(self, *popenargs, **kwargs)
return chk_out
Select check_output implementation
Select check_output implementation
Select check_output implementation
def check_output(self, *popenargs, **kwargs):
        """Select check_output implementation"""
        try:
            # if Python 3
            if sys.version_info[0] >= 3:
                output = subprocess.check_output(*popenargs, **kwargs)
                chk_out = output.decode()
            # if Python >= 2.7
            elif sys.version_info[0] >= 2 and sys.version_info[1] >= 7:
                chk_out = subprocess.check_output(*popenargs, **kwargs)
            # if Python < 2.7
            else:
                chk_out = self._check_output(*popenargs, **kwargs)
        except OSError:
            return ""

        return chk_out
def check_output ( self , * popenargs , * * kwargs ) : try : # if Python 3 if sys . version_info [ 0 ] >= 3 : output = subprocess . check_output ( * popenargs , * * kwargs ) chk_out = output . decode ( ) # if Python >= 2.7 elif sys . version_info [ 0 ] >= 2 and sys . version_info [ 1 ] >= 7 : chk_out = subprocess . check_output ( * popenargs , * * kwargs ) # if Python < 2.7 else : chk_out = self . _check_output ( * popenargs , * * kwargs ) except OSError : return "" return chk_out