In case you have started programming in Python recently and you work in Windows environment, here's an easy method to edit and run your Python code using Notepad++.
Pre-requisites:
1) Python should be installed in your computer. Visit https://www.python.org/downloads/windows/, download and install the appropriate version for your computer. Note the separate 32-bit/64-bit versions. I am using Python 2.7.9, 64-bit version.
2) Notepad++ should be installed in your computer.
Visit http://notepad-plus-plus.org/download. Download and install Notepad++. I am using 6.7.4 version.
Done with the installations? Here's the procedure for executing Python code.
1) Edit the Python code in Notepad++ and save it in any folder of your choice. My source code file is mp1.py (Screenshot 1)
2) Right-click on the tab of the code you want to run and from the drop-down menu select "Open Containing Folder in cmd"
3) This will open the Command Prompt in the folder/directory where your current code is saved.
4) Execute your code by entering command "python <source-code>" and hitting enter. For my source code the command would be: "python mp1.py". I found this very easy and simple method.
Hope this is of some help to you. In case you have any issues or queries, leave comments or email me: mailrupam@gmail.com.
Follow me on Facebook: https://www.facebook.com/EmbedSysLinuxTrainer
My organization: https://www.facebook.com/nxnvision
Pre-requisites:
1) Python should be installed in your computer. Visit https://www.python.org/downloads/windows/, download and install the appropriate version for your computer. Note the separate 32-bit/64-bit versions. I am using Python 2.7.9, 64-bit version.
2) Notepad++ should be installed in your computer.
Visit http://notepad-plus-plus.org/download. Download and install Notepad++. I am using 6.7.4 version.
Done with the installations? Here's the procedure for executing Python code.
1) Edit the Python code in Notepad++ and save it in any folder of your choice. My source code file is mp1.py (Screenshot 1)
Screenshot 1 |
Screenshot 2 |
3) This will open the Command Prompt in the folder/directory where your current code is saved.
Screenshot 3 |
Screenshot 4 |
Follow me on Facebook: https://www.facebook.com/EmbedSysLinuxTrainer
My organization: https://www.facebook.com/nxnvision
Thank you, this was much clearer than the things on StackOverflow
ReplyDeleteThanks. Sorry that I missed reading your feedback.
Delete