starting a python program from within xemacs
Michael Hudson
mwh at python.net
Tue Mar 26 06:01:06 EST 2002
jimd at vega.starshine.org (Jim Dennis) writes:
> 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?
There's no wrapper for newterm, so not really, no. Also tput is
more-or-less impossible to wrap sensibly, so you'd have to do delays
by hand, if you care about such things.
> 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.
http://www.python.org/patches/ :)
> I suppose I could try reading the Python curses sources and looking
> for the place where it sets up its terminal context.
Adding a wrapper for newterm probably isn't that hard, and is, I
think, the right thing to do here.
Cheers,
M.
--
Considering that this thread is completely on-topic in the way only
c.l.py threads can be, I think I can say that you should replace
"Oblivion" with "Gravity", and increase your Radiohead quotient.
-- Ben Wolfson, comp.lang.python
More information about the Python-list
mailing list