Python for Finance: Analyze Big Financial Data

(Elle) #1
Figure 13-4. Screenshot of traits GUI (empty)

Figure 13-5. Screenshot of traits GUI (with data)

In effect, this gives the same results as the following lines of code:


In  [ 76 ]: sr.name =   ‘sr_class’
sr.rate = 0.05
sr.time_list = [0.0, 0.5, 1.0, 1.5, 2.0]

By providing the traits-specific data types, traits is able to generate the correct visual


elements to accomplish these operations via a GUI — i.e. a text input field for sr.name


and five input elements for the list object sr.time_list.


The behavior of the new object after the input operations is the same as with our

Free download pdf