Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change start up preferences for IPython console in PyCharm?

Tags:

python

ipython

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.

like image 361
turnip Avatar asked Aug 12 '15 17:08

turnip


1 Answers

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.

like image 140
Kolaru Avatar answered Nov 14 '22 23:11

Kolaru