[ python-Bugs-1119331 ] curses.initscr - initscr exit w/o env(TERM) set

SourceForge.net noreply at sourceforge.net
Thu Feb 10 00:19:45 CET 2005


Bugs item #1119331, was opened at 2005-02-09 14:51
Message generated for change (Comment added) made by mwh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1119331&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jacob Lilly (jrlilly)
Assigned to: Nobody/Anonymous (nobody)
Summary: curses.initscr - initscr exit w/o env(TERM) set

Initial Comment:
the initscr in ncurses will cause an immeadiation exit
if the env doesn't have the TERM variable set.  Could
the curses.initscr be changed so it tests if TERM is
set and raises an exception?  It would be helpful to be
able to try and except this instead of just having
ncurses exit for you.

----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2005-02-09 23:19

Message:
Logged In: YES 
user_id=6656

Yeah, I noticed that.  We could at least call setupterm(0, NULL) first, I 
guess...

----------------------------------------------------------------------

Comment By: Jacob Lilly (jrlilly)
Date: 2005-02-09 19:51

Message:
Logged In: YES 
user_id=774886

that is any return of 0 from newterm

----------------------------------------------------------------------

Comment By: Jacob Lilly (jrlilly)
Date: 2005-02-09 19:49

Message:
Logged In: YES 
user_id=774886

sorry, I should have done that in the beginning; I have it
raising a RuntimeError, I think thats what it is.  This
doesn't really solve the problem in whole, since ncurses
initscr has lots of ways it could decide to decide to exit
(any return value from newterm causes it to exit), but it
does solve a more common one.  Anything else would require
modifying ncruses to be responsible.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2005-02-09 18:45

Message:
Logged In: YES 
user_id=6656

How amazingly terrible (on ncurses part).  Do you want to/are you able 
to work on a patch?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1119331&group_id=5470


More information about the Python-bugs-list mailing list