Changes between Version 6 and Version 7 of FAQ_WrapperScriptBasics
- Timestamp:
- Jul 20, 2006 9:35:07 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FAQ_WrapperScriptBasics
v6 v7 38 38 39 39 || 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])''' || 41 41 || 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')''' || 42 42 || 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()''' ||