Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
826c9659
Commit
826c9659
authored
Jul 18, 2015
by
yoogx
Browse files
* Use visitor.py as example
parent
a5ee9a31
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/python.rst
View file @
826c9659
...
...
@@ -21,28 +21,10 @@ At run-time, the following environment variables must be set up::
Example
#######
Here is a small examples illustrating Python API capabilities
::
Here is a small examples illustrating Python API capabilities
#! /usr/bin/python
from ocarina import *;
def main ():
'''Test function'''
# Print all registered backends
for backends in Backends:
print(backends);
load("rma.aadl"); # load a file
load("deployment.aadl"); # load a file
analyze(); # analyze models
instantiate("rma.erc32"); # instantiate system
generate (Backends.polyorb_hi_ada); # generate code using the PolyORB/HI-Ada backend
if __name__ == "__main__":
main ()
sys.exit (0); # exit
.. literalinclude:: ../resources/runtime/python/test/visitor.py
:language: python
Python API description
######################
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment