Home > Development Tools > notepad > How to run python in notepad

How to run python in notepad

爱喝马黛茶的安东尼
Release: 2019-08-07 15:48:09
Original
8148 people have browsed it

How to run python in notepad

Open notepad, there is a run on the menu bar, we click Run->Run, or use the shortcut key ALT R.

How to run python in notepad

#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

How to run python in notepad

##Related recommendations: "

Notepad usage graphic tutorial"

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

How to run python in notepad

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. It depends on your own personal definition of habits.

How to run python in notepad

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 to run python in notepad

After we configured notepad, we ran the python script directly. We used the previous script to run it directly to verify it. We ran it directly with ALT SHIFT R. The result was an error because the path was incorrect. , we change it to an absolute path.

How to run python in notepad

If I change the path of the file to an absolute path, add E:\\python\\baopo\ in front of the file. Then run ALT SHIFT R again, and there is no problem.

How to run python in notepad

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template