the command line front end
[python-rwhoisd.git] / bin / pyrwhoisd
1 #! /usr/bin/env python
2
3 # -*- python -*-
4 import sys, os
5
6 # determine if the rwhoisd package is in the standard spot relative to
7 # this script.
8 this_path = sys.path[0]
9 rwhoisd_path = os.path.join(this_path, "..", "rwhoisd")
10 if os.path.isdir(rwhoisd_path):
11     sys.path.append(rwhoisd_path)
12
13
14 import RwhoisServer
15
16 RwhoisServer.init(sys.argv)
17 try:
18     RwhoisServer.serve()
19 except KeyboardInterrupt:
20     print "interrupted"
21