[IPython-user] IPython output under WindowsXP / Emacs / ipython.el
jietang
jietang86@gmail....
Fri Mar 7 23:40:13 CST 2008
in case anyone runs into a similar problem:
I got ipython to work from within emacs by commenting out the following
lines in genutils.py (98-100)
if sys.platform == 'win32' and readline.have_readline:
Term = IOTerm(cout=readline._outputfile,cerr=readline._outputfile)
if I read these correctly they redirect the output and error streams to the
Console() object wrapped by pyreadline rather than the standard output and
standard error stream
that emacs reads.
After this change, ipython.el under emacs displays all text properly, but
when run from the windows
console IPython displays garbled color codes in addition to the prompt
(obviously since readline took
care of the color output). This is fine since I do most of my work through
python-mode + emacs
Jie
On Mon, Mar 3, 2008 at 2:36 AM, jietang <jietang86@gmail.com> wrote:
> apologies if this gets sent out twice, I sent it from the
> wrong address the first time.
>
>
> Hi,
>
> I just started playing around with IPython a few days ago.
> It's been fun; I'm not sure how I managed with the
> vanilla python shell for so long.
>
> I've been trying to get IPython working under Gnu Emacs
> 22.1 on WindowsXP. I got python-mode and ipython.el
> loaded alright following the instructions on the IPython
> site, to the point where I can call M-x py-shell from a .py
> file and have a colored IPython prompt show up inside
> Emacs.
>
> However, I can't get any output to show up. When I type
> commands I never see an Out [#]: echoed to me.
> If I type something like sys? at the prompt, I won't get
> the sys help text but I will see helpful UI text i.e.
> ---return to continue, q to quit---
> ---return to continue, q to quit---
> ...
> each time I press enter.
>
> I can, however, make calls to print just fine: so if I run
> print Out[#]
> at the prompt I can examine the contents of the output
> cache after commands have been executed.
>
> So it seems like everything is working fine behind the
> scenes but somewhere the output is getting lost. So,
> I went and added a hook to the comint-output-filters-hook
> in Emacs to show all the output that emacs receives
> from any external process.
>
> When I check the log I see the In[] prompts being sent
> (with some color codes), but it looks like the Out[]
> prompts, the help text, and the IPython startup banner
> are not being received by Emacs.
>
> Has anyone run into similar issues? How is the output
> from commands sent to the terminal (and is it different
> from the way the "In [#]:" prompts get sent)?
>
>
> Thanks,
>
>
> Jie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ipython.scipy.org/pipermail/ipython-user/attachments/20080308/77ed4bbd/attachment.html
More information about the IPython-user
mailing list