We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1acd916 commit 7a50441Copy full SHA for 7a50441
1 file changed
OMPython/OMCSession.py
@@ -481,8 +481,15 @@ def __del__(self):
481
self.omc_zmq = None
482
483
def omcpath(self, *path) -> OMCPath:
484
- # TODO: need to handle PurePosixPath and PureWindowsPath
485
- # 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.
486
487
+
488
+ # fallback solution for Python < 3.12; a modified pathlib.Path object is used as OMCPath replacement
489
+ if sys.version_info < (3, 12):
490
+ # noinspection PyArgumentList
491
+ return OMCPath(*path)
492
493
return OMCPath(*path, session=self)
494
495
def execute(self, command: str):
0 commit comments