Change Cidr.Cidr.create() to just Cidr.new(), which seems a bit more concise
[python-rwhoisd.git] / bin / pyrwhoisd
1 #! /usr/bin/env python
2
3 # This file is part of python-rwhoisd
4 #
5 # Copyright (C) 2003, David E. Blacka
6 #
7 # $Id: pyrwhoisd,v 1.2 2003/04/28 16:46:50 davidb Exp $
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 # USA
23 # -*- python -*-
24
25 import sys, os
26
27 # determine if the rwhoisd package is in the standard spot relative to
28 # this script.
29 this_path = sys.path[0]
30 rwhoisd_path = os.path.join(this_path, "..", "rwhoisd")
31 if os.path.isdir(rwhoisd_path):
32     sys.path.append(rwhoisd_path)
33
34
35 import RwhoisServer
36
37 RwhoisServer.init(sys.argv)
38 try:
39     RwhoisServer.serve()
40 except KeyboardInterrupt:
41     print "interrupted"
42