Functions | |
def | main |
Main. | |
def | parse_http_host_and_port |
def master.main | ( | ) |
def master.parse_http_host_and_port | ( | url | ) |
Convenience routine to handle parsing and validation of HTTP URL port due to the fact that Python only provides easy accessors in Python 2.5 and later. Validation checks that the protocol and host are set. @param url: URL to parse @type url: str @return: hostname and port number in URL or 80 (default). @rtype: (str, int) @raise ValueError: if the url does not validate