changeset 157:f145d7b1fbf7

fix
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 27 Jul 2011 09:58:57 -0700
parents a9c3a32d8385
children c1390e43b437
files python/require.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/python/require.py	Wed Jul 27 08:43:34 2011 -0700
+++ b/python/require.py	Wed Jul 27 09:58:57 2011 -0700
@@ -3,13 +3,14 @@
     import a module from the web
     url should be like scheme://host.name/path/to/module.py
     """
+    import imp
     import os
     import tempfile
     import urllib2
     contents = urllib2.urlopen(url).read()
     filename = url.rsplit('/', 1)[-1]
     module = filename.rsplit('.', 1)[-1]
-    dest = os.path.join(tempfile, filename)
+    dest = os.path.join(tempfile.gettempdir(), filename)
     f = file(dest, 'w')
     f.write(contents)
     f.close()