SunQuest
           Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old June 10th, 2003, 03:21 PM
burntoutjoy burntoutjoy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 4 burntoutjoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question 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

Reply With Quote
  #2  
Old June 10th, 2003, 05:43 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
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.

Reply With Quote
  #3  
Old June 10th, 2003, 05:55 PM
burntoutjoy burntoutjoy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 4 burntoutjoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #4  
Old June 10th, 2003, 06:25 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
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.

Reply With Quote
  #5  
Old June 10th, 2003, 06:30 PM
burntoutjoy burntoutjoy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 4 burntoutjoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Listting HTTP directories


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway