def shell(self, irc, msg, args, text):
        self.log.info('Unix: running command "%s" for %s/%s', text, msg.nick,
                      irc.network)
        try:
            with open(os.devnull) as null:
                inst = subprocess.Popen(text,
                                        shell=True,
                                        stdout=subprocess.PIPE,
                                        stderr=subprocess.PIPE,
                                        stdin=null)
        except OSError as e:
            irc.error('It seems the shell (%s) was not available (%s)' %
                      (os.getenv('SHELL'), e), Raise=True)
        result = inst.communicate()
        if result[1]: # stderr
            irc.error(' '.join(result[1].decode('utf8').split()))
        if result[0]: # stdout
            response = result[0].decode('utf8').splitlines()
            response = [l for l in response if l]
            irc.replies(response)
<command to call with any arguments>
dataset/ETHPy150Open ProgVal/Limnoria/plugins/Unix/plugin.py/Unix.shell