Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > running a c program from a python script

Reply
Thread Tools

running a c program from a python script

 
 
johnclare
Guest
Posts: n/a
 
      12-03-2005
Help - I'm (very) new to python. I want to run run a c executable from
a python script - how do I do this?

Many thanks for your help,
j

 
Reply With Quote
 
 
 
 
Scott David Daniels
Guest
Posts: n/a
 
      12-03-2005
johnclare wrote:
> Help - I'm (very) new to python. I want to run run a c executable from
> a python script - how do I do this?
>
> Many thanks for your help,
> j
>

generally:
import os
os.execl(program_location)
Look in os, Process management for further details. The next time
you ask, you really should mention your OS and Python versions; the
fiddley details differ.

--Scott David Daniels
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
johnclare
Guest
Posts: n/a
 
      12-03-2005
Great stuff, thanks, it works.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doesn't MS-Windows likes Python ? (or: why more than 20 sec delaywhen running a program from Python) Stef Mientki Python 0 11-01-2009 11:42 PM
Block execution of script while same script is already running MrBanabas@googlemail.com Ruby 2 12-17-2008 06:03 PM
How to fetch output of some other script in the current running perl script? ritugoyal12@gmail.com Perl Misc 4 10-27-2007 03:52 PM
modify a long-running python script while it is running? Benjamin Rutt Python 2 12-20-2005 01:42 PM
running a C program with python script M.N.A.Smadi Python 1 03-09-2005 09:41 AM



Advertisments