Cherrypy 3.0 can run on app engine without modification.
Here is a hello example from
http://boodebr.org/main/python/cherrypy-under-google-appserver
I modified it a little bit so the cherrypy application will be cached
by app engine.
import cherrypy
import wsgiref.handlers
class Root:
@cherrypy.expose
def index(self):
return "Hello, CherryPy! version=",cherrypy.__version__
app = cherrypy.tree.mount(root(),'/',config=conf)
def main():
wsgiref.handlers.CGIHandler().run(app)
if __name__=='__main__':
main()
On Oct 23, 8:53 am, saurabh <[EMAIL PROTECTED]> wrote:
> Hi,
>
> to give clear view of the problem i am pasting the python code of
> the main page of my cherrypy application.
> here the server is instantiated every time we double click on this
> file as it invokes the cherrypy.quickstart and then auto opens the
> browser ........ but i want to start the application , access the
> application like we normally do by just passing the URL in the address
> bar ...... if i want to host it in google app server what shud i do??
>
> import cherrypy
> import MySQLdb
> import md5
> import os.path
> from cherrypy.lib import sessions
>
> from content import setting1
> import fordb
> from login2 import *
>
> class root:
> @cherrypy.expose
> def index(self):
> return file('template/home.html').read()
> auth=loginauth()
> #empmanagement=empmanagement()
> if __name__=='__main__':
> import webbrowser
> conf=setting1()
> cherrypy.config.update({'server.socket.port':8080})
> cherrypy.tree.mount(root(),'/',config=conf)
> cherrypy.server.quickstart()
> cherrypy.engine.start_with_callback(
> webbrowser.open,
> ('http://localhost:8080/',),
> )
> cherrypy.engine.block()
>
> Thanks for ur help and support
>
> Saurabh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---