Returns information about all the pointing devices (including mice and trackballs) installed on a computer.

This script was tested using Python 2.2.2-224 for Microsoft Windows, available from ActiveState.

import win32com.client
strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer,"root\cimv2")
colItems = objSWbemServices.ExecQuery("Select * from Win32_PointingDevice")
for objItem in colItems:
    print "Availability: ", objItem.Availability
    print "Caption: ", objItem.Caption
    print "Config Manager Error Code: ", objItem.ConfigManagerErrorCode
    print "Config Manager User Config: ", objItem.ConfigManagerUserConfig
    print "Creation Class Name: ", objItem.CreationClassName
    print "Description: ", objItem.Description
    print "Device ID: ", objItem.DeviceID
    print "Device Interface: ", objItem.DeviceInterface
    print "DoubleSpeed Threshold: ", objItem.DoubleSpeedThreshold
    print "Error Cleared: ", objItem.ErrorCleared
    print "Error Description: ", objItem.ErrorDescription
    print "Handedness: ", objItem.Handedness
    print "Hardware Type: ", objItem.HardwareType
    print "Inf File Name: ", objItem.InfFileName
    print "Inf Section: ", objItem.InfSection
    print "Install Date: ", objItem.InstallDate
    print "Is Locked: ", objItem.IsLocked
    print "Last Error Code: ", objItem.LastErrorCode
    print "Manufacturer: ", objItem.Manufacturer
    print "Name: ", objItem.Name
    print "Number Of Buttons: ", objItem.NumberOfButtons
    print "PNP Device ID: ", objItem.PNPDeviceID
    print "Pointing Type: ", objItem.PointingType
    z = objItem.PowerManagementCapabilities
    if z is None:
        a = 1
        for x in z:
            print "Power Management Capabilities: ", x
    print "Power Management Supported: ", objItem.PowerManagementSupported
    print "Quad Speed Threshold: ", objItem.QuadSpeedThreshold
    print "Resolution: ", objItem.Resolution
    print "Sample Rate: ", objItem.SampleRate
    print "Status: ", objItem.Status
    print "Status Info: ", objItem.StatusInfo
    print "Synch: ", objItem.Synch
    print "System Creation Class Name: ", objItem.SystemCreationClassName
    print "System Name: ", objItem.SystemName