faqts : Computers : Programming : Languages : Python : Modules : urllib

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 6 people (33%) answered Yes
Recently 1 of 5 people (20%) answered Yes

Entry

Is there some method similar to seek in the urllib-module?

Jun 7th, 2000 03:39
unknown unknown, Robert Roy


From the documentation for urllib.urlopen(

This supports the following methods: read(), readline(), readlines(),
fileno(), close(), info() and geturl(). 

so no seek()...

nothing preventing you from doing 

x = urlopen('http://www.python.org')
# read into the file and throw away result
x.read(1024)
stuffIWant = x.read(256)