Reference: Python pyh Module Chinese documentation
1. Use your own CSS or JS File.
Write your own CSS and JS files, such as mystyle.css, myjs.js, and so On.
from Import *= pyh ('Study pyh') page.addcss (' Mystyle1.css'mystyle2.css') page.addjs (' Myjs1.js ' ' Myjs2.js ' ) page.printout ()
2. Using labels
For example, using
Page << H1 (' Test total time consuming ')
3. Define the ID of the label
Mydiv = div (id='id1')
Or
Mydiv = Div () mydiv.attributes['ID'id2'
4. Define the class of the label
Mydiv = div (cl='Class1 class2')
5. Define the Value/text of the label
Mydiv = div ('Save')
6. Tag Nesting
For example, Div contains P.
Mydiv = div (p ('I am Tag p. '), cl='Class1 class2', id='id1')
7. Connect multiple tabs via +
Page << p (' number of successful cases:'+str (self.success_num) +' " *10+' failure case number:'+str (self.fail_num) +'*10+' ' number of error cases:'+str (self.error_num))
Pyh:python Generating HTML