Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting iPython default profile

Tags:

ipython

Right after installing IPython, I created a default profile with:

$ ipython profile create

Then, I created another one, this time I gave it the name testing:

$ ipython profile create testing

I have customized this testing profile (the prompt, and autoreload extension, etc) to my liking, and now I would like it to be my default profile, so it's started when I type:

$ ipython

I know that I can start it with:

$ ipython --profile=testing

But that is a lot of typing.

I have already tried editing the file ipython_config.py in the profile_default folder, line 89:

# The IPython profile to use.
c.TerminalIPythonApp.profile = 'testing'

But it's not working. Any ideas why? Is it broken?

EDIT: Since I have to use different profiles for periods of time of weeks or fortnights, I'm looking for a way of selecting a default profile for those periods of time. It would be awesome achieving that from IPython itself, in the meantime, a very convenient workaround is adding an alias in the bash configuration(as pointed out by cel in one of the comments):

alias ipython='ipython --profile=testing'
like image 867
Bobby Wan-Kenobi Avatar asked Dec 15 '25 13:12

Bobby Wan-Kenobi


1 Answers

Take a backup of profile_default and then rename profile_testing to profile_default.

Or you can copy the contents of profile_testing to profile_default.

like image 71
Amit Verma Avatar answered Dec 19 '25 07:12

Amit Verma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!