On 09/21/2017 04:46 PM, Evuraan wrote: > Greetings! > > My search-fu failed me, so thought of finally asking this question here. > > > How can I work around this issue where subprocess.getstatusoutput gives > up, on Python 3.5.2:
You picked a fun one! First off, subprocess.getstatusoutput is a dubious API, because if you call a command on a UNIX/Linux flavored system, it has the possibility of writing to both the standard output and standard error streams, but this API cannot separate them. I remember fighting this in something years and years ago. Second, this thing has changed even in the Python 3.x series, which is a bad sign (see docs): first it didn't exist, then it was put back, then the first element of the return tuple changed. Third, according to the docs, "none of the guarantees described above regarding security and exception handling consistency are valid for these functions" (referring to "legacy" getstatusoutput and getoutput) Probably - don't use it. You have your main hint in the error messages: "Non-ISO extended-ASCII text" along with failures claiming a problem decoding something that is not in the range of standard ASCII: 'ascii' codec can't decode byte 0xe0 in position 189: ordinal not in range(128)' Maybe try using subprocess.check_output, although it's not a direct replacement. But: do you really want to "tail" what's probably not really a plaintext file? Just guessing, but the .db as well as the error msgs are a hint. You'll need to fill us in more on what you want to accomplish. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor