The subprocess module

From IronPython Cookbook

The subprocess Module

I've written a partial .NET implementation of the subprocess module. There are currently a few limitations:

  • Popen.communicate doesn't work
  • Can't redirect stdin except for PIPE
  • Can't redirect stderr to stdout (i.e. using stderr=subprocess.STDOUT)
  • Can't redirect to a file descriptor
  • univeral_newlines is not supported
  • Command strings are flaky (lists work much better). Use shell=True if using command strings.

Except for what's listed above, it passes most (about 2/3) of the subprocess test cases.

The code is under the Ms-PL, except for list2cmdline which is under the PSF license. I believe this is the correct way to do it (but correct me if I'm wrong!).

The module is available at