Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92312

Re: Detect if specific Python.app instance is already running

From Ned Deily <nad@acm.org>
Subject Re: Detect if specific Python.app instance is already running
Date 2015-06-07 16:07 -0700
References <a3be1707-0eae-46fa-9921-e9c145816ad5@googlegroups.com> <11e093d5-b78e-4ac6-9a7f-649cb2c2c942@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.281.1433718479.13271.python-list@python.org> (permalink)

Show all headers | View raw


In article <11e093d5-b78e-4ac6-9a7f-649cb2c2c942@googlegroups.com>,
 Andrei <andrei.fokau@gmail.com> wrote:
> Alright, I have had some development in 
> http://stackoverflow.com/questions/30694560/detect-if-specific-python-app-inst
> ance-is-already-running and can prevent running multiple instances of the 
> same app/script (by lockf), but I still need to identify which Python.app 
> instance is running certain script. I guess it's more Cocoa-related question 
> but I hope someone had same problem with tkinter etc.

Can you give a more complete explanation of the goal, i.e. what you are 
trying to end up with here, rather than the steps you are taking to get 
there?  It's not at all clear to me what your goal is and the cumbersome 
steps you find you have to take suggest that you might be going down the 
wrong path.  OS X apps usually don't have to resort to such hacks.  If 
you haven't already, make sure you have looked at the "Information 
Property List Key Reference" for OS X (and iOS) apps.  For instance, key 
LSMultipleInstancesProhibited *might* be useful if you really only want 
to ensure that there is only instance of an app launched.

https://developer.apple.com/library/mac/documentation/General/Reference/I
nfoPlistKeyReference/Articles/LaunchServicesKeys.html

-- 
 Ned Deily,
 nad@acm.org

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Detect if specific Python.app instance is already running Andrei <andrei.fokau@gmail.com> - 2015-06-07 07:31 -0700
  Re: Detect if specific Python.app instance is already running Andrei <andrei.fokau@gmail.com> - 2015-06-07 12:54 -0700
    Re: Detect if specific Python.app instance is already running Ned Deily <nad@acm.org> - 2015-06-07 16:07 -0700
      Re: Detect if specific Python.app instance is already running Andrei <andrei.fokau@gmail.com> - 2015-06-08 01:32 -0700
        Re: Detect if specific Python.app instance is already running Laura Creighton <lac@openend.se> - 2015-06-08 20:21 +0200
        Re: Detect if specific Python.app instance is already running Ned Deily <nad@acm.org> - 2015-06-12 12:08 -0700

csiph-web