damonlynch / showinfilemanager

Platform independent Python module to open the system file manager and select files in it
MIT License
22 stars 1 forks source link

Options to close file manager from API? #26

Open apiszcz opened 4 months ago

apiszcz commented 4 months ago

Thank you for this tool, should be a part of Python. Is there any options that would allow one to close the window from the API. Either a PID or handle returned from the file manager that was opened so it can be closed to terminated?

damonlynch commented 4 months ago

The best option would be for the function show_in_file_manager to return something other than None, which might simply be the PID or window handle (or both), or something more sophisticated like what the various subprocess functions return. If this is to be implemented, you will need to design and implement it taking into account various use cases other than your own — implementing a return type makes its API fixed for the foreseeable future. It should not change lightly. It will also need to be implemented so that it works equally well on Linux, macOS, and Windows (including WSL1 and WSL2). This is a fair amount of work and testing.