Chris Fox at Esri just kindly posted this example of using python to generate dynamic text outside of the data driven pages/index layer model:
Below is a sample, this assumes i have a map document, two text elements in the layout, a layer named TestLayer with 2 fields "AddressField" and "ZipField".
# get the reference to the map document and the layer named "TestLayer" in the map document
mxd = arcpy.mapping.MapDocument("C:/Temp/Test.mxd")
mapLyr = arcpy.mapping.ListLayers(mxd, "TestLayer")
# get the reference to the text elements in the map document. I have 2 text elements with the name Address and Zip
addrElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Address")
zipElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Zip")
# create a cursor and grab the first row in the feature class for the layer specified above
rows = arcpy.SearchCursor(mapLyr.dataSource)
row = rows.next()
# set the text property of the text element equal to the value from the fields named "AddressField" and "ZipField"
addrElem.text = row.getValue("AddressField")
zipElem.text = row.getValue("ZipField")
# save the map document and delete the reference to the row, cursor and map object
del mxd, row, rows,
Is there a way to use python in a dynamic text where it looks for the dynamic text by attribute and depending on that value, you place and if else. If attribute = 0 then "No", else "Yes"?