Skip to content

Instantly share code, notes, and snippets.

@ahmednooor
Created December 22, 2017 00:53
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 ahmednooor/55969d8aeb806615fd1d3c22a767b32b to your computer and use it in GitHub Desktop.
Save ahmednooor/55969d8aeb806615fd1d3c22a767b32b to your computer and use it in GitHub Desktop.
get_current_directory_absolute_path_python
# configure root directory path relative to this file
THIS_FOLDER_G = ""
if getattr(sys, "frozen", False):
# frozen
THIS_FOLDER_G = os.path.dirname(sys.executable)
else:
# unfrozen
THIS_FOLDER_G = os.path.dirname(os.path.realpath(__file__))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment