How to start more than one process at the same time?

dbandler at gmail.com dbandler at gmail.com
Fri Jul 14 11:28:10 EDT 2006


Have you considered a multi-threaded solution?

The following websites offer reasonable examples:

http://en.wikibooks.org/wiki/Programming:Python/Threading
http://www.wellho.net/solutions/python-python-threads-a-first-example.html

-Derek

Dirk Hagemann wrote:
> Hi!
>
> How can I start several jobs at the same time with python? I want to
> collect data from some servers and I don't want to wait until the first
> server is finished. These jobs should run parallel to save time.
> What I tried is this:
> os.popen('regdmp -m \\\\server1
> "HKEY_LOCAL_MACHINE\\Software\\Intel\\LanDesk\\VirusProtect6\\CurrentVersion\\Clients"
> >> av_server1.txt')
> os.popen('regdmp -m \\\\server2
> "HKEY_LOCAL_MACHINE\\Software\\Intel\\LanDesk\\VirusProtect6\\CurrentVersion\\Clients"
> >> av_server2.txt')
> os.popen('regdmp -m \\\\server3
> "HKEY_LOCAL_MACHINE\\Software\\Intel\\LanDesk\\VirusProtect6\\CurrentVersion\\Clients"
> >> av_server3.txt')
>
> I didn't get an error-message, but I also didn't get a result. No
> text-file was created.
> I also tried to do the same thing via batch-files, but that didn't
> change anything.
>
> Is it just not possible or what am I doing wrong?
> 
> Thanks for any help!
> Dirk Hagemann




More information about the Python-list mailing list