def _getfontlist(): from Carbon import Res fontnames = [] for i in range(1, Res.CountResources('FOND') + 1): r = Res.GetIndResource('FOND', i) fontnames.append(r.GetResInfo()[2]) return fontnames
def listresources(): ntypes = Res.CountTypes() for itype in range(1, 1+ntypes): type = Res.GetIndType(itype) print "Type:", repr(type) nresources = Res.CountResources(type) for i in range(1, 1 + nresources): Res.SetResLoad(0) res = Res.GetIndResource(type, i) Res.SetResLoad(1) info(res)
def findICONresources(self): num = Res.CountResources('ICON') rv = [] for i in range(1, num+1): Res.SetResLoad(0) try: r = Res.GetIndResource('ICON', i) finally: Res.SetResLoad(1) id, type, name = r.GetResInfo() rv.append((id, name)) return rv
"""browsepict - Display all "cicn" resources found"""
"""browsepict - Display all "PICT" resources found"""
# List all resources