all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Troubles with the python shell under windows
@ 2014-04-28  8:08 zaimzet
  2014-04-28  8:49 ` zaimzet
  0 siblings, 1 reply; 2+ messages in thread
From: zaimzet @ 2014-04-28  8:08 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Troubles with the python shell under windows
  2014-04-28  8:08 Troubles with the python shell under windows zaimzet
@ 2014-04-28  8:49 ` zaimzet
  0 siblings, 0 replies; 2+ messages in thread
From: zaimzet @ 2014-04-28  8:49 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-28  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28  8:08 Troubles with the python shell under windows zaimzet
2014-04-28  8:49 ` zaimzet

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.