Running Python in PowerShell

Since, you are able to run Python in PowerShell. You can just do python <scriptName>.py to run the script. So, for a script named test.py containing

name = raw_input("Enter your name: ")
print "Hello, " + name

The PowerShell session would be:

Start:

cd C:\Python27
python test.py

Session transcript:

Enter your name: Monty Python
Hello, Monty Python

Leave a Comment