pytha File Handles - pytha-3d-cad/pytha-lua-api GitHub Wiki
From the perspective of the Lua api, all files and materials are referred to by file handles.
All functions in the pytha api that access files like pytha.import_pyo will take a file handle instead of an explicit file path.
Both pyux.select_pyo and pyux.select_material allow the user to select a file (material) in the file explorer and will return a handle to the selected file (material).
A special function is pyux.get_library_handle that allows direct access to the PYTHA library folder and its subfolders.
The file name can be accessed by invoking the file handle metamethod get_name.
See also:
Groups, import_pyo, list_pyos, select_material, get_library_handle