Re: Using httplib to read a file online

2005-06-17 Thread Fuzzyman
Why are you using httplib rather than urllib2 ? Best Regards, Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list

Re: Using httplib to read a file online

2005-06-14 Thread Fredrik Lundh
Oyvind Ostlund wrote: > There is a server called noteme.com and a file called > index.php on it, but why doesn't it work. If I changed > it to 'vbforums.com' and 'index.php' then it worked. server.putrequest('GET', filename)# send request andheaders + server.putheader('Host', se

Using httplib to read a file online

2005-06-14 Thread Oyvind Ostlund
I am trying to read a file online, and was just testing a bit. This is what I tried. -- import sys, httplib showlines = 6 try: servername, filename = sys.argv[1:] # cmdline args? except: servername, filename = 'noteme.com', '/index.php' prin