0

How to make a .py file?

10th Aug 2016, 11:50 AM
Rocky Black
Rocky Black - avatar
4 Réponses
+ 4
Go to a text editor like NotePad in Windows. Write your code, then go to the File menu > Save as... Then in the "File name" field, give it a name like "black" then put a dot in front of it, then add the "py" extension. So your file name will be like : "black.py" DO NOT FORGET to change the field "Save as type" to "All files" It's better to change the Encoding field to "UTF-8" Then click save.
10th Aug 2016, 12:02 PM
Alireza M
Alireza M - avatar
+ 2
go to IDLE(GUI). after this go to file and click new window. then script mode opens. write the required program and run it. It will ask where to save the program. just select the required place and save it. for eg required name.py and then click OK. It will be saved
10th Aug 2016, 12:21 PM
sudharsan balaji
sudharsan balaji - avatar
0
thanks
10th Aug 2016, 12:05 PM
Rocky Black
Rocky Black - avatar
0
actually simply renaming works. remember to set the extension name to be visible
12th Aug 2016, 4:54 AM
Sihe Chen
Sihe Chen - avatar