In article <11e093d5-b78e-4ac6-9a7f-649cb2c2c...@googlegroups.com>, Andrei <andrei.fo...@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, n...@acm.org -- https://mail.python.org/mailman/listinfo/python-list