下一步是什么?
当我输入“python”时,它显示:
ActivePython 2.6.5.14 (ActiveState Software Inc.)
based on Python 2.6.5 (r265:79063, Jul 4 2010, 21:05:58)
[MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
这是我在命令行中得到的:
>>> python create-application.py
File "<stdin>", line 1
python create-application.py
^ SyntaxError: invalid syntax
What should I do to work in Qooxdoo。
When I type "python" it displays:
ActivePython 2.6.5.14 (ActiveState Software Inc.)
based on Python 2.6.5 (r265:79063, Jul 4 2010, 21:05:58)
[MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
This is what I get at the command line:
>>> python create-application.py
File "<stdin>", line 1
python create-application.py
^ SyntaxError: invalid syntax
What should I do to work in Qooxdoo.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然,您对 Python REPL 和 命令行。您应该从命令行(Windows 中的“cmd”)调用 python create-application.py,而不是从 REPL(这是您输入 python 时得到的结果)在命令行上)。
我建议在进一步冒险之前先阅读基础知识。祝你好运。
Apparently you are confusing between the Python REPL and the command line. You should be calling
python create-application.py
from the command line ("cmd" in Windows) and not from the REPL (which is what you get when you typepython
on the command line).I suggest reading up on the basics before venturing further. Good Luck.
您需要从命令行运行命令
python create-application.py
,而不是从解释器内运行。您已经启动了 Python 解释器,可以通过在命令行中输入
python
来启动。 (你可以看出来,因为>>>
提示符是 Python 标准。)这是一个接受 Python 代码的程序——但是python create -application.py
不是Python代码,它是一个系统命令。您可以从命令行运行它们。我假设您不打算使用 Python 进行编程(只是为了运行此脚本),但如果您打算这样做,我建议您 Dive进入 Python 获取教程。
You need to run the command
python create-application.py
from the command line, not from within the interpreter.You have already started the Python interpreter, probably by typing
python
at the command line. (You can tell, because the>>>
prompt is a Python standard.) This is a program that accepts Python code -- butpython create-application.py
isn't Python code, it's a system command. You run those from the command line.I assume you're not planning to use Python to program (just to run this script) but if you are, I recommend Dive Into Python for a tutorial.