问题
I have several django projects and several different files with name utils.py, however pycharm treats them as simple .txt files with no syntax highlighting or any other kind of parsing, how can I fix this?
回答1:
Please see File | Settings (Preferences on Mac) | Editor | File Types, select the Text files and remove utils.py from there. Most likely it was added by accident from the file right click context menu.
来源:https://stackoverflow.com/questions/13374533/pycharm-utils-py-not-getting-syntax-highlight