FAQ

On Thu, 07 Aug 2003 00:29:21 +0100, simon place wrote:
On the ftp holding my web space (ftp server: ProFTPD 1.2.0pre10 ) a 'stat
*.pdf' command will list all pdf files in all sub directories recursively, (
and this is meant to be fairly standard,) unfortunately using ftp commands
directly shows up the server os dependent format that directories are listed
in ( usually UNIX ) but the functions to interpret this are in the ftp lib and
there's a more general interpretation module out there somewhere ( handles
more server os's )
With 'stat *.pdf' and classic ftplib I have this. Have you got same ?
WHere is the mistake ?

from ftplib import FTP
ftp = FTP('ftp.python.org') # connect to host, default port
ftp.login()
ftp.retrlines('stat *.pdf') # list directory contents
ftp.quit()

-----------------------------------------------------------------------
python -u ftp.py
Traceback (most recent call last):
File "ftp.py", line 4, in ?
ftp.retrlines('stat *.pdf') # list directory contents
File "/usr/lib/python2.2/ftplib.py", line 402, in retrlines
conn = self.transfercmd(cmd)
File "/usr/lib/python2.2/ftplib.py", line 346, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "/usr/lib/python2.2/ftplib.py", line 330, in ntransfercmd
raise error_reply, resp
ftplib.error_reply: 211-status of *.pdf:
211 End of Status
Exit code: 1

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 8 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedAug 6, '03 at 9:45p
activeAug 12, '03 at 5:09p
posts8
users2
websitepython.org

2 users in discussion

Simon place: 4 posts Conatic: 4 posts

People

Translate

site design / logo © 2022 Grokbase