开发者社区 问答 正文

python 脚本怎么运行

python 脚本怎么运行

展开
收起
云计算小粉 2018-05-10 20:10:00 1628 分享 版权
1 条回答
写回答
取消 提交回答
  • 阿里云ping https://ping.gaomeluo.com/aliyun/

    比如我的桌面上有一个testprint.py程序,内容就是print "123",方法如下:

    1、直接输入python文件的绝对路径

    C:Userscwx283889>C:Userscwx283889Desktoptestprint.py
    123
    C:Userscwx283889>

    2、Python C:Userscwx283889Desktoptestprint.py

    C:Userscwx283889>python C:Userscwx283889Desktoptestprint.py
    123
    C:Userscwx283889>
    建议楼主使用第二种方式运行,更易懂

    很多人说直接双击py程序,这种方法其实不可取的,楼主可以试试

    2019-07-17 22:20:05
    赞同 展开评论
问答分类:
问答地址: