ansys-pyensight-core 0.10.0__tar.gz → 0.10.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ansys-pyensight-core might be problematic. Click here for more details.

Files changed (37) hide show
  1. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/PKG-INFO +1 -1
  2. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/pyproject.toml +1 -1
  3. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/dvs.py +17 -2
  4. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/dsg_server.py +8 -1
  5. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/omniverse_cli.py +16 -3
  6. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/omniverse_glb_server.py +13 -1
  7. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/LICENSE +0 -0
  8. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/README.rst +0 -0
  9. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/__init__.py +0 -0
  10. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/common.py +0 -0
  11. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/deep_pixel_view.html +0 -0
  12. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/dockerlauncher.py +0 -0
  13. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/enscontext.py +0 -0
  14. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/enshell_grpc.py +0 -0
  15. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/ensight_grpc.py +0 -0
  16. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/ensobj.py +0 -0
  17. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/launch_ensight.py +0 -0
  18. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/launcher.py +0 -0
  19. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/libuserd.py +0 -0
  20. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/listobj.py +0 -0
  21. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/locallauncher.py +0 -0
  22. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/py.typed +0 -0
  23. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/renderable.py +0 -0
  24. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/session.py +0 -0
  25. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/sgeo_poll.html +0 -0
  26. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/__init__.py +0 -0
  27. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/adr.py +0 -0
  28. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/export.py +0 -0
  29. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/omniverse.py +0 -0
  30. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/omniverse_dsg_server.py +0 -0
  31. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/parts.py +0 -0
  32. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/query.py +0 -0
  33. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/readers.py +0 -0
  34. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/resources/Materials/000_sky.exr +0 -0
  35. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/support.py +0 -0
  36. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/variables.py +0 -0
  37. {ansys_pyensight_core-0.10.0 → ansys_pyensight_core-0.10.2}/src/ansys/pyensight/core/utils/views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ansys-pyensight-core
3
- Version: 0.10.0
3
+ Version: 0.10.2
4
4
  Summary: A python wrapper for Ansys EnSight
5
5
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
6
6
  Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
@@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
6
6
 
7
7
  [project]
8
8
  name = "ansys-pyensight-core"
9
- version = "0.10.0"
9
+ version = "0.10.2"
10
10
  description = "A python wrapper for Ansys EnSight"
11
11
  readme = "README.rst"
12
12
  requires-python = ">=3.10,<3.14"
@@ -155,7 +155,7 @@ class DVS(dvs_base):
155
155
  apex_path = apex_path[-1]
156
156
  arch = "win64" if self._is_windows() else "linux_2.6_64"
157
157
  apex_libs = os.path.join(apex_path, "machines", arch)
158
- python_path = glob.glob(os.path.join(apex_libs, "Python-*"))[-1]
158
+ python_path = glob.glob(os.path.join(apex_libs, "Python-3.*"))[-1]
159
159
  apex_py_version = re.search("Python-3.([0-9]+).([0-9]+)", os.path.basename(python_path))
160
160
  apex_py_major_version = apex_py_version.group(1)
161
161
  lib_path = os.path.join(python_path, "lib", f"python3.{apex_py_major_version}")
@@ -167,7 +167,22 @@ class DVS(dvs_base):
167
167
 
168
168
  self._dvs_module = dynamic_visualization_store
169
169
  except (ModuleNotFoundError, ImportError):
170
- warnings.warn("Cannot import DVS module from provided ansys installation folder.")
170
+ python_cei = os.path.join(apex_libs, "Python-CEI")
171
+ if os.path.isdir(python_cei):
172
+ python_cei_lib_path = os.path.join(
173
+ python_cei, "lib", f"python3.{apex_py_major_version}"
174
+ )
175
+ if self._is_windows():
176
+ python_cei_lib_path = os.path.join(python_cei, "DLLs")
177
+ sys.path.append(python_cei_lib_path)
178
+ try:
179
+ import dynamic_visualization_store
180
+
181
+ self._dvs_module = dynamic_visualization_store
182
+ except (ModuleNotFoundError, ImportError):
183
+ warnings.warn(
184
+ "Cannot import DVS module from provided ansys installation folder."
185
+ )
171
186
 
172
187
  DVS_NULL_TRANSPORT = 0
173
188
  DVS_GRPC_TRANSPORT = 1
@@ -12,12 +12,19 @@ from ansys.api.pyensight.v0 import dynamic_scene_graph_pb2
12
12
  from ansys.pyensight.core import ensight_grpc
13
13
  import numpy
14
14
 
15
+ original_stderr = sys.stderr
16
+ original_stdout = sys.stdout
17
+ sys.stderr = open(os.devnull, "w")
18
+ sys.stdout = open(os.devnull, "w")
15
19
  try:
16
20
  import dsgutils
17
21
 
18
22
  dsgutils_loaded = True
19
- except ModuleNotFoundError:
23
+ except (ModuleNotFoundError, ImportError, AttributeError):
20
24
  dsgutils_loaded = False
25
+ finally:
26
+ sys.stderr = original_stderr
27
+ sys.stdout = original_stdout
21
28
 
22
29
  if TYPE_CHECKING:
23
30
  from ansys.pyensight.core import Session
@@ -5,14 +5,27 @@ import json
5
5
  import logging
6
6
  import os
7
7
  import pathlib
8
+ import sys
8
9
  import time
9
10
  from typing import Any, List, Optional
10
11
  from urllib.parse import urlparse
11
12
 
12
13
  import ansys.pyensight.core
13
- import ansys.pyensight.core.utils.dsg_server as dsg_server
14
- import ansys.pyensight.core.utils.omniverse_dsg_server as ov_dsg_server
15
- import ansys.pyensight.core.utils.omniverse_glb_server as ov_glb_server
14
+
15
+ original_stderr = sys.stderr
16
+ original_stdout = sys.stdout
17
+ sys.stderr = open(os.devnull, "w")
18
+ sys.stdout = open(os.devnull, "w")
19
+ try:
20
+ import ansys.pyensight.core.utils.dsg_server as dsg_server
21
+ import ansys.pyensight.core.utils.omniverse_dsg_server as ov_dsg_server
22
+ import ansys.pyensight.core.utils.omniverse_glb_server as ov_glb_server
23
+ except AttributeError as exc:
24
+ if "_ARRAY_API" not in str(exc):
25
+ raise exc
26
+ finally:
27
+ sys.stderr = original_stderr
28
+ sys.stdout = original_stdout
16
29
 
17
30
 
18
31
  def str2bool_type(v: Any) -> bool:
@@ -13,7 +13,19 @@ import numpy
13
13
  import pygltflib
14
14
 
15
15
  sys.path.insert(0, os.path.dirname(__file__))
16
- from dsg_server import UpdateHandler # noqa: E402
16
+ sys.path.insert(0, os.path.dirname(__file__))
17
+ original_stdout = sys.stdout
18
+ original_stderr = sys.stderr
19
+ sys.stderr = open(os.devnull, "w")
20
+ sys.stdout = open(os.devnull, "w")
21
+ try:
22
+ from dsg_server import UpdateHandler # noqa: E402
23
+ except AttributeError as exc:
24
+ if "_ARRAY_API" not in str(exc):
25
+ raise exc
26
+ finally:
27
+ sys.stderr = original_stderr
28
+ sys.stdout = original_stdout
17
29
 
18
30
 
19
31
  class GLBSession(dsg_server.DSGSession):