こんにちは私はcmdのyoutube dlの出力を読んでwxpythonプログラムに入れたいと思います。これは私が使った機能です。youtube-dlのetaのようなパラメータを読む
def execute(self,command,textctrl):
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output = ''
# Poll process for new output until finished
for line in iter(process.stdout.readline, ""):
textctrl.AppendText(line)
output += line
process.wait()
exitCode = process.returncode
if (exitCode == 0):
return output
else:
raise Exception(command, exitCode, output)
wxPythonのプログラムはtextctrlの更新を開始し、その後、凍結しました。
[youtube-dl API](https://github.com/rg3/youtube-dl/blob/master/README.md#embedding-youtube-dl)を使用していないのはなぜですか? – phihag