Jason Swails wrote:
> Hello,
>
> I have a question about a csv.writer instance. I have a utility that I
> want to write a full CSV file from lots of data, but due to performance
> (and memory) considerations, there's no way I can write the data
> sequentially. Therefore, I write the data in chun
On 24/10/2011 08:03, Chris Angelico wrote:
On Mon, Oct 24, 2011 at 4:18 PM, Jason Swails wrote:
my_csv = csv.writer(open('temp.1.csv', 'wb'))
Have you confirmed, or can you confirm, whether or not the file gets
closed automatically when the writer gets destructed? If so, all you
need to do is
On Mon, Oct 24, 2011 at 3:03 AM, Chris Angelico wrote:
> On Mon, Oct 24, 2011 at 4:18 PM, Jason Swails
> wrote:
> > my_csv = csv.writer(open('temp.1.csv', 'wb'))
> >
>
> Have you confirmed, or can you confirm, whether or not the file gets
> closed automatically when the writer gets destructed? I
On Mon, Oct 24, 2011 at 2:08 AM, Chris Rebert wrote:
> On Sun, Oct 23, 2011 at 10:18 PM, Jason Swails
> wrote:
>
> > unless, of course, I add an explicit reference to track the open file
> object
> > and manually close or flush it
> > (but I'd like to avoid it if possible).
>
> Why? Especially w
On Mon, Oct 24, 2011 at 4:18 PM, Jason Swails wrote:
> my_csv = csv.writer(open('temp.1.csv', 'wb'))
>
Have you confirmed, or can you confirm, whether or not the file gets
closed automatically when the writer gets destructed? If so, all you
need to do is:
my_csv = something_else
# or:
del my_csv
On Sun, Oct 23, 2011 at 10:18 PM, Jason Swails wrote:
> Hello,
>
> I have a question about a csv.writer instance. I have a utility that I want
> to write a full CSV file from lots of data, but due to performance (and
> memory) considerations, there's no way I can write the data sequentially.
> Th
Hello,
I have a question about a csv.writer instance. I have a utility that I want
to write a full CSV file from lots of data, but due to performance (and
memory) considerations, there's no way I can write the data sequentially.
Therefore, I write the data in chunks to temporary files, then combi