Ignore:
Timestamp:
03/20/12 08:18:01 (2 years ago)
Author:
markotoplak
Branch:
default
rebase_source:
5f093927cfe99adbb8b562a712db8e15d1b77c82
Message:

Moved some other scripts from misc to utils and Orange imports and canvas not works, although not systematically tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/orng/addOnPack.py

    r9671 r10581  
    66import OWGUI 
    77 
    8 import Orange.misc.addons 
     8import Orange.utils.addons 
    99 
    1010 
     
    3939        p = OWGUI.widgetBox(page, "Select a registered add-on to pack", orientation="horizontal") 
    4040        self.aolist = OWGUI.listBox(p, self, callback=self.list_selection_callback) 
    41         self.registered_addons = Orange.misc.addons.registered_addons 
     41        self.registered_addons = Orange.utils.addons.registered_addons 
    4242        for ao in self.registered_addons: 
    4343            self.aolist.addItem(ao.name) 
     
    163163        xml = os.path.join(self.directory, "addon.xml") 
    164164        if os.path.isfile(xml): 
    165             self.ao = Orange.misc.addons.OrangeAddOn(xmlfile=open(xml, 'r')) 
     165            self.ao = Orange.utils.addons.OrangeAddOn(xmlfile=open(xml, 'r')) 
    166166        else: 
    167             self.ao = Orange.misc.addons.OrangeAddOn() 
     167            self.ao = Orange.utils.addons.OrangeAddOn() 
    168168        denone = lambda x: x if x else ""  
    169169        self.e_id.setText(self.ao.id if self.ao.id else str(uuid.uuid1())) 
    170170        self.e_name.setText(self.ao.name or os.path.split(self.directory)[1]) 
    171         self.e_version.setText(Orange.misc.addons.suggest_version(self.ao.version_str)) 
     171        self.e_version.setText(Orange.utils.addons.suggest_version(self.ao.version_str)) 
    172172        self.e_description.setPlainText(denone(self.ao.description)) 
    173173        self.e_preferreddir.setText(denone(self.ao.preferred_directory)) 
     
    213213         
    214214    def accept(self): 
    215         rao = Orange.misc.addons.OrangeRegisteredAddOn(self.ao.name, self.directory) 
     215        rao = Orange.utils.addons.OrangeRegisteredAddOn(self.ao.name, self.directory) 
    216216        rao.prepare(self.ao.id, self.ao.name, str(self.e_version.text()), unicode(self.e_description.toPlainText()), self.e_tags.parseEntries(), 
    217217                    self.e_aorganizations.parseEntries(), self.e_aauthors.parseEntries(), self.e_acontributors.parseEntries(), self.preferredDir, 
Note: See TracChangeset for help on using the changeset viewer.