Function
urllib.splitnport

Signature

splitnport(host, defport=-1)

Documentation String

Split host and port, returning numeric port. Return given default port if no : found; defaults to -1. Return numerical port if a valid number are found after :. Return None if : but not a valid number.