cloudmesh-common.cloudmesh.common.TableParser
¶
Module Contents¶
Classes¶
-
class
cloudmesh-common.cloudmesh.common.TableParser.
TableParser
(output='dict', header=True, index=None, change=None, strip=True, lower=True, strip_seperator=True, seperator='|', comment_chars='+#')¶ Bases:
object
-
classmethod
convert
(cls, table=None, output='dict', header=True, index=None, change=None, strip=True, lower=True, strip_seperator=True, seperator='|', comment_chars='+#')¶
-
clean
(self, line)¶ - Parameters
line – cleans the string
- Returns
-
extract_lines
(self, table)¶
-
_get_headers
(self)¶ assumes comment have been stripped with extract :return:
-
to_dict
(self, table)¶ - Parameters
table (string) – converts a stream called line to a dict
- Returns
the dict
-
to_list
(self, table)¶ - Parameters
table (string) – converts a stream called line to a list
- Returns
the list
-
json
(self)¶
-
__str__
(self)¶ Return str(self).
-
classmethod
-
cloudmesh-common.cloudmesh.common.TableParser.
parser
¶