You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import em
interpreter = em.Interpreter()
# The following prints the results to stdout:
interpreter.string("@{x = 123}@x\n")
# This expands to the same thing, but puts the results as a
# string in the variable result:
result = interpreter.expand("@{x = 123}@x\n")
# This just prints the value of x directly:
print interpreter.globals['x']
# Process an actual file (and output to stdout):
interpreter.file(open('/path/to/some/file'))
interpreter.shutdown() # this is important; see below
Benefits
Create xodr file and geojson files
Easier to receive arguments instead of using environment variables
Creation of python modules that are shared among the templates
Summary
Nowadays we are using empy templates to obtain xodr descriptions.
Proposal
We could embed the empy interpreter in python applications
Take a look at http://www.alcyone.com/software/empy/#Embedding-Empy
Benefits
Related issues
#12
The text was updated successfully, but these errors were encountered: