importing module conflict

M

Matias Surdi

Hi,

Suppose I've a module named "urllib" and from it I need to import the
urllib module from the python standart library.

¿how can I do this?

The problem I found is that when I do:


import urrlib

The imported module is itself, and not the one from the stdlib.

Any idea?

Thanks a lot.
 
B

Bruno Desthuilliers

Matias Surdi a écrit :
Hi,

Suppose I've a module named "urllib" and from it I need to import the
urllib module from the python standart library.

¿how can I do this?

The problem I found is that when I do:


import urrlib

The imported module is itself, and not the one from the stdlib.

Any idea?

Yes : don't name your module 'urllib' !-)

Else, you can play with sys.path before importing the std urllib, etc,
etc...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top