After MANY hours searching online documentation, i still cannot find some simple examples of using the subprocess module to execute commands in the windows console and read back in the output from said command(everything is for unix). So for example, if i wanted to do something like use 7z.exe to simply test a bunch of zipped files, and then check the output to the console to see if there were any errors, how could I do this ?

Luckyly you found DaniWeb and we have here our Dr. Gribouillis, who wrote us nice class to help us out: http://www.daniweb.com/software-development/python/code/257449 It uses subprocess.popen, the import is little hiding inside the class for encapsulation.

Oh how i love Daniweb!

Can someone please explain the advantages/disadvantages to using subprocess.Popen.wait() versus subprocess.Popen.communicate() ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.