@@ -31,45 +31,57 @@ Installation using `pip` is recommended.
31
31
32
32
Install the latest OMPython master by running:
33
33
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
+ ```
35
37
36
38
### Windows
37
39
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
+ ```
40
46
41
- cd %OPENMODELICAHOME%\share\omc\scripts\PythonInterface
42
- python -m pip install -U .
47
+ ### Local installation
43
48
44
- Instead, to Install the latest version of the OMPython master branch
49
+ To Install the latest version of the OMPython master branch
45
50
only, previously cloned into ` <OMPythonPath> ` , run:
46
51
47
- cd <OMPythonPath>
48
- python -m pip install -U .
52
+ ```
53
+ cd <OMPythonPath>
54
+ python -m pip install -U .
55
+ ```
49
56
50
57
## Usage
51
58
52
- Running the following commads should get you started
59
+ Running the following commands should get you started
53
60
54
- ``` python
61
+ ``` python
55
62
import OMPython
56
63
help (OMPython)
57
64
```
58
65
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 )
61
73
online.
62
74
63
75
## Bug Reports
64
76
65
- - See OMPython bugs on the [ OpenModelica
77
+ - See OMPython bugs on the [ OpenModelica
66
78
trac] ( https://trac.openmodelica.org/OpenModelica/query?component=OMPython )
67
79
or submit a [ new
68
80
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
70
82
welcome.
71
83
72
84
## Contact
73
85
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