Is there any multiprocessing type module for Python 2.3? I am stuck using 2.3 for the programs I interface with and would like to be able to setup some multiprocessing as the tasks I do only use one CPU and are really inefficient.
I would like each thread/process to handle its own global variables and each thread/process should not share any variables with any other thread/process. Basically I would just like to have a queue of files that need be run through a function and each run would be an entirely new thread.
I have tried using thread.start_new_thread
, but it just turned into a mess with my global variables.
A thought just occurred to me, can I do a os.popen('python C:\function_dir\function.py vars...')
from each new thread? Sounds rather ugly, but I don't see why it wouldn't work. The master program wouldn't continue until the os.popen
"thread" finishes correct?
Any thoughts or modules I may be overlooking?