In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to set up shortcuts to run python code directly in notepad++. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
How to run python code directly in notepad++?
Press F5 in the notepad++ interface (or select "run" in the menu bar), and the following screen appears (it is empty for the first time):
Then enter: cmd / KD:\ Python27\ python.exe "$(FULL_CURRENT_PATH)" & PAUSE & EXIT
The red part is the path of the source file of the python program. Because I installed it under the root of the D disk.
If you want to use the shortcut keys, click "Save" and the following screen will appear:
Use the arrangement and combination of these keys, and then take the name, you can use the shortcut key to run the python program, and there will be no flash black screen phenomenon. (it has been there before)
Save ok and set keyboard shortcuts. Run. Then every time you need to run the python script, you just need to press the shortcut key you set. I set alt+p Name to "run"
You can see it in the Settings-manage keys.
Explanation:
Cmd: open the command prompt program / k: execute the following command, which is equivalent to copying the following content to the command prompt to execute the path $(FULL_CURRENT_PATH): Notepad++ of..\ python.exe: python.exe to get the current file path, which needs to be enclosed in double quotation marks in cmd. &: connect multiple commands, x & y & z means first execute x, then execute y, and then execute the instructions of zpause and exit as cmd, which means to pause and exit, so the whole command means to open cmd, execute python.exe, run the current file, pause at the end of running, and press any key to exit cmd. Thank you for reading! This is the end of this article on "how to set up shortcuts to run python code directly in notepad++". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.