Files
Phoenix/docs/sphinx/rest_substitutions/snippets/python/converted/SingleInstanceChecker.1.py
2012-04-10 03:16:37 +00:00

15 lines
434 B
Python

def OnInit(self):
self.name = "SingleApp-%s" % wx.GetUserId()
self.instance = wx.SingleInstanceChecker(self.name)
if self.instance.IsAnotherRunning():
wx.MessageBox("Another instance is running", "ERROR")
return False
frame = SingleAppFrame(None, "SingleApp")
frame.Show()
return True