Pure Python COM package for Windows COM automation and interoperability
88
{
"context": "This evaluation assesses how effectively the engineer uses the comtypes package to implement Windows shortcut (.lnk) file operations, specifically focusing on proper usage of COM persistence interfaces like IPersistFile and related Shell interfaces for creating and reading shortcut properties.",
"type": "weighted_checklist",
"checklist": [
{
"name": "COM Object Creation",
"description": "Uses comtypes.client.CreateObject() or CoCreateInstance() to create IShellLink COM objects (typically using 'WScript.Shell' or the Shell.Link CLSID)",
"max_score": 15
},
{
"name": "IPersistFile Interface",
"description": "Correctly obtains and uses the IPersistFile interface via QueryInterface() or direct casting to save and load shortcut files",
"max_score": 25
},
{
"name": "IPersistFile.Save Method",
"description": "Calls IPersistFile.Save() with appropriate parameters (file path and fRemember flag) to persist the shortcut to disk",
"max_score": 15
},
{
"name": "IPersistFile.Load Method",
"description": "Calls IPersistFile.Load() with appropriate parameters (file path and mode flags) to load an existing shortcut file",
"max_score": 15
},
{
"name": "IShellLink Properties",
"description": "Uses IShellLink interface methods such as SetPath()/GetPath(), SetDescription()/GetDescription(), and SetWorkingDirectory()/GetWorkingDirectory() to set and retrieve shortcut properties",
"max_score": 20
},
{
"name": "COM Initialization",
"description": "Properly initializes COM using comtypes.CoInitialize() or comtypes.CoInitializeEx() if needed, or handles COM context appropriately",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-comtypesevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10