Thanks, I don't suppose it would be worth someone trying to implement a
simpler import/export function? I'm a lot happier with the underlying
python now so it's not too big a deal but for a beginner this could be a
bit of a sticking point (it was for me).

Cheers,
Vince


On 26 March 2012 14:22, Jason Grout <[email protected]> wrote:

> On 3/25/12 10:39 PM, Dima Pasechnik wrote:
>
>> wow, *deleting* does this?!
>>
>> I duly sought close() method for output, didn't find it...
>>
>
> I wouldn't use the del method, even if it may work, just because it looks
> so odd compared to usual file paradigms.
>
> Searching for "cvs writer python empty file" on the net gives lots of hits
> talking about this problem, and the main conclusion seems to be that you
> need to close the file (or even better, use 'with' so the file is
> automatically closed).
>
>
> http://stackoverflow.com/**questions/3976711/csvwriter-**
> not-saving-data-to-file-why<http://stackoverflow.com/questions/3976711/csvwriter-not-saving-data-to-file-why>
>
>
>
>
>> Another question is why this is not needed at sage prompt. Different
>> behaviour in shell and in nb is never good, IMHO.
>>
>
> When you exit Sage (to look at the file), the files are automatically
> closed (IIRC).  In the notebook, the Sage session keeps running for the
> next cell, so the difference seems to be natural.
>
> Jason
>
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to sage-support+unsubscribe@**
> googlegroups.com <sage-support%[email protected]>
> For more options, visit this group at http://groups.google.com/**
> group/sage-support <http://groups.google.com/group/sage-support>
> URL: http://www.sagemath.org
>



-- 
Dr Vincent Knight
Cardiff School of Mathematics
Senghennydd Road,
Cardiff
CF24 4AG
(+44) 29 2087 5548
www.vincent-knight.com
@drvinceknight <http://twitter.com/#!/drvinceknight>
Skype: drvinceknight

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to