[IPython-dev] [IPython-user] Problems with "_" syntax output cache (ipy_bzr, gettext).

Ville M. Vainio vivainio@gmail....
Mon Feb 9 12:41:31 CST 2009


Apparently, it's ipy_bzr that screws up _. This happens because
ipython does not want to clobber _ when using gettext, and the bzr
plugin(s) use gettext and reassing _.

You can work around this by doing

import __builtin__
del __builtin__.__dict__['_']

After ip.load('ipy_bzr')

Erik, can you try it for a while and report any problems? I'll add
that to ipy_bzr.py if you have good experience with it.

Relevant discussion below.


On Sun, Feb 8, 2009 at 11:58 PM, Erik Tollerud <etolleru@uci.edu> wrote:
> I do not in the profiles, but in ipy_user_conf.py
>
> This prompted me to look through all my settings in ipy_user_conf.py,
> though, and I discovered the offending line:
> ip.load('ipy_bzr')
>
> Apparently the bzr module is somehow screwing up the _ bindings ...
> this is less than ideal, as I would like both to be available...
> should I post it as a bug, or is this something related to my bzr
> setup or something otherwise unique to me?  I tried looking through
> the ipy_bzr.py file and saw nothing obvious but I'm by no means an
> ipapi expert.
>
> Another problem apparently related to switching from ipythonrc:  I no
> longer get tab completion for files - that is, it used to be that I
> could type "open('filename." and hit tab to see all the possible files
> that fit... now this doesn't seem to do anything.  Do you no what (if
> any) option will enable that behavior? It works fine with cd
> filename.<tab> , but it used to work whenever I had any filename
> inside a string...
>
> On Sun, Feb 8, 2009 at 12:32 AM, Ville M. Vainio <vivainio@gmail.com> wrote:
>> On Sun, Feb 8, 2009 at 3:39 AM, Erik Tollerud <etolleru@uci.edu> wrote:
>>> I'm still facing this problem... has no one else encountered it?
>>
>> Not yet.
>>
>> Do you have ipy_defaults imported in your profiles?
>>
>> --
>> Ville M. Vainio
>> http://tinyurl.com/vainio
>>
>
>
>
> --
> Erik Tollerud
> Graduate Student
> Center For Cosmology
> Department of Physics and Astronomy
> 2142 Frederick Reines Hall
> University of California, Irvine
> Office Phone: (949)824-2587
> Cell: (651)307-9409
> etolleru@uci.edu
>



-- 
Ville M. Vainio
http://tinyurl.com/vainio


More information about the IPython-dev mailing list