spawn or fork

Eric Brunel eric_brunel at despammed.com
Wed Dec 8 17:07:20 CET 2004


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 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 for the file.
> 2b. spawn a process to insert data into the file.
> 
> This way the user can see the data as its being written.

You may want to use threads for this instead of processes. See 
http://docs.python.org/lib/module-threading.html

HTH
-- 
- Eric Brunel <eric (underscore) brunel (at) despammed (dot) com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com



More information about the Python-list mailing list