HEADER<{{ import requests,json ## ## 1) Generate python stub source code: ## java -jar graphwalker-3.4.0-SNAPSHOT.jar source -i model.graphml python.template > model.py ## ## 2) Start graphwalker: ## java -jar graphwalker-3.4.0-SNAPSHOT.jar online --service RESTFUL -m model.graphml "random(edge_coverage(100))" ## ## 3) Run the per program: ## python model.py ## }}>HEADER def {LABEL}() : print( "{LABEL}" ) return FOOTER<{{ gw_url = 'http://localhost:8887/graphwalker' while requests.get(gw_url+'/hasNext').json()['hasNext'] == 'true' : # Get next step from GraphWalker step = requests.get(gw_url+'/getNext').json()['currentElementName'] if step != '' : eval( step + "()" ) }}>FOOTER