List Info

Thread: mechanism to reload modules ?




mechanism to reload modules ?
user name
2006-04-19 22:09:45
Hi - If my understanding is correct when the CP server
starts it
'compiles' all the relevant modules to pyc and uses that
code until the
server stops. As a result changes to the underlying .py's
are not
reflected until the server stops. In our case we use kid
templates
which also get compiled to pyc's.

Is there a way to tell CP to reload all modules without
stopping and
starting ?

The reason i ask is that i have a person doing CSS/HTML work
on the
templates who could get by with just FTP access if there was
a means of
reloading the modules without shell access.

regards

richard.


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

mechanism to reload modules ?
user name
2006-04-19 23:46:31
cp has an autoreload feature that is enabled by default (in development environment at least)
if you modify .py files while the server is running it should automatically shutdown and restart
(it works quite well too)

this feature is usually disabled when running in production because it can consume system
resources needlessly

your alternative then is to manually shutdown and reload the server, but maybe there is a way of doing that from code and I just don't know of it yet

d

On 4/19/06, northof40 <gmail.com">shearichardgmail.com> wrote:

Hi - If my understanding is correct when the CP server starts it
'compiles' all the relevant modules to pyc and uses that code until the
server stops. As a result changes to the underlying .py's are not
reflected until the server stops. In our case we use kid templates
which also get compiled to pyc's.

Is there a way to tell CP to reload all modules without stopping and
starting ?

The reason i ask is that i have a person doing CSS/HTML work on the
templates who could get by with just FTP access if there was a means of
reloading the modules without shell access.

regards

richard.






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users&quot; 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 )