Mercurial > mozilla > hg > talosnames
diff talosnames/require.py @ 14:1b18b2746e69
minor fixes
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 10 Jul 2012 18:09:19 -0700 |
parents | 1029ddf7b806 |
children | cc0edf61ab21 |
line wrap: on
line diff
--- a/talosnames/require.py Tue Jul 10 17:12:59 2012 -0700 +++ b/talosnames/require.py Tue Jul 10 18:09:19 2012 -0700 @@ -1,12 +1,13 @@ +import imp +import os +import tempfile +import urllib2 + def require(url): """ 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]