Is there a Python equivalent to Perl's File::Listing::parse_dir

J

John Nagle

Perl has a function which will take a remote directory page, in
the form that most web sites return for a file directory, and
parse it into a useful form:

http://www.xav.com/perl/site/lib/File/Listing.html

This is especially useful for FTP sites.

Is there a Python equivalent of this? I'm converting some
old Perl code.

Even the Python FTP module doesn't have a directory parser.

John Nagle
 
S

Stefan Schwarzer

Hi John,

Perl has a function which will take a remote directory page, in
the form that most web sites return for a file directory, and
parse it into a useful form:

http://www.xav.com/perl/site/lib/File/Listing.html

This is especially useful for FTP sites.

Is there a Python equivalent of this? I'm converting some
old Perl code.

Even the Python FTP module doesn't have a directory parser.

I saw this posting only now. I hope it's not too late to
point you to ftputil, http://ftputil.sschwarzer.net . :)
As the name implies, it's FTP-only for now, though.

If you have any questions regarding the library, please ask.

Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top