Is there anyway to change the default value of Starting script on Python Console option?
Hi,
I'm trying to find a way to change the value of File | Settings | Build, Execution, Deployment | Console | Python Console | Starting script.
It is always like this:
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
It is really annoying that I need to change this whenever I start a new project.
I think there should be somewhere that keeps the default script for this, but I couldn't find that. Is there any to change this?
Thanks.
请先登录再写评论。
You can change the default setting for newly created projects in File | New Project Setup | Settings for new projects. In this particular case, you can further navigate to Build, Execution, Deployment | Console | Python console and set up the required parameters here.
Once you set everything up and apply changes, all new projects will inherit these settings.
I have the same problem as the OP but Daniil's solution doesn't work for me: the bloody starting script always reverts to the default when Pycharm is closed and reopened. Yes, that includes the “Settings for new projects”: if I edit the script there, then restart Pycharm and reopen that window, I see the default script and not the script I had.
This has been going on for several versions now.
Hello, @anonymous,
I did not reproduce the issue on my side. For further investigation, please create YouTrack ticket and share a log archive ( Help | Collect Logs and Diagnostic Data) and steps to reproduce.