elisp: Python script for manual testing of protocol

This commit is contained in:
Michael Volz 2025-01-27 17:45:54 +01:00
parent 94dab46a38
commit f7b0bb5e6e

31
elisp/test-jx.py Executable file
View file

@ -0,0 +1,31 @@
#!/usr/bin/env python
import json
import sys
def jx_ask():
return None
if __name__ == "__main__":
question1 = {
"command": "prompt",
"type": "string",
"prompt": "Enter your name: ",
}
print(json.dumps(question1))
answer = input()
print(answer, file=sys.stderr)
question2 = {
"command": "prompt",
"type": "string",
"prompt": "Please try again: ",
}
print(json.dumps(question2))
answer = input()
print(answer, file=sys.stderr)
success = {
"command": "success",
}
print(json.dumps(success))