Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-40280: Emscripten has no support for subprocesses #29872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,10 @@ def _syscmd_file(target, default=''):
# XXX Others too ?
return default

import subprocess
try:
import subprocess
except ImportError:
return default
target = _follow_symlinks(target)
# "file" output is locale dependent: force the usage of the C locale
# to get deterministic behavior.
Expand Down Expand Up @@ -746,7 +749,10 @@ def from_subprocess():
"""
Fall back to `uname -p`
"""
import subprocess
try:
import subprocess
except ImportError:
return None
try:
return subprocess.check_output(
['uname', '-p'],
Expand Down
2 changes: 2 additions & 0 deletions Lib/pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down