The global settings has a setting called - "-explorer program-" It defines the program to run when this function is called. The optional folder paramter specified which path should be opened. :param folder_to_open: The path to open in the explorer program :type folder_to_open
(folder_to_open='')
| 23349 | |
| 23350 | |
| 23351 | def execute_file_explorer(folder_to_open=''): |
| 23352 | """ |
| 23353 | The global settings has a setting called - "-explorer program-" |
| 23354 | It defines the program to run when this function is called. |
| 23355 | The optional folder paramter specified which path should be opened. |
| 23356 | |
| 23357 | :param folder_to_open: The path to open in the explorer program |
| 23358 | :type folder_to_open: str |
| 23359 | :return: Popen object |
| 23360 | :rtype: (subprocess.Popen) | None |
| 23361 | """ |
| 23362 | pysimplegui_user_settings.load() # Refresh the settings just in case they've changed via another program |
| 23363 | explorer_program = pysimplegui_user_settings.get('-explorer program-', None) |
| 23364 | if explorer_program is not None: |
| 23365 | sp = execute_command_subprocess(explorer_program, folder_to_open) |
| 23366 | else: |
| 23367 | print('No file explorer has been configured in the global settings') |
| 23368 | sp = None |
| 23369 | return sp |
| 23370 | |
| 23371 | |
| 23372 | def execute_find_callers_filename(): |
nothing calls this directly
no test coverage detected