<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Skip Montanaro wrote:<br>
<blockquote cite="mid16534.46723.35707.92255@montanaro.dyndns.org"
 type="cite">
  <pre wrap="">    Gabriel> Is there a known-bug in csv.DictWriter? It is ignoring my
    Gabriel> attempts to specify a Dialect. It doesn't even error if you
    Gabriel> give it anything invalid. I can send it the registered
    Gabriel> string-name of the dialect, a string of gibberish, a dialect
    Gabriel> object instance, a dialect class object... it accepts all and
    Gabriel> ignores all.

Fixed in CVS I believe.  I will check when I get a chance (there doesn't
seem to be a test case for this), but you might try grabbing the DictWriter
class from the csv.py that's in CVS.
  </pre>
</blockquote>
Bah, it turns out I was a goofball. I forgot that there were two
parameters between the last required param and the dialact parameter. <br>
<br>
Basically the function definition looks like this:<br>
<br>
<b><tt id="l2h-3916" class="class">DictWriter</tt></b>(<var>csvfile,
fieldnames</var><big>[</big><var>, restval=""</var><big>[</big><var>,
extrasaction=<code>'raise'</code></var><big>[</big><var>, dialect=<code>'excel'</code></var><big>[</big><var>,
fmtparam</var><big>]</big><big>]</big><big>]</big><big>]</big>)<br>
<br>
and I did this:<br>
<br>
x = DictWriter(file, fields, dialect)<br>
<br>
when I actually had to do either:<br>
<br>
x = DictWriter(file, fields, None, None, dialect)<br>
<br>
or <br>
<br>
x = DictWriter(file, fields, dialect=dialect)<br>
<br>
Whoops. I ignored the two parameters 'restval' and 'extrasaction'. <br>
The worst part is how much time I spent looking at that and simply
didn't see it. Tsk Tsk. <br>
<br>
Gabriel.<br>
</body>
</html>