[IPython-dev] Dependency on pyreadline
jorgen.stenarson at kroywen.se
Wed Nov 20 03:25:40 EST 2013
Strictly speaking it is not imported into *every* python process. Only those that are interactive, for a script invoked by python script.py, pyreadline is not imported unless you import for instance pdb and use set_trace.
If you add disable_readline(True) to the pyreadline.ini file pyreadline should not integrate itself into the readline hooks of python and you would see the standard behaviour where ctrl-D will generate ^D at the prompt instead of exiting the process.
I have not seen the infinite exception loop you see when using pyreadline master (what version of pyreadline and python are you using?)
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
Fri Nov 15 2013 10:26:21 GMT+0100 (Västeuropa, normaltid), Paul Moore <p.f.moore at gmail.com> skrev:
> On 13 November 2013 08:14, Paul Moore <<p.f.moore at gmail.com>> wrote:
> > > Do you want to do a quick PR against the docs?
> > >
> > I'd be happy to, may take a couple of days to find some free time, but
> > I'll sort something out.
> I'm just looking at this now. One thing that struck me was that the
> reason I picked up on this is that when installed, pyreadline in
> injected into *every* Python process (because core python imports
> readline on startup). This changes behaviour in *every* Python process
> (for example, "standard" Windows command history is lost, and Ctrl-Z
> works differently). Also, there is a bug of some sort (involving the
> low level console handling) that causes an infinite exception chain if
> you import pip from the interactive prompt.
> Is it appropriate to mention these issues in the IPython docs? I don't
> want to add FUD, but I think people should have the information they
> need to make a decision. (Maybe add the point about changed behaviour,
> but omit the bug as it's rare, and might get fixed).
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev