David's Python Resources

A growing catalogue of Python applications, packages and wrappers for *nix and windoze

Features and Design Policies common to all packages:
You can report bugs for any of these packages at http://www.freenet.org.nz/bugs

Applications

Application
Description
Stasher
A pure-python Kademlia-based distributed file storage framework (DHT), that utilises the encrypting/anonymising I2P stealth network
SPIRO
Simple Python Interface to Remote Objects, an easy ORB framework which integrates (C)Python and Java without needing to compile any brittle binary JNI wrappers
pyshaper
A simple, flexible and powerful 'traffic shaper' (bandwidth manager) app for Linux systems.

jetstreamusage
A utility class/standalone for customers of Telecom New Zealand Jetstream internet access. Retrieves current usage info
PSST II
Successor to the original
PSST Encrypted Instant Messaging application
(http://netforth.sourceforge.net/psst).

Now features:
  • Much tighter security and improved encryption that would give even the NSA a severe headache
  • Forced public key pre-sharing to combat Man-In-The-Middle attacks
  • Able to have multiple concurrent chat sessions
  • Plus a couple of major exciting new features which will rock a few boats amongst various governments.
Beta test commencing soon - stay tuned or contact me if you want to get involved in alpha testing.
PhoneBook
An encrypted filesystem for linux 2.4 and 2.6 systems, featuring strong plausible deniability features (to protect user against legally-compelled key disclosure, such as under the UK's RIP Act).
Similar in concept to the Rubberhose filesystem, but more flexible, and much easier to set up, use and manage.
netusage
Simple cron script for measuring your monthly DSL traffic usage, and mailing you each day with your remaining traffic quota. This script might save you hundred$ or thou$and$.


Libraries/Frameworks

Library
Description
pygene
A simple, versatile and easily understandable framework for genetic algorithms and genetic programming in Python. Implements crossover, mutation, sexual reproduction, recombination operations with full configurability.

Supports classical Mendelian genetics, single-strand prokaryotic and double-strand eukaryotic organisms, and evolving program organisms. Good set of simple examples, including the obligatory "Travelling Salesman Problem".

Aims to present a highly-pythonic class collection. Extensive API documentation.
PyBison
Python-based parsing at the speed of C. A sophisticated wrapper which exposes the speed and power of the Bison (yacc) and Flex (lex) parsing tools (and their generated C code) into the Python environment.

User-written Python classes, containing grammar and lexing rules, upon first instantiation are automatically used to generate/process/compile/link bison and flex scripts into a shared library. Running the parser passes control over to the C yyparse() routine therein; the python Parser object receives callbacks upon parse targets being reached. Subsequent instantiation of the Parser class does not cause a rebuild of the library, unless the user has changed the grammar.
pyWeb
A simple but powerful framework for generating HTML pages dynamically, and simplifying use of cookies and other persistent data.
Presents a coherent document object model for adding and manipulating page content.
Highly extensible
Runs as CGI on hosts with Python versions as early as 1.5.2 (which suits those innumerable 'budget' web hosts).
pythonfs
Implement Linux filesystems in pure-python code. (Requires the LUFS framework, which requires you to have a matching set of headers for your current linux kernel).


Packages and Wrappers

Package
Description
XMLObject
Does for XML what SQLObject does for databases.

Lets you operate on XML files like Python objects. Read files, generate new files, view/change/add attributes, iterate over child tags, add new child tags, save changes to file. Saves a lot of coding effort.
HashCash
Easy functions for generating and verifying hashcash tokens
YahooQuote
Convenient classes for fetching Yahoo Finance stock quotes and histories
ip2country
Lookup the country an IP address resides in
ezSqlObject
A convenience wrapper for the venerable SQLObject object-relational mapper
widgets
Some of my Tkinter/PMW Widgets collection
PYWM
Python-programmable Window Manager with lots of features:
  • mouse-friendly and keyboard-friendly
  • easy to learn and program
  • very usable as a live window manager
  • keybindings which can be global, or per-window
  • create screen hotspots
  • make your scripts as simple or complex as you like
Also, very lightweight.
Based on a hack of the fast light FLWM window manager, this package defines a basic window manager class. Subclass this, and override the event handlers to customise your perfect desktop environment, just as you want it. Get even more control by subclassing the basic window class.
py-EvilWM
An earlier build of my python-programmable window manager, that uses the sparser EvilWM engine. Kept here for archival purposes. I much more strongly recommend PYWM above. Py-EvilWM will not be maintained.
tVector
A useful convenience class for Tkinter programming.

Facilitates creating code that is shorter, much more readable, and easy and convenient to write and maintain.

Offers a paradigm of 'row' and 'column' vectors in lieu of the menial manual pack() method. Worth a look - you may like it.
pyFreenet
An easy and powerful Python API to the Freenet anonymous publishing/caching network. Patent-free.

Notes:
(1) POSSESSION OR USAGE OF THIS CODE MAY BE ILLEGAL IN YOUR COUNTRY OF RESIDENCE
SSLCrypto
Supersedes ezPyCrypto. Very similar easy API, but much much faster (by virtue of it using the OpenSSL library).
Just as easy to use as ezPyCrypto.
No SSL functionality provided at this stage. However it does implement secure stream functionality in its key class.

Notes:
(1) POSSESSION OR USAGE OF THIS CODE MAY BE ILLEGAL IN YOUR COUNTRY OF RESIDENCE
(2) Contains implementations of one or more algorithms which may breach software patents in your country of residence (eg USA)
ezPyCrypto
DEPRECATED - USE SSLCrypto INSTEAD!

Encryption made simple. Contains full code of the respected PyCrypto toolkit, and wraps it with an even easier Python class.

Much slower than SSLCrypto - unacceptably slow with decent key sizes - kept here only for cases where OpenSSL licensing problems may forbid people from using SSLCrypto.

Notes:
(1) POSSESSION OR USAGE OF THIS CODE MAY BE ILLEGAL IN YOUR COUNTRY OF RESIDENCE
(2) Contains implementations of one or more algorithms which may breach software patents in your country of residence (eg USA)
pyPortAudio
Simple Python wrapper to the PortAudio library (which allows easy, platform-independent ability to read from and write to audio devices (whereas many Python audio packages only provide write ability)).
pySpeex
Fast easy Python wrapper to the Speex audio speech codec. Known to be fully patent-free

PythonCard goodies

Helpful resources for using the PythonCard GUI environment
PyrexDoc
Python Documentation Generator specially written for Pyrex modules
pyp
Python Preprocessor (in development, simple working version available)
Metakit Plus
A convenience wrapper which makes Metakit more extensible


Miscellaneous
ming
Bits and pieces relating to the wonderful Ming Flash file generation library.
(Yes - there's a lovely Python library for easily creating those much loved/hated Macromedia Shockwave Flash (.SWF) files.
Spamish Inquisition Companion to the popular SpamBayes spam blocking software.
Retaliates against spammers by causing their machines to slow to a near-standstill (using RFC831 'incomplete response' messages).
Runs as an SMTP server, replacing your own SMTP server. Pipes non-spam messages to an MTA of your choice (Exim, qmail, sendmail etc) for delivery.



Release Policies
Privacy Policy