
December 24th, 2012, 11:57 AM
|
|
Registered User
|
|
Join Date: Dec 2012
Posts: 1
Time spent in forums: 8 m 57 sec
Reputation Power: 0
|
|
|
Python File format check with FTP download
Hi,
I am using python's ftplib module for downloading several files in binary mode. The ftp server is windows whereas my client is on linux. The files are of different formats (e.g. raw text, zip archive, etc). At times, some of the downloaded files are not in the expected format. Does python already provide a functionality/module to check for the correct format of files when they get downloaded from ftp?
Manually, I use 'file $filename' to test, but wondering about other/existing capabilities in python.
I am running python v2.7.3.
Thank You.
|