ansys-pyensight-core 0.10.0__py3-none-any.whl → 0.10.1__py3-none-any.whl

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.

@@ -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):
@@ -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.1
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>
@@ -2,7 +2,7 @@ ansys/pyensight/core/__init__.py,sha256=BCfpDonS2OZRM2O6wjcyOYhLSgdy9hMQRl6G-_9B
2
2
  ansys/pyensight/core/common.py,sha256=f28uGaJhpSmOE1i6MwzqFH0_jKpIByglM2plB2K4Hdk,7574
3
3
  ansys/pyensight/core/deep_pixel_view.html,sha256=6u4mGOuzJiPze8N8pIKJsEGPv5y6-zb38m9IfrarATE,3510
4
4
  ansys/pyensight/core/dockerlauncher.py,sha256=eAg50C1BjGzOkRKHgSPssz8_jiMwQOP1o-a7lUY-p_Q,28415
5
- ansys/pyensight/core/dvs.py,sha256=xL2LeJ9uja3mFBuU8vsE26O_NFgaR9uhDvxZKAHGGvg,31284
5
+ ansys/pyensight/core/dvs.py,sha256=ZBejZNhYUzHXnj9-p9HS2qCrsJPDAIuDhgGSqg2nnLI,31985
6
6
  ansys/pyensight/core/enscontext.py,sha256=GSKkjZt1QEPyHEQ59EEBgKGMik9vjCdR9coR4uX7fEw,12141
7
7
  ansys/pyensight/core/enshell_grpc.py,sha256=-OxSdFI_p3DmQnqh1jT_a_aSh_w-EUD2IaWGKxrnyjI,17122
8
8
  ansys/pyensight/core/ensight_grpc.py,sha256=IitEgMzBJTyTgQff0sXPvGkVnC2E9qRKw-HXCF-mVvA,29713
@@ -18,12 +18,12 @@ ansys/pyensight/core/session.py,sha256=6UEMn6X_08JzaAhmpIi4TQfv8zdONDG1cH8UaO7MQ
18
18
  ansys/pyensight/core/sgeo_poll.html,sha256=1M4BIc5CZpYA3b40qzk22NcPCLhjFnWdoS2PrS6Rhn4,752
19
19
  ansys/pyensight/core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  ansys/pyensight/core/utils/adr.py,sha256=XslZhlwcrSGzOlnhzprOv3ju_ppxxsWBjCnQL5KiNms,3570
21
- ansys/pyensight/core/utils/dsg_server.py,sha256=ScNf7sb339kvEGIwIAlJpxzPvOGbUSnvNrCat9soFlw,46769
21
+ ansys/pyensight/core/utils/dsg_server.py,sha256=2jCPhOplPrlDaQNSKSk9qo7bEgfcrhx0rHS_cqW2zAY,47003
22
22
  ansys/pyensight/core/utils/export.py,sha256=UAJQcrElo3esQD0CWdxxjMQ8yE1vB4cdAhF33_uZfQw,22605
23
23
  ansys/pyensight/core/utils/omniverse.py,sha256=qeIA9WgHHsf-fylT5I3z7rBUZUlSEOR-fLTvqgCPqbQ,18996
24
- ansys/pyensight/core/utils/omniverse_cli.py,sha256=aVYu4HsSZBl7A9_xU3DfItNB-hpxCdMPXm_oMAOU_HQ,20261
24
+ ansys/pyensight/core/utils/omniverse_cli.py,sha256=ujoBbBGMYsYUn83nrk2dFkOd7kn7-6cs7ljBmmSXodw,20578
25
25
  ansys/pyensight/core/utils/omniverse_dsg_server.py,sha256=-62_pDAJ0UlFnjf91Ra4W63musyJxdBON1L66bve7ns,40186
26
- ansys/pyensight/core/utils/omniverse_glb_server.py,sha256=KSaLvGfyREu9bSTA3wgiAzf68s0KfQuWLwHbZ1Zf5vE,31824
26
+ ansys/pyensight/core/utils/omniverse_glb_server.py,sha256=dx2cfR036d3DY6meooNfLZOQpOMaiaLKqBjztpew2_Q,32167
27
27
  ansys/pyensight/core/utils/parts.py,sha256=222XFRCjLgH7hho-cK9JrGCg3-KlTf54KIgc7y50sTE,52173
28
28
  ansys/pyensight/core/utils/query.py,sha256=OXKDbf1sOTX0sUvtKcp64LhVl-BcrEsE43w8uMxLOYI,19828
29
29
  ansys/pyensight/core/utils/readers.py,sha256=_IluAWz8mmoe5SM3hAewHIqlhtKMfEqrUJoQOlJ4U4I,12138
@@ -31,7 +31,7 @@ ansys/pyensight/core/utils/support.py,sha256=QI3z9ex7zJxjFbkCPba9DWqWgPFIThORqr0
31
31
  ansys/pyensight/core/utils/variables.py,sha256=ZUiJdDIeRcowrnLXaJQqGwA0RbrfXhc1s4o4v9A4PiY,95133
32
32
  ansys/pyensight/core/utils/views.py,sha256=ZKhJ6vMT7Rdd4bwJ0egMYTV7-D7Q7I19fF2_j_CMQ0o,12489
33
33
  ansys/pyensight/core/utils/resources/Materials/000_sky.exr,sha256=xAR1gFd2uxPZDnvgfegdhEhRaqKtZldQDiR_-1rHKO0,8819933
34
- ansys_pyensight_core-0.10.0.dist-info/licenses/LICENSE,sha256=K6LiJHOa9IbWFelXmXNRzFr3zG45SOGZIN7vdLdURGU,1097
35
- ansys_pyensight_core-0.10.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
36
- ansys_pyensight_core-0.10.0.dist-info/METADATA,sha256=dmlDa6r_UFNXdNxuBouVLtvnE9icLaI3UU4pJF-PZMo,12169
37
- ansys_pyensight_core-0.10.0.dist-info/RECORD,,
34
+ ansys_pyensight_core-0.10.1.dist-info/licenses/LICENSE,sha256=K6LiJHOa9IbWFelXmXNRzFr3zG45SOGZIN7vdLdURGU,1097
35
+ ansys_pyensight_core-0.10.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
36
+ ansys_pyensight_core-0.10.1.dist-info/METADATA,sha256=sA4Mb4MLIufiajVwjpXhJMiqUqmMChL7dv194oKlL48,12169
37
+ ansys_pyensight_core-0.10.1.dist-info/RECORD,,