Utils#

class pycanape.utils.CANapeVersion(value)[source]#

An enumeration.

CANAPE_17 = 17#
CANAPE_18 = 18#
CANAPE_19 = 19#
CANAPE_20 = 20#
CANAPE_21 = 21#
CANAPE_22 = 22#
CANAPE_23 = 23#
pycanape.utils.get_canape_versions() List[CANapeVersion][source]#

Return a list of all CANape versions, that can be found in Windows Registry.

Return type:

List[CANapeVersion]

pycanape.utils.get_canape_path(version: CANapeVersion | None = None) Path[source]#

Return the path to the CANape installation from Windows registry.

Parameters:

version (CANapeVersion | None) – Select the CANape version that shall be found. If None, it will usually return the version, that was installed last.

Returns:

Path to the CANape installation.

Return type:

Path

pycanape.utils.get_canape_data_path(version: CANapeVersion | None = None) Path[source]#

Return the path to the CANape data folder from Windows registry.

Parameters:

version (CANapeVersion | None) – Select the CANape version that shall be found. If None, it will usually return the version, that was installed last.

Returns:

Path to the CANape data folder.

Return type:

Path

pycanape.utils.get_canape_dll_path(version: CANapeVersion | None = None) Path[source]#

Return the path to the CANapAPI.dll from Windows registry or PATH.

Parameters:

version (CANapeVersion | None) – Select the CANape version that shall be found. If None, it will usually return the version, that was installed last.

Returns:

Path to the CANapAPI.dll.

Return type:

Path