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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top