Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
e7ee65e2
Commit
e7ee65e2
authored
Sep 26, 2018
by
Markus Mirz
Browse files
expose logger in python
parent
78f93324
Changes
2
Show whitespace changes
Inline
Side-by-side
Source/Python/Module.cpp
View file @
e7ee65e2
...
...
@@ -35,6 +35,7 @@
#include
<dpsim/Python/SystemTopology.h>
#include
<dpsim/Python/Simulation.h>
#include
<dpsim/Python/LoadCim.h>
#include
<dpsim/Python/Logger.h>
#ifndef _MSC_VER
#include
<dpsim/Python/Interface.h>
#endif
...
...
@@ -69,6 +70,8 @@ PyMODINIT_FUNC PyInit__dpsim(void) {
return
nullptr
;
if
(
PyType_Ready
(
&
SystemTopology
::
type
)
<
0
)
return
nullptr
;
if
(
PyType_Ready
(
&
Logger
::
type
)
<
0
)
return
nullptr
;
#ifndef _MSC_VER
if
(
PyType_Ready
(
&
Interface
::
type
)
<
0
)
return
nullptr
;
...
...
@@ -82,6 +85,8 @@ PyMODINIT_FUNC PyInit__dpsim(void) {
PyModule_AddObject
(
m
,
"Simulation"
,
(
PyObject
*
)
&
Simulation
::
type
);
Py_INCREF
(
&
SystemTopology
::
type
);
PyModule_AddObject
(
m
,
"SystemTopology"
,
(
PyObject
*
)
&
SystemTopology
::
type
);
Py_INCREF
(
&
Logger
::
type
);
PyModule_AddObject
(
m
,
"Logger"
,
(
PyObject
*
)
&
Logger
::
type
);
Py_INCREF
(
&
Component
::
type
);
PyModule_AddObject
(
m
,
"Component"
,
(
PyObject
*
)
&
Component
::
type
);
#ifndef _MSC_VER
...
...
Source/Python/dpsim/__init__.py
View file @
e7ee65e2
...
...
@@ -19,6 +19,7 @@ import _dpsim
#from _dpsim import Interface
from
_dpsim
import
SystemTopology
from
_dpsim
import
Logger
from
_dpsim
import
load_cim
...
...
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