-----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----- _______________________________________________ Sugar mailing list [email protected] http://lists.laptop.org/listinfo/sugar

