16 lines
909 B
HTML
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>
|