Choking code:
while port < 0 or port > 65535:
try:
port = int(raw_input("Enter port: ")
except ValueError:
print "Invalid port number."
Result:
File "/Users/.../Documents/.../CS 176A/TCPServer.py", line 10
except ValueError:
^
SyntaxError: invalid syntax