自分は最近PowerPointを操作するアプリを作った際に、 PowerPointの操作はC#プログラムで、 PowerPoint操作以外の部分はPythonで という感じでアプリを作った際にsubprocessを使いました。 Pythonでsubprocessを使って、C#で作ったプログラム.exeに対してコマンドライン引数 ...
encoding='utf-8', stdout=subprocess.PIPEは返り値を得るための設定。 で、返り値は、actapp.stdoutとなります。 不思議と、返り値の文末には、改行マークが入ります。 \nです。 でアプリ名称はMacOSでの命名法に従い、'Safari'とか'Kindle'になりのす。
Displays subprocess stdout and stderr in real time as the process runs — not buffered until exit. Uses a PTY (pseudo-terminal) on POSIX so the child process keeps line-buffering active, just as it ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する