diff --git a/src/pyedb/dotnet/edb.py b/src/pyedb/dotnet/edb.py index 2e4b670928..9e496f1165 100644 --- a/src/pyedb/dotnet/edb.py +++ b/src/pyedb/dotnet/edb.py @@ -30,6 +30,7 @@ from pathlib import Path import re import shutil +import subprocess import sys import tempfile import time @@ -37,6 +38,8 @@ from typing import Union import warnings +import rtree + from pyedb.configuration.configuration import Configuration from pyedb.dotnet.application.Variables import decompose_variable_value from pyedb.dotnet.edb_core.cell.layout import Layout @@ -95,8 +98,6 @@ from pyedb.generic.general_methods import ( generate_unique_name, get_string_version, - inside_desktop, - is_ironpython, is_linux, is_windows, ) @@ -106,13 +107,6 @@ from pyedb.modeler.geometry_operators import GeometryOperators from pyedb.workflow import Workflow -if is_linux and is_ironpython: - import subprocessdotnet as subprocess -else: - import subprocess - -import rtree - class Edb(Database): """Provides the EDB application interface. @@ -227,9 +221,7 @@ def __init__( if not isreadonly: self._check_remove_project_files(edbpath, remove_existing_aedt) - if isaedtowned and (inside_desktop or settings.remote_rpc_session): - self.open_edb_inside_aedt() - elif edbpath[-3:] in ["brd", "mcm", "sip", "gds", "xml", "dxf", "tgz", "anf"]: + if edbpath[-3:] in ["brd", "mcm", "sip", "gds", "xml", "dxf", "tgz", "anf"]: self.edbpath = edbpath[:-4] + ".aedb" working_dir = os.path.dirname(edbpath) control_file = None @@ -553,40 +545,6 @@ def open_edb(self): return True - def open_edb_inside_aedt(self): - """Open EDB inside AEDT. - - Returns - ------- - ``True`` when succeed ``False`` if failed : bool - - """ - self.logger.info("Opening EDB from HDL") - self.run_as_standalone(False) - if self.oproject.GetEDBHandle(): - self.attach(self.oproject.GetEDBHandle()) - if not self.active_db: - self.logger.warning("Error getting the database.") - self._active_cell = None - return None - self._active_cell = self.edb_api.cell.cell.FindByName( - self.active_db, - self.edb_api.cell._cell.CellType.CircuitCell, - self.cellname, - ) - if self._active_cell is None: - self._active_cell = list(self.top_circuit_cells)[0] - if self._active_cell: - if not os.path.exists(self.edbpath): - os.makedirs(self.edbpath) - self._init_objects() - return True - else: - return None - else: - self._active_cell = None - return None - def create_edb(self): """Create EDB. @@ -2197,9 +2155,6 @@ def _create_cutout_multithread( keep_lines_as_path=False, inlcude_voids_in_extents=False, ): - if is_ironpython: # pragma: no cover - self.logger.error("Method working only in Cpython") - return False from concurrent.futures import ThreadPoolExecutor if output_aedb_path: @@ -2729,20 +2684,12 @@ def _create_cutout_on_point_list( for void_circle in voids_to_add: if void_circle.type == "Circle": - if is_ironpython: # pragma: no cover - ( - res, - center_x, - center_y, - radius, - ) = void_circle.primitive_object.GetParameters() - else: - ( - res, - center_x, - center_y, - radius, - ) = void_circle.primitive_object.GetParameters(0.0, 0.0, 0.0) + ( + res, + center_x, + center_y, + radius, + ) = void_circle.primitive_object.GetParameters(0.0, 0.0, 0.0) cloned_circle = self.edb_api.cell.primitive.circle.create( layout, void_circle.layer_name, diff --git a/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py b/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py index 32c46eacd7..80b7649413 100644 --- a/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py +++ b/src/pyedb/dotnet/edb_core/cell/hierarchy/component.py @@ -32,16 +32,14 @@ from pyedb.dotnet.edb_core.cell.hierarchy.spice_model import SpiceModel from pyedb.dotnet.edb_core.definition.package_def import PackageDef from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance -from pyedb.generic.general_methods import is_ironpython - -if not is_ironpython: - try: - import numpy as np - except ImportError: - warnings.warn( - "The NumPy module is required to run some functionalities of EDB.\n" - "Install with \n\npip install numpy\n\nRequires CPython." - ) + +try: + import numpy as np +except ImportError: + warnings.warn( + "The NumPy module is required to run some functionalities of EDB.\n" + "Install with \n\npip install numpy\n\nRequires CPython." + ) from pyedb.generic.general_methods import get_filename_without_extension diff --git a/src/pyedb/dotnet/edb_core/dotnet/database.py b/src/pyedb/dotnet/edb_core/dotnet/database.py index 0fef1ecca0..175ce182d2 100644 --- a/src/pyedb/dotnet/edb_core/dotnet/database.py +++ b/src/pyedb/dotnet/edb_core/dotnet/database.py @@ -32,7 +32,6 @@ env_path, env_path_student, env_value, - is_ironpython, is_linux, settings, ) @@ -751,14 +750,10 @@ def __init__(self, edbversion, student_version=False): self.base_path = edb_path sys.path.append(edb_path) os.environ[env_value(self.edbversion)] = self.base_path - if is_ironpython: - _clr.AddReferenceToFile("Ansys.Ansoft.Edb.dll") - _clr.AddReferenceToFile("Ansys.Ansoft.EdbBuilderUtils.dll") - _clr.AddReferenceToFileAndPath(os.path.join(self.base_path, "Ansys.Ansoft.SimSetupData.dll")) - else: - _clr.AddReference("Ansys.Ansoft.Edb") - _clr.AddReference("Ansys.Ansoft.EdbBuilderUtils") - _clr.AddReference("Ansys.Ansoft.SimSetupData") + + _clr.AddReference("Ansys.Ansoft.Edb") + _clr.AddReference("Ansys.Ansoft.EdbBuilderUtils") + _clr.AddReference("Ansys.Ansoft.SimSetupData") else: if settings.edb_dll_path: self.base_path = settings.edb_dll_path @@ -1234,7 +1229,7 @@ def attach(self, hdb): # pragma no cover ------- """ - from pyedb.generic.clr_module import Convert + from pyedb.dotnet.clr_module import Convert hdl = Convert.ToUInt64(hdb) self._db = self.edb_api.database.Attach(hdl) diff --git a/src/pyedb/dotnet/edb_core/edb_data/control_file.py b/src/pyedb/dotnet/edb_core/edb_data/control_file.py index 58e3614701..1193b1148e 100644 --- a/src/pyedb/dotnet/edb_core/edb_data/control_file.py +++ b/src/pyedb/dotnet/edb_core/edb_data/control_file.py @@ -23,24 +23,14 @@ import copy import os import re +import subprocess import sys from pyedb.edb_logger import pyedb_logger -from pyedb.generic.general_methods import ( - ET, - env_path, - env_value, - is_ironpython, - is_linux, -) +from pyedb.generic.general_methods import ET, env_path, env_value, is_linux from pyedb.misc.aedtlib_personalib_install import write_pretty_xml from pyedb.misc.misc import list_installed_ansysem -if is_linux and is_ironpython: - import subprocessdotnet as subprocess -else: - import subprocess - def convert_technology_file(tech_file, edbversion=None, control_file=None): """Convert a technology file to edb control file (xml). diff --git a/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py b/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py index 7a0d21da49..9b9b44e470 100644 --- a/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py +++ b/src/pyedb/dotnet/edb_core/edb_data/padstacks_data.py @@ -25,12 +25,12 @@ import re import warnings -from pyedb.dotnet.clr_module import String, _clr +from pyedb.dotnet.clr_module import String from pyedb.dotnet.edb_core.cell.primitive import Primitive from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet from pyedb.dotnet.edb_core.edb_data.edbvalue import EdbValue from pyedb.dotnet.edb_core.general import PadGeometryTpe, convert_py_list_to_net_list -from pyedb.generic.general_methods import generate_unique_name, is_ironpython +from pyedb.generic.general_methods import generate_unique_name from pyedb.modeler.geometry_operators import GeometryOperators @@ -1403,17 +1403,12 @@ def backdrill_top(self): layer = self._pedb.edb_api.cell.layer("", self._pedb.edb_api.cell.layer_type.SignalLayer) val = self._pedb.edb_value(0) offset = self._pedb.edb_value(0.0) - if is_ironpython: # pragma: no cover - diameter = _clr.StrongBox[type(val)]() - drill_to_layer = _clr.StrongBox[self._pedb.edb_api.Cell.ILayerReadOnly]() - flag = self._edb_padstackinstance.GetBackDrillParametersLayerValue(drill_to_layer, offset, diameter, False) - else: - ( - flag, - drill_to_layer, - offset, - diameter, - ) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, False) + ( + flag, + drill_to_layer, + offset, + diameter, + ) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, False) if flag: if offset.ToDouble(): return drill_to_layer.GetName(), diameter.ToString(), offset.ToString() @@ -1461,17 +1456,12 @@ def backdrill_bottom(self): layer = self._pedb.edb_api.cell.layer("", self._pedb.edb_api.cell.layer_type.SignalLayer) val = self._pedb.edb_value(0) offset = self._pedb.edb_value(0.0) - if is_ironpython: # pragma: no cover - diameter = _clr.StrongBox[type(val)]() - drill_to_layer = _clr.StrongBox[self._pedb.edb_api.Cell.ILayerReadOnly]() - flag = self._edb_padstackinstance.GetBackDrillParametersLayerValue(drill_to_layer, offset, diameter, True) - else: - ( - flag, - drill_to_layer, - offset, - diameter, - ) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, True) + ( + flag, + drill_to_layer, + offset, + diameter, + ) = self._edb_padstackinstance.GetBackDrillParametersLayerValue(layer, offset, val, True) if flag: if offset.ToDouble(): return drill_to_layer.GetName(), diameter.ToString(), offset.ToString() @@ -1751,12 +1741,9 @@ def aedt_name(self): >>> edbapp.padstacks.instances[111].get_aedt_pin_name() """ - if is_ironpython: - name = _clr.Reference[String]() - self._edb_padstackinstance.GetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, name) - else: - val = String("") - _, name = self._edb_padstackinstance.GetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, val) + + val = String("") + _, name = self._edb_padstackinstance.GetProductProperty(self._pedb.edb_api.ProductId.Designer, 11, val) name = str(name).strip("'") return name diff --git a/src/pyedb/dotnet/edb_core/general.py b/src/pyedb/dotnet/edb_core/general.py index 467dacc339..3a15883814 100644 --- a/src/pyedb/dotnet/edb_core/general.py +++ b/src/pyedb/dotnet/edb_core/general.py @@ -30,15 +30,12 @@ import logging from pyedb.dotnet.clr_module import Dictionary, List, Tuple -from pyedb.generic.general_methods import is_ironpython - -if not is_ironpython: # pragma: no cover - try: - from enum import Enum - except ImportError: - Enum = None -else: # pragma: no cover - Enum = object + +try: + from enum import Enum +except ImportError: + Enum = None + logger = logging.getLogger(__name__) diff --git a/src/pyedb/dotnet/edb_core/hfss.py b/src/pyedb/dotnet/edb_core/hfss.py index bc48fb41c0..980928a7d2 100644 --- a/src/pyedb/dotnet/edb_core/hfss.py +++ b/src/pyedb/dotnet/edb_core/hfss.py @@ -36,7 +36,7 @@ convert_pytuple_to_nettuple, ) from pyedb.generic.constants import RadiationBoxType, SweepType -from pyedb.generic.general_methods import generate_unique_name, is_ironpython +from pyedb.generic.general_methods import generate_unique_name from pyedb.modeler.geometry_operators import GeometryOperators @@ -1258,13 +1258,9 @@ def configure_hfss_analysis_setup(self, simulation_setup=None): adapt.AdaptiveFrequency = simulation_setup.mesh_freq adapt.MaxPasses = int(simulation_setup.max_num_passes) adapt.MaxDelta = str(simulation_setup.max_mag_delta_s) - if is_ironpython: - simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Clear() - simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList.Add(adapt) - else: - simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList = ( - convert_py_list_to_net_list([adapt]) - ) + simsetup_info.SimulationSettings.AdaptiveSettings.AdaptiveFrequencyDataList = convert_py_list_to_net_list( + [adapt] + ) elif simulation_setup.ac_settings.adaptive_type == 2: low_freq_adapt_data = self._pedb.simsetupdata.AdaptiveFrequencyData() low_freq_adapt_data.MaxDelta = str(simulation_setup.max_mag_delta_s) diff --git a/src/pyedb/dotnet/edb_core/materials.py b/src/pyedb/dotnet/edb_core/materials.py index 33d4501f65..a749a083a1 100644 --- a/src/pyedb/dotnet/edb_core/materials.py +++ b/src/pyedb/dotnet/edb_core/materials.py @@ -32,10 +32,8 @@ from pydantic import BaseModel, confloat from pyedb import Edb -from pyedb.dotnet.clr_module import _clr from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list from pyedb.exceptions import MaterialModelException -from pyedb.generic.general_methods import is_ironpython logger = logging.getLogger(__name__) @@ -426,16 +424,11 @@ def __load_all_properties(self): def __property_value(self, material_property_id): """Get property value from a material property id.""" - if is_ironpython: # pragma: no cover - property_box = _clr.StrongBox[float]() - self.__material_def.GetProperty(material_property_id, property_box) - return float(property_box) + _, property_box = self.__material_def.GetProperty(material_property_id) + if isinstance(property_box, float): + return property_box else: - _, property_box = self.__material_def.GetProperty(material_property_id) - if isinstance(property_box, float): - return property_box - else: - return property_box.ToDouble() + return property_box.ToDouble() # def __reset_property(self, name): # """Reset a property using the default value of the EDB API. diff --git a/src/pyedb/dotnet/edb_core/nets.py b/src/pyedb/dotnet/edb_core/nets.py index c9baa70916..3603a29f58 100644 --- a/src/pyedb/dotnet/edb_core/nets.py +++ b/src/pyedb/dotnet/edb_core/nets.py @@ -29,7 +29,7 @@ from pyedb.dotnet.edb_core.edb_data.nets_data import EDBNetsData from pyedb.generic.constants import CSS4_COLORS -from pyedb.generic.general_methods import generate_unique_name, is_ironpython +from pyedb.generic.general_methods import generate_unique_name from pyedb.modeler.geometry_operators import GeometryOperators @@ -838,9 +838,6 @@ def plot( show : bool, optional Whether to show the plot or not. Default is `True`. """ - if is_ironpython: - self._logger.warning("Plot functionalities are enabled only in CPython.") - return False from pyedb.generic.plot import plot_matplotlib object_lists = self.get_plot_data( diff --git a/src/pyedb/dotnet/edb_core/stackup.py b/src/pyedb/dotnet/edb_core/stackup.py index 1f80635e2d..7a05c06c5f 100644 --- a/src/pyedb/dotnet/edb_core/stackup.py +++ b/src/pyedb/dotnet/edb_core/stackup.py @@ -38,27 +38,26 @@ StackupLayerEdbClass, ) from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list -from pyedb.generic.general_methods import ET, generate_unique_name, is_ironpython +from pyedb.generic.general_methods import ET, generate_unique_name from pyedb.misc.aedtlib_personalib_install import write_pretty_xml colors = None pd = None np = None -if not is_ironpython: - try: - import matplotlib.colors as colors - except ImportError: - colors = None - - try: - import numpy as np - except ImportError: - np = None - - try: - import pandas as pd - except ImportError: - pd = None +try: + import matplotlib.colors as colors +except ImportError: + colors = None + +try: + import numpy as np +except ImportError: + np = None + +try: + import pandas as pd +except ImportError: + pd = None logger = logging.getLogger(__name__) @@ -970,8 +969,7 @@ def _export_layer_stackup_to_csv_xlsx(self, fpath=None, file_format=None): if not pd: self._pedb.logger.error("Pandas is needed. Please, install it first.") return False - if is_ironpython: - return + data = { "Type": [], "Material": [], @@ -1972,9 +1970,7 @@ def _import_csv(self, file_path): if not pd: self._pedb.logger.error("Pandas is needed. You must install it first.") return False - if is_ironpython: - self._pedb.logger.error("Method works on CPython only.") - return False + df = pd.read_csv(file_path, index_col=0) for name in self.stackup_layers.keys(): # pragma: no cover @@ -2451,8 +2447,7 @@ def plot( ------- :class:`matplotlib.plt` """ - if is_ironpython: - return False + from pyedb.generic.constants import CSS4_COLORS from pyedb.generic.plot import plot_matplotlib diff --git a/src/pyedb/generic/filesystem.py b/src/pyedb/generic/filesystem.py index 0e51f6753c..5fff83ac71 100644 --- a/src/pyedb/generic/filesystem.py +++ b/src/pyedb/generic/filesystem.py @@ -16,16 +16,10 @@ def search_files(dirname, pattern="*"): ------- list """ - from pyedb.generic.general_methods import is_ironpython - if is_ironpython: - import glob + import pathlib - return list(glob.glob(os.path.join(dirname, pattern))) - else: - import pathlib - - return [os.path.abspath(i) for i in pathlib.Path(dirname).glob(pattern)] + return [os.path.abspath(i) for i in pathlib.Path(dirname).glob(pattern)] def my_location(): diff --git a/src/pyedb/generic/general_methods.py b/src/pyedb/generic/general_methods.py index 5ff3f87467..a06f2c3eb6 100644 --- a/src/pyedb/generic/general_methods.py +++ b/src/pyedb/generic/general_methods.py @@ -47,11 +47,9 @@ from pyedb.generic.constants import CSS4_COLORS from pyedb.generic.settings import settings -is_ironpython = "IronPython" in sys.version or ".NETFramework" in sys.version is_linux = os.name == "posix" is_windows = not is_linux _pythonver = sys.version_info[0] -inside_desktop = True if is_ironpython and "4.0.30319.42000" in sys.version else False try: @@ -868,10 +866,7 @@ def read_xlsx(filename): # pragma: no cover def write_csv(output, list_data, delimiter=",", quotechar="|", quoting=csv.QUOTE_MINIMAL): # pragma: no cover - if is_ironpython: - f = open(output, "wb") - else: - f = open(output, "w", newline="") + f = open(output, "w", newline="") writer = csv.writer(f, delimiter=delimiter, quotechar=quotechar, quoting=quoting) for data in list_data: writer.writerow(data) @@ -1302,10 +1297,9 @@ def install_with_pip(package_name, package_path=None, upgrade=False, uninstall=F uninstall : bool, optional Whether to install the package or uninstall the package. """ - if is_linux and is_ironpython: - import subprocessdotnet as subprocess - else: - import subprocess + + import subprocess + executable = '"{}"'.format(sys.executable) if is_windows else sys.executable commands = [] diff --git a/src/pyedb/generic/plot.py b/src/pyedb/generic/plot.py index 3bceeef0bf..5b436f8338 100644 --- a/src/pyedb/generic/plot.py +++ b/src/pyedb/generic/plot.py @@ -2,35 +2,32 @@ import os import warnings -from pyedb.generic.general_methods import is_ironpython - -if not is_ironpython: # pragma: no cover - try: - import numpy # noqa: F401 - except ImportError: - warnings.warn( - "The NumPy module is required to run some functionalities of PostProcess.\n" - "Install with \n\npip install numpy\n\nRequires CPython." - ) - - try: - from matplotlib.patches import PathPatch - from matplotlib.path import Path - - # Use matplotlib agg backend (non-interactive) when the CI is running. - if bool(int(os.getenv("PYEDB_CI_NO_DISPLAY", "0"))): # pragma: no cover - import matplotlib - - matplotlib.use("Agg") - import matplotlib.pyplot as plt - - except ImportError: - warnings.warn( - "The Matplotlib module is required to run some functionalities of PostProcess.\n" - "Install with \n\npip install matplotlib\n\nRequires CPython." - ) - except: - pass +try: + import numpy # noqa: F401 +except ImportError: + warnings.warn( + "The NumPy module is required to run some functionalities of PostProcess.\n" + "Install with \n\npip install numpy\n\nRequires CPython." + ) + +try: + from matplotlib.patches import PathPatch + from matplotlib.path import Path + + # Use matplotlib agg backend (non-interactive) when the CI is running. + if bool(int(os.getenv("PYEDB_CI_NO_DISPLAY", "0"))): # pragma: no cover + import matplotlib + + matplotlib.use("Agg") + import matplotlib.pyplot as plt + +except ImportError: + warnings.warn( + "The Matplotlib module is required to run some functionalities of PostProcess.\n" + "Install with \n\npip install matplotlib\n\nRequires CPython." + ) +except: + pass def plot_matplotlib( diff --git a/src/pyedb/generic/process.py b/src/pyedb/generic/process.py index 88df235529..f6c2578cfe 100644 --- a/src/pyedb/generic/process.py +++ b/src/pyedb/generic/process.py @@ -1,11 +1,7 @@ import os.path +import subprocess -from pyedb.generic.general_methods import env_path, is_ironpython, is_linux - -if is_linux and is_ironpython: - import subprocessdotnet as subprocess -else: - import subprocess +from pyedb.generic.general_methods import env_path, is_linux class SiwaveSolve(object): diff --git a/src/pyedb/misc/downloads.py b/src/pyedb/misc/downloads.py index f0235be4fc..c2ef1c2795 100644 --- a/src/pyedb/misc/downloads.py +++ b/src/pyedb/misc/downloads.py @@ -24,15 +24,10 @@ import os import shutil import tempfile +import urllib.request import zipfile -from pyedb.generic.general_methods import is_ironpython, is_linux, settings -from pyedb.misc.misc import list_installed_ansysem - -if is_ironpython: - import urllib -else: - import urllib.request +from pyedb.generic.general_methods import is_linux, settings tmpfold = tempfile.gettempdir() EXAMPLE_REPO = "https://github.com/ansys/example-data/raw/master/" @@ -62,8 +57,7 @@ def _retrieve_file(url, filename, directory, destination=None, local_paths=[]): local_paths.append(local_path_no_zip) # grab the correct url retriever - if not is_ironpython: - urlretrieve = urllib.request.urlretrieve + urlretrieve = urllib.request.urlretrieve destination_dir = os.path.join(destination, directory) if not os.path.isdir(destination_dir): os.makedirs(destination_dir) @@ -71,35 +65,6 @@ def _retrieve_file(url, filename, directory, destination=None, local_paths=[]): if is_linux: command = "wget {} -O {}".format(url, local_path) os.system(command) - elif is_ironpython: - versions = list_installed_ansysem() - if versions: - cpython = os.listdir(os.path.join(os.getenv(versions[0]), "commonfiles", "CPython")) - command = ( - '"' - + os.path.join( - os.getenv(versions[0]), - "commonfiles", - "CPython", - cpython[0], - "winx64", - "Release", - "python", - "python.exe", - ) - + '"' - ) - commandargs = os.path.join(os.path.dirname(local_path), "download.py") - command += ' "' + commandargs + '"' - with open(os.path.join(os.path.dirname(local_path), "download.py"), "w") as f: - f.write("import urllib.request\n") - f.write("urlretrieve = urllib.request.urlretrieve\n") - f.write("import urllib.request\n") - f.write('url = r"{}"\n'.format(url)) - f.write('local_path = r"{}"\n'.format(local_path)) - f.write("urlretrieve(url, local_path)\n") - print(command) - os.system(command) else: _, resp = urlretrieve(url, local_path) local_paths.append(local_path) @@ -118,8 +83,6 @@ def _retrieve_folder(url, directory, destination=None, local_paths=[]): # pragm else: local_path = os.path.join(destination, directory) - if is_ironpython: - return False _get_dir = _get_file_url(directory) with urllib.request.urlopen(_get_dir) as response: # nosec data = response.read().decode("utf-8").split("\n") diff --git a/src/pyedb/siwave.py b/src/pyedb/siwave.py index 0eacd483f5..79c64499fe 100644 --- a/src/pyedb/siwave.py +++ b/src/pyedb/siwave.py @@ -16,7 +16,7 @@ from pyedb.dotnet.clr_module import _clr from pyedb.edb_logger import pyedb_logger -from pyedb.generic.general_methods import _pythonver, is_ironpython, is_windows +from pyedb.generic.general_methods import _pythonver, is_windows from pyedb.misc.misc import list_installed_ansysem from pyedb.siwave_core.icepak import Icepak @@ -80,10 +80,7 @@ def current_version(self): def __init__(self, specified_version=None): self._logger = pyedb_logger - if is_ironpython: - _com = "pythonnet" - import System - elif is_windows: # pragma: no cover + if is_windows: # pragma: no cover modules = [tup[1] for tup in pkgutil.iter_modules()] if _clr: import win32com.client