Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
実行中にPython スクリプトからバッチ ファイルを呼び出すと 、コマンド プロンプトが開きます。 私の質問は、python スクリプトからバッチ ファイルが呼び出されたときにコマンド プロンプト ウィンドウを最大化する方法です。
私は絶対に肯定的ではありませんが、Python からそれが可能だとは思いません。これを回避するには、バッチ ファイルのショートカットを作成し、ショートカットを右クリックして、ショートカットのプロパティで最大化して実行するように設定し、Python からショートカットを起動して、例のようなリンク (lnk) として参照します。以下は Python 2.5 で使用されているとおりです。
import os; os.startfile('C:\\batchfile\\test.bat.lnk')