0
我試圖從開始一個python的過程phantomjs但由於某種原因它沒有找到我的腳本文件:Phantomjs在Windows中沒有找到腳本7
PHANTOM = 'C:\\Users\\ahald1\\phantomjs'
SCRIPT = 'C:\\Users\\ahald1\\hello.js'
params = [PHANTOM, SCRIPT]
exitcode = subprocess.call(params)
其中hello.js包含:
console.log('Hello, world!');
phantom.exit();
This returns Can't open 'C:\Users\ahald1\hello.js'
試圖從cmd執行此操作會返回相同的錯誤,但phantomjs --version
確實會返回值。我在Windows 7上運行python 2.7.3。
對不起,對於新手問題,非常感謝!
雅絕對搞砸了文件名。非常感謝您的幫助,如果我可以讓你高興,我會的! – user1460878