Reputation: 28399
I am using PyCharm Community Edition 2017.1.2. I find that after renaming a file, if I run the current file. Pycharm still shows the original name.
The original file name is temp.py, and later I change its name to read_class_scores.py. When I want to run it by right click of the mouse, pycharm still shows the name temp, not the new name.
I tried to delete the .idea folder under my project and restart Pycharm. But that has no effect. Do you know how to fix this?
Upvotes: 3
Views: 2537
Reputation: 28399
After reporting this issue to JetBrains, I get their feedback that this is not bug but rather a feature.
Two methods can be used to remedy this inconsistency after renaming a .py
file under the current project. You can delete the configuration of current file after renaming.
Another workaround is that you can first delete all configuration files and set 'Temporary configuration limit' to 0 in the "Run/Debug Configurations" window.
Upvotes: 4
Reputation: 123
This is because the PyCharm would use the run file name as the default run configuration name if you didn't name it manually, you could either rename it as Rauch said, or just use the same configuration file to run it.
As far as I've experienced, it wouldn't have any impact on your project.
Upvotes: 0
Reputation: 49814
What you seeing is likely the Run Configuration not the filename. You will need to edit the configuration:
Check it out (here)
Upvotes: 4