How can I get Bottle to restart on file change?

后端 未结 4 1501
长情又很酷
长情又很酷 2020-12-29 20:29

I\'m really enjoying Bottle so far, but the fact that I have to CTRL+C out of the server and restart it every time I make a code change is a big hit on my productivity. I\'v

4条回答
  •  没有蜡笔的小新
    2020-12-29 20:32

    With

    run(reloader=True)
    

    there are situations where it does not reload like when the import is inside a def. To force a reload I used

    subprocess.call(['touch', 'mainpgm.py'])
    

    and it reloads fine in linux.

提交回复
热议问题