How to Run Python Code From Notepad++
There are number of ways to run Python code from within Notepad++. I found the following to be the most elegant and it works:1. Open a new file Notepad++ and enter a simple Python statement such as: print("Hello World!")
2. Run the program by pressing F5 in Notepad++. You will get the following dialogue box:
Enter the following in the input box provided: py -3 -i "$(FULL_CURRENT_PATH)"
3. Click Save and provide an appropriate name such as "Python38_Run"
4. Press Run to run the program. You should see a Python shell and "Hello World!"
Source: https://stackoverflow.com/questions/1702586/how-to-execute-a-python-file-in-notepad
No comments:
Post a Comment