我的代碼現在剛剛超過400行,我寧願不給予這個答案,而是對可能出錯的一些建議。在我的程序中,我開始一個子過程:python:無法打開文件'python DACscrap.py&':[Errno 2]沒有這樣的文件或目錄...但它呢?
#out_select is a variable that defaults to the AD9850 control program
#and is switched to the sinetable program with the valve_select command.
subprocess.call(out_select, shell=True)
#The following lines are used to find the PID of the program used for output
#and save it for the stop command to kill that PID.
sp = subprocess.Popen(['python',out_select])
end_sine = int(sp.pid)-1
print end_sine
#end = str(end_sine)
這是用tkinter按鈕命令啓動的。該程序確實在後臺開始,但我。我收到我的LXTerminal以下錯誤消息時我啓動命令(通過點擊按鈕):爲驗證與
python: can't open file 'sudo python AD9850_GUI.py &': [Errno 2] No such file or directory
兩個程序都運行良好:
python: can't open file 'python DACscrap.py &': [Errno 2] No such file or directory
或者根據命令out_select示波器,我可以返回到程序並使用其他按鈕小部件。掛斷是程序中有一個圖形,我不能通過USB端口從arduino發送值。這不是arduino,因爲圖表會繪製一個零值。有關問題可能出在哪裏的任何建議?如果這裏沒有幾行,那麼我可以在其他地方做點什麼嗎?