0
PacRat
6y

i heard capturing stdout was important.

quick question, is there an easy way to escape the extra characters that the second function outputs?
the output is:
b'subprocess.Popen test\n'
i'd like it to just say "subprocess.Popen test"

Comments
  • 0
    I really feel like this should be asked on Stack Overflow instead of devrant.
  • 0
    You might want to try looking at the pexpect library. I was trying to do some complicated stuff with Popen, and pexpect makes a lot of it easier.
  • 0
    *psst*
    You can easily remove that, duckduckgo it
  • 0
    @djsumdog i asked a 'quick question', idc who answers. if someone happened to know off of the top of their head at the time i posted i'd be able to try something quicker; StOve folks are better egotists than they are developmental advisors
  • 0
    To remove the b use the decode function.
Add Comment