From: davidb Date: Tue, 22 Apr 2003 23:20:37 +0000 (+0000) Subject: the command line front end X-Git-Tag: v0.2~15 X-Git-Url: https://blacka.com/cgi-bin/gitweb.cgi?p=python-rwhoisd.git;a=commitdiff_plain;h=37058bb7aeb7a3bf36688172c6d1596cd4c3c956;hp=0cc9a43585de35ccfbcaebbe2b0c62696f836fae the command line front end --- diff --git a/bin/pyrwhoisd b/bin/pyrwhoisd new file mode 100755 index 0000000..7532b5b --- /dev/null +++ b/bin/pyrwhoisd @@ -0,0 +1,21 @@ +#! /usr/bin/env python + +# -*- python -*- +import sys, os + +# determine if the rwhoisd package is in the standard spot relative to +# this script. +this_path = sys.path[0] +rwhoisd_path = os.path.join(this_path, "..", "rwhoisd") +if os.path.isdir(rwhoisd_path): + sys.path.append(rwhoisd_path) + + +import RwhoisServer + +RwhoisServer.init(sys.argv) +try: + RwhoisServer.serve() +except KeyboardInterrupt: + print "interrupted" +