Skip to content

Example script for running Pyre with SPIRO_128843987

nxi edited this page Apr 9, 2015 · 1 revision

Gumtree : Example script for running Pyre with SPIRO

Created by Tony Lam, last modified on Sep 08, 2009
# Do remote control
c.do("import pyre.inventory")
c.do("from pyre.units.time import s, hour")
c.do("from pyre.units.length import m, km, mile")
c.do("speed = pyre.inventory.dimensional(\"speed\", default=50*mile/hour)")
Note: for some reason "speed = pyre.inventory.dimensional(\"speed\", default=50*mile/hour)" cannot be executed directly in Jython. It can only be interpreted remotely. Note for GumTree client: In order to use spiron, python lib needs to be included to vm:
Set VM arg:
-Dpython.home="rcp-path\plugins\org.python.jython" For lib to reference back to python (org.python.core in jython),
jython.jar needs to be loaded in the system jvm:
Set bootstrap entires to:
rcp-path\plugins\org.python.jython\jython.jar
Document generated by Confluence on Apr 01, 2015 00:11
Clone this wiki locally