Home  >  Article  >  Development Tools  >  How does notepad run python code?

How does notepad run python code?

青灯夜游
青灯夜游Original
2019-11-21 16:05:1217261browse

Notepad is very popular among programmers, and operation and maintenance personnel also like to use it. It has powerful functions and many plug-ins. The key is that it can also run python scripts directly. Let me introduce to you how to run python script files on notepad. method.

How does notepad run python code?

Notepad The process of running python code is actually calling cmd (command prompt) to run the python code, so make sure you have installed python.

Steps for notepad to run python code:

1. Open the python file with notepad. Or create a new file and save it in .py format.

2. There is a Run on the menu bar. We click Run->Run, or use the shortcut key F5.

How does notepad run python code?

#3. After clicking the run menu, the run window in notepad will pop up, not the cmd run window that comes with the system. The input box for entering the name of the running program is: cmd /k C:\Python27\python.exe "$(FULL_CURRENT_PATH)" & PAUSE & EXIT

Note: The path must be your python path.

How does notepad run python code?

Since we often need to call python directly under notepad to run the script, we need to save and use the content this time for future use. We click save...

How does notepad run python code?

shortcut means shortcut key. Here we need to fill in the name of the saved shortcut key. I named it run_python and the shortcut key is ALT SHIFT. R. Let’s look at your own definition of personal habits.

How does notepad run python code?

Reopening the menu bar, we found that there is an additional run_python option under the run menu, and shortcut keys are also displayed on the right hand side.

How does notepad run python code?

Press the shortcut key you just entered to run the current python file. In the future, you only need to press the shortcut key to run the python file, no previous steps are required.

The above is the detailed content of How does notepad run python code?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn