How to code in Python without using an IDE (for Windows users)

This page teaches you how to code in Python programming language without using an Integrated Development Environment (IDE).


Step - 1 
Go to the browser, get a good text editor and install it (if you don’t have one on your PC).
Here are some well known text editors -
  • Visual Studio “Code” (Not “Visual Studio”, it is an IDE)
  • Notepad++
  • SciTE
  • jEdit 
(Most Windows PC have notepad++ already installed in them.)

Step - 2
Run PowerShell from start menu, you can search for it and hit ‘enter’. Create a shortcut for PowerShell on the desktop or quick launch in the taskbar.

Step - 3
Download the latest version of Python from https://www.python.org/downloads/ and install it. (Check the box that says - “add python to your path”, without fail)

Step - 4
In your PowerShell program type “python” and hit enter.

Step - 5
Type quit() and press enter to exit python. You will come back at a prompt - the same as the one you were on before typing python.

Step - 6
Now note the address given before the prompt, it is the address of your home directory. Every time you launch PowerShell you will begin from here.

Step - 7
Create a folder in your home directory manually, we will save our python scripts in this folder.

Step - 8
Now open the text editor and create your first Python script, save it with a “.py” extension in the folder created in the home directory.

Step - 9
Launch PowerShell, type - 
cd <name of the folder in home directory>
Now hit enter, this will change your location to the folder containing the Python script.

Step - 10 
Type - python <name of the script>.py

This will run the code you just typed in the script.

Note - Every time you want to run a script, save it in the folder in home directory, launch PowerShell, move to folder using “cd” command, type “python” and the name of the script with .py extension and hit enter.

……………………………………………………………………………………………………………………………….
Hi there! Please let me know if the above steps work for you and please comment regarding any issues related to the setup or using PowerShell for running Python scripts.
Thank you 🙏 


Comments

Popular posts from this blog

IoT - The Gen-Z road to sustainable development and environmental conservation

IDEs - Do newbie coders really need them?