Changeset 7843:f175e24318cd in orange


Ignore:
Timestamp:
04/14/11 14:18:00 (3 years ago)
Author:
matija <matija.polajnar@…>
Branch:
default
Convert:
0535c58d823a8edc9bb28c1e43a6750c1c64880b
Message:

Compatibility bugfix in Orange.network.readwrite: current Ubuntu's version of networkx does not have a generate_pajek function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/network/readwrite.py

    r7838 r7843  
    11import network 
    22import networkx.readwrite as rw 
     3import warnings 
    34 
    45__all__ = ['generate_pajek', 'write_pajek', 'read_pajek', 'parse_pajek'] 
    56 
    6 generate_pajek = rw.generate_pajek 
     7try: 
     8    generate_pajek = rw.generate_pajek 
     9except: 
     10    warnings.warn("Warning: your version of networkx does not contain the "+ 
     11                  "generate_pajek method; you may encounter problems when "+ 
     12                  "using the Orange.network module.") 
     13     
    714write_pajek = rw.write_pajek 
    815 
Note: See TracChangeset for help on using the changeset viewer.