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

Function _create_full_editor_command

PySimpleGUI/PySimpleGUI.py:23405–23423  ·  view source on GitHub ↗

The global settings has a setting called - "-editor format string-" It uses 3 "tokens" to describe how to invoke the editor in a way that starts at a specific line # :param file_to_edit: :type file_to_edit: str :param edit_format_string:

(file_to_edit, line_number, edit_format_string)

Source from the content-addressed store, hash-verified

23403
23404
23405def _create_full_editor_command(file_to_edit, line_number, edit_format_string):
23406 """
23407 The global settings has a setting called - "-editor format string-"
23408 It uses 3 "tokens" to describe how to invoke the editor in a way that starts at a specific line #
23409 <editor> <file> <line>
23410
23411 :param file_to_edit:
23412 :type file_to_edit: str
23413 :param edit_format_string:
23414 :type edit_format_string: str
23415 :return:
23416 :rtype:
23417 """
23418
23419 command = edit_format_string
23420 command = command.replace('<editor>', '')
23421 command = command.replace('<file>', file_to_edit)
23422 command = command.replace('<line>', str(line_number) if line_number is not None else '')
23423 return command
23424
23425
23426def execute_get_editor():

Callers 1

execute_editorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected