Adekoba wrote:
> On Feb 24, 1:06 pm, Christian Heimes <[EMAIL PROTECTED]> wrote:
>> Adekoba wrote:
>>> 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
On Feb 24, 3:21 pm, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]
nomine.org> wrote:
> -On [20080224 20:01], Adekoba ([EMAIL PROTECTED]) wrote:
>
> >I don't think moving food.py's code to __init__.py would work out to
> >well, because then how would I run the script?
>
> import food
>
> Which in
-On [20080224 20:01], Adekoba ([EMAIL PROTECTED]) wrote:
>I don't think moving food.py's code to __init__.py would work out to
>well, because then how would I run the script?
import food
Which in turn has something like this in food/__init__.py:
from food.cheese import gouda
from food.ham import
On Feb 24, 1:06 pm, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Adekoba wrote:
> > 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.
Adekoba wrote:
> 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
> p
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 wo