executing shell commands

Phlip phlip_cpp at my-deja.com
Thu Feb 22 15:37:30 EST 2001


chris lamb wrote:

> I am very new to Python and having to learn quickly! I am enjoying it,
> however. It is a flexible and intuitive environment.
> 
> Can someone advise me if there is an equivalent to running a system
> process from inside a script as there is in Perl? I mean in perl if I use
> backticks to enclose a system command, then the command is executed. Is
> there a comparable way of running these commands from Python?

        os.system ("ls -l")

> I want to build dynamic javadoc commands and module names and run the
> commands inside the script.

May I suggest you use 'make'?

-- 
  Phlip                          phlip_cpp at my-deja.com
============ http://c2.com/cgi/wiki?PhlIp ============
  --  My opinions are those of your employer  --



More information about the Python-list mailing list