help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Troubles with the python shell under windows


From: zaimzet
Subject: Re: Troubles with the python shell under windows
Date: Mon, 28 Apr 2014 01:49:31 -0700 (PDT)
User-agent: G2/1.0

On Monday, April 28, 2014 1:08:07 AM UTC-7, zai...@gmail.com wrote:
> For various reasons I'd like to develop python in Emacs under windows. Emacs 
> works pretty well in windows, but there are some hiccups with inferior 
> processes, like python.
> 
> 
> 
> When I enter a statement into the Python prompt that causes an error, the 
> error doesn't surface until after the next prompt is entered. I've invoked 
> the debugger and done a side-by-side comparison with Emacs under GNU/Linux 
> and the point of difference is during the call to process-send-string. In 
> GNU/Linux, this results in the error immediately appearing. In windoze 
> nothing shows up but another prompt.
> 
> 
> 
> It got worse though. I then tried to use TAB to complete at point and Emacs 
> completely freezes and I had to kill the process. I take this as a sign that 
> something is dreadfully wrong (other than that I'm using windows). I'm 
> guessing it sent its call to get the completions, and the response is AWOL.
> 
> 
> 
> I was wondering if anyone could help me get to the bottom of this issue.
> 
> 
> 
> Keep in mind that this is with native NTEmacs 24.3 and native Python 3. I 
> tested it with Cygwin Python 2, and it seems to cooperate, Cygwin Python 3 
> does not. All of my pythons are 64-bit. So it seems there may be an issue 
> with Python 3.

Aaaaand half an hour later I solve my own problem. I should be in bed right 
now...

Python is buffering its output when it should not be. For any future people 
grappling with this problem, try this:

1. Use M-x customize to set the Python Shell Interpreter Args to -i -u. The -u 
option forces Python to not buffer its output.
2. If you are wondering why completion still doesn't work, it's because you 
need an implementation of readline. Try installing this: 
https://pypi.python.org/pypi/pyreadline/2.0

Good luck.


reply via email to

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