[IPython-user] Moving to Python-based configuration files
Ville M. Vainio
Fri Aug 24 12:40:24 CDT 2007
On 8/24/07, Konrad Hinsen <email@example.com> wrote:
> I am in the process of migrating from ipythonrc to ipy_user_conf.py
> for configuring IPython (0.8.1) on the various computers, mostly to
> gain flexibility. However, I ran into a problem: as soon as I uncomment
> import ipy_defaults
> to disable ipythonrc, ipython ignores the "colors" option given on
> the command line. I can still change the color scheme inside
> ipy_user_conf.py, and I can still use the magic command %colors
> inside ipython.
> Is this a bug? Is there any workaround?
It's a result of command line args being handled before the now style
config files, and therefore the config files override the behaviour of
command line args.
It's sort of a bug. Rather than fixing it (it's behing DPyGetOpt,
which sucks), I'd rather implement a more flexible workaround.
- The 'backwards compatible' way is not to use ipy_defaults.
- You could create your own profile, say 'ipy_profile_shnocolor',
where you would do
ip = ...
- I'll probably implement something more flexible soon, say
ipython -x "%colors NoColor"
where after x you have statements.
- These will be executed inside ipython after configuration (profiles etc.)
- This will leave ipython prompt open (as opposed to just running .ipy
files, which exits at the end).
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-user