[an error occurred while processing this directive]
To run IDLE in the labs, go to Start->Run... and type in (or browse to):
C:\Python21\Tools\idle\idle.pyw
This will open a window named *Python Shell*. Inside this window you can see the Python prompt. Here, you can type interactive Python code and have it execute immediately. Go ahead and try it. Type 4+4 and hit enter. You should see:
>>> 4+4 8You can type in arbitrary Python code at this command line. Try the below:
>>> for i in range(1,4): print i 1 2 3Note that the keywords are highlighted as you type, and when you type "range(" simple usage information about the range function appears. However, you shouldn't do the problem set typing code in at the command line — you might have already realized this if you made any mistakes typing any of the above. Instead, you should use IDLE's built-in text editor, which also does syntax highlighting and function definitions.
To do this, in IDLE, click on File->New Window. In this window, enter:
for i in "alphabet": print iNow, save this script (click File->Save as...) and name it whatever you want. Now, click on Edit->Run Script. The output of this script will appear in the *Python Shell* window.
To start working on PS1, go to PS1 and click the ps1.zip download link. Unzip it into J:\cs216\ps1 (or any directory you have access to).
Now, in IDLE, click File->Open... and navigate to your newly unzipped TimerExample.py. Uncomment the lines at the top of this file and change the path to match your working path (if necessary):
Now, in the window where you typed the script, click on Edit->Run Script.import sys sys.path.append('J:\\cs216\\ps1')
[an error occurred while processing this directive]