Changeset 10145:a48a4c150102 in orange


Ignore:
Timestamp:
02/08/12 22:32:27 (2 years ago)
Author:
ales_erjavec
Branch:
default
rebase_source:
16a6ab4033fc0d60d75dc34de8f7dd46dd2ff978
Message:

A hack to import orange without also importing Orange. Also added orangeom, orangene, statc and corn.

Location:
Orange/orng
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/orng/orange.py

    r9877 r10145  
    1 from Orange.orange import * 
     1 
     2try: 
     3    import sys as __sys     
     4    import os as __os 
     5    import imp as __imp 
     6    from distutils.sysconfig import get_config_var as __get_config_var 
     7    __ORANGE_SO__FILE__ = __os.path.dirname(__os.path.dirname(__os.path.abspath(__file__))) 
     8    __ORANGE_SO__FILE__ = __os.path.join(__ORANGE_SO__FILE__, "orange" + __get_config_var("SO")) 
     9    if __ORANGE_SO__FILE__ != __sys.modules["orange"].__file__: 
     10        __ORANGE = __imp.load_dynamic("orange", __ORANGE_SO__FILE__) 
     11        __sys.modules['orange'] = __ORANGE 
     12except Exception, ex: 
     13    from Orange.orange import * 
Note: See TracChangeset for help on using the changeset viewer.