CSC
310.010 - Procedure Oriented Programming Languages, Old Main 140, MWF
9-9:50 AM.
Dr. Dale
E. Parson
Spring, 2010 Office Hours:
M 10-11:30, Tu 2:30-3:30, W 10-11:30, Th 1:30-2:30, and by
appointment
First
day
handout (syllabus that is specific to this
semester).
The Python website is at http://www.python.org/.
Documentation is at http://docs.python.org/.
There is a good on-line tutorial and reference by Steven F. Lott called
Building Skills in Python. There
is
a
PDF
copy
here.
We will be using the 2.6 version of
Python, not 3.x.
Python on bill is at /opt/csw/bin/python.
Lecture notes
Example code is at
/export/home/faculty/parson/ProcLang on
bill.kutztown.edu.
Programming Language Pragmatics web site.
Programming
Language Pragmatics, Third Edition slides
(password protected).
Python supplement on
regular expressions and parser generators for textbook Chapters 1,
2.1.
Assignments
Assignment # 1 --
mergesort in Python -- due 11:59 PM Friday February 12.
Assignment # 2 -- line-oriented parsing of
a simplified make language using Python regular expressions -- due
11:59
PM
Thursday
March
4 (extended from March 1).
Assignment # 3 -- compiling
closures-as-opcodes for a simplified make language -- due
11:59
PM
Friday
March
26.
Assignment # 4 -- implementing
producer-consumer coroutines using Python generators --
due
11:59
PM
Friday April 16.
Assignment # 5 --
and a related handout -- redo
Assignment 3 using Python classes, objects and references to bound
methods as opcodes, due
11:59
PM
Friday April 30.
Documentation and other external links
http://www.gnu.org/software/make/manual/
has
the
gmake
manual.
Download site for Python,
use latest stable 2.6.n version, not
3.x!
After installing Python 2.6 (default
installation is under C:\Python26), go to Windows
Control Panel -> System -> Advanced -> Environment Variables
and set system variable PYTHONPATH to your ProcLang directory.
Download site for FileZilla
file transfer utility for transferring files between bill and your PC,
or you can use whatever you already have.
Download
site
for
Eclipse IDE/Debugger for Java.
Use the "Eclipse IDE for Java
Developers," then update it as follows.
Download and unzip Eclipse.
Go into the Eclipse directory and run
the eclipse executable file.
Make sure that your Eclipse workspace is in a directory that
is completely different from any of your source code projects. Do not mix Eclipse's meta-data with your
programming projects!
Once Eclipse is running,
click Help
-> New Software -> Add site.
Add
http://pydev.org/updates as a site, click the boxes to add
packages.
Eclipse should require a restart.
Window -> Preferences -> Pydev
-> Editor -> Interpreter Python for interpreter.
"Auto Config" (or "New") to add Python
2.6
interpreter. If Auto Config does not find Python 2.6, use "New" to add
the path to the Python interpreter, for example C:\Python26\python.exe
if that is where you installed Python. In this same panel under System
PYTHONPATH add your ProcLang directory via "New Folder."
Pitfall
#1: After you successfully install and configure PyDev tools
under Eclipse, exit Eclipse and reboot your PC. Problems that I have
encountered may be due to networking problems in Old Main, but I have
had to do this step on two machines after Eclipse went into a hung
state, so you might as well do this after setting up Eclipse and PyDev.
We will go over Pydev Projects, source
editing and debugging in class.
Pitfall
#2: If you remove a Python project such as ProcLang, a) do not
check the box to actually remove the Python files, and b) after
removing the project, exit Eclipse and go into the project directory
with the Windows Explorer and remove files .project and .pydevproject.
Pitfall
#3: Whenever you copy files from bill into a Python project
under Eclipse, make sure to right-click "Refresh" (F5) on your Python
project in Eclipse's "Pydev Package Explorer" panel.
Pydev's
home is here.