|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hello all,
I've looked, but I can't find a nice way to get a directory listing of an HTTP directory in Python (or anything for that matter!) Can anyone help? Thanks in anticipation, dan |
|
#2
|
||||
|
||||
|
directory listings.
Hey,
What exactly are you trying to do? To get a list of all the files and folders in a directory you can use os.listdirs(path string) which returns an array of all the files/folders it see's. Also see the glob module. Hope this helps. Mark. |
|
#3
|
|||
|
|||
|
Re: directory listings.
Quote:
Locally, getting a listing is easy. I want a listing of all files at, say, URL I could parse the HTML and get all the files it refers to, but that's not necessarily all the files in the directory. |
|
#4
|
||||
|
||||
|
FTP
I'd check out the FTPlib module, this provides a full FTP interface, that should let you connect to a site and retieve a file/dir listing. If not maybe use the Socket module..
If you are just looking for a way to get the listing and done wnat to do much with it when you have the listing can i suggest the FlashGet Download Manager, it has a feature which allows you to conned to any website and get a list of all files and dirs. Mark. |
|
#5
|
|||
|
|||
|
Re: FTP
Quote:
I can't FTP to all sites, i'd like to use HTTP if at all possible. One problem with FlashGet: i'm on Mac OS X ![]() However, I'd love to know how flashget does it! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Listting HTTP directories |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|