

def _dispatch_terminal(self, cmd):
    cmd = self.clean_cmd(cmd)
    cmd = self.escape_dquote(cmd)
    args = ['osascript']
    args.extend(['-e', (('tell application "Terminal" to do script "' + cmd) + '" in front window')])
    subprocess.Popen(args)

dataset/ETHPy150Open randy3k/SendTextPlus/textsender.py TextSender._dispatch_terminal/original