@www.csse.monash.edu.au |
| Assessment | Contacts | Laboratories | Lectures | Resources | Timetables | Tutorials | Unit Outline |
| Last modified: 20101021:090359/add link to PEP257 | FIT2022 AJH-2010-22 |
Assignment 1: A Python Image Server | Support Materials | Submission
Much of computing is concerned with providing services to users, often through connections to remote servers. This assignment is about a) building clients for use in a client-server environment, and b) using threads to achieve quasi -parallel exceution in the client.
Your primary task is to write a python program that displays images from a server. While displaying images, the program must accept input from the user to determine how the image is displayed. The program should also be persistent, in the sense that it remembers all data (including over previous invocations) entered by the user.
This means that you should use threads to set up (at least) three quasi-parallel processes, one to display images and sleep for an appropriate length of time, one to read user input and respond to the user's requests, and the third to save state. The third process can be triggered either by user entry, quitting the program, or at some predetermined interval.
One of the parameters associated with each image is a score. The score is an indication of how long the image should be displayed. A score is a number in the range 0-10, and is a floating point number. Users can enter scores for each image, and the server will maintain an average of all scores entered for that particular image.
You may make various design decisions in implementing your system, but you must document these decisions in your program documentation. For example, you may make the maximum length of history saved some fixed limit, but make sure that the variables used to define this are documented in the code.
The image server is located at
It uses the HTTP protocol to deliver a supply of images. The server may be viewed through a browser, or accessed through python library calls. There are three parameters to a GET operation through the HTTP port (port 80). These are:Check the Wiki Page for helpful hints. For example, this program might be useful!
A marking quide will be made available.
Use the SVN server supplied to submit your assignment, with repository fit2022-your authcate ID. Make sure you include all relevant files (.py files, .pdf files, literate program files, etc.), and place them in a directory called Assignment1.
Your assignment will be retrieved from that repository for marking. If the file is not correctly named, it will not be retrieved, and hence you will not get any marks for the assignment!
NO WORD DOCUMENTS are to be submitted - if you want to use Word, please convert to a pdf file before submission (there are free convertors available, see for example http://www.doc2pdf.net/). If you submit Word documents, they will be ignored.
Please note that you must not put any assignments in the public space of the svn repositories! Not only is this contrary to the instructions given in lectures about the use of svn, it also contravenes university policy.
Students whose work is found in the public areas will have the work removed, and will receive NO marks for the assignment.
Your submitted program must contain its own documentation, either in the form of comments in the code, or using the Python documentation format (also RER257), or as a literate program. There are different maximum marks attached to these three alternatives, as described in the Marking Guide. As a bare minimum, you should include one comment section to describe the overall program, and comment sections for each key subsection of the program.
Your submission must also include a short User Manual, describing the use of the program for the casual user.
An explanation of the marking strategy is included in the Marking Guide
| 20101021:090359 | 3.1.2 | ajh | add link to PEP257 |
| 20100803:123653 | 3.1.1 | ajh | add submission details from marking guide |
| 20100802:121625 | 3.1.0 | ajh | final form released |
| 20100802:103754 | 3.0.2 | ajh | add history task and documentation parameters |
| 20100727:161245 | 3.0.1 | ajh | release draft version to students |
| 20100726:173213 | 3.0.0 | ajh | first draft version for 2010 |
| This page maintained by John Hurst. Copyright Monash University Copyright Policy |
|
![]() |
|
Generated at
20120515:1417
from an XML file modified on
20101112:1626 | |||