urllib2 urlopen timeout option

Joined
Jan 3, 2009
Messages
1
Reaction score
0
hi,

i am trying to use the timeout option in the urllib2.urlopen:

Code:
u = urllib2.urlopen(address, timeout = 120)
uTxt = u.read() 
u.close()

but python wont accept it for some reason,
it will accept it without the timeout which is normal

Code:
u = urllib2.urlopen(address)

any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top