Trouble with ftplib uploading to an FTP server
skylarking11 at gmail.com
Thu Feb 25 17:33:31 CET 2010
On Feb 25, 1:10 am, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Wed, 24 Feb 2010 17:21:58 -0800 (PST), Sky Larking
> <skylarkin... at gmail.com> declaimed the following in
> > For instance I just ran the script and os.rename() renamed it to:
> > TestMachine.local @ 02-24-2010 2020.txt
> > in that .txt file it reads:
> > Asset: TestMachine.local Checking in from IP#: xx.xxx.xx.xxx
> > This is what I want, but the FTP piece doesn't seem to work...
> But since you haven't CLOSED the file before invoking the FTP
> operation, the contents are probably in a write buffer that hasn't been
> flushed. Renaming a file only changes the directory entry -- doesn't do
> anything for what may or may not be in the file.
> After the program exits, the file get closed, which means the
> buffers are flushed.
> Wulfraed Dennis Lee Bieber KD6MOG
> wlfr... at ix.netcom.com HTTP://wlfraed.home.netcom.com/
I see my mistake now, I closed the file ...then did the upload ... and
the data was there --
thanks for the help
More information about the Python-list