[Python-checkins] r61064 - python/trunk/Lib/curses/__init__.py
andrew.kuchling
python-checkins at python.org
Mon Feb 25 17:29:58 CET 2008
Author: andrew.kuchling
Date: Mon Feb 25 17:29:58 2008
New Revision: 61064
Modified:
python/trunk/Lib/curses/__init__.py
Log:
Use file descriptor for real stdout
Modified: python/trunk/Lib/curses/__init__.py
==============================================================================
--- python/trunk/Lib/curses/__init__.py (original)
+++ python/trunk/Lib/curses/__init__.py Mon Feb 25 17:29:58 2008
@@ -15,6 +15,7 @@
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 @@
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'):
More information about the Python-checkins
mailing list