In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the method of running python code in notepad. I hope you will gain a lot after reading this article. Let's discuss it together.
Notepad++ is very popular among programmers, in which the operation and maintenance staff also like to use, powerful functions, many plug-ins, the key can also directly run python scripts.
The process of running python code in Notepad++ is actually a call to cmd (command prompt) to run python code, so make sure you have python installed.
To run the python code in notepad:
1. Open the python file with notepad++. Or create a new file and save it in .py format.
2. There is a run above the menu bar. We click run-> run, or use the shortcut key F5.
3. After clicking the run menu, the run window in notepad++ will pop up, which is not the cmd run window that comes with the system. Enter the name of the running program in the input box as follows: cmd / KC:\ Python27\ python.exe "$(FULL_CURRENT_PATH)" & PAUSE & EXIT
Note: the path must be your python path.
Since we often need to call python directly under notepad++ to run the script, we need to save the content this time and make it easy to use later. We click Save.
Shortcut means shortcut key, here is the need for us to fill in the name of the save shortcut key, I named it run_python, shortcut key is ALT+SHIFT+R. Look at the definition of your personal habits.
When we reopen the menu bar, we find that there is an extra run_python option under the run menu, and shortcuts are displayed on the right-hand side.
Press the shortcut you just entered to run the current python file. In the future, just press the shortcut key to run the python file, and you don't need the previous steps.
After reading this article, I believe you have a certain understanding of the way notepad runs python code. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!
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.