Jun-12-2019, 02:10 PM
(Jun-11-2019, 10:42 PM)snippsat Wrote: Can show one withrun()
that has gotten new parameters likecapture_output=True
.
name = subprocess.run(['id', '-un'], encoding='utf8', capture_output=True)
I tried this, but it gave me something that doesn't look like an error, but also not what I was looking for :P
Output:CompletedProcess(args=['id', '-un'], returncode=0, stdout='username\n', stderr='')
But Gribouillis proposal worked, so are gonna mark the thread as solved.Thank you both for your help and time!