Skip to content

Instantly share code, notes, and snippets.

@frankchen0130
Last active August 18, 2017 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankchen0130/881dfe6a8b7543f2fad92f95112069e1 to your computer and use it in GitHub Desktop.
Save frankchen0130/881dfe6a8b7543f2fad92f95112069e1 to your computer and use it in GitHub Desktop.
A way to add local directory files, prevent error when import module from other places.
_get_module_path = lambda path: os.path.normpath(os.path.join(os.getcwd(),
os.path.dirname(__file__), path))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment