pserve --reload は Python の変更に対応していますが、テンプレートを変更するときは手動でリロードする必要があります。
テンプレート フォルダの変更を監視するこの小さなスクリプトを作成しましたが、pserve をリロードするコマンドは何ですか? Pyramids プロジェクト内からinit .py などで pserve メソッドを呼び出す必要がある場合、pserve をリロードするために呼び出すメソッドは何ですか?
#!/usr/bin/env python
import sys
import pyinotify
from subprocess import call
import time
wm = pyinotify.WatchManager()
mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE | pyinotify.IN_MODIFY
class EventHandler(pyinotify.ProcessEvent):
def process_IN_MODIFY(self, event):
print "Modified: ", event.pathname
# This is where my reload call would go...
# call(["pserve", "reload"])
handler = EventHandler()
notifier = pyinotify.Notifier(wm, handler)
wdd = wm.add_watch("/path/to/my/pyramid/templates/", mask, rec=True, auto_add=True)
notifier.loop()