Changeset 10468:33ad07c97b80 in orange


Ignore:
Timestamp:
03/08/12 14:05:11 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Test the import of networkx itself (fixes #1121).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/network/__init__.py

    r9994 r10468  
    5353from Orange.core import GraphAsList, GraphAsMatrix, GraphAsTree 
    5454 
     55# Test if networkx is installed 
     56__have_networkx = False 
    5557try: 
    56     from network import * 
     58    import networkx as nx 
     59    __have_networkx = True 
    5760except ImportError: 
    5861    import warnings 
    5962    warnings.warn("Warning: some features are disabled. Install networkx to use the 'Orange.network' module.")  
     63 
     64if __have_networkx: 
     65    from network import * 
    6066 
    6167import community 
Note: See TracChangeset for help on using the changeset viewer.