tessl install tessl/pypi-comtypes@1.4.0Pure Python COM package for Windows COM automation and interoperability
Agent Success
Agent success rate when using this tile
88%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.99x
Baseline
Agent success rate without this tile
89%
A utility for creating and reading Windows shortcut (.lnk) files with customizable properties.
Create shortcut files that link to target files or directories with customizable properties.
Read and extract information from existing Windows shortcut files.
@generates
def create_shortcut(shortcut_path: str, target_path: str, description: str = "", working_dir: str = "") -> None:
"""
Creates a Windows shortcut (.lnk) file.
Args:
shortcut_path: Path where the shortcut file will be created
target_path: Path to the target file or directory
description: Optional description for the shortcut
working_dir: Optional working directory for the shortcut
Raises:
ValueError: If shortcut_path or target_path is empty
OSError: If there are issues creating the shortcut file
"""
pass
def read_shortcut(shortcut_path: str) -> dict:
"""
Reads properties from an existing Windows shortcut file.
Args:
shortcut_path: Path to the shortcut file to read
Returns:
Dictionary containing:
- 'target': Target path of the shortcut
- 'description': Description property (empty string if not set)
- 'working_dir': Working directory property (empty string if not set)
Raises:
ValueError: If shortcut_path is empty
FileNotFoundError: If the shortcut file does not exist
OSError: If there are issues reading the shortcut file
"""
passProvides COM interface access for Windows Shell objects and persistence operations.
@satisfied-by