Re: FTP upload issue

2008-05-15 Thread afrobeard
First of all, it would be better to use:- ftp.storlines("STOR " + remoteFileName, open(localFileName, "rb")) rather than:- ftp.storlines("STOR" + filename, file(filename)) Since the Python Documentation has this to say for open(): [Although ] When opening a file, it's preferable to use open()

FTP upload issue

2008-05-15 Thread davidj411
I am having difficulty uploading a text file using Python 2.5 on MAC OSX. SCRIPT filename='/tmp/mac.info2.txt' fh=open(filename,'w') fh.write('yes, i have a mac but don't hold that against me - just example data') fh.close() from ftplib import FTP 'host, username, and password are string variab