471,337 Members | 1,117 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

how to select between two file libraries with same name?

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

Aug 23 '07 #1
1 1008
On Aug 23, 1:46 pm, jmborr <borregu...@gmail.comwrote:
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/pyt...er/167055.html

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

Mike

Aug 23 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Suresh Gladstone | last post: by
3 posts views Thread by joseluismarchetti | last post: by
6 posts views Thread by Kevin Frevert | last post: by
185 posts views Thread by jacob navia | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.