0

I want to be able to start an ipython session with it importing some modules. On Windows this would be simple - I had a global installation of ipython and I used .pythonrc I think it was.

However, in Ubuntu 13 I have ipython installed in a virtualenv (but not installed globally).

In my .bashrc is:

alias ipy="python -c 'import IPython; IPython.terminal.ipapp.launch_new_instance()'"

I am wondering if it's possible to run similar startup commands in ipython. Or if that's not possible with my current setup - then what is the best way to achieve what I want in Ubuntu.

1 Answer 1

2

Hopefully some combination of PYTHONSTARTUP or IPYTHONDIR environment variables in your .bashrc can accomplish what you want.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I got it to work using IPYTHONDIR="~" and creating an ipython profile at ~/home/nebffa/profile_default/ipython_config.py

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.