[IPython-User] prompt and config file questions
Richard D. Moores
Mon Sep 27 04:34:09 CDT 2010
On Mon, Sep 27, 2010 at 01:05, Richard D. Moores <email@example.com> wrote:
> 64-bit Vista
> Python 2.6
> IPython 0.10
> QUESTION 2.
> I'd like IPython to start with mpmath already imported. In
> ipy_user_conf.py I tried putting the 3 lines
> from mpmath import *
> inside main() , and then above def main() , but they are ignored.
> What's the correct way to do this?
> Of course, entering the line
> from mpmath import *;mp.dps=50;mp.pretty=True
> at the IPython prompt works.
Good old trial and error. I've been doing a lot of that, and tried
putting these 3 lines in main() in ipy_user_conf.py:
o.autoexec.append('from mpmath import *')
They work, as can be seen:
So I think that takes care of Q2.
More information about the IPython-User