Python USB control on Windows 7?

Chris Angelico rosuav at gmail.com
Sun Dec 23 08:34:41 CET 2012


On Sun, Dec 23, 2012 at 6:28 PM, Tim Roberts <timr at probo.com> wrote:
> Duncan Booth <duncan.booth at invalid.invalid> wrote:
>>
>>In this year's Christmas Raffle at work I won a 'party-in-a-box' including
>>USB fairy lights.
>>
>>They sit boringly on all the time, so does anyone know if I can toggle the
>>power easily from a script? My work PC is running Win7.
>
> Not easily, no.  It's not really a USB device -- I'm betting it doesn't
> even enumerate.  It's just sucking power from the USB wires.  There's
> nothing to control.

Hmm. Can you control whether a particular port is on or off? (I have
no idea what's possible with the underlying API, much less whether
it's exposed.) It should in theory be possible - disable the
appropriate USB port and the device loses power.

ChrisA



More information about the Python-list mailing list