Module name conflict with standard library

Felix Wiemann Felix.Wiemann at
Sun Sep 5 17:07:23 CEST 2004

Nigel Rowe wrote:

> In the mean time [until PEP 328 is implemented], 
> can help at least some of the problems.

This doesn't always work:

$ cat
from __std__ import random

$ python  # this works

$ cat
from __std__ import curses

$ python  # this does not work
Traceback (most recent call last):
  File "", line 1, in ?
    from __std__ import curses
  File "/usr/lib/python2.3/curses/", line 16, in ?
    from curses.wrapper import wrapper                        <--- Uh-oh
  File "/var/home/felix/tmp/", line 1, in ?
    from __std__ import curses
ImportError: cannot import name curses

So I hope that absolute imports will get implemented in Python 2.4.  I
think I'll name my module 'Curses', as John suggested (even if that's
asking for trouble on Windows systems).

Felix Wiemann --

More information about the Python-list mailing list