problem when getting ftp file
franz04 at yahoo.fr
Tue Aug 17 17:32:32 CEST 2004
I'm new to python and I'm not sure if I use the ftplib
I made a programm to update a pseudo-dynamic site via
ftp. The site is a static html that include files
update by ftp. It create 2 files, and html and a .dat
file, which hold a easier to manipulate data.
first of all, when I start the application, it connect
to ftp, and get the .dat files on the ftp server to
stay up to date. Then modification are done to the
local file, when the application receive a update
request, it take the local file and update it to the
The update work perfectly, but the part I get the file
from ftp cause me some trouble. The client app is run
on windows. To create the file and to read it, I use
open("myfile.dat").write and readlines, there's no
problem, but when I get a new file from ftp, the
return line disapear and readlines take the all the
file as one line.
To write the new file in ftp I use :
And to get it I use :
If someone can guide me where to look to find a
solution, it will be appreciated.
Lèche-vitrine ou lèche-écran ?
More information about the Python-list