看板 Python 關於我們 聯絡資訊
我原本有支程式其中有下面兩行 runAlign=Popen("runpsipred_single "+fileallname, shell=True) runAlign.wait() runpsipred_single是一個script小程式 在freebsd下執行的 原本這樣寫是可以跑的 (會產生一個輸出檔) 但當我把程式改成從網頁執行時(用cgiwrap)就不能跑了 沒產生輸出檔 但這兩行不會有錯誤通知 不知用cgi時 Popen是不是需要改變成什麼樣子?? ==================================================================== 我在想會不會是shell的關系 所以把shell拿掉 不過被擋住了 以下是錯誤訊息 Traceback (most recent call last): File "test1.py", line 12, in <module> runAlign=Popen("runpsipred_single spg", stdout=open("stdout.txt","w")) File "/usr/local/lib/python2.5/subprocess.py", line 594, in __init__ errread, errwrite) File "/usr/local/lib/python2.5/subprocess.py", line 1097, in _execute_child raise child_exception OSError: [Errno 13] Permission denied 因為主機不是我管的 不知這樣要請網管開啟什麼權限呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.140.149 ※ 編輯: Arton0306 來自: 220.135.140.149 (10/16 01:01) ※ 編輯: Arton0306 來自: 220.135.140.149 (10/16 01:19)
dingyuchi:suid 4755 10/17 20:29