Re: spawn or fork

2004-12-08 Thread sjdevnull
Eric Brunel wrote: > > Basically, I have the situation where a user (via the web) requests data > > from a database that has to be written to file. However, this takes a couple > > of minutes. So the way I thought of doing this is: > > 1. create an empty file. > > 2a. tell the user where to look fo

Re: spawn or fork

2004-12-08 Thread Eric Brunel
C Gillespie wrote: What are you trying to do exactly? If you provide more explanations, we may provide a better help than the simplistic one above. Dear All, Thanks for the suggestions. Basically, I have the situation where a user (via the web) requests data from a database that has to be written t

Re: spawn or fork

2004-12-08 Thread C Gillespie
> What are you trying to do exactly? If you provide more explanations, we may > provide a better help than the simplistic one above. Dear All, Thanks for the suggestions. Basically, I have the situation where a user (via the web) requests data from a database that has to be written to file. Howe

Re: spawn or fork

2004-12-08 Thread Diez B. Roggisch
> Thanks, but can I call it using spawn? No, but you can spawn a python interpreter that calls it. Like this: spawnv(P_, sys.executable, ['-c', 'import myfile; foo()']) But I suggest you use fork - then you can call it in the interpreter itself. -- Regards, Diez B. Roggisch -- http://mail.pyt

Re: spawn or fork

2004-12-08 Thread Eric Brunel
C Gillespie wrote: Dear All, I have a function def printHello(): fp = open('file','w') fp.write('hello') fp.close() I would like to call that function using spawn or fork. My questions are: 1. Which should I use 2. How do I call that function if it is d

Re: spawn or fork

2004-12-08 Thread C Gillespie
"Miki Tebeka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Colin, > > > I have a function > > def printHello(): > > fp = open('file','w') > > fp.write('hello') > > fp.close(

Re: spawn or fork

2004-12-08 Thread Miki Tebeka
Hello Colin, > I have a function > def printHello(): > fp = open('file','w') > fp.write('hello') > fp.close() > > I would like to call that function using spawn or fork. My questions are: > > 1. Which should I use spawn and

spawn or fork

2004-12-08 Thread C Gillespie
Dear All, I have a function def printHello(): fp = open('file','w') fp.write('hello') fp.close() I would like to call that function using spawn or fork. My questions are: 1. Which should I use 2. How do I call that function if it is defined in the