Google App Engine __main__ module
each script entry in your app.yaml will be executed as a __main__ module. If you only want a single __main__ then you need to run everything through a single entry-point and map everything via a single WSGIApplication instance.
I'm building a data seeder module that looks for all models using introspection and the inspect module. I index the models I found by a string looking like module.model_name because there might be more modules with the same name in different modules.
The problem is that module sometimes is indeed the right module name, but sometimes it's __main__, probably because that specific module was the first one that was called to handle a URL after an instance was started. Is there anyway I can avoid this, perhaps by forcing a specific module to always be __main__?
This problems gets worse when I have multiple instances running at once because I also get inconsistent data between instances, each having a different __main__ module.
Thanks