Changeset 5009:72f57281871b in orange


Ignore:
Timestamp:
07/23/08 21:58:14 (6 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
f93ee3c556924d895e9d025a5e3c5fdaf57fd8b6
Message:
  • readCategories now reads the widget directories only upon the first invocation, and returns a stored global list afterwards
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngRegistry.py

    r5006 r5009  
    1515        self.directory = directory 
    1616    
     17storedCategories = None 
    1718def readCategories(): 
     19    global storedCategories 
     20    if storedCategories: 
     21        return storedCategories 
     22     
    1823    widgetDirName = os.path.realpath(directoryNames["widgetDir"]) 
    1924    canvasSettingsDir = os.path.realpath(directoryNames["canvasSettingsDir"]) 
     
    5156 
    5257    cPickle.dump(categories, file(cacheFilename, "wb")) 
     58    storedCategories = categories 
    5359    return categories 
    5460 
Note: See TracChangeset for help on using the changeset viewer.