ftp EOF error, thread and process

nemo nemokingdom at gmail.com
Sun Dec 28 13:44:11 CET 2008


Hi all,
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()



More information about the Python-list mailing list