ftp design question

nemo nemokingdom at gmail.com
Mon Dec 29 04:11:06 CET 2008

I'm on a toy ftp project and I want it to be convinient for the user
to cancel an undergoing downloading while continue others. The
following code explains:
for file in download_files:
    self.ftp.retrbinary('RETR '+file,  fileHandler)
Thers seems not a solid way to cancel this transfer and I considered
thread or process but I can't handle this correctly.
Thread: I can't kill the thread in another thread, so...
Process: There seems something wrong(raise an EOFError exception) when
I use Process(target = download_fun, args = (dir,)) for each
downloading after connection built.
Some suggestions?

More information about the Python-list mailing list