Skip to content

Instantly share code, notes, and snippets.

@rgs1
Created June 28, 2014 21:59
Show Gist options
  • Save rgs1/97134f5dcaa5fad67fb5 to your computer and use it in GitHub Desktop.
Save rgs1/97134f5dcaa5fad67fb5 to your computer and use it in GitHub Desktop.
diff --git a/bin/zk-shell b/bin/zk-shell
old mode 100644
new mode 100755
index a95c494..0796739
--- a/bin/zk-shell
+++ b/bin/zk-shell
@@ -1,6 +1,12 @@
#!/usr/bin/env python
-from zk_shell.cli import CLI
+try:
+ from zk_shell.cli import CLI
+except ImportError:
+ # running from source?
+ import sys
+ sys.path.extend((".", ".."))
+ from zk_shell.cli import CLI
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment