ftplib question

Steve McAllister nosp at m.needed
Thu Jun 19 10:08:20 EDT 2003


> How do I find the year of a remote file in ftplib?
> 
> retrlines('LIST') seems to include only month day and hour.

You can make no assertion about exactly what you fetch with `LIST'.
However Unix filesystems will almost always send you an `ls -l'
output, and others often fake this format.  In this case, the year is
written if, and only if, it differs from the current one.





More information about the Python-list mailing list