Agnostic fetching

Bruce Frederiksen is_this at visible.com
Fri Aug 1 21:03:44 EDT 2008


On Fri, 01 Aug 2008 17:05:00 -0700, jorpheus wrote:

> OK, that sounds stupid. Anyway, I've been learning Python for some
> time now, and am currently having fun with the urllib and urllib2
> modules, but have run into a problem(?) - is there any way to fetch
> (urllib.retrieve) files from a server without knowing the filenames?
> For instance, there is smth like folder/spam.egg, folder/
> unpredictable.egg and so on. If not, perhaps some kind of glob to
> create a list of existing files? I'd really appreciate some help,
> since I'm really out of my (newb) depth here.

You might try the os.path module and/or the glob module in the standard
python library.



More information about the Python-list mailing list