summaryrefslogtreecommitdiffstats
path: root/Lib/tempfile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-24 20:42:55 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-24 20:42:55 (GMT)
commite2ae77b8b8a62e648bb1864a9b36ef3280984404 (patch)
treee03ad6f126a16529b2fb43671903e357bcb05835 /Lib/tempfile.py
parentc6ac8a78f668123ec5c2c3d5a824e7886e9a1c60 (diff)
downloadcpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.zip
cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.gz
cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.bz2
SF patch #474590 -- RISC OS support
Diffstat (limited to 'Lib/tempfile.py')
-rw-r--r--Lib/tempfile.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 7a1fc26..f1d53db 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -34,6 +34,10 @@ def gettempdir():
attempdirs.insert(0, dirname)
except macfs.error:
pass
+ elif os.name == 'riscos':
+ scrapdir = os.getenv('Wimp$ScrapDir')
+ if scrapdir:
+ attempdirs.insert(0, scrapdir)
for envname in 'TMPDIR', 'TEMP', 'TMP':
if os.environ.has_key(envname):
attempdirs.insert(0, os.environ[envname])
@@ -87,7 +91,7 @@ if os.name == "posix":
# string.
elif os.name == "nt":
template = '~' + `os.getpid()` + '-'
-elif os.name == 'mac':
+elif os.name in ('mac', 'riscos'):
template = 'Python-Tmp-'
else:
template = 'tmp' # XXX might choose a better one