Developing Techniques (and naming conventions)
Adekoba
adekoba at gmail.com
Sun Feb 24 12:07:44 EST 2008
I have some questions... Say we have a package "food"
food/
__init__.py
ham.py
cheese.py
Is it possible to have a file named "food.py" in the package and have
non-referential imports work? i.e., for ham.py to have a line "import
food.food". From my experience, python will not work with this.
Alright, new scenario. Say we had:
food.py
food/
__init__.py
ham.py
cheese.py
where food.py is a script that uses the package food. Is it possible
for this to work in any way? Every time I try to run food.py, python
tries to import everything from the script instead of from the
package. How can I fix this?
More information about the Python-list
mailing list