How to change a file to python file

Answered

in Pycharm Professional, I created a file called "lab06" forgetting the .py extension. Pycharm made this a simple text file. I deleted this file and tried to create a new file called "lab06.py" but this is still treated as a simple text file and not recognized as a python file.

Anyone know why this is the case?

4 comments
Comment actions Permalink

Hello,

Please try to remove "lab06" from Text file type association in "Settings | Editor | File Types".

 

3
Comment actions Permalink

Yes, that worked... Thank you!

1
Comment actions Permalink

Had the same issue. Now it is solved. Thanks.

0
Comment actions Permalink

i had to remove my File under "Settings | Editor | File Types | Auto-detect file type by content

0

Please sign in to leave a comment.