Skip to content
Snippets Groups Projects
Commit e71e9959 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

...

parent d65dc9f9
No related branches found
No related tags found
No related merge requests found
# Rolf Niepraschk, Rolf.Niepraschk@ptb.de, 2023-03-13
import sys, json
def extractCorvusArray(s):
a = s.split()
return [float(a[0]), float(a[1])]
data = json.loads(sys.argv[2])
x = data.get('_x')
print(json.dumps('Result':extractCorvusArray(x)))
......@@ -8,7 +8,8 @@
Während der normalen Kommunikation zwischen DEVHUB-Server und Python-Prozess ist ein Test des Python-Codes schwierig. Es empfiehlt sich daher, das Python-Programm unabhängig vom DEVHUB-Server zu testen. Im konkreten Fall kann das folgendermaßen geschehen:
```
python3 corvus.py '{"PostScriptPy": "corvus", "PostScriptInput": {"Index":1}}' '{"_x": " -1.000 17"}'
python3 corvus.py '{"PostScriptPy": "corvus", "PostScriptInput": {"Index":1}}' \
'{"_x": " -1.000 17"}'
```
Ergebnis:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment