Python2.5.4 curses.initscr() fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python2.5 (Ubuntu) |
Fix Released
|
High
|
Scott Kitterman | ||
Jaunty |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python2.5
IMPACT: debian/
DEVELOPMENT: Fixed in Karmic using the same patch to curses_init.dpatch as is being suggested for Jaunty.
PATCH: http://
REPRODUCE: python2.5 -c 'import curses; curses.initscr()'
REGRESSION: Minimal. This debdiff only affects one module, and it only adds imports for modules which were previously unimported.
============
Original bug description:
-------
import curses
curses.initscr()
-------
$>python2.5 test.py
Traceback (most recent call last):
File "test.py", line 2, in <module>
curses.
File "/usr/lib/
setupterm(
NameError: global name '_os' is not defined
FIX: add
import os as _os
import sys as _sys
to /usr/lib/
ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: python2.5 2.5.4-1ubuntu4 [modified: usr/lib/
ProcEnviron:
LC_TIME=sl_SI.utf8
LANGUAGE=
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: python2.5
Uname: Linux 2.6.28-11-generic i686
Changed in python2.5 (Ubuntu): | |
status: | In Progress → Won't Fix |
status: | Won't Fix → Fix Released |
I can confirm the bug and the fix (thanks for reporting mmarko).
This also affects ipython's 'magic' commands as they call curses.initscr() (e.g. ipython, from app import class, class? -> NameError: global name '_os' is not defined)