urllib slow on Leopard

M

mark

I've recently switched from Ubuntu to OS X Leopard. I have some python
scripts which download info from the web. The scripts were working fine
before on Ubuntu, but urllib seems to work really slowly on Leopard.

I tried an example from the docs:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtm
The line f = ... takes about a minute to return - but otherwise returns
the predicted result. My web connection seems fine, so has anyone got
any ideas as to what the problem might be?
 
A

André

I've recently switched from Ubuntu to OS X Leopard. I have some python
scripts which download info from the web. The scripts were working fine
before on Ubuntu, but urllib seems to work really slowly on Leopard.

I tried an example from the docs:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtm

The line f = ... takes about a minute to return - but otherwise returns
the predicted result. My web connection seems fine, so has anyone got
any ideas as to what the problem might be?

Nope, but it's not Leopard related. Just checked here and it loaded
in about 1 sec.

André
 
S

Stefan Behnel

mark said:
I've recently switched from Ubuntu to OS X Leopard. I have some python
scripts which download info from the web. The scripts were working fine
before on Ubuntu, but urllib seems to work really slowly on Leopard.

I tried an example from the docs:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtm

The line f = ... takes about a minute to return - but otherwise returns
the predicted result. My web connection seems fine, so has anyone got
any ideas as to what the problem might be?

It likely tries to load the DTD in the background, which requires network access.

http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic

Stefan
 
M

mark

mark said:
I've recently switched from Ubuntu to OS X Leopard. I have some python
scripts which download info from the web. The scripts were working fine
before on Ubuntu, but urllib seems to work really slowly on Leopard.

I tried an example from the docs:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtm

The line f = ... takes about a minute to return - but otherwise returns
the predicted result. My web connection seems fine, so has anyone got
any ideas as to what the problem might be?

I found that by configuring the network manually (specifying static IP
address, etc.) it sped the whole thing up. Go figure.
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top