Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Examples/package.mo
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
within OMCallPythonAdvanced;
package Examples

package Examples
extends Modelica.Icons.ExamplesPackage;
import OMCallPythonAdvanced.Py;

model Test
extends Modelica.Icons.Example;
Py.PythonHandle pyHandle = Py.PythonHandle() "Initialize Python";
constant String pyProgram =
String pyProgram =
"def multiply(x, y):
print(\"Will compute\", x, \"times\", y)
print('Time: " + String(time) + "')
return x * y
";
parameter String pyModuleName = "__main__";
Expand Down
11 changes: 8 additions & 3 deletions Resources/C-Sources/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

# change these to suit your platform!
PYTHON_INCLUDE_DIR=-I"e:/bin/py64/include"
PYTHON_LIBRARY_DIR=-L"e:/bin/py64"
PYTHON_LIBRARY=-lpython38

PYTHON_INCLUDE_DIR=-I"C:\Users\benjamins\AppData\Local\Programs\Python\Python39\include"

PYTHON_LIBRARY_DIR=-L"C:\Users\benjamins\AppData\Local\Programs\Python\Python39"


PYTHON_LIBRARY=-lpython39

CFLAGS=-g ${PYTHON_INCLUDE_DIR}
LDFLAGS=${PYTHON_LIBRARY_DIR} ${PYTHON_LIBRARY}

Expand Down
Loading