b is bytes. You need to convert it to a string and then remove the newline with strip method
print(p.decode().strip())
Recommended Tutorials:
subprocess return of stdout after running Linux command
|
|
Messages In This Thread |
subprocess return of stdout after running Linux command - by ivanachukapawn - Oct-13-2016, 03:55 PM
RE: subprocess return of stdout after running Linux command - by metulburr - Oct-13-2016, 04:11 PM
RE: subprocess return of stdout after running Linux command - by wavic - Oct-13-2016, 04:13 PM
RE: subprocess return of stdout after running Linux command - by ivanachukapawn - Oct-13-2016, 05:06 PM
RE: subprocess return of stdout after running Linux command - by wavic - Oct-13-2016, 05:13 PM
RE: subprocess return of stdout after running Linux command - by micseydel - Oct-13-2016, 05:32 PM
RE: subprocess return of stdout after running Linux command - by ivanachukapawn - Oct-13-2016, 05:33 PM
RE: subprocess return of stdout after running Linux command - by micseydel - Oct-13-2016, 05:37 PM
|