Last active
February 10, 2018 20:56
-
-
Save xacrimon/a3ebe881273a102a09bd3816e4dcf50b to your computer and use it in GitHub Desktop.
Useful script onelines
This file contains 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
# Get the parent directory of the directory where in the program resides in python | |
os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | |
# Get the directory of the current running script in shell | |
"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment