0
A
回答
0
这是你规定什么:python
本身运行Python提示符。要运行python脚本,请使用例如
& "path-to-script\scriptname.py"
或
python "path-to-script\scriptname.py"
可以省略双引号,如果没有path-to-script
也不scriptname.py
包含空格或其他cmd
或powershell
有毒字符(S)。
要运行powershell
脚本,使用
.\scriptname.ps1
编辑:如果你的脚本被命名为python
(它不过可能不是一个好的做法),并放置在当前工作目录,那么你可以使用:
- 运行python脚本:
.\python.py
- 运行powershell脚本:
.\python.ps1
相关问题
- 1. 在powershell脚本中运行python脚本
- 2. 在Python脚本中运行PowerShell cmdlet
- 3. 如何让Python脚本在执行后运行powershell脚本
- 4. Python脚本未运行
- 5. Apache2未运行python脚本
- 6. 在asp.net网站上运行powershell脚本
- 7. 运行PowerShell脚本
- 8. 运行PowerShell脚本
- 9. 在Python运行PowerShell脚本,而不在每次运行
- 10. 从python代码运行PowerShell脚本
- 11. 在python脚本中运行powershell脚本,如何让python在运行时打印powershell输出
- 12. powershell并行运行脚本
- 13. 在未安装python的计算机上运行python脚本
- 14. Powershell脚本在复制到Powershell时运行,但未点击时运行
- 15. 运行批处理脚本,PowerShell脚本
- 16. .NET API运行PowerShell脚本
- 17. 运行R.脚本Powershell的
- 18. PowerShell运行多个脚本
- 19. 从ASP.NET运行PowerShell脚本
- 20. 运行PowerShell脚本.PS1
- 21. UIAutomation脚本未在设备上运行
- 22. 脚本未在window.resize上运行
- 23. 从另一个python脚本在Windows上运行Python脚本7
- 24. 运行powershell没有'运行脚本'
- 25. 在Linux上批量运行python脚本?
- 26. 在服务器上运行Python脚本?
- 27. 在Mac/Windows上运行Python脚本
- 28. 在Mac终端上运行Python脚本
- 29. 在木偶上运行python脚本
- 30. 在arduino上运行python脚本
请编辑您的问题并显示“ex1.py”的内容。从你的屏幕截图看,它看起来像脚本运行(如果在PATH中找不到Python解释器,你会得到一个错误),但不会产生输出。 –