List Info

Thread: Cheetah2.0xx and Cherrypy 2.2beta reload problems




Cheetah2.0xx and Cherrypy 2.2beta reload problems
user name
2006-03-06 21:49:38
This problem is not restricted to eggs.  I reported this
(Ticket #464)
a while back but it got closed because my test case worked
for the
person who tried it.  Perhaps they have a different version
of Cheetah.

Here is another perhaps simpler test case...
$ cheetah version
2.0b5
$
$ cat sandbox.py
from Cheetah.Template import Template
import cherrypy

class Root:

    def index(self):
        tmpl = Template("hello")
        return str(tmpl)
    index.exposed = True

cherrypy.config.update({
    'global': {
        'server.socketPort': 8080,
        'server.threadPool': 100,
        'server.environment': "development",
        'server.showTracebacks': True
              }
     })

cherrypy.root = Root()
cherrypy.server.start()


I'm using Cherrypy 2.1 but this problem is present using
other versions
of Cherrypy also.  Here is the offending code in
autoreload.py

try:
    mtime = os.stat(filename).st_mtime
except OSError:
    sys.exit(3) # force reload

...the program tries to stat
"DynamicallyCompiledCheetahTemplate.py"
which doesn't exist so the module reloads.  I put an ugly
hack in my
code which just checks if the file has this name and
doesn't exit if
this is true.  It may actually be the Cheetah code that's
at fault but
I found it harder to understand what's going on in that
program.


--~--~---------~--~----~------------~-------~--~----~
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]

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