在windows中使用cmd创建一个python文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31456070/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Create a python file using cmd in windows
提问by G Surendar Thina
I tried the following code to create a python file of the name "test.py"
我尝试了以下代码来创建一个名为“test.py”的 python 文件
edit test.py
This command is not recognised as an internal command. Please suggest me an alternative code for creating a new python file using command line in windows. I have my python already installed in my computer and I have set the path variable too also.
此命令不被识别为内部命令。请建议我使用 Windows 中的命令行创建新的 python 文件的替代代码。我已经在我的电脑上安装了我的 python,我也设置了路径变量。
Thanks.
谢谢。
采纳答案by Victor Yan
TYPE CON>test.py
To terminate, hit Ctrl+C or Ctrl+Z,Enter (Ctrl+Z = EOF).
要终止,请按 Ctrl+C 或 Ctrl+Z,Enter (Ctrl+Z = EOF)。