########################################################################
#
#    Vision Network - Python source code - file generated by vision
#    Tuesday 17 April 2007 09:38:20 
#    
#       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/SinFuncSerie_net.py,v 1.2 2007/08/29 20:37:16 vareille Exp $
#
# $Id: SinFuncSerie_net.py,v 1.2 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 Plot ##
    from Vision.matplotlibNodes import PlotNE
    Plot_11 = PlotNE(constrkw = {}, name='Plot', library=matplotliblib)
    masterNet.addNode(Plot_11,100,166)
    apply(Plot_11.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore PlotNE named Plot in network masterNet"
    print_exc()
    Plot_11=None

try:
    ## saving node SinFuncSerie ##
    from Vision.matplotlibNodes import SinFuncSerie
    SinFuncSerie_12 = SinFuncSerie(constrkw = {}, name='SinFuncSerie', library=matplotliblib)
    masterNet.addNode(SinFuncSerie_12,85,8)
except:
    print "WARNING: failed to restore SinFuncSerie named SinFuncSerie in network masterNet"
    print_exc()
    SinFuncSerie_12=None

try:
    ## saving node iterate ##
    from Vision.StandardNodes import Iterate
    iterate_13 = Iterate(constrkw = {}, name='iterate', library=stdlib)
    masterNet.addNode(iterate_13,102,91)
except:
    print "WARNING: failed to restore Iterate named iterate in network masterNet"
    print_exc()
    iterate_13=None

masterNet.freeze()

## saving connections for network SinFunc ##
if SinFuncSerie_12 is not None and iterate_13 is not None:
    try:
        masterNet.connectNodes(
            SinFuncSerie_12, iterate_13, "X", "listToLoopOver", blocking=True)
    except:
        print "WARNING: failed to restore connection between SinFuncSerie_12 and iterate_13 in network masterNet"
if iterate_13 is not None and Plot_11 is not None:
    try:
        masterNet.connectNodes(
            iterate_13, Plot_11, "oneItem", "y", blocking=True)
    except:
        print "WARNING: failed to restore connection between iterate_13 and Plot_11 in network masterNet"
masterNet.unfreeze()
#masterNet.run()

