MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / execute_file_explorer

Function execute_file_explorer

PySimpleGUI/PySimpleGUI.py:23351–23369  ·  view source on GitHub ↗

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='')

Source from the content-addressed store, hash-verified

23349
23350
23351def 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
23372def execute_find_callers_filename():

Callers

nothing calls this directly

Calls 3

loadMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected