@@ -31,45 +31,57 @@ Installation using `pip` is recommended.
3131
3232Install the latest OMPython master by running:
3333
34- python -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip
34+ ``` bash
35+ python -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip
36+ ```
3537
3638### Windows
3739
38- Install the version as packaged with your OpenModelica installation by
39- running:
40+ Install the version packed with your OpenModelica installation by running:
41+
42+ ``` cmd
43+ cd %OPENMODELICAHOME%\share\omc\scripts\PythonInterface
44+ python -m pip install -U .
45+ ```
4046
41- cd %OPENMODELICAHOME%\share\omc\scripts\PythonInterface
42- python -m pip install -U .
47+ ### Local installation
4348
44- Instead, to Install the latest version of the OMPython master branch
49+ To Install the latest version of the OMPython master branch
4550only, previously cloned into ` <OMPythonPath> ` , run:
4651
47- cd <OMPythonPath>
48- python -m pip install -U .
52+ ```
53+ cd <OMPythonPath>
54+ python -m pip install -U .
55+ ```
4956
5057## Usage
5158
52- Running the following commads should get you started
59+ Running the following commands should get you started
5360
54- ``` python
61+ ``` python
5562import OMPython
5663help (OMPython)
5764```
5865
59- or read the [ OMPython
60- documentation] ( https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html )
66+ ``` python
67+ from OMPython import OMCSessionZMQ
68+ omc = OMCSessionZMQ()
69+ omc.sendExpression(" getVersion()" )
70+ ```
71+
72+ or read the [ OMPython documentation] ( https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html )
6173online.
6274
6375## Bug Reports
6476
65- - See OMPython bugs on the [ OpenModelica
77+ - See OMPython bugs on the [ OpenModelica
6678 trac] ( https://trac.openmodelica.org/OpenModelica/query?component=OMPython )
6779 or submit a [ new
6880 ticket] ( https://trac.openmodelica.org/OpenModelica/newticket ) .
69- - [ Pull requests] ( https://github.com/OpenModelica/OMPython/pulls ) are
81+ - [ Pull requests] ( https://github.com/OpenModelica/OMPython/pulls ) are
7082 welcome.
7183
7284## Contact
7385
74- - Adeel Asghar, <adeel.asghar@liu.se >
75- - Arunkumar Palanisamy, <arunkumar.palanisamy@liu.se >
86+ - Adeel Asghar, <adeel.asghar@liu.se >
87+ - Arunkumar Palanisamy, <arunkumar.palanisamy@liu.se >
0 commit comments