ftp EOF error, thread and process

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Dec 29 00:51:05 EST 2008


En Sun, 28 Dec 2008 10:44:11 -0200, nemo <nemokingdom at gmail.com> escribió:

> My code like this raise an EOFError, It happens if I use the Process
> module,
> while, if I use thread.start_new_thread(ftp.pwd,()), it seems works
> well.
> And I wondered why.
>
> from ftplib import FTP
> import thread
> from multiprocessing import Process
>
> if __name__ == '__main__':
>     ftp = FTP('localhost', 'movie', 'movie')
>     print ftp.pwd()
>     p = Process(target = ftp.pwd)         # thread.start_new_thread
> (ftp.pwd,()),
>     p.start()
>     p.join()

You asked the same question last week.
What exactly do you want to do? Using another process in this example is  
just not sensible.

-- 
Gabriel Genellina




More information about the Python-list mailing list