Displaying os commands

Fredrik Lundh fredrik at pythonware.com
Tue May 25 09:57:41 EDT 2004


"Perochon Sebastien" wrote:

> When I do (on Windows):
>
> os.system('dir')
>
> The command 'dir' is well executed but the command itself 'c:\dir' is not
> displayed.

the command is dir, not c:\dir.

> How to display the launched command ?

print command
os.system(command)

</F>







More information about the Python-list mailing list