Beispiel #1
0
    import sys

    uris = sys.argv[1:]
    if not uris:
        uris.insert(0, 'http://[email protected]:4321/path;with-param/to/service.ext?arg&q=v;and=v2#somefragment')
        uris.insert(0, '*****@*****.**')
        uris.insert(0, 'cid:[email protected]')
        uris.insert(0, './../path;param')
        uris.insert(0, '../path;param')
        uris.insert(0, '//example.org/path?v=1')
        uris.insert(0, 'urn://id@net/abspath')
        uris.insert(0, 'urn:/abspath')
        #uris.insert(0, ':4')
        #uris.insert(0, '.root')
        #uris.insert(0, '@root')
        uris.insert(0, '//foo/#root')
        uris.insert(0, '/#root')
        #uris.insert(0, '#root')
        uris.insert(0, '/?root')
        uris.insert(0, '/root')
        uris.insert(0, 'urn:root')

    for uri in uris:
        match = uriref.match(uri)
        print util.match_groupdict_table(uri, match)
        print




Beispiel #2
0
def table_writer(uri, match, file, opts):
    print >>file, util.match_groupdict_table(uri, match)
    print >>file, ""