Skip to content

Commit

Permalink
Update ompython.rst
Browse files Browse the repository at this point in the history
There is a comma missing in the list of commands.
This also updates the printing to use new style syntax as shown here:
https://pyformat.info/
  • Loading branch information
thorade authored and sjoelund committed Jan 10, 2017
1 parent 6eb0fce commit e347601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UsersGuide/source/ompython.rst
Expand Up @@ -125,15 +125,15 @@ Full example:
cmds = [
"loadModel(Modelica)",
"model test end test;",
'loadFile(getInstallationDirectoryPath() + "/share/doc/omc/testmodels/BouncingBall.mo")'
'loadFile(getInstallationDirectoryPath() + "/share/doc/omc/testmodels/BouncingBall.mo")',
"getIconAnnotation(Modelica.Electrical.Analog.Basic.Resistor)",
"getElementsInfo(Modelica.Electrical.Analog.Basic.Resistor)",
"simulate(BouncingBall)",
"plot(h)"
]
for cmd in cmds:
answer = omc.sendExpression(cmd)
print "\\nResult:\\n%s"%answer
print("\n{}:\n{}".format(cmd, answer))
Implementation
~~~~~~~~~~~~~~
Expand Down

0 comments on commit e347601

Please sign in to comment.