Hugh Sasse's Python Page.

Hugh G. Sasse <hgs@dmu.ac.uk>

This page is Best Viewed With Any Browser.

Contents

The Python WWW site (Danish, French, UK Mirror sites)
This contains a lot of the information. Of particular importance is the Documentation (Danish, French Mirrors, my local copy has been removed as it is too old and too big to keep):
Python Imaging Library.
python Imaging Library Handbook.
BeOpen PythonLabs
Starship Python
Guides to using Python
The Python Tutorial.
The What, Why, Who, and Where of Python.
for informtion on the language. These are 2 of many links from the main site.
Mark Lutz's Home page.
This has a lot of useful links on, but then it would, as he wrote "Programming Python".
Dive Into Python.
Dianne Hackborn's Python Page.
A collection of useful scripts, tutorials, and other Python-related things.
found from [HN:8028031].
Fundamentals of Tkinter - Part one, Parts 2, 3, 4, 5 are also available.
A list of online Tkinter docs.
Software
Software by other people
Some example scipts for beginners by Joseph Strout, and some more scripts by Andrew Kuchling. See also David Leonard's Python page.
Gadfly
an SQL database. See An Introduction to SQL.
The Larch Environment.
A visual programming approach to Python. Images look like images.
Python2C
PyLR -- an LR parser extension for Python
has been written by Scott, for Python 1.5. He has got further than I have, so I am not sure how much further mine will get.
Yapps -- Yet Another Python Parser generator
has been written by Amit Patel <amitp@cs.stanford.edu>, with the aim of providing a simple, LL(1) recursive descent parser generator, whose output is human readable Python.
py2exe.
For building Windows native executables on Windows. Works by putting them in a folder with DLL files.
My software
I am working on a number of projects, which are inter-related. My main purpose is to familiarise myself with OO programming, to which I am new. Therefore I am also new to Python, and my software may reflect this.
Parser Generator
I am hoping to implemet a generalised parser generator in Python. I am hoping that this is a sufficicently complex project to benefit from proper use of the OO paradigm, and that a number of re-usable modules will result. These will appear below as they are developed. However, see the stuff on PyLR above.
Finite State Machine
Parser generators such as yacc or bison produce a finite state machine to parse the supplied grammar. To this end I have produced a module for a Finite State Machine class (in HTML form and downloadable source) and a script to test it, thogh not exhasutively (in HTML form and downloadable source) so far... Comments and constructive suggestions are welcome.
Pygrep -- a Python Grep
Python has a basic grep module, and it supports various regular expression types. However, I wanted a grep that would not spit out unprintable characters when reading binary files, that could read the patterns from a file, that could recursively descend directories. I particularly wanted a grep which could give me a few lines of context to surround the match it had found. I had written one in Perl which read one line at a time, but I wrote this python one to read in whole files at a time and use list operaters such as map and filter to extract the lines. The result (HTML form and downloadable source) does the job, but is slow. (However, Andrew Kuchling suggested I change some of the code to use strings instead of regexps, which has made a huge improvement-- added to version 1.1). It also has a results class so that sets of results can be combined in useful ways. Version 1.2 (15-JUL-98) now has:
  • Better handling of recursion in directory trees. ("pygrep -R something ." used to fail.) Symbolic links to directories are not traversed.
  • Now reports links to missing files/directories
  • Ability to completely ignore files containing binary data (-I option), instead of just filtering them (-a, -A, -B options)
  • -V actually gives a version number now, which helps.
Version 1.3 (15-JUL-98) now has:
  • -E option fixed. This was not recognised before.
Version 1.4 (16-JUL-98) now has:
  • -d option fixed. This was printing out matching lines of files before.
Version 1.5 (26-OCT-98) now has:
  • -c option fixed

Hugh G Sasse
Last Modified: 20-AUG-2014