FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How can I run external program in python





maramr_08
i'm new programer in python
i have a problem to run prolog file from python.

and at the same time i will forwarde the value of varibles from python program to prolog filr yhen i will nedd to read the result

any help or suggestions
Maram
pedepy
see if this would suit your needs:

http://www.python.org/doc/2.5.2/lib/module-popen2.html
albuferque
I guess you are looking for os.system, as in:

import os
cmd = 'ls -l /usr/bin'
os.system(cmd)

Note that this will not capture the output of the system command; you
can use the os.popen family of commands to do that.

For more info on process control, take a look at:

http://www.python.org/doc/current/lib/os-process.html
Related topics
Python execute External Application. How?
Do external link Exchange and bandwidth limit voilate TOS?
Fortran Tutorials(77)
is there a program that...
Programming in a lot of languages
DreamWeaver or Visual Studio
Try to find local network adress
ejecting USB drive.
Writing your first Java Program
Auto Run a Program if Closed?
C++ TUTORIAL : INTRODUCTION TO C++
Creating a new Operating System
warning
Gaining Speed In Xp
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.