> Jeremy Ouellette wrote:
> > I recently started working with CherryPy 3.1.2 under Jython 2.5.0, and
> > everything seems to work very nicely so far with the exception of one
> > minor threading patch I found in a blog post and autoreloading.
> > To get autoreloading working, it seems raising a SystemRestart
> > exception is the correct mechanism on Jython (there's similar code in
> > the Django autoreload utility). I updated the _do_execv method in
> > wspbus.py as follows:
> > def _do_execv(self):
> > """Re-execute the current process.
> > This must be called from the main thread, because certain
> > platforms
> > (OS X) don't allow execv to be called in a child thread very
> > well.
> > """
> > if sys.platform[:4] == 'java':
> > from _systemrestart import SystemRestart
> > raise SystemRestart
> > else:
> > args = sys.argv[:]
> > self.log('Re-spawning %s' % ' '.join(args))
> > args.insert(0, sys.executable)
> > if sys.platform == 'win32':
> > args = ['"%s"' % arg for arg in args]
> > os.execv(sys.executable, args)
> Thanks!!
> > What's the appropriate mechanism to contribute patches to the
> > project? I suspect I'll be working through more minor issues as I
> > continue working with CherryPy on Jython.
> http://www.cherrypy.org/newticketis best. There's a guest name/pw on
> every page. If you end up doing a sizable chunk of work, join #cherrypy
> on irc.oftc.net and we'll get you set up with a dev account.
> Robert Brewer
> fuman...@aminus.org