Posts

Showing posts with the label python execution

Run python script from command line

Image
Run python script from command line Step 1: In order to run a python script in command line we need a python interpreter that is to be downloaded and installed. Click here  to download Python for Windows. Click here  to download Python for Linux/Unix. Click here  to download Python for Mac OS Select the python version you want to download (Downloading the latest version is recommended). Then install the executable file that has been downloaded. Step 2 : The next step is to set path variable. To set path follow the following steps: Go to my computer -> select properties -> select advanced settings -> select environment variable -> new. In variable name  write path and in variable value copy the path of Python interpreter downloaded. Then click ok Now path is set for executing python script. Step 3 : First we must have a python file to execute. Open any text editor (Notepad or Notepad++) Copy the python code give below in the text editor. print("Welcome to my first progr