These are chat archives for ipython/ipython

24th
Feb 2017
Leonid Lytvynenko
@llytvynenko
Feb 24 2017 15:55
@minrk are there any way to configure the kernel without being locked to profile?
Min RK
@minrk
Feb 24 2017 15:55
That's what the default profile is for
IPython always uses a profile. Most of the time, that's the default profile.
Leonid Lytvynenko
@llytvynenko
Feb 24 2017 15:57
that's okay, the question is if I can generate profile and pass it dynamically via some script?
Min RK
@minrk
Feb 24 2017 15:57
You can generate profiles
ipython profile create [name] is one way
(that creates an empty profile, populating it with a few default files to edit)
What's your ultimate goal (there may be an easier way)?
Leonid Lytvynenko
@llytvynenko
Feb 24 2017 16:03
one of the goals is to have tree structure of the notebooks,
and have data folders shared between them, and put data relatively to root, not to the notebook
the problem is that notebooks have no idea where the root is
Min RK
@minrk
Feb 24 2017 16:05
Do you want to create a setting for all users on the system, or separately for each user?
(or just you)
Leonid Lytvynenko
@llytvynenko
Feb 24 2017 16:07
I want to have different settings for different projects, don't want to be tied to users in any way (it's ok to be tied automatically, I guess), and I want to be able to share this settings via some script in github
Min RK
@minrk
Feb 24 2017 16:08
ipython profile create [name] could create profiles, and you can put files in there to configure them.
If it were global configuration, I was going to mention /etc/ipython, but if it should be different for different projects, that's not appropriate.
if exec_lines is what you are after, startup files might be preferable. Any .py (or .ipy) script places in [profile]/startup/ will be executed on startup.
So if you have a .py file you'd like to execute when you launch with a given profile, you could:
mkdir -p $HOME/.ipython/profile_name/startup
cp my-script.py $HOME/.ipython/profile_name/startup/
Leonid Lytvynenko
@llytvynenko
Feb 24 2017 16:24
ok, thanks!