starting a python program from within xemacs

Jim Dennis jimd at vega.starshine.org
Wed Mar 27 07:35:54 EST 2002


In article <ubsdbzj0r.fsf at python.net>, Michael Hudson wrote:

> jimd at vega.starshine.org (Jim Dennis) writes:

>>  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.

 I don't understand.  Why couldn't it be redirected to use
 the same timing as the other terminal? How is tputs involved 
 in the curses module?  (I'm guessing you're referring to tputs(3)
 rather than tput(1)).  From the man pages I'd suspect that
 the Python curses module would make little if any use of tputs
 since the man pages suggest higher level functions for most
 operations.
 
>>  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.

  Ahhh!  I see.  newterm() is a function in the ncurses library.
  



More information about the Python-list mailing list