or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/comtypes@1.4.x
tile.json

tessl/pypi-comtypes

tessl install tessl/pypi-comtypes@1.4.0

Pure 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%

task.mdevals/scenario-6/

COM Event Monitor

Build a simple Windows application event monitoring system that connects to COM objects and captures events they fire.

Capabilities

Event Connection

  • Connects a Python callback handler to a COM object's event interface @test
  • Successfully receives events when the COM object fires them @test

Event Discovery

  • Lists all available events from a COM object for debugging purposes @test

Message Processing

  • Processes Windows messages to ensure event delivery with configurable timeout @test

Implementation

@generates

The implementation should provide a simple interface for monitoring COM events. The system needs to handle event callbacks from COM objects and ensure proper message processing.

API

class EventMonitor:
    """
    Monitor events from COM objects.
    """

    def connect_events(self, com_object, event_handler):
        """
        Connect an event handler to a COM object.

        Args:
            com_object: The COM object to monitor
            event_handler: Object with methods matching event names

        Returns:
            Connection object that can be used to disconnect events
        """
        pass

    def list_events(self, com_object):
        """
        List all available events from a COM object.

        Args:
            com_object: The COM object to inspect

        Returns:
            Information about available events
        """
        pass

    def process_messages(self, timeout_seconds):
        """
        Process Windows messages to allow event delivery.

        Args:
            timeout_seconds: Maximum time to process messages in seconds
        """
        pass

Dependencies { .dependencies }

comtypes { .dependency }

Provides COM object interaction and event handling support for Windows.