Skip to content

Instantly share code, notes, and snippets.

@theodox
Last active August 29, 2015 14:01
Show Gist options
  • Save theodox/27687947e3def9a1b15b to your computer and use it in GitHub Desktop.
Save theodox/27687947e3def9a1b15b to your computer and use it in GitHub Desktop.
using webfinder and webloader
sys.path_hooks.append(WebFinder)
sys.path.append("http://www.inference.phy.cam.ac.uk/mackay/python/compression/huffman")
# with the url on the path, just use import
import Example
print Example.__path__
#['http://www.inference.phy.cam.ac.uk/mackay/python/compression/huffman/Example.py']
# the module's __path__ will point at the url, but __file__ points at the cached
# file on disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment