python 安装后测试的问题
时间:2011-12-17
来源:互联网
我在win7 sp1 旗舰版按照默认安装路径安装了Python(x,y)-2.7.2.1
安装好后进行测试的时候,出现了的问题。cmd命令中打印“hello world”,显示成功。
C:\>python
>>> print 'hello world'
成功运行显示 hello world
第二次,在cmd中运行test.py 出现了问题。
cmd中的命令:
C:\>python D:\TestCode\pythontest test.py
其中 D:\TestCode\pythontest 是存放 test.py 的目录
然后输出显示:
C:\Python27\python.exe: cann't find '__main__' module in 'D:\\TestCode\\pythontest'
第三次,在SciTe中运行 test.py证明没有问题。
test.py 中的内容就是
Python code
我的疑问就是为何我的程序在 cmd中无法运行 python *.py?
安装好后进行测试的时候,出现了的问题。cmd命令中打印“hello world”,显示成功。
C:\>python
>>> print 'hello world'
成功运行显示 hello world
第二次,在cmd中运行test.py 出现了问题。
cmd中的命令:
C:\>python D:\TestCode\pythontest test.py
其中 D:\TestCode\pythontest 是存放 test.py 的目录
然后输出显示:
C:\Python27\python.exe: cann't find '__main__' module in 'D:\\TestCode\\pythontest'
第三次,在SciTe中运行 test.py证明没有问题。
test.py 中的内容就是
Python code
print "hello world"
我的疑问就是为何我的程序在 cmd中无法运行 python *.py?
作者: sxlr08 发布时间: 2011-12-17
你的命令行乱七八糟,认真打认真看...
作者: angel_su 发布时间: 2011-12-17
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28