问题很菜,都不好意思上来问。
在学《简明 Python 教程 》。下载了python2 最新版,装完后,用Python GUI写了入门程序helloworld.py。在window的 command prompt输入 helloworld.py下运行正常,可是在Python(command line)输入helloworld.py不能运行,总出来错误
Traceback (most recent call last):
File "", line 1, in
NameError: name 'helloworld' is not defined
是怎么回事?
python没装好吗?可是在Python(command line)里输入print'hello',可以正确显示啊。难道Python(command line)下本身就不能运行python 文件,只可以一行一行运行?