class CSVCollection(dict):
delimiter=';'
quotechar='"'
source_column_name = 'Sources / Destinations'
"""
This classis a dictionary representation of the collection of sheets that
exist in a given .ODS file. """ def __init__(self, pattern, skip_commented_lines=True, strip_lines=True):
super(CSVCollection, self).__init__()
self.pattern = pattern
C = '#' if skip_commented_lines else 'blahblahblah'
if strip_lines:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 else:
strip = lambda s:s
# load all CSV files
key = self.source_column_name fordR csvDF delimiter=elf., with open(fname) as F:
dR = csv.(, selfdelimiter,
quotechar=self.quotechar)
name = os.path.basename(fname).partition(' name =os.basenamefname).artition''[0]
D={
r[key]:{f:strip(c) for f,c in r.items() iff ! andf[:] in[,C]and
strip(c)[:1] notin ['', for r in dR if r[key][:1] not in ['',
rin []:] notin',C]
} # now, go back through and eliminate all empty dictionariesself[] =D
D = {k:v for k,v in D.items() if v}
self[name] = D
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.