def urlparse_main():
    options, args = urlparse_parse_args()
    for parsed_url in urlparse(fh=sys.stdin, *args, **options):
        if parsed_url:
            if hasattr(parsed_url, '__iter__'):
                # Format as tab-delimited for output
                parsed_url = "\t".join(parsed_url)
            print parsed_url
        else:
            # Lines where we couldnt get any match (e.g when using -q)
            print ''

    return 0
Console entry-point
dataset/ETHPy150Open adamhadani/logtools/logtools/_urlparse.py/urlparse_main