Entry
How do I shell-out on Win32 systems with Python?
Jul 5th, 2000 10:01
Nathan Wallace, Hans Nowak, Snippet 180, Arpad Kiss
"""
Packages: operating_systems.windows
"""
"""
> I know that on Unix systems you can use the commands or the popen
> modules.
>
> What do I have to do to get the output from a command (like 'dir', or a
> batch file) executed on a Win32 system?
Try to use the win32pipe modul! Here is an example:
"""
import win32pipe
i,o,e=win32pipe.popen3("dir")
pout=o.readlines()
perr=e.readlines()
# ....