newbie question

Oleg Broytmann phd at phd.fep.ru
Thu Jul 5 05:46:05 EDT 2001


On Thu, 5 Jul 2001, alphaZeta wrote:
> I didn't find any documentation (lib and tut) about how to execute a program
> in a python script.
> Does anybody know ?

   os.system("ls -l")

> For example : I would like to store in a variable the result of a call to
> the system.
> alike : >>> a = sys.exe("ls -l")

   a = os.popen("ls -l", 'r').read()

Oleg.
----
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list