• Home
  • Raw
  • Download

Lines Matching refs:dialect

60 .. function:: reader(csvfile, dialect='excel', **fmtparams)
67 *dialect* parameter can be given which is used to define a set of parameters
68 specific to a particular CSV dialect. It may be an instance of a subclass of
72 dialect. For full details about the dialect and formatting parameters, see
98 .. function:: writer(csvfile, dialect='excel', **fmtparams)
103 'b' flag on platforms where that makes a difference. An optional *dialect*
105 particular CSV dialect. It may be an instance of a subclass of the
109 dialect. For full details about the dialect and formatting parameters, see
128 .. function:: register_dialect(name[, dialect], **fmtparams)
130 Associate *dialect* with *name*. *name* must be a string or Unicode object. The
131 dialect can be specified either by passing a sub-class of :class:`Dialect`, or
133 parameters of the dialect. For full details about the dialect and formatting
139 Delete the dialect associated with *name* from the dialect registry. An
140 :exc:`Error` is raised if *name* is not a registered dialect name.
145 Return the dialect associated with *name*. An :exc:`Error` is raised if *name*
146 is not a registered dialect name.
150 instance of the requested dialect was returned. Users could modify the
169 dialect='excel', *args, **kwds)
198 dialect='excel', *args, **kwds)
242 file. It is registered with the dialect name ``'excel'``.
248 TAB-delimited file. It is registered with the dialect name ``'excel-tab'``.
273 dialect = csv.Sniffer().sniff(csvfile.read(1024))
275 reader = csv.reader(csvfile, dialect)
323 formatting parameters are grouped together into dialects. A dialect is a
327 the :class:`Dialect` class as the dialect parameter. In addition to, or instead
328 of, the *dialect* parameter, the programmer can also specify individual
406 to the current dialect.
411 .. attribute:: csvreader.dialect
413 A read-only description of the dialect in use by the parser.
451 the current dialect.
458 dialect.
463 .. attribute:: csvwriter.dialect
465 A read-only description of the dialect in use by the writer.
506 Registering a new dialect::
545 def unicode_csv_reader(unicode_csv_data, dialect=csv.excel, **kwargs):
548 dialect=dialect, **kwargs)
583 def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
585 self.reader = csv.reader(f, dialect=dialect, **kwds)
600 def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
603 self.writer = csv.writer(self.queue, dialect=dialect, **kwds)