High-Level Gopher Client with urllib : Gopher Client « Network « Python






High-Level Gopher Client with urllib

import urllib, sys
host = sys.argv[1]
file = sys.argv[2]

f = urllib.urlopen('gopher://%s%s' % (host, file))
for line in f.readlines():
    sys.stdout.write(line)
    

           
       








Related examples in the same category

1.Simple Gopher Client
2.Simple Gopher Client with basic error handling
3.Simple Gopher Client with file-like interface
4.High-Level Gopher Client