Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <ytrewq1@em...> - 2005-06-27 06:06:05
|
I get a Bus error for the following: from AppKit import * import sys icon = NSImage.alloc().init() if icon is None: sys.stderr.write('failed in create NSImage') sys.exit(1) try: icon = icon.initWithContentsOfFile_(u'/hello.png') except: pass I think it's my fault for specifying the path of a file that doesn't exist and initWithContentsOfFile_ is dying. Is it possible to handle this failure though? In general, even if I check whether a file exists before making the call, there's no guarantee that the file will exist by the time the call is made, right? -- ytrewq1@... -- http://www.fastmail.fm - Email service worth paying for. Try it for free |