The util module

(Obsolete, 1.5.2 only). This module is included for backwards compatibility only. New code should use the replacement constructs shown in the examples below.

remove(sequence, item) removes the given item, if found in the sequence.

Example: Emulating the util module’s remove function
# File:

def remove(sequence, item):
    if item in sequence:

readfile(filename) ⇒ string reads the contents of a text file as a single string.

Example: Emulating the util module’s readfile function
# File:

def readfile(filename):
    file = open(filename, "r")

readopenfile(file) ⇒ string returns the contents of an open file (or other file object).

Example: Emulating the util module’s readopenfile function
# File:

def readopenfile(file):

A Django site. rendered by a django application. hosted by webfaction.