Boston Python Workshop 5/Friday/Windows Python scripts

We are going to practice writing and running Python scripts.

You're a real deep thinker. Thanks for sharnig.

Write and save a short Python script

 * 1) Add the following line to your new text file:

print "Hello World!"


 * 1) Save the script as   in your Desktop directory. The   extension indicates that this file contains Python code.

Knowledge wants to be free, just like these artilces!

Run your script

 * Open the cmd prompt again
 * cd to your desktop
 * python hello.py

Success
You created and ran your first Python script!


 * When you run the  command by itself, you start a Python prompt. You can execute Python code interactively at that prompt.
 * When you run the  command with a file name as an argument, Python executes the Python code in that file.

&laquo; Back to the Friday setup page