[sugar] Bitfrost compliance for Update.1

Benjamin M. Schwartz bmschwar
Sat Nov 3 11:30:23 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ivan Krsti? wrote:
> Here's how to properly get a temporary file in Python until we  
> provide helpers for it through Sugar:
...
> tmp_root = os.path.join(environ['SUGAR_ACTIVITY_ROOT'], 'tmp')
> tmp = tempfile.TemporaryFile(dir=tmp_root)

According the the tempfile docs [1], the tempfile module respects a $TMPDIR
environment variable.  Sugar should set this variable to the preferred temporary
directory, so that the above boilerplate is unnecessary.

1. http://docs.python.org/lib/module-tempfile
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHLJQPUJT6e6HFtqQRAus9AKCOomxCMzFLR9FeO0UAxEoGAkXjbACfeVnT
hMnYwrIEGXJqIuPr0fUNFn8=
=/6cZ
-----END PGP SIGNATURE-----



More information about the Sugar-devel mailing list