- self.icon = os.path.join(__location__,"icon.png")
- self.cpicon = os.path.join(__location__,"current-profile.png")
- self.delpicon = os.path.join(__location__,"delete.png")
- self.addpicon = os.path.join(__location__,"add.png")
+ if os.path.isdir(os.path.join(__location__,"/icons")):
+ path = os.path.join(__location__,"/icons")
+ else:
+ path = ""
+ try:
+ import pkg_resources
+ path = pkg_resources.resource_filename(__name__, 'icons/')
+ except:
+ print "unable to load resource icons"
+ self.icon = os.path.join(path,"icon.png")
+ self.cpicon = os.path.join(path,"current-profile.png")
+ self.delpicon = os.path.join(path,"delete.png")
+ self.addpicon = os.path.join(path,"add.png")