def sh(self, cmd, ignore_error=False, cwd=None, *args, **kwargs):
        kwargs.update({
            'shell': True,
            'cwd': cwd or self.fpath,
            'stderr': subprocess.STDOUT,
            'stdout': subprocess.PIPE})
        log.debug('cmd: %s %s' % (cmd, kwargs))
        return sh(cmd, ignore_error=ignore_error, **kwargs)

        # p = subprocess.Popen(cmd, **kwargs)
        # p_stdout = p.communicate()[0]
        # if p.returncode and not ignore_error:
        #     raise Exception("Subprocess return code: %d\n%r\n%r" % (
        #         p.returncode, cmd, p_stdout))
        # return p_stdout #.rstrip()