summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-02-25 16:29:58 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-02-25 16:29:58 (GMT)
commit734451a4bcc900fd9d159b0c6d4fcdca17cc31bb (patch)
tree325aff3638035a60d9604e98c4ef9d6689195a26
parentaa5e3cea7aeabd4d1c2ad61a60b538c0f842799d (diff)
downloadcpython-734451a4bcc900fd9d159b0c6d4fcdca17cc31bb.zip
cpython-734451a4bcc900fd9d159b0c6d4fcdca17cc31bb.tar.gz
cpython-734451a4bcc900fd9d159b0c6d4fcdca17cc31bb.tar.bz2
Use file descriptor for real stdout
-rw-r--r--Lib/curses/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/curses/__init__.py b/Lib/curses/__init__.py
index c3f2f25..bd7d5f6 100644
--- a/Lib/curses/__init__.py
+++ b/Lib/curses/__init__.py
@@ -15,6 +15,7 @@ __revision__ = "$Id$"
from _curses import *
from curses.wrapper import wrapper
import os as _os
+import sys as _sys
# Some constants, most notably the ACS_* ones, are only added to the C
# _curses module's dictionary after initscr() is called. (Some
@@ -28,7 +29,8 @@ def initscr():
import _curses, curses
# we call setupterm() here because it raises an error
# instead of calling exit() in error cases.
- setupterm(term=_os.environ.get("TERM", "unknown"))
+ setupterm(term=_os.environ.get("TERM", "unknown"),
+ fd=_sys.__stdout__.fileno())
stdscr = _curses.initscr()
for key, value in _curses.__dict__.items():
if key[0:4] == 'ACS_' or key in ('LINES', 'COLS'):