473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

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 3161
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom Locke | last post by:
Hi All, I'm having trouble with the python shell within emacs. It's hanging when I use tkinter. Setup is: Windows XP emacs 21.3 py-mode 4.6 Recipe:
0
by: Pedro Werneck | last post by:
Hi, I don't know if I should ask this here or on an emacs group/list. If I choose wrong, please forgive me. I am trying to run pychecker on the current buffer on python-mode using the...
5
by: Darren Dale | last post by:
I am using Emacs Python mode, and my project involves reading large datafiles and processing large arrays. I have some code that reports the progress during these time consuming processes. It works...
1
by: Yaroslav Bulatov | last post by:
> Hi, > > Equis Uno wrote: > > > I use meta-x shell to start a shell and then once I see a shell > > prompt I enter the python command and I get a well-behaved python > > shell inside of emacs....
3
by: Marcio Rosa da Silva | last post by:
Hi! I am having some problem with python-emacs mode. I found a bug related to it at sf.net: bug #1021885 shell gets set to 'cpython': ...
0
by: Greg Novak | last post by:
I realize that this is a pretty esoteric question, but I'm not even getting any traction on it by myself. I believe that the problem has to do with signal handling for programs run underneath...
1
by: lorinh | last post by:
Hi all, I've written a Python script with functionality similar to the Unix "script" program, which keeps a record of shell commands issued (I capture some additional stuff like timestamps). The...
3
by: Hadron | last post by:
Sorry to repeat, but I had to reinstall and lost all my news. I am looking for pointers on using emacs with python. I use emacs v 22.0.91 (Ubuntu snapshot). It comes with its own python mode....
14
by: jmDesktop | last post by:
Hi, I'm trying to learn Python. I using Aquamac an emac implementation with mac os x. I have a program. If I go to the command prompt and type pythong myprog.py, it works. Can the program be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.