Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'subject:Windows': 0.09; 'booth': 0.09; 'sucking': 0.09; 'toggle': 0.09; 'underlying': 0.09; 'dec': 0.15; 'api,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hmm.': 0.16; 'script?': 0.16; 'wrote:': 0.17; 'tim': 0.18; 'appropriate': 0.20; 'disable': 0.22; 'idea': 0.24; 'device': 0.24; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'received:209.85.212': 0.28; "i'm": 0.29; "skip:' 10": 0.30; 'running': 0.32; 'anyone': 0.33; 'to:addr :python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'really': 0.36; 'should': 0.36; 'possible': 0.37; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'easily': 0.39; 'header:Received:5': 0.40; 'time,': 0.62; 'christmas': 0.65; 'sit': 0.65; 'power': 0.74; 'loses': 0.84; 'raffle': 0.84; 'won': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SYce/r6kzzxEFamtPF/9gzMwbAZXRQepMn3PMXCTLYY=; b=LRf9hJEP/9+pfIdW3AFxWMknPh46pAMcILxLzPjkUnh0Pajtw9pOXLXffQhtqnM5FG z2EgCr6KhOcTwK79NjJ7XG1B/Jaq308xjfu8E08jx84xdxcgH34ybRfXDnnuWyYmSnig UOP0LMr1pxzCpgg38MkozZ2XoZrbwEKpi9YG6ws9K8JjIv4abeJowjN2N2Z4dTNl81b5 cKd3CWGx2XjeXukJBv0s1YLzmEY1Vv/lvrNqVy6wbTwbyX54aOW6m3teyVs7phjpvgnw xTZBtnM6UYOypEAYrXT9E25VV7H8vW3eRhdjFUoae8U0p7VrBO75lc81YGAZhIkftVA1 EKfQ== MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 23 Dec 2012 18:34:41 +1100 Subject: Re: Python USB control on Windows 7? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356248091 news.xs4all.nl 6907 [2001:888:2000:d::a6]:57789 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35401 On Sun, Dec 23, 2012 at 6:28 PM, Tim Roberts wrote: > Duncan Booth 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