SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
def get_script_path(for_file = None): path = os.path.dirname(os.path.realpath(sys.argv[0] or 'something')) return path if not for_file else os.path.join(path, for_file)