awips2/cave/com.raytheon.viz.gfe/help/TextProductUserGuideTabular/Slide16.html
root 06a8b51d6d Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 64fa9254b946eae7e61bbc3f513b7c3696c4f54f
2012-01-06 08:55:05 -06:00

16 lines
909 B
HTML

<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title></title>
</head>
<body>
<center>
<h2> Text Formatter User Guide for Tabular Products</h2>
<h3>16. Smart Text Products - Python "exec" statement</h3>
<hr>
<a href=Slide15.html>Previous Slide</a> <a href=Slide17.html>Next Slide</a> <br><img SRC=Slide16.JPG border=1><br></center>
<p><p><big>To do this, we use the special "exec" Python command. This is a very handy command which you will see in use throughout the text products. You build a text string of the Python code you would like to execute and then submit it to the "exec" command. So in this case, we loop through the entries of the Definition section creating variables. For example, if we have a Definition entry of "type", we build an exec string that sets the variable, "self._type" to its Definition value. <br><br><br></big>
</body>
</html>