Skip to content

Commit

Permalink
For better compatibility, expose the utils module in DSSContext; im…
Browse files Browse the repository at this point in the history
…port DSS enums in the main module.
  • Loading branch information
PMeira committed Dec 14, 2023
1 parent 7e2120c commit ee99195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions opendssdirect/DSSContext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from ._utils import Base, DSSException
from ._utils import lib as dss_lib
from ._utils import ffi as dss_ffi
from . import utils as _utils
from .utils import run_command
from .ActiveClass import _ActiveClass, IActiveClass
from .Basic import _Basic, IBasic
Expand Down Expand Up @@ -115,6 +116,8 @@ class DSSContext(Base):
"Commands",
]

utils = _utils

# `_ptr_to_ctx` is to be used in callbacks (mapping the pointer
# to the equivalent Python object)
_ptr_to_ctx = {}
Expand Down
1 change: 1 addition & 0 deletions opendssdirect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"""
from ._version import __version__
from . import utils
from dss import enums
from .DSSContext import (
dss,
run_command,
Expand Down

0 comments on commit ee99195

Please sign in to comment.