automatically reload code as you are developing?

743 views
Skip to first unread message

alec

unread,
Jun 10, 2010, 5:10:18 PM6/10/10
to Tornado Web Server
Hi

Is there a way to enable Tornado to automatically reload python code
as you are developing, so that you can avoid having to restart Tornado
each time you want to test your app?

Thanks
Alec

Stanislav

unread,
Jun 10, 2010, 5:39:09 PM6/10/10
to Tornado Web Server
debug=True in application settings

alec

unread,
Jun 10, 2010, 10:40:50 PM6/10/10
to Tornado Web Server
Thanks for pointing that out to me.

Alec

kzahel

unread,
Jun 11, 2010, 10:30:10 AM6/11/10
to Tornado Web Server
In case it's still not working for you, I've noticed that unless you
run tornado.options.parse_command_line(), then even if you have
debug=True set in your application, none of the reloading takes place.

K

Ben Darnell

unread,
Jun 11, 2010, 2:44:51 PM6/11/10
to python-...@googlegroups.com
On Fri, Jun 11, 2010 at 7:30 AM, kzahel <kgr...@gmail.com> wrote:
> In case it's still not working for you, I've noticed that unless you
> run tornado.options.parse_command_line(), then even if you have
> debug=True set in your application, none of the reloading takes place.

Autoreload does not depend on tonado.options, but if you don't either
use parse_command_line or do something else to configure the python
logging system (such as logging.basicConfig(level=logging.INFO)), you
won't see a message when the reload happens.

-Ben

Reply all
Reply to author
Forward
0 new messages