List Info

Thread: Stopping a desktop app




Stopping a desktop app
user name
2006-04-30 18:22:02
I'm writing a browser-based desktop app using CherryPy.

I`m using a combination of ideas from the two recipes linked
on
http://w
ww.cherrypy.org/wiki/CherryPyRecipes

Basically, I start the app with
cherrypy.root = MyApp()
cherrypy.server.start_with_callback(webbrowser.open,
                                        ('http://localhost:8080',),)

and try to end it with a delay

#inside MyApp
        def exit(self):
            threading.Timer(1, cherrypy.server.stop).start()
            return FinishPage

The problem I have is that the process itself does not end. 
From the
documentation:
===
    *   cherrypy.server.stop()

Stop the CherryPy Server. Well, "suspend" might
be a better term - this
doesn't terminate the process.
===
I've tried raising various exceptions, with various delays,
to no
avail.

This is on Windows if it matters (actually, I'm really
looking for a
cross-platform solution).

André


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

Stopping a desktop app
user name
2006-04-30 20:24:50
Found a solution by accident.  I had to set
'server.environment': "production"
instead of "development".


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )