[Tutor] Newbie Question Again.

Derrick 'dman' Hudson dman@dman.ddts.net
Sat, 8 Jun 2002 22:01:57 -0500


--X1bOJ3K7DJ5YkBrT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jun 08, 2002 at 09:26:37PM -0500, SA wrote:
| Hi Everyone-
|=20
|     I'm running Python on Mac OSX. (bsd based system) How do I call a
| program from outside Python to be run from within my Python script/ In ot=
her
| words if I have an executable file, say "someprogram", how would I execute
| this program from within a python script.

There are various ways depending on what you want to do with it.  In
the simplest case, this works :

import os
os.system( "command" )

-D

--=20

"GUIs normally make it simple to accomplish simple actions and
impossible to accomplish complex actions."
    --Doug Gwyn  (22/Jun/91 in comp.unix.wizards)
=20
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg


--X1bOJ3K7DJ5YkBrT
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj0CxSUACgkQO8l8XBKTpRQ35gCffgo8DqrDIvax98w5d3LO74fu
4p0AoKDTThLPT0FaikbcGEKK3QXNbUfF
=bs4X
-----END PGP SIGNATURE-----

--X1bOJ3K7DJ5YkBrT--