########################################################################
#
#    Vision Network - Python source code - file generated by vision
#    Friday 13 April 2007 14:00:00 
#    
#       The Scripps Research Institute (TSRI)
#       Molecular Graphics Lab
#       La Jolla, CA 92037, USA
#
# Copyright: Daniel Stoffler, Michel Sanner and TSRI
#   
# revision: Guillaume Vareille
#  
#########################################################################
#
# $Header: /opt/cvs/python/packages/share1.5/Vision/doc/Examples/matplotlib/Vline_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
#
# $Id: Vline_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
#

from traceback import print_exc
## loading libraries ##
from Vision.matplotlibNodes import matplotliblib
masterNet.getEditor().addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib")

from Vision.StandardNodes import stdlib
masterNet.getEditor().addLibraryInstance(stdlib,"Vision.StandardNodes", "stdlib")

try:
    ## saving node ReadTable ##
    from Vision.StandardNodes import ReadTable
    ReadTable_180 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
    masterNet.addNode(ReadTable_180,94,21)
    ReadTable_180.inputPortByName['filename'].widget.set("Data/vlines_data.dat", run=False)
    ReadTable_180.inputPortByName['sep'].widget.set(",", run=False)
    ReadTable_180.inputPortByName['datatype'].widget.set("float", run=False)
    apply(ReadTable_180.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
    print_exc()
    ReadTable_180=None

try:
    ## saving node Vline ##
    from Vision.matplotlibNodes import VlineNE
    Vline_181 = VlineNE(constrkw = {}, name='Vline', library=matplotliblib)
    masterNet.addNode(Vline_181,117,358)
except:
    print "WARNING: failed to restore VlineNE named Vline in network masterNet"
    print_exc()
    Vline_181=None

try:
    ## saving node Index ##
    from Vision.StandardNodes import Index
    Index_182 = Index(constrkw = {}, name='Index', library=stdlib)
    masterNet.addNode(Index_182,12,187)
    apply(Index_182.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore Index named Index in network masterNet"
    print_exc()
    Index_182=None

try:
    ## saving node Index ##
    from Vision.StandardNodes import Index
    Index_183 = Index(constrkw = {}, name='Index', library=stdlib)
    masterNet.addNode(Index_183,161,188)
    apply(Index_183.inputPortByName['index'].widget.configure, (), {'max': 2})
    Index_183.inputPortByName['index'].widget.set(1, run=False)
    apply(Index_183.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore Index named Index in network masterNet"
    print_exc()
    Index_183=None

try:
    ## saving node Index ##
    from Vision.StandardNodes import Index
    Index_184 = Index(constrkw = {}, name='Index', library=stdlib)
    masterNet.addNode(Index_184,299,185)
    apply(Index_184.inputPortByName['index'].widget.configure, (), {'max': 2})
    Index_184.inputPortByName['index'].widget.set(2, run=False)
    apply(Index_184.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore Index named Index in network masterNet"
    print_exc()
    Index_184=None

masterNet.freeze()

## saving connections for network Vline ##
if ReadTable_180 is not None and Index_182 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_180, Index_182, "data", "data", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_180 and Index_182 in network masterNet"
if ReadTable_180 is not None and Index_183 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_180, Index_183, "data", "data", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_180 and Index_183 in network masterNet"
if ReadTable_180 is not None and Index_184 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_180, Index_184, "data", "data", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_180 and Index_184 in network masterNet"
if Index_182 is not None and Vline_181 is not None:
    try:
        masterNet.connectNodes(
            Index_182, Vline_181, "data", "x", blocking=True)
    except:
        print "WARNING: failed to restore connection between Index_182 and Vline_181 in network masterNet"
if Index_183 is not None and Vline_181 is not None:
    try:
        masterNet.connectNodes(
            Index_183, Vline_181, "data", "ymin", blocking=True)
    except:
        print "WARNING: failed to restore connection between Index_183 and Vline_181 in network masterNet"
if Index_184 is not None and Vline_181 is not None:
    try:
        masterNet.connectNodes(
            Index_184, Vline_181, "data", "ymax", blocking=True)
    except:
        print "WARNING: failed to restore connection between Index_184 and Vline_181 in network masterNet"
masterNet.unfreeze()
#masterNet.run()

