Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  csv_collection.py

  Sprache: Python
 

# SPDX-License-Identifier: GPL-2.0+

import os, csv, glob

class CSVCollection(dict):
  delimiter=';'
  quotechar='"'
  source_column_name = 'Sources / Destinations'

  """
  This class is 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:
      strip = lambda s:s.strip()
    else:
      strip = lambda s:s

    # load all CSV files
    key = self.source_column_name
    for fname in glob.glob(pattern):
      with open(fname) as F:
        dR = csv.DictReader(F, delimiter=self.delimiter,
                            quotechar=self.quotechar)
        name = os.path.basename(fname).partition('.')[0]
        D = {
          r[key]:{f:strip(c) for f,c in r.items()
                  if f != key and f[:1not in ['', C] and
                     strip(c)[:1not in ['', C]}
          for r in dR if r[key][:1not in ['', C]
        }
        # now, go back through and eliminate all empty dictionaries
        D = {k:v for k,v in D.items() if v}
        self[name] = D

Messung V0.5 in Prozent
C=92 H=97 G=94

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-06-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=434850
#Domains=655579