single app

Peter Damoc wrote:

attached is the new version
if you consider it to be of any use please help me improve it and when Robin gets back maybe he will add it to wx.lib or something :slight_smile:

It doesn't work on my Windows XP SP2 Russian edition with Python 2.4.1 and wxPython 2.6.1 Unicode build.

Here's the traceback I get:

Traceback (most recent call last):
   File "D:\singleApp.py", line 94, in ?
     app = TestApp("A_simple_TestApp",0)
   File "D:\singleApp.py", line 53, in __init__
     self.instance = wx.SingleInstanceChecker(name+str(wx.GetUserId()))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-12: ordinal not in range(128)

I guess it's got to do with str(wx.GetUserId()) which cannot convert the unicode string returned by GetUserId() to regular string.

···

--
Best regards,
Alexei Vinidiktov
Open Book - educational software for learning languages
English: http://www.vinidiktov.com
Russian: http://www.vinidiktov.ru