943,908 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 4903
  • Python RSS
Sep 7th, 2005
0

running a process from a python program

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Avner .H. is offline Offline
18 posts
since Aug 2005
Sep 9th, 2005
0

Re: running a process from a python program

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.
Reputation Points: 41
Solved Threads: 31
Junior Poster
G-Do is offline Offline
146 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: backup files to cdr ?
Next Thread in Python Forum Timeline: Help making a function





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC