473,583 Members | 4,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\pyt hon.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 3175
em**********@gm ail.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**********@gm ail.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**********@gm ail.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**********@gm ail.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.pytho n 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\arc p_db\trunk\src\ gui>c:\python25 \python.exe -i
c:\python25\pyt hon.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\bi n\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
3344
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
1745
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 py-pychecker-run command, but it fails with the "Symbol's function definition is void: read-shell-command" error. I don't know elisp, but seems this is the...
5
2303
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 fine from the dos shell, but I would really like to work entirely within Emacs. I have two questions: 1) Is it possible to have the *Python...
1
2642
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. > > > > I'm trying to figure out the best way to run ipython inside of emacs.
3
1399
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': http://sourceforge.net/tracker/?group_id=86916&atid=581349&func=detail&aid=1021885 The problem is that when I try to run the script using C-c C-c, I get
0
1220
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 Python, and how these signals may (or may not) percolate up to higher levels, which for me means Emacs. PyX is a Python package for drawing graphs...
1
1645
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 code is borrowed largely from http://groups.google.com/group/comp.lang.python/msg/de40b36c6f0c53cc Anyways, one problem is that it doesn't...
3
1669
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. The problem is that the debugger just hangs when I start it. The interpreter runs fine. Any ideas?
14
2648
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 run from within the editor or is that not how development is done? I ask because I was using Visual Studio with C# and, if you're familiar, you just...
0
7825
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8179
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8323
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7933
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6578
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5372
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3816
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1155
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.