YES - I have two main() and two if __name__ == "__main__":


History:

I had the white screen of death and nothing to get it to go away. I've checked 
my code but just can't find the problem. I've verified that main() at the 
bottom of my program is executed...BUT the white screen was still there.



I know this is freaky, but I put a second main() at the top of my program and 
it FIXED the white screen of death. IT FREAKIN WORKED! No white screen of death!



I am not sure why, but for whatever reason, by the time the "redirect" takes 
place, the other application has replaced it. I have no idea, but all I can say 
is FINALLY!!!!!!

So, if anyone from AppEngine wants to look at my code and see what is going on 
and how I've fixed it by breaking it, let me know and I'll let you in. <grin>

HERE's THE SNIPPETS:
------------TOP OF FILE-----------------
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class MainPage(webapp.RequestHandler):
  def get(self):
    self.redirect('/')
application = webapp.WSGIApplication(
                                      [('/', MainPage)],
                                      debug=True)
def main():
  run_wsgi_app(application)
if __name__ == "__main__":
  main()

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from RefFinder import oRefFinder
import pickle,sys,urllib,cgi,tempfile,zlib,re,codecs
# reminder - use the following for temp variables:
#  each, every, cString, iCounter
class tmpFiles( db.Model ):
  info = db.BlobProperty()
....
900 lines of code
....
application = webapp.WSGIApplication([('/', mainPage),
                                      ('/admin/', admin),
                                      ('/upload/',uploadFile),
                                      ('/process/', processFile),
                                      ('/viewIndex/',viewIndex),
                                      ('/viewText/',viewText),
                                      ('/shop/',shop)
                                      ],
                                     debug=True)

def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()





Brian Becker - br...@semo.net
President/CEO Poplar Bluff Internet, Inc.
Home of semo.net, Shelton Internet, IMS Internet, and TotallyFabricated.com

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.


Reply via email to