Andrew Nelis's Home Page

You can go to my main site at nelis.cc and use the wiki there.

Python Scripts

A small collection of Python scripts that are just about worth sharing. Use at your own peril and as you like (public domain!).

ToDo List

CGI script for managing todo lists that look like this (screenshot) - Download.


CatLang

A simple implementation of the Cat programming language

See the Github Page for more information and downloads.


Weblike

A basic yet versatile mod python handler that makes writing dynamic web sites with mod_python easier - main page.


RSS Feed generator

A small and easy to use script to generate your own RSS feeds. Example usage contained within the file - rss.py


BrainFuck "Compiler"

Simple compiler that converts BrainFuck source code into pure python source - Download


Forest Message Board

A simple file based message board using CGI. See the information page for more details.


BrainFuck Interpreter

As above, but interprets the BrainFuck code rather than compile.

Download


Email Activity Plotter

Plots a graph of messages recieved against the date recieved for a given IMAP folder. Handy for keeping tabs on things like the amount of spam recieved or mailing list activity. You'll need a couple of extra Python libraries to plot the chart (more instructions within the script).

Example Chart

Download


Python Execution Tracer

A handy tool to follow the execution of a python program. Simply call the 'execute' function with the function you wish to trace and it will display the functions called, their arguments and return value as they are called.

Download


Display numbers in binary format

A small snippet to display numbers as a string in base 2:

def bin(n, length=8):
    """
    Display <n> as a binary number of length <length>.

    Examples:
    >>> bin(10)
    '00001010'
    >>> bin(0xF0F0, 16)
    '1111000011110000'
    """
    return ''.join(['01'[bool(n & 2**x)] for x in range(length-1, -1, -1)])