The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
Listting HTTP directories
Discuss Listting HTTP directories in the Python Programming forum on Dev Shed. Listting HTTP directories Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

June 10th, 2003, 03:21 PM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Listting HTTP directories
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
|

June 10th, 2003, 05:43 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
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.
|

June 10th, 2003, 05:55 PM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Re: directory listings.
Quote: Originally posted by netytan
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. |
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.
|

June 10th, 2003, 06:25 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
|
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.
|

June 10th, 2003, 06:30 PM
|
|
Junior Member
|
|
Join Date: Feb 2003
Posts: 4
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Re: FTP
Quote: Originally posted by netytan
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. |
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!
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|