示例#1
0
import monkey
import os

if not monkey.init(None, 0, 0, None):
    os._exit(1)
if not monkey.stop():
    os._exit(1)
示例#2
0
import monkey

f = open('/tmp/index.html', 'w')
f.write("<html><body><h2>Hello Monkey</h2></body></html>")
f.close()

monkey.init(None, 0, 0, '/tmp/')
monkey.configure(indexfile='index.html')

monkey.start()
raw_input("Press enter to stop the server...")
monkey.stop()
示例#3
0
import monkey
import os

if monkey.init(None, 0, 0, None) == False:
    os._exit(1)
if monkey.start() == False:
    os._exit(1)
if monkey.stop() == False:
    os._exit(1)