Re: Python FTP - NameError: name 'mydpa' is not defined

2008-08-05 Thread Ej
Hi Fredrik, Thanks so much for you quick help!!! I googled the os.rename you gave me and I found solution to solve my problem. You made my day! On Aug 5, 10:37 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Ej wrote: > > I have a similar problem. I need to download the same file every hour >

Re: Python FTP - NameError: name 'mydpa' is not defined

2008-08-05 Thread Fredrik Lundh
Ej wrote: I have a similar problem. I need to download the same file every hour so it will be nice to be able to rename the downloads with a variable name. For example in this case: from ftplib import FTP ftp=FTP('tgftp.nws.noaa.gov') ftp.login() ftp.cwd('SL.us008001/DF.of/DC.radar/DS.81dpr/SI.

Re: Python FTP - NameError: name 'mydpa' is not defined

2008-08-05 Thread Ej
I have a similar problem. I need to download the same file every hour so it will be nice to be able to rename the downloads with a variable name. For example in this case: from ftplib import FTP ftp=FTP('tgftp.nws.noaa.gov') ftp.login() ftp.cwd('SL.us008001/DF.of/DC.radar/DS.81dpr/SI.kbuf') ftp.

Re: Python FTP - NameError: name 'mydpa' is not defined

2008-07-28 Thread MRAB
On Jul 28, 2:27 pm, "Harry" <[EMAIL PROTECTED]> wrote: > Hi there. I am trying to download a file(sn.last) from a public FTP > server with the following code: > > from ftplib import FTP > ftp=FTP('tgftp.nws.noaa.gov') > ftp.login() > ftp.cwd('SL.us008001/DF.of/DC.radar/DS.81dpr/SI.kbuf') > ftp.retr

Python FTP - NameError: name 'mydpa' is not defined

2008-07-28 Thread Harry
Hi there. I am trying to download a file(sn.last) from a public FTP server with the following code: from ftplib import FTP ftp=FTP('tgftp.nws.noaa.gov') ftp.login() ftp.cwd('SL.us008001/DF.of/DC.radar/DS.81dpr/SI.kbuf') ftp.retrbinar('RETR sn.last', open(mydpa,'wb').write) ftp.quit() but got an