MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / SimpleTableCell

Class SimpleTableCell

scenedetect/_thirdparty/simpletable.py:66–88  ·  view source on GitHub ↗

A table class to create table cells. Example: cell = SimpleTableCell('Hello, world!')

Source from the content-addressed store, hash-verified

64
65
66class SimpleTableCell:
67 """A table class to create table cells.
68
69 Example:
70 cell = SimpleTableCell('Hello, world!')
71 """
72
73 def __init__(self, text, header=False):
74 """Table cell constructor.
75
76 Keyword arguments:
77 text -- text to be displayed
78 header -- flag to indicate this cell is a header cell.
79 """
80 self.text = text
81 self.header = header
82
83 def __str__(self):
84 """Return the HTML code for the table cell."""
85 if self.header:
86 return "<th>%s</th>" % (self.text)
87 else:
88 return "<td>%s</td>" % (self.text)
89
90
91class SimpleTableImage:

Callers 2

write_scene_list_htmlFunction · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected