Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Speos Labs As Admin #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Run Speos Labs As Admin #173

wants to merge 1 commit into from

Conversation

MarinVillalobos
Copy link
Collaborator

Script to run all labs with administrative privileges.
Some users face difficulties in obtaining admin rights to access all applications. This script is designed to streamline the process, enabling it to be run easily right after installation.

Requirements: Administrative privileges.

This module runs all executables in:
C:\Program Files\ANSYS Inc\vXXX\Optical Products\Viewers with administrator privileges.

Each time an application is launched, the module registers the associated COM server used to invoke the application, ensuring the path to each executable is properly registered.

Classes and Main Methods

SpeosPathFinder
This class provides two methods to locate the Speos application path:
A method that searches for a specific version of Speos.
A default method that identifies and returns the latest installed version of Speos.

LabsAdmin
This class offers methods to open or close one or multiple applications simultaneously.
If no specific applications are provided, it will launch all applications found by default.

def __init__(self):
self.last_version = "000"
self.version = "000"
def find_latest_awp_root(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are using numpy style docstring for each class. Could you update your class docstring using numpy style? pycharm docstring setting

subprocess.check_call([sys.executable, "-m", "pip", "install", third_party_package])
import pygetwindow as gw

class SpeosPathFinder:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function already available in the sdcm_core/utility.py: link
please consider using / improving that function.

if len(self.ThreeDigitCode) != 3:
raise ValueError("\n\nThe code must be of 3 characters long to derive the version.")
self.Version = "20" + self.ThreeDigitCode[0] + self.ThreeDigitCode[1] + " R" + self.ThreeDigitCode[2]
self.Version = "20" + self.ThreeDigitCode[0] + self.ThreeDigitCode[1] + " R" + self.ThreeDigitCode[2]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants