RSS Forums RSS
Please support our Python advertiser: Programming Forums
Views: 2632 | Replies: 1 | Thread Tools  Display Modes
Reply
Join Date: Aug 2005
Posts: 18
Reputation: Avner .H. is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Avner .H. Avner .H. is offline Offline
Newbie Poster

Help running a process from a python program

  #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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Posts: 142
Reputation: G-Do is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 11
G-Do's Avatar
G-Do G-Do is offline Offline
Junior Poster

Re: running a process from a python program

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the Python Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 7:59 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC