init
This commit is contained in:
commit
90f92d4c66
20 changed files with 425 additions and 0 deletions
20
bin/pyrep
Executable file
20
bin/pyrep
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# Requirements: nrepl-python-client
|
||||
#
|
||||
|
||||
import sys
|
||||
import nrepl
|
||||
|
||||
code = sys.stdin.read().strip()
|
||||
print(code)
|
||||
c = nrepl.connect("nrepl://localhost:1667")
|
||||
c.write({"op": "eval", "code": code})
|
||||
response = c.read()
|
||||
try:
|
||||
print(";; " + response['value'])
|
||||
except KeyError:
|
||||
try:
|
||||
print(";; ERROR: " + response['err'])
|
||||
except KeyError:
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue