bpo-40280: Emscripten has no support for subprocesses (GH-29872)

Fixes ``platform`` and ``help()`` on emscripten.

Signed-off-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
This commit is contained in:
Christian Heimes 2021-12-02 11:17:37 +02:00 committed by GitHub
parent 226d22ff2d
commit cb2b3c8d35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -1556,6 +1556,8 @@ def getpager():
return plainpager
if not sys.stdin.isatty() or not sys.stdout.isatty():
return plainpager
if sys.platform == "emscripten":
return plainpager
use_pager = os.environ.get('MANPAGER') or os.environ.get('PAGER')
if use_pager:
if sys.platform == 'win32': # pipes completely broken in Windows