[英]How can I execute python scripts from another directory
I am trying to follow a bad instructions website and because of that i'm getting troubles in executing scripts. 我试图遵循一个错误的说明网站,因此我在执行脚本时遇到了麻烦。
The website URL: http://www.tripleoxygen.net/wp/2014/01/sagemcom-modem-fst-2764-gv-power-box-gvt-desbloqueio/ 网站网址: http : //www.tripleoxygen.net/wp/2014/01/sagemcom-modem-fst-2764-gv-power-box-gvt-desbloqueio/
The following commands is the ones i'm getting trouble with: 以下命令是我遇到的问题:
./unlocker.py --mode=install
The steps i'm doing: 我正在做的步骤:
Open CMD
D:(my flash drive directory)
python
unlocker.py --mode=install
What I get: 我得到的是:
File "<stdin>", line 1
SyntaxError: can't assign to operator
but I don't think i'm executing the script, because there is no stdin in the file... So what I'm asking is: 但是我不执行脚本,因为文件中没有标准输入...所以我要问的是:
Are my steps wrong? 我的步骤错了吗?
How can I execute the script correctly from another directory? 如何从另一个目录正确执行脚本?
Thanks in advance. 提前致谢。
That website doesn't say to start python then enter unlocker.py
. 该网站没有说要启动python,然后输入unlocker.py
。 It says to type ./unlocker.py
from the command prompt, not the Python prompt. 它说从命令提示符而不是Python提示符键入./unlocker.py
。 You may need to do python unlocker.py
, but again, you're doing that from the command prompt. 您可能需要执行python unlocker.py
,但是同样,您需要在命令提示符下执行此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.