Problem using subprocess.Popen on windows
Nicholas Bastin
nick.bastin at gmail.com
Sun Oct 7 20:43:40 EDT 2007
More information about the Python-list mailing list
Sun Oct 7 20:43:40 EDT 2007
- Previous message (by thread): Off Topic: Gmail hates newsgroups!!!
- Next message (by thread): Problem using subprocess.Popen on windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/7/07, jorma kala <jjkk73 at gmail.com> wrote: > from subprocess import * > > p1 = Popen(["dir"], stdout=PIPE) > output = p1.communicate()[0] > > > But I get a WindowsError : [Error 2] File Not Found Tim answered your actual question, but why are you doing this in the first place? The Python standard library provides all the functionality that dir will provide and you don't have to parse the output... Look into <http://www.python.org/doc/lib/os-file-dir.html>, and specifically, os.listdir(path). -- Nick
- Previous message (by thread): Off Topic: Gmail hates newsgroups!!!
- Next message (by thread): Problem using subprocess.Popen on windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list