Module “license”

class tc_python.license.LicenseManager(license_manager)

Bases: object

Manages the license operations for Thermo-calc licenses for TC-Python, including login, activation, and proxy settings.

activate(user: str, password: str)

Activates the license.

Parameters:
  • user – The username

  • password – The password

activate_offline(user: str, password: str, path: str = '')

Activate the license with an offline activation response file.

Parameters:
  • user – The username

  • password – The password

  • path – Optional path to folder where the activation response file is located

create_offline_activation_file(user: str, password: str, path: str = '')

Create a file for offline activation.

Parameters:
  • user – The username

  • password – The password

  • path – Optional path to folder where the activation file is created

deactivate()

Deactivates the license if the license was activated using online method.

Raises:

LicenseException – If not logged in or license was activated using activate_offline().

deactivate_offline(path: str = '')

Deactivates the license if the license was activated using activate_offline().

Parameters:

path – Optional path to folder where the deactivation file is located

Raises:

LicenseException – If not logged in

get_info() str

Retrieves the current license information.

Returns:

The license information

proxy_settings_remove()

Disables the proxy settings.

proxy_settings_set(host: str, port: int, user: str, password: str)

Sets the proxy settings with the given host, port, username, and password.

Parameters:
  • host – The proxy host

  • port – The proxy port

  • user – The proxy username

  • password – The proxy password

update()

Updates the license.