this may seem basic, but could somebody run me through how to run a python file (one that's already created), through powershell? I know absolutely nothing about powershell despite hours of looking online to learn
Thanks all
this may seem basic, but could somebody run me through how to run a python file (one that's already created), through powershell? I know absolutely nothing about powershell despite hours of looking online to learn
Thanks all
It is happily very similar, if not the same, as running a python script from the normal command line.
First you're going to need to have python installed and in your path.
To test this try python --version
in powershell. You should get output like: python 2.7
.
If that worked fine then you run your script by typing python followed by the script name i.e. python test.py
(if its in another directory you will need to go to that dir or add the dir to the filename).
If that didn't work you probably need to install python: https://www.python.org/
Provide the path where you have installed the Python, followed by the path of the Python script:
'path of python.exe' 'Path of the python script'
Example:
C:\\Python27\python.exe 'D:\\Project\script.py'