On Nov 20, 2008, at 12:04 PM, Simon King wrote:

>
> Dear Robert,
>
> On Nov 20, 8:45 pm, Robert Bradshaw <[EMAIL PROTECTED]>
> wrote:
>>>   a) In what directory should the files be created? [Subdirectories
>>> of] SAGE_TMP perhaps?
>>
>> Yes.
>>
>>>   b) How can one avoid name conflicts with user data? E.g., in  
>>> the doc
>>> test for save_session, this point is not taken care of.
>>
>> Seehttp://www.python.org/doc/2.5.2/lib/module-tempfile.html
>
> Cool, I think I will use it!
>
> But shouldn't the doc test of save_session be changed, using tempfile?
> After all, if the user has a file 'session.sobj' in the current
> directory, the doc test would destroy it.

Yes, this should be changed.

> As much as I see, SAGE_TMP is removed as soon as you quit Sage.
> However, if explicit deletion were necessary: How can one delete a  
> non-
> empty directory? os.rmdir(...) would complain.

See http://www.python.org/doc/2.5.2/lib/module-shutil.html

- Robert

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to