Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!xlned.com!feeder7.xlned.com!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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'instance': 0.05; 'python?': 0.05; 'python': 0.08; 'instance.': 0.09; 'tkinter': 0.09; 'examples': 0.12; 'gui': 0.13; 'written': 0.17; 'linux': 0.18; 'exists.': 0.19; 'cheers,': 0.19; 'fine,': 0.23; 'received:209.85.212.46': 0.23; 'received:mail- vw0-f46.google.com': 0.23; "i'm": 0.27; 'all,': 0.28; 'message- id:@mail.gmail.com': 0.28; 'class.': 0.29; 'classes': 0.30; 'not.': 0.30; '3.x': 0.30; 'invoke': 0.30; 'to:addr:python-list': 0.34; 'there': 0.34; 'realize': 0.34; 'received:209.85.212': 0.34; 'module.': 0.35; 'running': 0.35; 'doing': 0.37; 'but': 0.37; 'using': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'showing': 0.38; 'steven': 0.38; 'web,': 0.39; 'should': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'subject:program': 0.67; 'machine,': 0.84; 'running,': 0.84; 'maximize': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=2ZpmWIKsH6Wk2OzKIdZ+cSyvAP8iye1zPoPpj3ll2AM=; b=NsuM44WCIZRRVWHYpB8S84l3Fu6N6R/c72dRecY1baE5op/w67xa8N6uhZFu+LehUy SiclhVI4eZ0H7VPbzxwrVIKNTCXu0DyCbu/XmULPN5YQFt/ri8SiqhhNUlIWKcdtsw5T ASttJL0NNj6XU+m3+rCY1i4nCygg26g0GhWMI= MIME-Version: 1.0 Date: Wed, 27 Jul 2011 10:18:13 +0200 Subject: Maximize already running tkinter program on invocation From: Steven Kauffmann To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311754757 news.xs4all.nl 23849 [2001:888:2000:d::a6]:48019 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10376 Hi all, I have written a small GUI application in python 3.x using the tkinter module. Program is running fine, but multiple instances of the program can now be created. I would like to reduce the number of instances of the program to only 1 instance. I know that this is possible by using a singleton class. This way it's possible to check if the program is already running or not. When I invoke the program and it detects that the program is already running, is it then possible to maximize the already running program? I can find a lot of examples about singleton classes in python on the web, but nothing about showing the already running application when 1 instance of the program already exists. Is there a way to realize this in python? I'm now doing the development on a linux machine, but the final program should work on Windows. Cheers, Steven