1 2 3 4 5 6 7 8 9 10 11 12 13 14
import sys import client import optparse o = optparse.OptionParser() o.conflict_handler = 'resolve' o.add_option('-p') o.add_option('-h') d, rest = o.parse_args(sys.argv[1:]) client = client(host=d.h, port=d.p) if __name __ == '__main__': client.run()