Jul-09-2021, 08:59 AM
subprocess.check_output(['ps', 'uaxw']).splitlines()Will output raw
bytes
because the encoding is missing.This is the default behavior.
subprocess.check_output(['ps', 'uaxw'], encoding="utf8").splitlines()Will decode as utf8 and return a
str
.Docs: https://docs.python.org/3/library/subpro...eck_output
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!