# HG changeset patch # User Jeff Hammel # Date 1311785937 25200 # Node ID f145d7b1fbf78eda2f2e00479d381bb6f006e402 # Parent a9c3a32d83850cfefbae6493e832d3b43a89da9a fix diff -r a9c3a32d8385 -r f145d7b1fbf7 python/require.py --- 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()