Changes between Version 6 and Version 7 of FAQ_WrapperScriptBasics


Ignore:
Timestamp:
Jul 20, 2006 9:35:07 PM (18 years ago)
Author:
dkearney
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ_WrapperScriptBasics

    v6 v7  
    3838
    3939|| Step || Explanation || Tcl Example Code || Python Example Code ||
    40 || 1 || Here we open the Rappture library with the first command line argument, argument 0 || '''set opt [Rappture::library [lindex $argv 0]]''' || '''lib = Rappture.library(sys.argv![1])''' ||
     40|| 1 || Here we open the Rappture library with the first command line argument || '''set opt [Rappture::library [lindex $argv 0]]''' || '''lib = Rappture.library(sys.argv![1])''' ||
    4141|| 2 || Pay attention to all lines that use the "get" function. They are grabbing information from the Rappture library. If your are confused by the path argument (the input.blah stuff) check out our page on [wiki:FAQ_XmlPathNames Reading XML Paths] || '''$opt get input.(structure).(p_node).current''' || '''inputType = lib.get('input.loader.current')''' ||
    4242|| 3 || Look for the appending of information to a variable, and the writing of variables to files || '''append deck ...''' [[BR]] '''set deckfile "pdr[pid]"''' [[BR]] '''set fid [open $deckfile w]''' [[BR]] '''puts $fid $deck '''[[BR]] '''close $fid''' || '''outFileName = 'inputDeck.' + getDriverId(inDeckName)''' [[BR]] '''fh = open(outFileName, 'w')''' [[BR]] '''if fh != None:''' [[BR]] '''fh.write(writeData)''' [[BR]] '''fh.close()''' ||