Some more renaming cleanup.

This commit is contained in:
Griatch 2014-01-31 00:14:49 +01:00
parent 3d35f68663
commit 8e096df0d5

View file

@ -9,7 +9,7 @@ by prettytable but shares no code.
Example usage: Example usage:
table = Table("Heading1", "Heading2", table=[[1,2,3],[4,5,6],[7,8,9]], border="cells") table = MudTable("Heading1", "Heading2", table=[[1,2,3],[4,5,6],[7,8,9]], border="cells")
table.add_column("This is long data", "This is even longer data") table.add_column("This is long data", "This is even longer data")
table.add_row("This is a single row") table.add_row("This is a single row")
print table print table
@ -32,7 +32,7 @@ As seen, the table will automatically expand with empty cells to
make the table symmetric. make the table symmetric.
Tables can be restricted to a given width. Tables can be restricted to a given width.
If we created the above table with the width=50 keyword to Table() If we created the above table with the width=50 keyword to MudTable()
and then added the extra column and row, the result would be and then added the extra column and row, the result would be
+-----------+------------+-----------+-----------+ +-----------+------------+-----------+-----------+
@ -73,13 +73,13 @@ def make_iter(obj):
return not hasattr(obj, '__iter__') and [obj] or obj return not hasattr(obj, '__iter__') and [obj] or obj
# Cell class (see further down for the EvTable itself) # Cell class (see further down for the MudTable itself)
class Cell(object): class Cell(object):
""" """
Holds a data cell for the table. A cell has a certain Holds a single data cell for the table. A cell has a certain width
width and height and contains one or more lines of and height and contains one or more lines of data. It can shrink
data. It can shrink and resize as needed. and resize as needed.
""" """
def __init__(self, data, **kwargs): def __init__(self, data, **kwargs):
""" """
@ -360,9 +360,9 @@ class Cell(object):
return "\n".join(self.formatted) return "\n".join(self.formatted)
# Main Evtable class # Main Mudtable class
class EvTable(object): class MudTable(object):
""" """
Table class. Table class.