MCPcopy
hub / github.com/flet-dev/flet / get_current_script_dir

Function get_current_script_dir

sdk/python/packages/flet/src/flet/utils/files.py:153–161  ·  view source on GitHub ↗

Returns the absolute directory of the current script entry point. Returns: Absolute directory path derived from `sys.argv[0]`.

()

Source from the content-addressed store, hash-verified

151
152
153def get_current_script_dir():
154 """
155 Returns the absolute directory of the current script entry point.
156
157 Returns:
158 Absolute directory path derived from `sys.argv[0]`.
159 """
160 pathname = os.path.dirname(sys.argv[0])
161 return os.path.abspath(pathname)

Callers 3

__get_assets_dir_pathFunction · 0.90
__get_upload_dir_pathFunction · 0.90
take_screenshotFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected