in case it helps here is a very basic example:
import MySQLdb, glob, os, re, shutil
from ftplib import FTP
a=file_to_fetch
ftp=FTP('ftp_server')
ftp.login('user_name','password')
try:
aa=ftp.nlst(a)
b='/home/a'
bb=os.path.basename(aa[0])
e=os.path.basename(b)
c=open(b, 'wb')
ftp.retrbinary('RETR '+aa[0], c.write)
c.close()
well u just copied some pieces of my own code to maybe help you get started
with ftp as you maybe don't know that you have to open a file for writing &
then write into it the stream from ftp retrieve cmd.
On Mon, Apr 7, 2008 at 7:16 AM, Alan Gauld <[EMAIL PROTECTED]>
wrote:
>
> "Nathan McBride" <[EMAIL PROTECTED]> wrote
>
> > Going off of wha tyou said, if I choose to use ftp, is there a way i
> > could do everything from within python including the server to get
> > the
> > files? Is there like a ftp module for python to help in the passing
> > of
> > the files between the computers?
>
> Yes, there is an ftp module in the standard library.
>
> Alan G
>
>
> _______________________________________________
> Tutor maillist - [email protected]
> http://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor