whats this mean?

TheDustbustr thedustbustr at aol.com
Fri Jul 20 21:35:33 EDT 2001


# BEGIN CODE BLOCK
try:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.bind((HOST, PORT))
    s.listen(1)
    conn, addr = s.accept()
except socket.error, why: ## reference 1
    print "Server Error: " + errno.errorcode[why[0]] + ", " + why[1] ##
reference 2
    sys.exit(1)
# END CODE BLOCK

what does reference 2 mean?  what do those brackets do?  And for reference 1,
what will 'why' hold if an error occurs?

Thanks, Dustin



More information about the Python-list mailing list