how to select between two file libraries with same name?

J

jmborr

Imagine my file one.py contains the statement
import two
If there's a two.py in same directory as one.py, then this file will
be loaded. However, I want to load a different file named also two.py,
say file ~username/mypythonlib/two.py
How can I select between the two two.py files ?
-jose
 
K

kyosohma

Imagine my file one.py contains the statement
import two
If there's a two.py in same directory as one.py, then this file will
be loaded. However, I want to load a different file named also two.py,
say file ~username/mypythonlib/two.py
How can I select between the two two.py files ?
-jose

This kind of thing has been discussed before. See below:

http://mail.python.org/pipermail/python-list/2002-October/167055.html

The basic idea is not to do this. Fix your code so that you never have
this problem through code refactoring.

Mike
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top