[Pyobjc-dev] NSFileWrapper.icon() returning None?
Brought to you by:
ronaldoussoren
From: Dinu G. <gh...@da...> - 2003-09-25 11:11:14
|
Hi, does anybody get a real NSImage instance instead of None for some existing path on his filesystem? I seem to always get None... See code below... (I can't use NSWorkspace.iconForFile_() because it needs an application, window server, whatever...). Thanks, Dinu import os from AppKit import NSFileWrapper # path = '/Users/dinu/foo.html' print os.path.exists(path) f = NSFileWrapper.alloc().initWithPath_(path) print f.filename() print f.icon() -- Dinu C. Gherman ...................................................................... "The first principle is that you must not fool yourself - and you are the easiest person to fool." (Richard Feynman) |