Sublime Forum

Sublime text editor will not save as python script file

#1

This question seems remedial and simply bizarre on its surface.

Any file that I click save as python file is NEVER saved as a python script file. Only if I type .py as the file name extension. Its a simple task but frustrating when you have to do it every time.

1 Like

#2

I’m not sure what you’re expecting to happen. What does it mean to you to save a file “as a python script file”?

0 Likes

#3

please clarify the exact steps you are taking, and which OS you are running. Maybe the details here will help explain what is happening:

0 Likes

#4

I am facing the same problem. Whenever I open file menu in sublime and choose save option and then save that file as .py file it doesn’t save(means When I later open file location it is not saved as .py file but only as a file without extension and thus I can not get color highlighting too bcz it was noty saved as python file.Here is the screenshot. I saved it as hello.py but now it is not saved as .py file.

0 Likes

#5

I’ve found that really frustrating too.
There’s no point to the drop down list of file types if selecting one doesn’t turn the saved file into the selected one.

0 Likes

#6

I found that this happened to me when I accidentally set Sublime Text editor as the permanent application to open the .py file type.

The fix:
right click the file and use open with to open a .py file with python - this resets it to be an executable file

0 Likes