Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Windows': 0.02; 'specific.': 0.09; 'subject:using': 0.09; 'runs': 0.10; 'gui': 0.12; 'windows': 0.15; 'patil': 0.16; 'screen,': 0.16; 'subject:GUI': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'else,': 0.19; 'import': 0.22; 'mon,': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'ctypes': 0.31; 'skip:c 30': 0.32; 'screen': 0.34; 'something': 0.35; 'received:google.com': 0.35; 'in.': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'till': 0.61; "you'll": 0.62; 'more': 0.64; 'dear': 0.65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=SZ2jdgxm3VPD2USZcgPeDca1Ygd0PVoc53y/zXMbJBM=; b=lPmCrpolNlw4F22Bez8fPoowV7yJEU3T8WgopJD3Z4sN3/7rEjdoeRoSqqgJc2C99e /yAYgXLOtEbGIjSeMJmIohREub8+dJKI1LrMSxNKH5NeOiNCsPOQPEScqiHM6vAuRhk6 5amxQcZDbp1aDL+6I7a4zexcXMZ3wg6beR+8Quii31yqYeFu37L1/V9h/dtszkkCUuNn B3UOYaP9tk9PfkybozKT0vj0qmyWmR9tZEli9SK77A/berLIxhprbr3o/MKq2zbXLN4x oIOJ6d4114jjMLZv5bLISCTxKaZq9/Q9iU/YMc+4QRKm7d0m/qqmSz2ADzXjYDlIcb0b 6QAA== X-Received: by 10.236.229.133 with SMTP id h5mr59563907yhq.64.1401772212024; Mon, 02 Jun 2014 22:10:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <0d04724b-d800-407f-9614-1a86c4a58769@googlegroups.com> References: <0d04724b-d800-407f-9614-1a86c4a58769@googlegroups.com> From: Ian Kelly Date: Mon, 2 Jun 2014 23:09:31 -0600 Subject: Re: Lock Windows Screen GUI using python To: Python Content-Type: text/plain; charset=UTF-8 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401772221 news.xs4all.nl 2831 [2001:888:2000:d::a6]:56273 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72467 On Mon, Jun 2, 2014 at 10:28 PM, Jaydeep Patil wrote: > Dear all, > Can we Lock Windows Screen GUI till program runs & unlock screen GUI when program finishes? If you mean can you programmatically bring up the Windows lock screen, then you can do this: import ctypes ctypes.windll.user32.LockWorkStation() The only way to unlock it is for the user to log in. If you mean something else, you'll have to be more specific.