[Tutor] Still Trying to Understand GAE

admin at gg-lab.net admin at gg-lab.net
Sun Sep 13 15:59:37 CEST 2009


Hi All,

i've started earning python sone months ago (on Google App Engine
unfortunately).

I have some doubts reagrding "import", and have asked a similar
question here months ago, but without finding a solution.

So:

with import i can import modules or single functions. And this is ok.
Then: as i have understood from all the books i readm in each package
directory i have the __init__.py file that decides what import with
it. In other words if my package skel is like:

/gg/
/gg/sub1/
/gg/sub1/file.py
/gg/sub2/
/gg/sub2/file.py

and i use "import gg", nothing is imported. To import sub1 and sub2, i can:

- Put in /gg/ a __init__.py file that tells to import them
- Use "from gg import sub1"

Ok now the $1 Billion question: google app engine has the same schema
than my "gg" package, an empty __init__.py file, but if i use "import
google" it also imports all subdirectories. And i can't understand
wiìhy it does so.

Can you help me?

Thankyou

Giorgio


More information about the Tutor mailing list