1

Python 親ファイルの例:

class myClass( wx.Frame ):
    def __init__(self):
        print "Prepare execute"
        self.MyThread = Thread.RunBackground( './child.py' , ( '--username' , 'root' ) );
        print "Executing... Do you like this app?"
        self.MyThread.start();
    def onClose( self , evt ):
        self.MyThread.close()
        self.exit();

app = MyClass()

Python を使用してバックグラウンドでスクリプトを実行する方法を知る必要があります。アイデアは、2 番目のプロセスが機能する場合でも、メイン ウィンドウを使用できるということです。

4

1 に答える 1