Reputation: 2346
I am trying to do what the user from this question is doing. I have it working for the separate IPython console but not the one integrated into PyCharm.
To sum up, I want IPython to import some modules when I start it. I have gone to the C:\Users\Name\.ipython\profile_default\startup
directory and I have made a startup.py
file which contains
from numpy import *
print 'NumPy imported succesfully!'
After setting PYTHONSTARTUP
to point to the file, the IPython console outside of PyCharm works as intended, but the one in PyCharm does not.
Upvotes: 6
Views: 1360
Reputation: 176
You can go to File -> Settings -> Build, Execution, Deployment -> Console -> Python Console. There you have a field named "Starting script" which is executed when you launch the console.
I had to restart PyCharm for the changes to actually take place, but it worked.
Note : I use PyCharm 4.5.3 Community Edition.
Upvotes: 6