[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] NTEmacs + ipython: almost completely functional!!

From: Mike Krell
Subject: [h-e-w] NTEmacs + ipython: almost completely functional!!
Date: Sun, 24 Apr 2005 14:27:53 -0700 (PDT)

I did some more digging and have gotten past the two
major issues I had with IPython under NTEmacs:

1.  Extraneous ^A and ^B characters in prompt -- a
similar problem was reported with running bash under
emacs a while back.  See:

The result was that a bug report was submitted for
bash.     A workaround is to add a hook so that emacs
will filter out the garbage characters.  I adapted it
for comint mode (replaced 'shell-mode-hook with
'comint-mode-hook) and it works fine.

2.  No output from python --  I did some debugging in (part of the readline implementation).  It
turned out that all the console API calls being made
on the standard output handle were failing with an
error code of 6 (invalid handle) even though the
handle value itself looked valid.  The online docs for
WriteConsole say that it will fail if used on a
standard handle which has been redirected to a file,
and suggests using WriteFile instead.  Sure enough, I
changed the lines in write_color and write_plain to
call WriteFile, and I now get output and error
messages like I expect.  One limitation is that the
SetConsoleTextAttribute call is still failing.  This
means colorized output does not work, but at least
IPython is usable in this state.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]