1. notepad++, run menu, run button
2. Enter the following command in the popup window:
EXIT
Then click "Save", feel free to take a name, such as "Runpython", for convenience, configure the shortcut keys (such as Ctrl + F5), click OK. Then run the Python file simply by pressing the configured shortcut key or by clicking "Runpython" on the Run menu.
3. Order Explanation "1"
EXIT
cmd/k python: Opens the cmd window, runs the command behind/k, and retains the window after execution is complete. This is Python (because the Python directory has been added to the environment variable, so it is not necessary to specify a directory for the Python program, which can be found directly)
$ (Full_current_path): notepad++ macro definition that represents the full path of the current file.
& used to connect more than one command
ECHO: Line break
Pause: Indicates a pause after running (cmd displays " Press any key to continue ..."), waiting for a key to continue
EXIT: Indicates " Press any key to continue ..." to close the command line window.
Set Python run in notepad++