All pastes #625587 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-07-19 01:18 UTC
rendered paste body
#!/usr/bin/python
import sys
from getopt import *

opts, args = getopt(sys.argv[1:], "cpu:v", ["content=", "port=","url="])
content=None
port=80
url=None
for o, a in opts:
    if (o == "-v"):
        print "glergh"
        sys.exit(0)
    if o in ("-c", "--content"):
        print "got c"
        content = a
    if o in ("-p", "--port"):
        print "got p"
        port = a
    if o in ("-u", "--url"):
        print "got u"
        url = a

print content
print url
print port