Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the _subprocess module

There is a module called _subprocess, as seen in that question.

I was able to import it, but I haven't found any documentation about what is it and how it is different from subprocess.

Anybody here know what this module does?

like image 376
iTayb Avatar asked Jan 18 '26 21:01

iTayb


1 Answers

_subprocess seems to be a Windows-specific C extension module that implements some of the functionality that's used by the subprocess module proper. If you look in the source for subprocess, _subprocess is only referred to inside of if mswindows blocks.

It's a detail of the implementation, and so you definitely shouldn't use it in any actual code (though of course some curiosity is never a bad thing).

Here's the source for `_subprocess'. The comment at the top says

* support routines for subprocess module
*
* Currently, this extension module is only required when using the
* subprocess module on Windows, but in the future, stubs for other
* platforms might be added here as well.
like image 72
Danica Avatar answered Jan 21 '26 10:01

Danica