I created a text file, and renamed it into testTreeGen.py.
The problem is that PyCharm does not detect it as a python source so that I can't execute it.
How can I teach PyCharm that this is python script? I tried remove the file and recreated it, and created another python file and renamed it; all ends up being the file as text file not Python script.
The version is 3.0.2.
EDIT
Refactoring does not working.
The file property comes back to text (the original file property that I created before the first refactoring) even after I renamed it as python script.
The weird thing is that no matter where I create the testTreeGen.py
, PyCharm creates it as a text file as if it remembers the name of the file should be text file. I can create python script anything but the testTreeGen.py
.