Changeset 7651:d3d506e02db7 in orange


Ignore:
Timestamp:
02/11/11 15:31:20 (3 years ago)
Author:
matija <matija.polajnar@…>
Branch:
default
Convert:
5fa3138c7ef463ade03322dd505cc111947693fb
Message:

orngABCN2: workaround cyclic import issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/orngABCN2.py

    r7288 r7651  
    22The main learner class is ABCN2. The first few classes are some variants of ABCN2 with reasonable settings.  """ 
    33 
    4 import Orange.core 
    5 import Orange.classification.rules 
    6 from orngABML import * 
     4 
    75import operator 
    86import random 
    97import numpy 
    108import math 
     9 
     10# The following is an ugly hack to make the cyclic dependencies work. 
     11# Cyclic dependencies are introduced by Orange's __init__.py importing all 
     12# its submodules, one of which currently depends on this module. 
     13import sys 
     14if "Orange" not in sys.modules: 
     15    del sys.modules['orngABCN2'] 
     16    import Orange 
     17 
     18import Orange.core 
     19import Orange.classification.rules 
     20from orngABML import * 
    1121 
    1222# Default learner - returns     # 
Note: See TracChangeset for help on using the changeset viewer.