Created
January 28, 2022 10:08
-
-
Save sandorex/9077c8749b7517fbb574d13ac21c89a9 to your computer and use it in GitHub Desktop.
Python script that includes module from previous directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# PROJECT HERE | |
# | |
# LICENSE HERE | |
# | |
# python-script-template.py: Template for python scripts | |
# hack to include modules from previous directory, edit to your liking | |
import os, sys | |
from pathlib import Path | |
CURDIR = Path(os.path.dirname(__file__)) | |
sys.path.append(str(CURDIR.absolute().parent)) | |
from buildsystem import templater | |
if __name__ == '__main__': | |
# to remove os.join clutter | |
os.chdir(CURDIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment