[sugar] Bitfrost compliance for Update.1

Marco Pesenti Gritti mpgritti at gmail.com
Fri Nov 2 15:01:12 EDT 2007


On 11/2/07, Ivan Krstić <krstic at solarsail.hcs.harvard.edu> wrote:
> On Nov 2, 2007, at 12:24 PM, Carlos Neves wrote:
> > Will os.tempnam() use this dir by default?
>
> No, but it's bad security practice to use os.tempnam unless you
> really know what you're doing (at that point, you can pass in the
> target directory as the 'dir' keyword argument).
>
> Here's how to properly get a temporary file in Python until we
> provide helpers for it through Sugar:

There is already Activity.get_activity_root(). Though I tend to think
this should be a module method, not a class one.

Marco


More information about the Sugar mailing list