starting a python program from within xemacs

Jim Dennis jimd at vega.starshine.org
Tue Mar 26 02:39:05 EST 2002


In article <1017098019.357959 at DS9.ai-lab.fh-furtwangen.de>, Marco Herrn wrote:

> Hi there,

> sorry if this is the wrong newsgroup to ask, but I tried in
> comp.emacs.xemacs and nobody could help me, probably because too few
> people there code in python :-)

> I develop a program that uses the curses library in xemacs. But for
> testing my program I have to save it in xemacs, switch to a terminal and
> call python myprog.py. Because I use curses, a C-c C-c doesn't work
> because the xemacs output window isn't capable of using curses.

> Is there a way to execute the content of my current xemacs buffer in a
> terminal/x-terminal?

> Bye
> Marco

> -- 
> Marco Herrn             herrn at gmx.net

 More to the point, is there a way to direct the Python curses module
 to use an alternative terminal/device?  This would be handy for 
 other situations as well (for example when running interactively 
 via idle or from an xterm or a Linux/FreeBSD virtual console).  It
 would be nice to have the interactive prompt and output decoupled
 from the "user's" I/O --- especially when playing with the curses
 module.

 I suppose I could try reading the Python curses sources and looking
 for the place where it sets up its terminal context.  We might be able
 to add a hook therein, a check for a magic environment variable like
 PYTHONTERMINAL or some such.  It just hasn't hurt enough for me to 
 chase down that rat hole.




More information about the Python-list mailing list