Skip to content

Instantly share code, notes, and snippets.

@patrickporto
Created July 2, 2018 20:40
Show Gist options
  • Save patrickporto/c7a750175a231fc8ddbbbc184517885c to your computer and use it in GitHub Desktop.
Save patrickporto/c7a750175a231fc8ddbbbc184517885c to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
sys.path.append('..')
try:
from bookkeeping.cli import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Bookkeeping. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment