Ignore:
Timestamp:
03/29/13 14:27:09 (11 years ago)
Author:
jripsl
Message:
  • add sample.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Monitoring/smon/types.py

    r840 r842  
    1111#  @license        CeCILL (http://dods.ipsl.jussieu.fr/jripsl/smon/LICENSE) 
    1212################################## 
     13 
     14import networkx as nx 
     15import pickle 
    1316 
    1417CSTE_SAMPLE="2.2" 
     
    3639 
    3740    def __init__(self,**kw): 
    38                 pass 
     41                dg = nx.DiGraph() 
     42 
     43        def update(cls): 
     44                dg.add_edge('a','b') 
     45 
     46        def print(cls): 
     47                print dg.edges() 
     48 
     49        def write(cls): 
     50                pickle.dump(dg, open('/tmp/graph.txt', 'w')) 
     51 
     52        def read(cls): 
     53                dg = pickle.load(open('/tmp/graph.txt')) 
    3954 
    4055    def __str__(self): 
Note: See TracChangeset for help on using the changeset viewer.