[Tutor] ftp inside function
Kent Johnson
kent37 at tds.net
Thu Sep 27 12:41:06 CEST 2007
Nelson Kusuma wrote:
> Dear Kent
>
> Thanks Kent, i made loop function to create directory
> tree, and for the first login, i also want to make
> inside function :
>
> def exeFtp():
> session=ftplib.FTP('myWorkstation','tes', 'tes')
> direc="d:\TES"
> direcFtp(direc) #function to create directory
> session.close()
> but this function can't execute although i can execute
> one buy one in GUI but not in that function, Is there
> any something wrong? Thanks
What happens when you run the program? Please copy and paste the exact
error message you get, including the traceback, into your email.
My guess is that you have to pass session as a parameter to direcFtp.
Kent
PS Please use Reply All to reply to the list.
More information about the Tutor
mailing list