On 20-feb-2006, at 22:05, Keith Ray wrote: > PyFIT gives me ascii strings,and I am trying to call cocoa (and > eventually some applescript) functions from Python. I tried > > from Foundation import NSString > from AppKit import NSWorkspace > import os.path > > ....etc... > > ws = NSWorkspace.sharedWorkspace() > uapplicationpath = unicode(self.applicationpath, 'ascii') > self.launchsuccess = ws.launchApplication_( > NSString.stringWithString_(uapplicationpath) ) > > but get a traceback: > > line 23, in result > uapplicationpath = unicode(self.applicationpath, 'ascii') > TypeError: decoding Unicode is not supported
What is self.applicationpath? The error seems to indicate that it already is a unicode string. Ronald > > Help ? > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig