Newbie using Python
vtail
vtail at yandex.ru
Thu Aug 15 08:20:09 EDT 2002
"Mark Welborn" <markw at electromotor.com> wrote in message news:<mailman.1029391950.1665.python-list at python.org>...
> Hello everyone,
>
> How does a person get Python to make a system call under Windows ? I have
> tried 'import os' and 'import sys', but I must not understand the fine
> points of making this work in a Python script. Do I use the Windows
> commands as in MS-DOS prompt or do I need a Python module using Python
> commands ?
Hello Mark.
Why don't you try this code:
---- run_command.py
import os
os.system("dir *.exe")
os.system("dir *.*")
----
Hope this helps.
Victor <vtail at yandex.ru>.
More information about the Python-list
mailing list