On Apr 3, 1:53 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm confused by the number of variations on "popen" that Python offers. > > I'm using os.popen in my programs without difficulty. Is this wrong? > Should I be using popen 2, popen3, etc.? I'm not clear on what the > advantages of popen2, 3 etc. are: they seem a lot more complicated. > > -- > Kevin Walzer > Code by Kevinhttp://www.codebykevin.com
There's nothing wrong with using os.popen. Some of them are Unix specific though. And that module's functionality along with os.system, os.spawn and commands have all be integrated into the subprocess module, which I think is much less confusing. The only places I've seen a fairly coherent run-down of the os.popen modules is the "Python in a Nutshell" book and maybe (I can't remember for sure) "Core Python Programming". See http://pydoc.org/2.4.1/subprocess.html for more info on the subprocess module. Mike -- http://mail.python.org/mailman/listinfo/python-list