Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90250

Re: getting fieldnames from Dictreader before reading lines

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.075
X-Spam-Evidence '*H*': 0.85; '*S*': 0.00; 'messages.': 0.05; 'responding': 0.07; 'subject:getting': 0.07; 'wrong,': 0.09; 'sat,': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'putting': 0.22; 'this?': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'file.': 0.24; 'header:In-Reply-To:1': 0.27; 'file': 0.32; 'stuff': 0.32; 'subject:from': 0.34; 'html,': 0.36; 'doing': 0.36; 'should': 0.36; 'two': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'new': 0.61; "you're": 0.61; 'charset:windows-1252': 0.65; 'received:74.208': 0.68; '2015': 0.84; 'messed': 0.84; 'subject:before': 0.84; 'thoroughly': 0.91
Date Sat, 09 May 2015 19:55:05 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
MIME-Version 1.0
To python-list@python.org
Subject Re: getting fieldnames from Dictreader before reading lines
References <CALyJZZV8XFjbmiNRYxoAFuGHS2iix4knv-smn5adicVRAJ7ZCg@mail.gmail.com> <CALyJZZVt_X5pYQg+rXmP4CHx9-LizL4vbTQv-7t4ihD5xGqXng@mail.gmail.com>
In-Reply-To <CALyJZZVt_X5pYQg+rXmP4CHx9-LizL4vbTQv-7t4ihD5xGqXng@mail.gmail.com>
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V03:K0:ShV1jcaIDEzNAFsB+uNnh9J8WvRRPkrf5vxY1FMCNpk08DFWllx aNMawmsWmelfOvKXFMwQfuG+yiGjr4iR65KVDdGMSNhhvVuRHSjgov9dQx42F0dgNpG4CLi f6lNFa3tdFd5b/4FfJ0avPfrs0jKW5WyZbCRtC23d6rwFcfruf6YE8zEfv9WE31skuCOBPf vvT7SekM1bYByyacutXWw==
X-UI-Out-Filterresults notjunk:1;
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.295.1431215720.12865.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1431215720 news.xs4all.nl 2923 [2001:888:2000:d::a6]:42831
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:90250

Show key headers only | View raw


On 05/09/2015 07:01 PM, Vincent Davis wrote:
> Not sure what I was doing wrong, it seems to work now.
>

I still see two significant things wrong:

1) you're top-posting, putting your response  BEFORE the stuff you're 
responding to.

2) both messages are in html, which thoroughly messed up parts of your 
error messages.

>
> On Sat, May 9, 2015 at 4:46 PM, Vincent Davis <vincent@vincentdavis.net>
> wrote:
>
>> I am reading a file with Dictreader and writing a new file. I want use the
>> fieldnames in the Dictwriter from the reader. See below How should I be
>> doing this?


-- 
DaveA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: getting fieldnames from Dictreader before reading lines Dave Angel <davea@davea.name> - 2015-05-09 19:55 -0400

csiph-web