executing an external app

J

Joseph Krauze

Hi all,

I have a simple question which I cannot solve (relatively new to Python).
I want to write a script that executes an application on the go. I looked
into the exec*e() calls but the problem there is that they do not return.
I also looked into execfile() but here the PATH is not taken into account
and I couldn't figure out to pass the file that's executed arguments.

So, is there a simple way to execute an external app?
i.e. execvpe('cat', 'myFile') - this will not return

Thanks,
Joseph
 
J

Jeff Epler

Try one or more of these:

os.system, os.spawn*, popen2.*, os.fork + os.exec* (where os.fork is
supported, at least), popen5 (third-party module, posix/unix only),
win32??? (not sure of name, included in win32all, for Windows only)

Jeff
 
J

Joe Francia

Joseph said:
Hi all,

I have a simple question which I cannot solve (relatively new to Python).
I want to write a script that executes an application on the go. I looked
into the exec*e() calls but the problem there is that they do not return.
I also looked into execfile() but here the PATH is not taken into account
and I couldn't figure out to pass the file that's executed arguments.

So, is there a simple way to execute an external app?
i.e. execvpe('cat', 'myFile') - this will not return

Thanks,
Joseph

Look at os.spawn* or os.popen*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,498
Latest member
log5Sshell/alfa5

Latest Threads

Top