[Tutor] listing files in an html directory
rabidpoobear at gmail.com
Sun Apr 29 19:57:44 CEST 2007
John Washakie wrote:
> Hello all,
> I'm trying to write a program which will take a path, look in it for
> play them. A key part of the code at this point is:
> searchPath = imageRoot + '*' + imgExt
> avail = glob.glob(searchPath) #will glob work over http?
> where searchPath is constructed from imageRoot and imgExt which are
> user input variables. I don't think glob will work over http, is there
> a urllib version perhaps? Any suggestions?
Most http servers disallow directory listing.
Even ones that do (like Apache default) there has to be no index.html in
the directory, and they
dump the directory listing to a webpage you'd have to parse.
More information about the Tutor