/usr/lib/petscdir/3.7.7/x86_64-linux-gnu-real-debug/bin/saws/SAWs.py is in libpetsc3.7.7-dbg 3.7.7+dfsg1-2build5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #! /usr/bin/python
import os, sys
import json
try:
import requests
except:
raise RuntimeError('Run "sudo easy_install requests" before running this script')
#
# If requests does not exist use sudo easy_install requests to install it.
#
host = os.getenv('SAWS_HOST')
if not host:
host = 'localhost'
port = os.getenv('SAWS_PORT')
if not port:
port = '8080'
url = 'http://'+host+':'+port+'/SAWs'
r = requests.get(url)
j = json.loads(r.content)
# Example that access the functions in the stack
j = j['directories']['SAWs_ROOT_DIRECTORY']['directories']['PETSc']['directories']['Stack']['variables']['functions']['data']
print j
|