Skip to content

Instantly share code, notes, and snippets.

@gregorynicholas
Forked from skorokithakis/zipimport.py
Created May 26, 2012 16:02
Show Gist options
  • Save gregorynicholas/2794429 to your computer and use it in GitHub Desktop.
Save gregorynicholas/2794429 to your computer and use it in GitHub Desktop.
Import zips and eggs for AppEngine.
import sys, os
package_dir = "packages"
sys.path.insert(0, package_dir)
for filename in os.listdir(package_dir):
if filename.endswith((".zip", ".egg")):
sys.path.insert(0, "%s/%s" % (package_dir, filename))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment