Emacs, PyX, and Python together result in a dead Python

G

Greg Novak

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
(http://pyx.sourceforge.net). It runs TeX behind the scenes to
produce output.

When I run python as an inferior process under Emacs and try to use
PyX, I get a mysterious error:

import pyx
g=pyx.graph.graphxy(width=8)
g.plot(pyx.graph.data.list([[1,2],[2,4],[3,9]],x=1,y=2))
g.writeEPSfile('gsn');

results in:

Process Python hangup

and the Python process is dead. My suspicion is that this has
something to do with the fact that PyX is running TeX behind the
scenes, but I can't confirm that. Another useful piece of information
is that if I run a plain old inferior shell under Emacs and then run
Python, it works. Perusing the python-mode.el, shell-mode.el, and
comint.el source files didn't produce an obvious reason for the
different behavior. Nor can I find the snippet of code that's
actually producing this error message.

I'm running emacs 21.3, the stock python-shell.el mode, and PyX 0.7.
I run Python with 'M-x py-shell'

If anyone sees fit to reply to this, please copy to my e-mail address
as well, novak at ucolick.org.

Many thanks,
Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top