threads instead od processes

Markus Franz mail at
Fri Jul 2 17:28:20 CEST 2004


I've got a little script:

import sys, os
for x in sys.argv[1:]:
    pid = os.fork()
    if pid == 0:
        # do something with x

This creates some new processes (depending on the number of passed command
line arguments) and inside each process x is one command line argument.

Now my question is: How can I do the same by using threads instead of
Thank you.

Best regards

Markus Franz

More information about the Python-list mailing list