Changeset 10844:8d8d78127c20 in orange


Ignore:
Timestamp:
04/23/12 14:40:10 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed c45 test on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Classify/OWC45Tree.py

    r10785 r10844  
    1919 
    2020_Orange_dir = os.path.dirname(Orange.__file__) 
    21 _SO = "c45%s" % sysconfig.get_config_var("SO") 
    22  
    23 if os.path.exists(os.path.join(_Orange_dir, _SO)):               
     21 
     22if sys.platform == "win32": 
     23    _SO = "c45.dll" 
     24else: 
     25    _SO = "c45.so" 
     26 
     27if os.path.exists(os.path.join(_Orange_dir, _SO)): 
    2428    # Test if the c45.(so|pyd) can be loaded by orange.C45Learner 
    25     import orange 
    2629    try: 
    27         orange.C45Learner() 
     30        Orange.core.C45Learner() 
    2831    except orange.KernelException, ex: 
    2932        # I guess not 
     
    3134else: 
    3235    raise ImportError("c45 is not found") 
    33   
     36 
     37 
    3438class OWC45Tree(OWWidget): 
    3539    settingsList = ["name", 
Note: See TracChangeset for help on using the changeset viewer.