Last active
August 29, 2015 14:01
-
-
Save Lukse/6bfdc39e7428e4462198 to your computer and use it in GitHub Desktop.
Get execution directory
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
import os | |
def execution_directory(): | |
exec_place = os.getcwd() | |
script_place = os.path.dirname(os.path.realpath(__file__)) | |
arguments_place = str(sys.argv[0]) | |
arguments_place = ("\\").join(arguments_place.split('\\')[0:-1]) | |
return exec_place, script_place, arguments_place | |
print execution_folders() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment