00001 """ 00002 This is the very first example you should look at when learning SLIMpy 00003 """ 00004 00005 #=============================================================================== 00006 # Setup 00007 #=============================================================================== 00008 from os import system 00009 00010 # non-SLIMpy functionality 00011 synth = "sfsigmoid n1=10 n2=10 > sig.rsf" 00012 print synth 00013 system( synth ) 00014 00015 #=============================================================================== 00016 # SLIMpy stuff 00017 #=============================================================================== 00018 00019 from slimpy_base import * 00020 00021 # parse the command line 00022 # fiunuction parse_args enables SLIMpy to recognise --help and other command line options 00023 options = parse_args( ) 00024 00025 # define a vector 00026 sig = vector('sig') 00027 00028 # add one to the vector 00029 res = sig + 1 00030 00031 # set the name of the result tells SLIMpy to keep res as a final target 00032 res.setName( "res" ) 00033 00034 # Run the command built up above 00035 Execute( ) 00036 00037