Re: thread and process

2011-08-13 Thread Dave Angel
On 01/-10/-28163 02:59 PM, 守株待兔 wrote: please see my code: import os import threading print threading.currentThread() print "i am parent ",os.getpid() ret = os.fork() print "i am here",os.getpid() print threading.currentThread() if ret == 0: print threading.currentThread() els

Re: thread and process

2011-08-13 Thread Carl Banks
On Saturday, August 13, 2011 2:09:55 AM UTC-7, 守株待兔 wrote: > please see my code: > import os > import  threading > print  threading.currentThread()  > print "i am parent ",os.getpid() > ret  =  os.fork() > print  "i am here",os.getpid() > print  threading.currentThread() > if  ret  ==  0: >   

Re: thread and process

2011-08-13 Thread aspineux
On Aug 13, 11:09 am, "守株待兔" <1248283...@qq.com> wrote: > please see my code: > import os > import threading > print threading.currentThread() > print "i am parent ",os.getpid() > ret = os.fork() > print "i am here",os.getpid() > print threading.currentThread() > if ret == 0: > p

thread and process

2011-08-13 Thread 守株待兔
please see my code: import os import threading print threading.currentThread() print "i am parent ",os.getpid() ret = os.fork() print "i am here",os.getpid() print threading.currentThread() if ret == 0: print threading.currentThread() else: os.wait() print thre

Re: ftp EOF error, thread and process

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 10:44:11 -0200, nemo 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

ftp EOF error, thread and process

2008-12-28 Thread nemo
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('loc