How does Python (or MonkeyRunner) locate imported modules?MonkeyRunner在Windows命令行
我以前問有關錯誤的運行從Git的猛砸一monkeyrunner
腳本時,我得到。我仍然沒有解決這個問題,並決定嘗試從Windows 7命令行運行它。我cd
到該目錄包含我.py
文件並運行
> monkeyrunner screenshots.py
無法打開指定的腳本文件
用法:monkeyrunner [選項] SCRIPT_FILE
-s MonkeyServer IP Address.
-p MonkeyServer TCP Port.
-v MonkeyServer Logging level (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF)
screenshots.py
確實在當前目錄中。爲什麼monkeyrunner不能找到它?我需要做些什麼來解決這個問題才能在Windows 7上運行?
你有沒有得到答案?我有同樣的問題。 –
@AndiJay Monkey Runner解析python搜索路徑似乎是一個錯誤(請參閱鏈接問題中的「更新」)。不過,我還沒有在Windows上找到這個問題的解決方案。我現在主要使用Linux,它沒有這個問題。 –
[Python(或MonkeyRunner)如何找到導入的模塊?](http://stackoverflow.com/questions/18115318/how-does-python-or-monkeyrunner-locate-imported-modules) –