Public Member Functions | |
def | __del__ |
def | __init__ |
def | addScriptCode |
def | endTable |
def | headers |
def | showLine |
def | startTable |
def | trailers |
def | write |
def | writeAnchor |
def | writeB |
def | writeBr |
def | writeH1 |
def | writeH2 |
def | writeH3 |
def | writeRow |
def | writeStyledRow |
Public Attributes | |
format | |
headersDone | |
outFile | |
scriptCode | |
style | |
title |
Definition at line 65 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::__init__ | ( | self, | |
title = "CMS SDT pages " , |
|||
style = None , |
|||
outFile = sys.stdout , |
|||
scriptCode = '' |
|||
) |
Definition at line 67 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::__del__ | ( | self | ) |
Definition at line 82 of file Formatter.py.
00083 : 00084 if self.headersDone : 00085 self.trailers() 00086 else: # in case nothing has been written yet, output an empty page ... 00087 self.outFile.write( "Content-Type: text/html" + '\n') # HTML is following 00088 self.outFile.write( '\n') # blank line, end of headers 00089 self.outFile.write( "<html> " + '\n') 00090 self.outFile.write( "</html> " + '\n') 00091 00092 return
def Formatter::SimpleHTMLFormatter::addScriptCode | ( | self, | |
scriptCode | |||
) |
Definition at line 79 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::endTable | ( | self | ) |
Definition at line 187 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::headers | ( | self | ) |
Definition at line 193 of file Formatter.py.
00194 : 00195 # make sure to write the headers only once ... 00196 if not self.headersDone : 00197 00198 self.outFile.write( "<html> " + '\n') 00199 00200 self.outFile.write( "<head> " + '\n') 00201 00202 if self.style: 00203 self.outFile.write( self.style + '\n') 00204 00205 self.outFile.write( "<TITLE>" + self.title + "</TITLE>" + '\n') 00206 if self.scriptCode: 00207 self.outFile.write( self.scriptCode + '\n' ) 00208 self.outFile.write( "</head> " + '\n') 00209 self.outFile.write( "<body>" + '\n') 00210 self.headersDone = True 00211 00212 return
def Formatter::SimpleHTMLFormatter::showLine | ( | self | ) |
Definition at line 93 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::startTable | ( | self, | |
colSizes, | |||
colLabels, | |||
id = None , |
|||
cls = None , |
|||
tableAttr = None |
|||
) |
Definition at line 136 of file Formatter.py.
00137 : 00138 # we assume that html headers are done by now !! 00139 tableString = '<table ' 00140 if tableAttr: 00141 tableString += tableAttr 00142 if id: 00143 tableString += ' id="'+id+'" ' 00144 if cls: 00145 tableString += ' class="'+cls+'" ' 00146 tableString += '>' 00147 self.outFile.write( tableString + '\n') 00148 00149 self.outFile.write( " <thead>\n <tr>" + '\n') 00150 for col in colLabels : 00151 self.outFile.write( " <th> <b>" + col + "</b> </th>" + '\n') 00152 self.outFile.write( " </tr>\n</thead>" + '\n') 00153 self.outFile.write( " <tbody>" + '\n') 00154 return
def Formatter::SimpleHTMLFormatter::trailers | ( | self | ) |
Definition at line 214 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::write | ( | self, | |
arg = "" , |
|||
bold = False |
|||
) |
Definition at line 98 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::writeAnchor | ( | self, | |
ref = "" |
|||
) |
Definition at line 131 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::writeB | ( | self, | |
arg = "" |
|||
) |
Definition at line 111 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::writeBr | ( | self | ) |
Definition at line 106 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::writeH1 | ( | self, | |
arg = "" |
|||
) |
Definition at line 116 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::writeH2 | ( | self, | |
arg = "" |
|||
) |
Definition at line 121 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::writeH3 | ( | self, | |
arg = "" |
|||
) |
Definition at line 126 of file Formatter.py.
def Formatter::SimpleHTMLFormatter::writeRow | ( | self, | |
args, | |||
bold = False , |
|||
cls = None |
|||
) |
Definition at line 155 of file Formatter.py.
00156 : 00157 # we assume that headers are done by now !! 00158 00159 if cls: 00160 self.outFile.write( ' <tr class="'+cls+'"> \n') 00161 else: 00162 self.outFile.write( " <tr>" + '\n') 00163 for arg in args: 00164 if string.strip(str(arg)) == "" : arg = " " 00165 if bold: self.outFile.write( '<td class=cellbold> ' ) 00166 else: self.outFile.write( " <td> " ) 00167 self.outFile.write( arg ) 00168 00169 self.outFile.write( " </td>" + '\n') 00170 self.outFile.write( " </tr> " + '\n') 00171 00172 return
def Formatter::SimpleHTMLFormatter::writeStyledRow | ( | self, | |
args, | |||
styles | |||
) |
Definition at line 173 of file Formatter.py.
00174 : 00175 # we assume that headers are done by now !! 00176 self.outFile.write( " <tr>" + '\n') 00177 for arg, cellStyle in zip(args, styles): 00178 if string.strip(str(arg)) == "" : arg = " " 00179 cellStyle = cellStyle.strip() 00180 if cellStyle != '' : self.outFile.write( '<td class='+cellStyle+'> ' ) 00181 else: self.outFile.write( " <td> " ) 00182 self.outFile.write( arg ) 00183 self.outFile.write( " </td>" + '\n') 00184 self.outFile.write( " </tr> " + '\n') 00185 00186 return
Definition at line 67 of file Formatter.py.
Definition at line 67 of file Formatter.py.
Definition at line 67 of file Formatter.py.
Definition at line 67 of file Formatter.py.
Definition at line 67 of file Formatter.py.
Definition at line 67 of file Formatter.py.