[英]Is there a way that command prompt could run a python file from Visual Code Studio?
I was wondering if there is a way the command prompt could run a python file when I click the run button on visual code studio.我想知道当我单击可视代码工作室上的运行按钮时,命令提示符是否可以运行 python 文件。 Is that possible?
那可能吗? Thanks in advance.
提前致谢。
Yes, that is possible (in fact, a lot of developers and learners do this) and it can be done by following these steps:-是的,这是可能的(事实上,很多开发人员和学习者都这样做),可以通过以下步骤来完成:-
All you do is enter this into command prompt: PATH OF FILE
.您所做的就是将其输入命令提示符:
PATH OF FILE
。 For example, if my file was hello.py
in Documents, then I would type in C:/Documents/hello.py
例如,如果我的文件是 Documents 中的
hello.py
,那么我将输入C:/Documents/hello.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.