Create a python file using cmd in windows

Issue

I tried the following code to create a python file of the name “test.py”

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.

Thanks.

Solution

TYPE CON>test.py

To terminate, hit Ctrl+C or Ctrl+Z,Enter (Ctrl+Z = EOF).

Answered By – Victor Yan

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published