469,623 Members | 1,535 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

emacs shell hangs on W32 with python

Emacs seems to freeze when doing certain shell commands on Microsoft
Windows. The following is a simple example with Xemacs:

----------------------------------------------------------

[Xemacs version 21.4.19; January 2006]

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

h:\>c:\python25\python.exe -i
c:\python25\python.exe -i
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>import Tkinter
t = Tkinter.Tk()
2
2
2

-------------------------------------------
At this point, python no longer accepts input. This example works fine
when starting python through dos instead of emacs. Note, I am not using
python-mode.el so that is not the problem. I also reproduced the
problem with GNU Emacs (version "GNU Emacs 21.3.1
(i386-mingw-nt5.1.2600)
of 2004-03-10 on NYAUMO")
Is there any way to run python through emacs or xemacs without having
it hang or is shell support broken?

Thanks in advance,
-Emin

Nov 2 '06 #1
4 3004
em**********@gmail.com writes:
Is there any way to run python through emacs or xemacs without having
it hang or is shell support broken?
Doing it from eshell gives the same problem :-(
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
Rugbyklubben Speed Scandinavian Open 7s Rugby http://www.rkspeed.dk
Nov 3 '06 #2
Hmm, it doesn't even work if I run the cygwin version of GNU Emacs and
have it start the Windows version of python through python-mode or if I
start a shell in emacs and then start the Windows version of python
through the shell. Interestingly, however, things DO seem to work if I
use cygwin emacs with cygwin python (version 2.4.1).

I wonder if the windows version of Tkinter does something weird such as
implicitly calling Tk.mainloop()...

Any help would be much appreciated.

Brian Elmegaard wrote:
em**********@gmail.com writes:
Is there any way to run python through emacs or xemacs without having
it hang or is shell support broken?

Doing it from eshell gives the same problem :-(
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
Rugbyklubben Speed Scandinavian Open 7s Rugby http://www.rkspeed.dk
Nov 3 '06 #3
The same problems occur with the latest emacs binary from CVS
(emacs-version)

"GNU Emacs 23.0.0.1 (i386-mingw-nt5.1.2600) of 2006-10-16 on DTOP"

Lennart Borgman wrote:
Would it not be a good idea to try the CVS version of Emacs for this now
since the pretest will soon begin? Go here for precompiled versions:

http://www.emacswiki.org/cgi-bin/wik...goryWThirtyTwo


em**********@gmail.com wrote:
Hmm, it doesn't even work if I run the cygwin version of GNU Emacs and
have it start the Windows version of python through python-mode or if I
start a shell in emacs and then start the Windows version of python
through the shell. Interestingly, however, things DO seem to work if I
use cygwin emacs with cygwin python (version 2.4.1).

I wonder if the windows version of Tkinter does something weird such as
implicitly calling Tk.mainloop()...

Any help would be much appreciated.

Brian Elmegaard wrote:
em**********@gmail.com writes:
Is there any way to run python through emacs or xemacs without having
it hang or is shell support broken?

Doing it from eshell gives the same problem :-(
--
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
Rugbyklubben Speed Scandinavian Open 7s Rugby http://www.rkspeed.dk
Nov 3 '06 #4
Lennart Borgman wrote:
Could you then please post a bug report? Just choose "Help - Send bug
report" from the menus.
I sent a bug-report to the emacs list as requested and got an email
reply saying the message is being held for a moderator to look at.
Since the bug seems to be in the interaction of emacs with python, I'm
also cross-posting this to comp.lang.python in case anyone there can
help. (Note this bug shows up in all the versions of emacs that I have
tried including Xemacs and GNU Emacs 21).

The body of the bug-report is below:

I started emacs with -q did ESC-x shell and entered the following

----------------------------------------------------------------------

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

h:\projects\arcp_db\trunk\src\gui>c:\python25\pyth on.exe -i
c:\python25\python.exe -i
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>import Tkinter
t = Tkinter.Tk()
2
----------------------------------------------------------------------

Note that after the call to Tkinter.Tk() my python window freezes and
no longer works. Killing the Tk window does not help. I realize that
this may seem like a bug in python and not emacs except that if I do
exactly the same thing through a dos shell I have no problems (i.e.,
python keeps accepting input). Consequently, it seems like emacs is
doing something funky when running the shell that interferes with
python in a way that running the shell without emacs would not do.
Sincerely,
-Emin Martinian
In GNU Emacs 23.0.0.1 (i386-mingw-nt5.1.2600)
of 2006-10-16 on DTOP
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.1) --cflags -O2 -g0
-march=i386 -mtune=i686 -pipe -IC:/gnuwin32/include_emacs
-IC:/gnuwin32/lib -IC:/gnuwin32/src --ldflags -s '

Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
locale-coding-system: cp1252
default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
encoded-kbd-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-compression-mode: t
line-number-mode: t

Recent input:
<help-echo<help-echo<help-echo<help-echo<help-echo>
<help-echo<help-echo<help-echo<help-echo<help-echo>
<help-echo<help-echo<help-echo<menu-bar<help-menu>
<report-emacs-bug>

Recent messages:
(c:\Program Files\emacs-23\ntemacs23\bin\emacs.exe -q)
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p. [2
times]
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done

Nov 3 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Tom Locke | last post: by
reply views Thread by Pedro Werneck | last post: by
5 posts views Thread by Darren Dale | last post: by
1 post views Thread by Yaroslav Bulatov | last post: by
3 posts views Thread by Marcio Rosa da Silva | last post: by
1 post views Thread by lorinh | last post: by
3 posts views Thread by Hadron | last post: by
14 posts views Thread by jmDesktop | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.