如何在cmd(win10)中执行python代码 [已关闭]

How can I execute python code in cmd(win10) [closed]

提问人:gundamepyon 提问时间:11/16/2023 最后编辑:Barmargundamepyon 更新时间:11/16/2023 访问量:39

问:


想改进这个问题吗?通过编辑这篇文章添加详细信息并澄清问题。

4天前关闭。

我想通过cmd(win10)执行python代码

file name : hello.py
directory : C:/test/hello.py

hello.py

def hello(arg)
  return 'Hi' +arg

我不了解python。但我必须在cmd上执行。 请帮帮我。

只能使用 cmd。

我需要cmd命令行

蟒蛇 cmd windows-10

评论

2赞 Barmar 11/16/2023
这不是辅导服务。如果你不了解python,你需要学习如何在其他地方使用它。
0赞 Tim Roberts 11/16/2023
你试过什么吗?python c:\test\hello.py
0赞 Compo 11/16/2023
请不要使用懒惰的语法开始学习语言,请使用代替上述语法。"F:\ull\PathTo\python.exe" "C:\test\hello.py"

答: 暂无答案