factory module¶
Pretty table factory¶
-
class
gemseo.third_party.prettytable.factory.
TableHandler
(**kwargs)[source]¶ Bases:
html.parser.HTMLParser
Initialize and reset this instance.
If convert_charrefs is True (the default), all character references are automatically converted to the corresponding Unicode characters.
-
gemseo.third_party.prettytable.factory.
from_csv
(filepath, field_names=None, **kwargs)[source]¶ Loads table from CSV file
- Parameters
filepath – param field_names: (Default value = None)
field_names – (Default value = None)
-
gemseo.third_party.prettytable.factory.
from_db_cursor
(cursor, **kwargs)[source]¶ - Parameters
cursor –
kwargs –
-
gemseo.third_party.prettytable.factory.
from_html
(html_code, **kwargs)[source]¶ Generates a list of PrettyTables from a string of HTML code.
Each <table> in the HTML becomes one PrettyTable object.
- Parameters
html_code (str) – HTML code
kwargs – additional arguments
-
gemseo.third_party.prettytable.factory.
from_html_one
(html_code, **kwargs)[source]¶ Generates a PrettyTables from a string of HTML code which contains only a single <table>
- Parameters
html_code (str) – HTML code
kwargs – additional arguments
-
gemseo.third_party.prettytable.factory.
from_md
(markdown, **kwargs)[source]¶ Generate PrettyTable from markdown string.
- Parameters
markdown – markdown type string.
kwargs – additional arguments
- Returns
a PrettyTable object.