.py文件未打开,但通过记事本运行正常++

2024-05-12 09:00:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我是python新手,现在已经熟悉了命令提示符。我试着打开计数.py文件位于根结构(/python)的文件夹(/asmt-01)中。我通过notepad++测试了python,它运行得很好。但是,我不能单独通过命令提示符运行这个脚本。我有以下脚本。我做错什么了?另外,有什么资源可以帮助我理解python用户的命令提示符吗?谢谢你的建议和帮助,谢谢。在

C:\Users\Maria\Desktop\python>dir


 Directory of C:\Users\Maria\Desktop\python

09/09/2013  12:23 AM    <DIR>          .
09/09/2013  12:23 AM    <DIR>          ..
09/08/2013  09:42 PM    <DIR>          asmt-01
09/08/2013  08:35 PM                19 firstprog.py
               1 File(s)             19 bytes
               3 Dir(s)  605,589,807,104 bytes free

C:\Users\Maria\Desktop\python>dir asmt-01

 Directory of C:\Users\Maria\Desktop\python\asmt-01

09/08/2013  09:42 PM    <DIR>          .
09/08/2013  09:42 PM    <DIR>          ..
09/08/2013  09:57 PM                37 counting.py
               1 File(s)             37 bytes
               2 Dir(s)  605,589,577,728 bytes free

C:\Users\Maria\Desktop\python>python counting.py
python: can't open file 'counting.py': [Errno 2] No such file or directory

C:\Users\Maria\Desktop\python>

Tags: ofpy脚本bytesdiramusersdirectory