wanghb

Results 1 comments of wanghb

python3.10没这问题,但3.12问题就出现了,我是改了个用法来规避这个问题: import subprocess _name = '测试' command = ['pypinyin', '-s', 'FIRST_LETTER', _name] result = subprocess.run(command, stdout=subprocess.PIPE, text=True) _pinyin_list = result.stdout.strip().split() print(_pinyin_list)