Module name conflict with standard library

John Lenton john at grulic.org.ar
Sun Sep 5 10:23:07 EDT 2004


On Sun, Sep 05, 2004 at 02:41:35AM +0200, Felix Wiemann wrote:
> Hi!
> 
> I want to create a module myproject.ui.curses, which needs to import the
> curses library.
> 
> However, if I just write ``import curses``, the module imports *itself*
> instead of the standard library's curses module.
> 
> Is there any (reliable) way to access a module of the standard library
> if the names conflict as in this case?

not now. I think your best bet is to call your module 'Curses'.

-- 
John Lenton (john at grulic.org.ar) -- Random fortune:
Civilization is the limitless multiplication of unnecessary necessities.
		-- Mark Twain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20040905/44bdcb28/attachment.sig>


More information about the Python-list mailing list