In C:
#include "foo.h"
int main()
{
}
I believe that "foo.h" effectively gets copied and pasted in at the spot of the "#include".
Python imports are different though, I'm finding.
I just refactored a bit of GAE code that initially had ALL request handlers in one big index.py file.
NEW directory tree:
+ | +- [handlers] // all inherit webapp.RequestHandler +- [models] // all inherit db.Model | +- globals.py // contains global variables for site-wide settings +- index.py // contains all handler redirects
[handlers] is the folder with the handlers
[models] is the folder with the models
So, index.py goes
from globals import * # we need all of the globals
# ...
from handlers.FirstPage import FirstPage
from handlers.SecondPage import SecondPage
#.. etc.
SHOULDN'T handlers.FirstPage and handlers.SecondPage "see" everything in globals, since globals is imported "first", before handlers.*?