En Fri, 26 Dec 2008 11:07:30 -0200, nemo <nemoking...@gmail.com> escribió:
There seems something wrong when I use multiprocessing.Process with ftplib, [...] It works well but when I using the Process module, something seems wrong: ftp = qftp(host, port, user, password) p = multiprocessing.Process(target = ftp.connect) p.join() ftp.ftp.pwd() #after join, i think a connection has made, but it throws an exception This give me a 'NoneType object has no attribute sendall' exception. I wondered why?
After p.join(), the second process has finished. The global variable ftp isn't shared between them - so it does not reflect the changes made in the other process.
An introductory article to multiprocessing: http://www.doughellmann.com/articles/CompletelyDifferent-2007-10-multiprocessing/index.html -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list