

def _dispatch_rstudio_linux(self, cmd):
    wid = subprocess.check_output(['xdotool', 'search', '--onlyvisible', '--class', 'rstudio'])
    if wid:
        wid = cmd.decode('utf-8').strip().split('\n')[(- 1)]
        cmd = self.clean_cmd(cmd)
        self.set_clipboard(cmd)
        subprocess.check_output(['xdotool', 'key', '--window', wid, '--clearmodifiers', 'ctrl+v'])
        subprocess.check_output(['xdotool', 'key', '--window', wid, '--clearmodifiers', 'Return'])
        self.reset_clipboard()

dataset/ETHPy150Open randy3k/SendTextPlus/textsender.py TextSender._dispatch_rstudio_linux/VarMisuse@38/60 `wid`->`cmd`