data.OnReadData()
self.instance = wx.SingleInstanceChecker('client_lock',
cfg.local_parameters
['client_path'])
if self.instance.IsAnotherRunning():
message = "Okay, Houston, we've had a problem here.
\nAnother instance is running"
wx.MessageBox(message, cfg.appTitle)
return False
The snip work fine except when I close and restar the application.
In fact when I try this ,'Python information' say me that
Deleted stale lock file '/home/beppe/my_huge_app/client_lock'.
How can I intercept this message?
I have read about wx.Log but I don't understand how to use this.
Thank for any suggestions.
Beppe
On Dec 14, 5:47 pm, Cody Precord <codyprec...@gmail.com> wrote:
Hi,
On Mon, Dec 14, 2009 at 10:03 AM, Beppe <g.costa...@email.it> wrote:
> The snip work fine except when I close and restar the application.
> In fact when I try this ,'Python information' say me that
> Deleted stale lock file '/home/beppe/my_huge_app/client_lock'.
> How can I intercept this message?
> I have read about wx.Log but I don't understand how to use this.
> Thank for any suggestions.
Call wx.Log.EnableLogging(False) (note static method) in your startup code.
The real issue though is that you need to cleanup your single instance
checker when your app exits so this condition does not happen at all.