[Tutor] csv manipulation

Serdar Tumgoren zstumgoren at gmail.com
Fri Oct 31 15:09:05 CET 2008


Aha! That did the trick. Thanks so much!

On Fri, Oct 31, 2008 at 10:02 AM, Kent Johnson <kent37 at tds.net> wrote:

> On Fri, Oct 31, 2008 at 9:32 AM, Serdar Tumgoren <zstumgoren at gmail.com>
> wrote:
> >> Below is my code. Can someone tell me how I'm botching the use of the
> >> "writerows" method? Also, on a separate note, is it possible and
> necessary
> >> to close the input and output files when using csv module? I keep
> getting a
> >> "module has no close method" error when I try to close the files...
>
> Use writerow() not writerows() - you are writing a single row.
>
> To close the files you have to keep a reference to the underlying
> file. See my original example.
>
> Kent
>



-- 
Serdar Tumgoren
The Record
150 River Street
Hackensack, NJ 07601
201-403-0834
tumgoren at northjersey.com
northjersey.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20081031/680dd1a4/attachment.htm>


More information about the Tutor mailing list