running a process from a python program

Reply

Join Date: Aug 2005
Posts: 18
Reputation: Avner .H. is an unknown quantity at this point 
Solved Threads: 0
Avner .H. Avner .H. is offline Offline
Newbie Poster

running a process from a python program

 
0
  #1
Sep 7th, 2005
Hello beautiful people..!

i need a way to run a python program from another one...

does anyone know what is the best way to call a process which runs another program in python, and when running that child process, causing the parent process to continue without waiting for the child process to return?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 146
Reputation: G-Do is an unknown quantity at this point 
Solved Threads: 28
G-Do's Avatar
G-Do G-Do is offline Offline
Junior Poster

Re: running a process from a python program

 
0
  #2
Sep 9th, 2005
To get two Python functions running concurrently, you're going to need to look at Python's threading modules.

There is a good site with example code here.

As for the main question, well, you could always exec() the second Python program from the first. But please don't do this unless you absolutely have to. A much neater solution is to import the second Python program as a module, then call its functions in a separate thread.
Vi veri veniversum vivus vici
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC