Python to call commands, e.g. "find , perl scripts , nmap , and others" is this possible?

Klaus Baldermann 06361993941-0001 at t-online.de
Sat Jun 3 18:35:24 EDT 2000


On Thu, 1 Jun 2000 18:17:27 -0700, "Emile van Sebille"
<emile at fenx.com> wrote:

>see if that makes a difference.  Pipes in winxx are somewhat=20
>flakey as I understand.

>>>> mylist = os.popen('dir').readlines()
>Traceback (innermost last):
>  File "<interactive input>", line 1, in ?
>OSError: (0, 'Error')

On Windows, you usually have 2 Python interpreters:
- Python.exe, which gives you a dos style window, os.popen works
- PythonW.exe, which gives you only the windows opened by your
scripts, but os.popen doesn't work.

So, if you don't mind the (additional) dos style window, you can start
idle via Python.exe instead of PythonW.exe, and have a working
os.popen.

HTH
Klaus



More information about the Python-list mailing list