[Medusa-dev] medusa daemon
douglas savitsky
dsavitsk@mail.e-coli.net
Thu Oct 31 18:35:42 2002
---------- Original Message ----------------------------------
From: "Adam Feuer" <adamf@pobox.com>
Date: Thu, 31 Oct 2002 10:17:12 -0800
>> douglas savitsky wrote:
>> hi there, does anyone have a trivial example of running medusa as a daemon
> The Python Cookbook has a couple of recipes... here's the one that looks
>best to me:
>
>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012
right, so in that example, could i just replace the main() function
def main():
import time
f = open("/tmp/daemon-log", "w")
while 1:
f.write('%s\n' % time.ctime(time.time()))
f.flush()
time.sleep(10)
with
def main():
import asyncore
from medusa import http_server
hs = http_server.http_server('/usr/www', 80)
asyncore.loop()
?
-doug
More information about the Medusa-dev
mailing list