[Tutor] Trying to prevent ftplib from locking my script
kent37 at tds.net
Tue Oct 4 21:54:23 CEST 2005
Tim Rupp wrote:
> Hi list,
> I'm trying to write a python script that uses ftplib to send items to a
> local server I have. I want to be able to give ftplib a file to send,
> and then just have it sort of go into the background and do its thing
> while the script does other "stuff"
> My attempts at it so far have caused the whole script to wait until the
> ftp transfer finishes (essentially pausing the rest of the script).
> Any ideas on how I can just make it go away, allowing me to do other
> stuff like output various info? Can threads be used? If so, does anyone
> have good resources to point me to for python threading?
Yes, threads are one solution to this problem. Twisted and Kamaelia are two other solutions. See this msg for links to some helpful discussions:
More information about the Tutor