我想從Sikuli腳本里面的Python庫中使用調用函數。Sikuli和Python subprocess.call函數
from subprocess import call
call(['notepad.exe'])
popup("call has ended")
#do something else in the notepad here
問題是消息「調用已結束」直到我關閉記事本纔會出現。我認爲這與在執行結束時發送的錯誤代碼call
有關。
謝謝。
我想從Sikuli腳本里面的Python庫中使用調用函數。Sikuli和Python subprocess.call函數
from subprocess import call
call(['notepad.exe'])
popup("call has ended")
#do something else in the notepad here
問題是消息「調用已結束」直到我關閉記事本纔會出現。我認爲這與在執行結束時發送的錯誤代碼call
有關。
謝謝。
如果您只想啓動並立即繼續,則應該使用Popen()
而不是call()
。
如果它們仍然存在,您應該註冊子流程對象和poll()
,如果不存在,那麼wait()
。
只是爲了讓你知道Sikuli實際上是Jython而不是Python –