I am trying to parse / download some of the files from Mainframe using ftplib but it's unsuccesful after few attempts.
My code Till now is :
import ftplib
ftp = ftplib.FTP('host','username','password')
ftp.retrlines("File To be Downloaded")
This works fine and I can see the required file.
However when I use following code.
ftp.retrbinary("RETR 'File_Name'",open('ww.txt','wb').write)
It fails with following error.
error_reply: 200 Representation type is Image
Based on reponse of Dag, I tried the following code to download file through "retrlines".
ftp.retrlines("RETR 'File_Name'",open('ww.txt','wb').write)
But it gives me following error.
error_reply: 200 Representation type is Ascii NonPrint