We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa5e36a commit afb8511Copy full SHA for afb8511
OMPython/OMCSession.py
@@ -478,8 +478,15 @@ def __del__(self):
478
self.omc_zmq = None
479
480
def omcpath(self, *path) -> OMCPath:
481
- # TODO: need to handle PurePosixPath and PureWindowsPath
482
- # define it here based on the backend (omc_process) used?
+ """
+ Create an OMCPath object based on the given path segments and the current OMC session.
483
484
+
485
+ # fallback solution for Python < 3.12; a modified pathlib.Path object is used as OMCPath replacement
486
+ if sys.version_info < (3, 12):
487
+ # noinspection PyArgumentList
488
+ return OMCPath(*path)
489
490
return OMCPath(*path, session=self)
491
492
def execute(self, command: str):
0 commit comments