Matt Croydon wrote:
If you're looking for timeouts, I'd highly suggest Joe Gregorio's httplib2:
http://code.google.com/p/httplib2/


Thanks for the link. I just took a look at the code in trunk and it does cover the timeout use case but unfortunately doesn't seem to support writing the data to a file pointer. Not something I'm currently using but but could perhaps be useful in the future and if I was going to patch the library with a different http handler I don't want to reduce the functionality of the library.


Jonathan Share wrote:
Justin Azoff wrote:
Jonathan Share wrote:
Hi,

In the archives I found the link to this

http://www.albany.edu/~ja6447/mogilefs.py

Just a couple of points of feedback for anyone searching.

1) Would it be possible to have the dependency of pycurl listed at the
top of the file (no big deal really)
Using pycurl might even be overkill... may be worthwhile to benchmark
pycurl vs. urllib and see if it is even faster.

Actually doing this could be worthwhile for other reasons.

I just tried installing on a debian etch system (current stable) and it
seems that libcurl, upon which pycurl depends, is currently at an
unsupported version and not present in backports either :-(

Just looking into the code I can see that it appears the reasoning for
using pycurl is for easy access to setting the timeouts, a quick google
search reveals that this is definitely not trivial in the context of
urllib(2) so I'm going to stick with pycurl for the short term. If, by
some miracle, I have some spare time at the end of my current project
I'll spend some more time looking into the other options available.

2) When importing in Python 2.5 I get the following error

mogilefs.py:83: DeprecationWarning: The sre module is deprecated, please
import re.
Fixed :-)
Thanks

Off to go and see if it actually works now, you'll hear from me if there
are any problems ;-)

Jon
It should work!  Let me know if it doesn't :)
It could definitely use some cleanups, and I believe there are a ton of
methods that need to be added to the Admin class.

Seems to work fine on my workstation although current use-cases are very
simple, hadn't thought of admin functions, will look into integrating
those for a later iteration.

/me off to go building libcurl from source



Reply via email to