Py3: decode subprocess output

Gnarlodious gnarlodious at
Wed Nov 3 16:59:21 CET 2010

OK, it turns out I had to tweak the parsing minimally for Python3:

1) Substrings such as st[5] no longer work (returns an ascii number),
instead st[5:6] selects one character

2) Replacements need to specified as bytes: s.replace('R','*') change
to s.replace(b'R',b'*')

So I think this problem is solved.

-- Gnarlie

More information about the Python-list mailing list