[Python-checkins] python/dist/src/Doc/lib libcsv.tex,1.1,1.2

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
Thu, 24 Apr 2003 11:47:36 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv4255

Modified Files:
	libcsv.tex 
Log Message:
* minor tweaks relating to the package nature of the beast
* added an (incomplete) description of the utils.Sniffer class


Index: libcsv.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcsv.tex,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** libcsv.tex	20 Mar 2003 23:29:12 -0000	1.1
--- libcsv.tex	24 Apr 2003 18:47:31 -0000	1.2
***************
*** 3,6 ****
--- 3,7 ----
  \declaremodule{standard}{csv}
  \modulesynopsis{Write and read tabular data to and from delimited files.}
+ \sectionauthor{Skip Montanaro}{skip@pobox.com}
  
  \versionadded{2.3}
***************
*** 19,23 ****
  of reading and writing the data from the programmer.
  
! The \module{csv} module implements classes to read and write tabular data in
  CSV format.  It allows programmers to say, ``write this data in the format
  preferred by Excel,'' or ``read data from this file which was generated by
--- 20,24 ----
  of reading and writing the data from the programmer.
  
! The \module{csv} package implements classes to read and write tabular data in
  CSV format.  It allows programmers to say, ``write this data in the format
  preferred by Excel,'' or ``read data from this file which was generated by
***************
*** 26,37 ****
  applications or define their own special-purpose CSV formats.
  
! The \module{csv} module's \class{reader} and \class{writer} objects read and
  write sequences.  Programmers can also read and write data in dictionary
  form using the \class{DictReader} and \class{DictWriter} classes.
  
! \note{The first version of the \module{csv} module doesn't support Unicode
  input.  Also, there are currently some issues regarding \ASCII{} NUL
! characters.  Accordingly, all input should generally be plain \ASCII{} to be
! safe.  These restrictions will be removed in the future.}
  
  \begin{seealso}
--- 27,38 ----
  applications or define their own special-purpose CSV formats.
  
! The \module{csv} package's \class{reader} and \class{writer} objects read and
  write sequences.  Programmers can also read and write data in dictionary
  form using the \class{DictReader} and \class{DictWriter} classes.
  
! \note{The first version of the \module{csv} package doesn't support Unicode
  input.  Also, there are currently some issues regarding \ASCII{} NUL
! characters.  Accordingly, all input should generally be printable \ASCII{}
! to be safe.  These restrictions will be removed in the future.}
  
  \begin{seealso}
***************
*** 43,50 ****
  
  
! \subsection{Module Contents}
  
  
! The \module{csv} module defines the following functions:
  
  \begin{funcdesc}{reader}{csvfile\optional{,
--- 44,51 ----
  
  
! \subsection{Package Contents}
  
  
! The \module{csv} package defines the following functions:
  
  \begin{funcdesc}{reader}{csvfile\optional{,
***************
*** 109,113 ****
  
  
! The \module{csv} module defines the following classes:
  
  \begin{classdesc}{DictReader}{csvfile, fieldnames\optional{,
--- 110,114 ----
  
  
! The \module{csv} package defines the following classes:
  
  \begin{classdesc}{DictReader}{csvfile, fieldnames\optional{,
***************
*** 263,266 ****
--- 264,288 ----
  
  
+ \subsection{Submodule \code{utils}}
+ 
+ The \module{csv} package contains a \module{utils} submodule which defines
+ the following class.
+ 
+ \begin{classdesc}{Sniffer}{\optional{sample=16384}}
+ 
+ The \class{Sniffer} class is used to deduce the format of a CSV file.  The
+ optional \var{sample} argument to the constructor specifies the number of
+ bytes to use when determining Dialect parameters.
+ 
+ \begin{methoddesc}{sniff}{fileobj}
+ Analyze the next chunk of \var{fileobj} and return a \class{Dialect} class
+ reflecting the parameters found.
+ \end{methoddesc}
+ 
+ \begin{methoddesc}
+ 
+ \end{methoddesc}
+ \end{classdesc}
+ 
  \subsection{Examples}
  
***************
*** 268,271 ****
--- 290,294 ----
  
  \begin{verbatim}
+     import csv
      reader = csv.reader(file("some.csv"))
      for row in reader:
***************
*** 276,279 ****
--- 299,303 ----
  
  \begin{verbatim}
+     import csv
      writer = csv.writer(file("some.csv", "w"))
      for row in someiterable: