Every line of 'os.path.dirname(__file__)' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
143 def get_path(): 144 if getattr(sys, 'frozen', False): 145 return os.path.dirname(sys.executable) 146 else: 147 return os.path.abspath(os.path.dirname(sys.argv[0]))
12 def path(filename: str): 13 scriptdir = os.path.dirname(os.path.realpath(__file__)) 14 return os.path.join(scriptdir, filename)
36 def get_path(filename): 37 return os.path.join(os.path.dirname(__file__), 'test_data', filename)
151 def get_parent(path): 152 return os.path.dirname(path)
57 def get_data_files_path(): 58 """Get a direct path to the data files colocated with the script. 59 60 Returns: 61 The directory where files specified in data attribute of py_test 62 and py_binary are stored. 63 """ 64 return _os.path.dirname(_inspect.getfile(_sys._getframe(1)))
9 def get_path(dir, filename): 10 return os.path.join( 11 os.path.dirname(__file__), 12 dir, filename 13 )
26 def _get_script_path(): 27 """Get directory path of current script""" 28 script_filename = inspect.getframeinfo(inspect.currentframe()).filename 29 script_path = os.path.dirname(os.path.abspath(script_filename)) 30 31 return script_path
206 def get_original_dir(): 207 return ORIGINAL_DIR
74 def _HERE(*args): 75 h = os.path.dirname(os.path.realpath(__file__)) 76 return os.path.abspath(os.path.join(h, *args))
129 def GET_PATH(path): 130 return abspath(join(DOC_ROOT, path))