Author Details

Author: code.activestate.com

Url: http://code.activestate.com

code.activestate.com : Components, Scripts, Codes Listing

Calculate the distance matrix 1.0

This script presents you three ways to calculate a distance matrix out of a list of n-dimensional points using scipy.

Freeware

Simple session handling example 1.3

This script is a very simple session handling example that uses plain Python CGI (tested only under Python 2.

Freeware

Solving the Metaclass Conflict 1.0

Any serious user of metaclasses has been bitten at least once by the infamous metaclass/metatype conflict.

Freeware

Force verbose mode for unittests in an IDE 1.0

When running unit tests, using the verbose flag often provides an extra level of protection against mistakes.

Freeware

Generator for sequence operations 1.0

Permutations and combinations are often required in algorithms that do a complete search of the solution space.

Freeware

Accessing MS exchange with webdav 1.2

If you want to talk to an MS exchange server, webdav offers a convenient way to do so.

Freeware

Farey Sequence 1.0

This function provides farey sequence, F(n), for any integer n.

Freeware

Boyer-Moore-Horspool string searching 1.0

This script implements a string searching algorithm based upon Boyer-Moore string searching, which is considered one of the most efficient string...

Freeware

Binary floating point summation 2.3

This script eliminates completely  rounding errors and loss of significance due to catastrophic cancellation during summation.

Freeware

Remote control with telnetlib 1.0

This script sends commands to one or more logins using Python's standard telnetlib module.

Freeware

Choose a random k-subset of {1,2, ..., n} 1.0

This script is a translation of the Fortran subroutine RANKSB.

Freeware

Generate the permutations of a bag 1.0

This script allows you to make permutation on a list like a set, but it could contain elements more than once.

Freeware

Boids Demonstration 1.0

This script demonstrates a 2D boids simulation.

Freeware

Expanded dictionary inversion 1.0

This script contains functions that invert different types of dictionaries with mixed data types as values.

Freeware

Extended great common divisor function 1.5

This script contains a function that finds out the gcd(a,b)(great common divisor of a and b) as a linear conbination of a anb b, ax...

Freeware

Event driven programming 1.3

Event driven programming script demonstrates how state driven programming can be done in python.

Freeware

Generic vs. Specific Algorithms 1.2

This script presents two approaches to generate all combination of elements from a number of sets.

Freeware

z_crypt 1.0

This module show a way to simple data encryption.

Freeware

Human readable 'random' password 1.0

This script allows you to generate a password in the form 'word' digits 'word' for example 137pace instead of a...

Freeware

Commafying an integer 1.0

This script contains a quick function to comma separate thousands in an integer or float.

Freeware

Import hook for end-of-line conversion 1.0

This code eliminates the need to convert line endings when moving .

Freeware

Print Hook 1.0

This class gets all output directed to stdout (e.

Freeware

Deque collection class 1.0

This script is a pure python drop in replacement for collections.

Freeware

Auto Incrementer Example of __call__ and yield 1.0

This script will automatically return the next integer.

Freeware

Format warnings for Visual Studio 1.0

Visual Studio can be configured to invoke a Python script during your build process.

Freeware

Directory Size Lister for Windows 1.0

This script lists the summed  size of a directory (or set of directories) without the GUI.

Freeware

Simple ldap with python 1.0

Simple ldap with python script shows some example of ldap library use with python.

Freeware

Using the Win32 IPHelper API 1.0

This function will return a list of ports (TCP/UDP) that the current machine is listening on.

Freeware

Groupby 1.4

This script allows you to perform the following actions: grouping records in reports, listing the unique keys in a database, counting the number of...

Freeware

Convert objects from string arguments 1.4

Usually, although they are a character sequence, all the arguments when starting a program are making it a special format, and if they change an...

Freeware

Extending Classes 1.0

This script contains two implementations for extending an exsisting class using metaclasses.

Freeware

Improved Gray Scale Quantization 1.0

Improved Gray Scale (IGS) codes are used for the elimination of false contouring in images, and image compression.

Freeware

Gather detailed system information on Mac OS X 1.0

This script uses the system_profiler application to retrieve detailed information about a Mac OS X system.

Freeware

Factory pattern 1.1

In the factory pattern script you have an object that creates other objects.

Freeware

Composite design-pattern using dictionaries 1.1

The script illustrates the composite design pattern by using hierarchical dictionaries.

Freeware

Bag collection class 1.0

Bag collection class script implements Smalltalk's bag class.

Freeware

Timeit function 1.0

This script contains a function to use the timeit module from a script, creating a nice overview of the runtimes of one or more code...

Freeware

Floating Point Simulator 1.0

This class readily reproduces textbook examples and provides immediate demonstrations of representation error, loss of precision (subtractive...

Freeware

Debuging of object instantiation 1.0

If you are debugging a program, this script will help you to know if some special objects exist and where they came from.

Freeware

Scope qualifier for globals 1.0

Scope qualifier for globals script contains the globaliser class that provides a scope qualifier s the glols.

Freeware

Observer pattern for method calls 1.7

This script can be good to avoid some limitations of multiple inheritance, when in need to expand functionalities of superclasses in the...

Freeware

Caching object creation 1.0

This script contains many recipes to memoize functions.

Freeware

Anagram Fetcher 1.3

This script provides you code for fetching Anagrams out of any given file that contains words seperated by new lines.

Freeware

Generator for integer partitions 1.0

Generator for integer partitions script uses an iterative procedure to deal with integer partitions.

Freeware

Time sections of code by using "with" 1.0

Time sections of code by using "with" statement script allows one to use the "with" statement to time sections of code.

Freeware

Python XTEA Encryption 1.4

The module implements the basic XTEA block encryption algorithm (`xtea_encrypt`/`xtea_decrypt`) and also provides a higher level `crypt` function...

Freeware

Automatically start the debugger on an exception 1.4

When Python runs a script and an uncatched exception is raised, a traceback is printed and the script is terminated.

Freeware

Round-Robin Pairings Generator 1.0

This script is an implementation of a round-robin algorithm for "fair" pairing of items from a list.

Freeware

Tail Call Optimization Decorator 1.0

This function decorates a function with tail call optimization.

Freeware

A speed limited, or governed range 1.0

This class implements a generator, which returns consecutive floats which are incremented by a speed (time between calls).

Freeware

Generating Code Coverage HTML Output 1.5

Code coverage testing is very useful especially for dynamic languages, it can easily give a view of the unused parts of your code.

Freeware

Import package modules at runtime 1.3

This script allows you to load modules from packages without hard-coding their class names in code; instead, they might be specified in a...

Freeware

Simpler item retrieval using tupled subscripting 1.1

This script shows a small addition to the tuple, list, and dictionary classes to allow for a simpler way to retrieve a number of independent...

Freeware

SQL-like ORDER BY function for lists 1.0

This script contains a function that allows you to easily sort a list by multiple columns in ascending and descending order similar in...

Freeware

Data Mining with Neural Nets 1.0

This script uses the IAC (interactive-competition-and-activation) model to analyze a database.

Freeware

A recursive function to get permutation of a list 1.2

A recursive function to get permutation of a list script allows you to make permutation on a list of objects.

Freeware

Regular expression for python string literals 1.0

For quick-and-dirty processing of Python source files, it can be convenient to have a regular expression that matches Python string literals.

Freeware

InitReplacement 1.0

InitReplacement script shows you how to replace an __init__ method in ascript sht;/p>

Freeware

Dependency Injection The Python Way 1.8

Dependency Injection The Python Way script is a sample pythonic inversion-of-control pseudo-Container.

Freeware

Metaclass Class Policies 1.2

This code implements the policy design pattern in Python by using metaclasses and multiple inheritance.

Freeware

Automatic Recursion 1.3

This script presents you the tools for easy and stable recursion of current function when only selected arguments have to be changed.

Freeware

Odbc connection on win32 1.0

Odbc connection on win32 script implement the features of retrieving dsn and tables list on win32.

Freeware

Docstring coverage 1.1

This script is a tool to examine lack of docstrings in a module.

Freeware

Stateful Objects use Mix-ins to define behaviour 1.0

If you want to implement stateful objects, which have a different set of behaviours according to what state they are in, this requirement can be...

Freeware

Module For Running Simple Proxies 1.0

Proxies can be useful at times but may not be simple to create and run.

Freeware

Binary floating point arithmetic 1.1

This script achieves exactness by manipulating values stored as a long integer mantissa with an integer exponent (base two).

Freeware

get_date wrapper to datetime module 1.0

The datetime module only accepts inputs of time it understands.

Freeware

Group a list into sequential n-tuples 1.0

Group a list into sequential n-tuples function returns a list of n-tuples from a single "flat" list.

Freeware

Buffered Stream with Multiple Forward-Only Readers 1.0

This script provides a buffered stream that supports multiple forward-only readers.

Freeware

RunningCalc 1.1

This is a trivial calculator "shell" with a running total.

Freeware

kexec the newest linux kernel 1.1

Kexec is a mechanism to use linux itself to load a new kernel without going through the BIOS thus minimizing down time.

Freeware

Dicts from lists 1.0

This script is a simple oneliner to built a dictionary from a list.

Freeware

How to disable debug logging in release version 1.2

When you release your program to client, its a good idea to disable all the debug messages.

Freeware

Port Forwarding 1.0

This script allows you to do port forwarding.

Freeware

Merging two sorted iterators 1.1

Merging two sorted iterators script provides a mergeiter() function that can merge two iterators into a single iterator.

Freeware

Controlling Windows Services 1.7

This script is a module for manipulating WinNT, Win2k & WinXP services.

Freeware

AbstractFactory 1.0

This script has a base Factory class that is meant to be subclassed and then define a default implementation to return, as well as module's to...

Freeware

Read/write object for pkg-config files 1.0

The PkgConfig class is useful by itself.

Freeware

Logging to a Jabber account 1.0

This script contains a handler class which sends a Jabber message for each logging event.

Freeware

Network Ping Pong using Twisted Prespective Broker 1.0

This is a simple program using Twisted Perspective Broker and showing use of Twisted Deferreds and other callback mechanisms.

Freeware

Splitting up a sequence 1.3

This script allows you to split up a sequence in same-size (if possible) parts.

Freeware

Apache Client Cache-rate Calculator 1.0

This script contains a function to calculate the percent of requests that were "refused" by Apache server due to the clients ability to read the...

Freeware

Just in time instantiation 1.0

JIT is a class for Just In Time instantiation of objects.

Freeware

Generating get/set methods using closures 1.0

When creating a class,one often end up writing lots get/set methods which essentially do the same thing e.

Freeware

Authenticate with twisted.web.xmlrpc 1.1

These classes subclass several of the culprits in twisted.

Freeware

Type-checking decorator 1.1

This is a decorator that lets you annotate function definitions with argument type requirements.

Freeware

SMAWK totally monotone matrix searching algorithm 1.0

This SMAWK algorithm takes as input a function for computing matrix values, and searches for the position of maximum value in each row.

Freeware

z_service 1.0

This script allows the creation of servers that provide services to connecting programs.

Freeware

Summary reports using itertools.groupby 1.1

This script produces a summary of the data, grouped by the given key (default: the first item), and giving totals of the given value (default: the...

Freeware

Type checked argument lists with decorators 1.0

This script shows you to use the new decorator feature of python 2.

Freeware

Binary search and insert in Python 1.2

This script demonstrates a binary search through sorted data using bisect.

Freeware

Scramble Word 1.0

Scramble word script re-arrange characters of word by using simple string manipulation and Random module.

Freeware

Safe heap queue class 1.2

All methods on this heap preserve the heap property invariant; therefore there is no need for is_heap().

Freeware

Separating Pattern Implementation from Your Code 1.0

This script separates pattern implementation from your code so that you can reuse the implementation elsewhere.

Freeware

Rabin-Miller probabilistic prime test 1.2

In this script is included a method for performing the Rabin-Miller probabilistic test for a composite witness.

Freeware

Generic cacheable value objects superclass 1.0

Generic cacheable value objects superclass script is a superclass for cache value objects by its constructor arguments.

Freeware

Treat the Win32 Registry like a Python dict 1.0

This class wraps most of the win32api functions for accessing a registry.

Freeware

Relational Join Algorithms 1.0

This script implements the three standard relational join algorithms: nested loops join, hash join, and merge join, using the iterator algebra...

Freeware

Functional exception handling 1.0

This scrip represents a tool for turning exception handling into functional alternation.

Freeware

Getting th permutation of a sequence 1.1

This script contains a function that given a sequence and a number n as parameters, returns the th permutation of the sequence (always as...

Freeware

Fuzzy matching dictionary 1.0

This script is an ease of use subclass of dict - rather then one that uses a lot of dict features.

Freeware

Union Find data structure 1.0

This script implements the Union Find data structure and algorithm.

Freeware

Maintenance-free Signals implementation 1.2

This is a signals implementation for python.

Freeware

Using introspection to verify Eiffel contracts 1.0

This script shows how you can use intospection to create a function wraper that verify Eiffel like contracts.

Freeware

Hierarchical data objects 1.0

In order to structure data, it makes sense to use hierarchical schemes, as for example filesystems structure files in nested directories.

Freeware

Using eval() To Transform Symbolic Expressions 1.0

Using eval() To Transform Symbolic Expressions script allows you to convert simple arithmetic expressions from infix to to converorm.

Freeware

Win32 process information 1.0

This script contains a function that will return a list of tuples of process names and ids.

Freeware

Sane tab completion in pdb 1.3

The Python debugger has not the bash-like tab completion that you can add to the interpreter.

Freeware

Conversion in base 2

This script is useful to convert a given number into a string that contains the base 2 representation of the number, with its sign.

Freeware

Constellation Finder 1.0

The script demonstrates the use of SETs in Python.

Freeware

Graph Script 1.1

This script allows you to create a directed Graph container that can be useful for the collections module.

Freeware

Find a file given a search path 1.0

Given search paths separated by a separator, this script finds the first file that matches a given specification.

Freeware

How to Set Environment Variables 1.0

This script writes the environment variables using a batch file wrapper.

Freeware

Persistent environment variables on Windows 1.1

This script allows adding/modifying/removing environment variables persistently on Windows.

Freeware

Getting SYSTEM environment variable under Windows 1.0

This script allows you to get SYSTEM environment value, as if running under Service or SYSTEM account.

Freeware

Infix~Postfix 1.0

This script is useful to convert an infix expression to postfix and vice-versa.

Freeware

Symmetric data obfuscation using xor 1.0

This script can be conveniently used to obfuscate a string of data using simple xor without using any key.

Freeware

Randomize an iterator 1.0

This script shows an extremely simple implementation of a method used for randomizing the iterable.

Freeware

Tabify 1.2

This script introduces a function that converts the indentation with spaces to tabs.

Freeware

Quick and easy FIFO queue class 1.1

Quick and easy FIFO queue class is an easy First-In-First-Out queue class based on Python's List data structure.

Freeware

Recursive sorting 1.0

This script allows you to sort recursively nested lists if iterable is a mutable sequence type.

Freeware

Complex Boolean Regular Expression Class 1.4

This class wraps up a complex boolean word expression, creating an internal regular expression, and provides methods that allows you to perform...

Freeware

Boring Constructor Pattern 1.4

This script contains automate boring constructors that simply create lots of private member variables.

Freeware

Numeric to rational via Farey fractions 1.0

This script converts a Numeric to a rational.

Freeware

Root access required 1.1

This script shows how simple is to avoid any access from user to your scripts.

Freeware

Numeric base converter 1.0

This is a traditional base converter with the twist that it accepts any strings as the digits for the input and output bases.

Freeware

Metropolis-Hastings Sampler 1.0

The Metropolis-Hastings Sampler is the most common Markov-Chain-Monte-Carlo (MCMC) algorithm used to sample from arbitrary probability density...

Freeware

ExceptionContainer 1.0

ExceptionContainer script is an Exception base-class that supports keyword arguments and printing.

Freeware

Changing file attributes on windows 1.0

The win32api module offers SetFileAttributes whiles allows you to make changes to a file in windows.

Freeware

Permutations using generators 1.0

This script defines permIter() function that takes a sequence and returns an iterator that goes through all possible permutations of that...

Freeware

Get the IP address of a network interface 1.0

This script uses the Linux SIOCGIFADDR ioctl to find the IP address associated with a network interface, given the name of that interface, e.

Freeware

A friendly mkdir() 1.0

This scripts provides a function mkdir() more friendly than Python's standard os.

Freeware

Overriding __new__ for attribute initialization 1.0

Whenever a superclass implements a __init__ method to initialize its attributes, subclasses derived from it have to invoke the __init__ method of...

Freeware

Autosuper to the limit 1.1

This script returns a tuple (cls,self,method), where:  -  cls is the class in wich you can find the definition of the method from which...

Freeware

Yet another Set class for Python 1.7

This script is a pure Pythonic implementation of a set class.

Freeware

Attributes WithProtection without pain 1.0

This script enables proper protection of attributes that are mangled with Pythons privacy indicator: the single underscore _.

Freeware

Get names of all "up" network interfaces 1.0

This script uses the SIOCGIFCONF ioctl to obtain a list of interfaces and extracts those names, returning them in a list of strings.

Freeware

Quickslice decorator 1.3

This script defines a decorator that allows for an abbreviated slice syntax in function arguments: {start:end}.

Freeware

Dictionary Tools 1.0

Dictionary Tools script shows you a collection of some dictionary tools.

Freeware

Calculating Apache hits per IP 1.5

This function returns a dictionary containing the hit counts for each individual IP that has accessed your Apache web server.

Freeware

SuperGlobal 1.0

Sometimes you like to have a global namespace where to put e.

Freeware

Binary ordered tree 1.1

This script is a simple example demonstrating the construction of binary trees.

Freeware

List/Generator Monad Combinators 1.1

The List monad in Haskell has many uses, including parsing and nondeterministic algorithms.

Freeware

Repeating alternator 1.3

This script is a generator for cycling over a set of values.

Freeware

A basic time profiler 1.0

A basic time profiler script provides a very simple time profiling module which helps you to measure actual execution time for blocks of Python code.

Freeware

Priority queue script 1.0

Priority queues are a kind of container that allows specification of the relative order of the data.

Freeware

Automatic indentation of output 1.0

This script is an output stream wrapper; possibly useful for debugging code with print statements.

Freeware

Variant assertion 1.0

Variant assertion script is Eiffel like loop variant assertion.

Freeware

Rating class with mapping interface 1.1

Rating class with mapping interface script deals with items sorted by value and accessed by key or rating index.

Freeware

Arithmetic coder 1.1

Arithmetic coder script is a simple but slow way of compression using arithmetic coding.

Freeware

Merge sorted sequences 1.1

The usual approach to merging is to loop through both sequences taking the smallest from each until they are both exhausted.

Freeware

dictproperty: properties for dictionary attributes 1.0

A Python property is accessed like a normal attribute, but is implemented using method calls.

Freeware

Dynamically added methods to a class 1.0

This script allows you to add a method to a class at an arbitrary point in your code.

Freeware

Asynchronous port forwarding 1.1

This script forward the TCP traffic from your machine to another host, and back in the the other way.

Freeware

Weakmethod Script 1.0

This script introduces weakly-bound methods.

Freeware

Environment manipulation on Windows 1.1

This script displays environment variables, then append C: to PATH.

Freeware

Lock NT via screensaver 1.4

Lock NT via screensaver code implements a Python solution for locking a workstation via a secure screensaver.

Freeware

Closest elements in a target array 1.0

This script has the next actions: finds the set of elements in input_array that are closest to elements in target_array and records the...

Freeware

Authenticate users through a POP-server 1.0

This script is an example of how an existing POP-mail account can be used to provide authentication to a python application.

Freeware

Finding the value passed to a function by name 1.2

Sometimes inside a decorator that creates a function with a generic (*args, **kwargs) signature, you want to access a value passed for a particular...

Freeware

Logpyl 1.1

The logpyl class implements basic logging functionality for Python programs.

Freeware

High-performance currying with instance method 1.0

This script implements the instance method for performing currying.

Freeware

Simple SNTP client 1.1

This script uses the SNTP protocol (as specified in RFC 2030) to contact the server specified in the command line and report the time as returned...

Freeware

Helper subclass for win32pdhquery 1.0

One of the few perks one can have when developing on Windows (at least NT or newer) is the use of the Performance Data Helper (the PDH can be found...

Freeware

Priority dictionary 1.0

This data structure acts almost like a dictionary, with two modifications: First, D.

Freeware

Determining the current functions name 1.3

This script defines the whoaminow() function that can be used inside a function to determine, at the time it is called, the name under which...

Freeware

Lazy streams using generators 1.0

This class allows you to use generators as more list-like streams.

Freeware

Property decorator for python 2.4

Defining a property involves the definition of nested functions for one or more of fget,fset,fdel.

Freeware

Memento Closure 1.2

The memento pattern is great for transaction-like processing.

Freeware

Accepting Four Points in 2-space 1.0

Photographic document images are often rotated, if only slightly.

Freeware

Classmethod emulation in python 1.1

Class methods were introduced in python2.

Freeware

Finding differences in patches on Solaris 1.0

This script uses ssh to gather patch information on two solaris boxes.

Freeware

Mandelbrot/Frame Binary Fractal Trees 1.0

This script generates Mandelbrot/Frame's fractal trees in Python.

Freeware

Function emulation using __call__ 1.1

This script defines a simple but useful class that emulates a function to gracefully permit latent assignment.

Freeware

Dynamically change the Python system path 1.0

This script contains a function that adds the specified path to the Python system path if it is not already there.

Freeware

Convenience 'timeit' function 1.1

This function makes it easier to use the timeit module from the interactive interpreter.

Freeware

Python Octree Implementation 1.0

This script is a simple implementation of an octree data structure in python.

Freeware

A meta-class that provides behavior like Ruby 1.0

This script brings a Ruby-like class behavior.

Freeware

TryFinally 1.0

This script is a convenient way to deeply nest try/finally statements.

Freeware

Evaluate upper-letters variable name as constants 1.1

This code converts variables which is made with upper-leters only, into constants at compile time, if it is possible to be replaced.

Freeware

New Tail Recursion Decorator 1.6

This tail recursion decorator can eliminate the tail calls for recursive functions.

Freeware

Constraint-based Sudoku Solver 1.0

This code uses the constraint package to solve sudoku puzzles.

Freeware

Iterator to return items N-at-a-time 1.0

This script creates an iterator which returns N-tuples built from the incoming items from another iterator.

Freeware

Tracking file requests in web server access logs 1.0

This script helps you to find out how often and by who a particular file is being requested.

Freeware

List and dictionary observer 1.0

This script implements an observer pattern for dictionaries and lists.

Freeware

Forbidding inheritance 1.0

Forbidding inheritance script shows how to prevent the use of a class asForbiddinlass.

Freeware

Vpython example 1.0

This script allows you to perform a block moving robot arm simulation.

Freeware

Rich Comparison Mixin 1.0

This script implements the full suite of rich comparison operators if __cmp__ is defined.

Freeware

Ring buffer 1.1

A ring buffer is a buffer with a fixed size.

Freeware

Stable deep sorting 1.0

This method implements what is referred to as a Schwartzian transform algorithm.

Freeware

Group iterator into n-tuples with None padding 1.0

This script groups the elements returned by an iterator into n-tuples.

Freeware

Drawing inheritance diagrams with "Dot" 1.0

Dot is a very nice graph description language developed at MIT.

Freeware

Obtaining the name of a function/method 1.0

This scripts shows you how to obtain the name of a method or a function from within the running method/function.

Freeware

Reverse a string 1.3

Reverse a string script allows you to reverse a string.

Freeware

min/max "peaks" with Numeric 1.0

Given a large one-dimensional array, this script breaks it into blocks of contstant length and compute min and max for each block, the...

Freeware

Temperature class 1.1

This script allows you to assign temperature values in one scale and you have it available in others as respective attributes.

Freeware

Sieve of Eratosthenes 1.0

This script computes an infinite sequence of primes using simple generators.

Freeware

IPv6 Multicast 1.0

IPv6 can be tricky in many ways, and multicast makes it even more fun.

Freeware

UrlAppServer 1.0

This script shows you a very simple way to interact with python via homepage

Freeware

Number Format function 1.2

This function takes a number (integer or float) and returns a string with the integer portion grouped by thousands and the decimal portion rounded...

Freeware

Finding Eulerian path in undirected graph 1.0

This script takes as input a graph and outputs Eulerian path (if such exists).

Freeware

Fibonacci Object 1.0

This script shows a simple class useful to compute Fibonacci numbers.

Freeware

Simple exception logging 1.0

If you want to log exceptions, this script offers you a simple way to do so without having to explicitly repetitiously call the...

Freeware

Poker hand primitives 1.0

This script handles logic for detecting straights and groups of repeats in the presence of wildcards and hands with more than five cards.

Freeware

Handler stack 2.2

This script presents a design pattern that is highly reusable.

Freeware

Dump all the attributes of an object 1.0

This script prints a nicely formatted overview of an object, including _everything_ in the object's `dir'.

Freeware

Transposing a List of Lists 1.0

This script allows you to transpose a list of lists of different lengths.

Freeware

PyHeartbeat 1.5

PyHeartbeat detects inactive computers by sending and receveing "heartbeats" as UDP packets on the network, and keeping track of how much time...

Freeware

Execute Python program from Windows Cmd. file 1.0

This script generates a Windows command file that executes a Python program.

Freeware

Convex hull and diameter of 2d point sets 1.1

This script returns the convex hull (separated into upper and lower chains of vertices) and the diameter (farthest pair of points), given input...

Freeware

Dictionary tool for lazy typers 1.0

This script provides an alternative way of generating and updating dictionaries.

Freeware

Multicasting on objects 1.1

This script uses the 'Multicast' class to multiplex messages/attribute requests to objects which share the same interface.

Freeware

ClearModules 1.2

This script clears "sys.

Freeware

Extending the 'logging' module 1.1

This script helps you in adding new format specifiers to the logging module.

Freeware

LZ77 compression 1.2

LZ77 is a compression algorithm upon which most popular compression formats are based; PKZIP, GZIP, LHA, RAR, etc.

Freeware

Splitting iterators 1.0

This script shows an implementation of isplit, a function that splits iterators into two equal ones, which return similar values, but are exact...

Freeware

Easy binary2decimal and decimal2binary 1.0

This script allows you to convert binary numbers to decimal and vice-versa in the most straightforward way.

Freeware

Example For winreg 1.0

This script is an example of how to use the winreg module.

Freeware

Reduce dicts 1.0

This script introduces a function similar to the builtin reduce for reducing dictionaries.

Freeware

Pseudo-random string to float conversion 1.0

Pseudo-random string to float conversion script converts strings to floats in the range [0, 1), using a hash function.

Freeware

Implementation of sets using sorted lists 1.1

This script implements set operations using sorted lists as the underlying data structure.

Freeware

Finding significant digits 1.1

This script shows you a method to find significant digits for any given number.

Freeware

Avoid running multiple copies of pine 1.0

Avoid running multiple copies of pine script shows how to stop yourself from running multiple copies of a program (in this case, pine).

Freeware

SimpleWrapper 1.1

This script is a simple object wrapper that allows you to define pre-defined parameters for functions (global for all functions associated with the...

Freeware

A lazy, memoized attribute space 1.0

This class provides thunk-like behavior in standard Python.

Freeware

Binary search in one line 1.1

This is an implementation of the binary search algorithm in (almost) one line.

Freeware

Delete directories except special administration 1.0

Delete directories except special administration script allows you to remove non-empty directories leaving specified directories.

Freeware

Automated swigging for creating C shared modules 1.1

This script contains a simple python function to automate using the swig process for creating C modules for use inside Python.

Freeware

IP address conversion functions 1.0

This script allows you to convert dotted-quad IP addresses to long integer and back, get network and host portions from an IP address.

Freeware

All k-subsets from an n-set 1.0

This script yields each subset of size k from a super set of size n.

Freeware

A basic undo mechanism 1.0

This script provides a basic undo mechanism.

Freeware

The Singleton Pattern implemented with Python 1.1

This script contains a class that shows how to implement the singleton pattern in Python.

Freeware

Timeit module wrapper 1.3

This script contains a simple, easy to use wrapper function for doing quick tests of your functions using the timeit module.

Freeware

z_matrix 1.0

This module provides two classes that emulate one and two dimentional lists with fixed sizes but mutable internals.

Freeware

Breadth first traversal of tree 1.1

Breadth first traversal of tree script is an example of the self-recursive generators.

Freeware

Frozen dictionaries 1.0

A frozen dictionary is a dictionary that cannot be modified after being created - but it is hashable and may serve as a member of a set or a key in...

Freeware

SIGIO handler 1.0

This handler manages a chain of registered callback functions.

Freeware

Yet another Design By Contract module 1.0

This script implements class invariants, pre/postconditions in a way similar to PyDBC, but significantly better.

Freeware

Discreet Simulation 1.0

This script demonstrates the discreet simulation of Round Robin Sheduling.

Freeware

Integrating Twisted reactor with IPython 1.0

This script allows you to run the Twisted reactor event loop in a thread alongside an IPython shell, for introspecting a running Twisted process.

Freeware

A List of Dictionaries 1.0

This  class emulates a list of dictionary objects without the memory and pickle storage overhead which occurs when storing every item in the...

Freeware

Gaussian quadrature with Log singularity 1.1

This script computes the definite integral of a user defined function over the interval [a, b].

Freeware

n-dimensional loop iterator object 1.0

This script does nested for loops on an arbitrary list of iterable things.

Freeware

How to use twisted pb pager 1.0

This script shows how to transfer large files with Twisted Perspective Broker using twisted.

Freeware

z_string 1.0

This module provides several functions that can encode and decode a string.

Freeware

Reloading all modules 1.0

When you create a Python module, you can use a test script wich import your module.

Freeware

httpExists 1.0

This script quickly finds out whether a web file exists or an http reference is valid.

Freeware

Big file sorting 1.0

Big file sorting script allows you to sort big ASCII files.

Freeware

Edge-coloring of a bipartite graph 1.0

Konig's theorem tells us that every bipartite graph with maximum vertex-degree d can be edge-colored with just d colors.

Freeware

Handling Deeply Nested/Recursive Data 1.1

Common python services such as pickle, deepcopy and comparison tests either fail entirely or do not scale for highly recursive data structures.

Freeware

A general solution of Eight Queens 1.0

This script is a general method to figuren out all solutions of eight queens.

Freeware

Iterator Merge 1.2

This script merges multiple sorted inputs into a single sorted output.

Freeware

Create objects from variable class names 1.2

Sometimes you would want to create objects from various classes based on some condition (without using eval()).

Freeware

Eiffelmethod 1.0

This script presents the implemetation of eiffel like methods (methods with preconditions and postconditions).

Freeware

Another Singleton Implementation 1.0

This script creates a unique instance of classes that uses Singleton as their metaclass.

Freeware

Matrix vector multiplication 1.0

Using 'reduce' and 'map', this code shows how a matrix vector multiplication can be reduced to a single loop.

Freeware

Remote Shutdown on Windows 1.0

Remote Shutdown on Windows script shuts down or reboots a remote computer.

Freeware

Windows free drive space report 1.9

Windows free drive space report script reads a file containing a list of share names, and prints a report of the current free space on the volumes.

Freeware

Splicing of lists 1.0

This script splices any number of nonempty lists as one list.

Freeware

Tensor and transpose 1.0

This script presents two functions useful when you don't use a numerical library.

Freeware

Changing return value for mutating list methods 1.0

Mutating list methods such as 'append' or 'extend' return None instead of the (mutated) list itself.

Freeware

List mixin 1.6

This script allows you to create custom list classes from a small subset of list methods.

Freeware

Easily call executables from Python 1.0

One common aspect of programming is calling executables and processing results.

Freeware

Print an expression and its value 1.0

The function printexpr() takes a Python expression, and prints it's value, and the filename and line from which printexpr() is called.

Freeware

Using a Dictionary in place of 'switch' 1.0

This script shows a clean way of implementing a 'switch' statement in Python via a dictionary container.

Freeware

List object carried out to an instance 1.0

In order to change into a list, the length of an instance is investigated first.

Freeware

Fibonacci sequence using generators 1.0

Generators, introduced in Python 2.

Freeware

pykill 1.0

This is a python script very loosely approximating pkill that is a Linux command: will send the specified signal (by default SIGTERM) to each...

Freeware

Using the logging module 1.6

This script allows you to use separate loggers to make specific sub-system debugging easier.

Freeware

Pipe convenience function for doing pipes 1.0

This script allows that arbitrary number of commands to be strung together with each one feeding into the next ones input.

Freeware

Permutation order indices 1.1

Given a list, this script finds the indices used to get the elements from the list in sorted order.

Freeware

Fancy rich comparisons 1.0

This script is an example of template comparisons based on a logical ANY object.

Freeware

Another memoize 1.0

This script tries to be a safer and faster memoize decorator, it works with mutable types and with keyword args too.

Freeware

Ensuring a name definition in a module namespace 1.0

This script ensures that a name exists in a target namespace.

Freeware

Get the MAC address of a remote computer 1.1

This script uses the Internet Protocol Helper functions on Win32 and helps you to find the MAC adress of a remote computer.

Freeware

Loose Coupling 1.0

The "broadcaster" and "broker" modules enable loose coupling between objects in a running application.

Freeware

Padding variable length sequences 1.1

Padding variable length sequences script returns a pad function that implements tuple unpacking.

Freeware

pkgconfig parser 1.0

This script creates a class to allow access to variables stored in pkg-config files ( or '.

Freeware

How to freeze Python classes 1.0

This script raises an error when trying to set an undeclared name.

Freeware

Generating combinations in blocks 1.0

This script is yet another combination generator, with an extra twist: the generated combinations can be yielded in blocks of a given size.

Freeware

Tkinter : moving geometry methods 1.2

A common way to create new compound widgets is to inherit Frame, create everything you need inside it and pack this base Frame on your application.

Freeware

Clean implementation for Ordered Dictionary 1.0

This script allows you to record the order in which items are added.

Freeware

Editable buffer for the Python shell 1.0

This script is a useful wrapper around the python command line shell to allow editing of the last typed in lines of code in an external editor.

Freeware

ASTVisitor generator 1.1

This script parses the online documentation for compiler.

Freeware

Ruby like syntactic sugar 1.0

Ruby offers very nice language constructs for loops or for iterating over lists like the following: 5.

Freeware

Finding the convex hull of a set of 2D points 1.0

This simple code calculates the convex hull of a set of 2D points and generates EPS files to visualise them.

Freeware

Descriptive statistical analysis tool 1.1

This script is a Python module implementing a class which can be used for computing numerical statistics for a given data set.

Freeware

Fifo as single linked lists 1.4

Fifo mean "First In First Out".

Freeware

Watching a directory tree under Linux 1.0

This script contains a class named DirectoryNotifier that encapsulates the code required for watching directory entry contents.

Freeware

Static or Class Methods 1.0

This script implements class methods that do not require an object instance.

Freeware

Case-insensitive Dictionary 1.0

Case-insensitive Dictionary script is a dictionary that has case-insensitive keys.

Freeware

Some python style switches 1.5

Some python style switches script shows several ways of making a 'switch' in pyshows sevbr />

Freeware

Debug with garbage collection 1.0

You now that there is garbage in your program but you don't know what exactly.

Freeware

Purge 1.0

This command-line program will replace the content of your files with zeros.

Freeware

Quasi-Singleton Metaclass 1.1

In effect, this script provides a pattern for a set of quasi-singletons, identified by keyword.

Freeware

Memoization with cache cleared on return 1.3

This script memoizes, but clears cache when last function call returns.

Freeware

Random Password Generation 1.0

Random Password Generation script is a code snippet to generate an 8 character alphanumeric password.

Freeware

A queue for string data 1.0

This script is a queue data structure, for string data only, which looks like a File object.

Freeware

z_delegate 1.0

This script was written to emulate a flexible version of delegates from the C# language.

Freeware

wchoice 1.0

This script returns a function having the given objects with the specified frequency distribution.

Freeware

Scheduled Queue 1.0

This script defines a scheduled queue: a queue with priorities that are scheduled.

Freeware

Storage for store information about prefixes 1.0

Storage for store information about prefixes script allows you to store information about domains determined by key prefixes.

Freeware

Discover exchange in active directory 1.1

Active directory is wordy and very detailed.

Freeware

Unique Random Numbers 1.0

This script returns a list of specified number of elements from another list such that each element in the returned list is unique and random.

Freeware

CRC64 1.0

This script implements the algorithm to compute the cyclic redundancy check that is described in the ISO 3309 standard.

Freeware

Finding the last item in a loop 1.0

Finding the last item in a loop script shows you a method to detect the last item in a loop.

Freeware

Remove duplicates from a sequence 1.0

The fastest way to remove duplicates from a sequence depends on some pretty subtle properties of the sequence elements, such as whether they're...

Freeware

A ThunkSpace for Python 1.2

This script allows normal functions to be attached to a 'ThunkSpace' which causes the function to be lazily evaluated when the thunk is referenced.

Freeware

Tuples with Named Elements via Spawning 1.1

Instead of requiring the named attributes list for each instantiation of the tuple, this implementation 'Spawns' a derived tuple class that is...

Freeware

Weighted choice 1.0

This script uses fact that any probability distributions can be sampled by computing the cumulative distribution, drawing a random number from 0 to...

Freeware

Proxy Example 1.0

Proxy Example script demonstrates how to build a proxy object.

Freeware

All base class initializers get called 1.4

This code can be used in debugging phase to notice errors sooner.

Freeware

Encrypting A String 1.0

The main purpose of these functions are to encrypt and decrypt a string (or change the string from one "language" into another).

Freeware

Picking random items from an iterator 1.0

This script allows you to choose a random object from an iterated list.

Freeware

Get attributes of an object in MS Active Directory 1.0

Sometimes it is useful to know what attributes are available to you for an object in active directory.

Freeware

Windows shortcuts import hook 1.0

This simple import hook script can resolve Windows shortcuts refering to directories.

Freeware

urrlib2 opener for SSL proxy 1.1

This small module builds an urllib2 opener that can be used to make a connection through a proxy using the http CONNECT method (that can be used to...

Freeware

Increment numbers in a string 1.0

Suppose one reference number on your invoice is "XYZ-001", then let this algorithm figure out that the next one should be "XYZ-002" or that "dsc_010.

Freeware

decorator: suppressable 1.2

This script is useful for decorating functions/methods that you'd like to disable from the main loop or commandline via optparse.

Freeware

Automatic argument type conversion 1.3

This decorator can be used to cast argument types automatically, using a pre-specified list of types, when a function is called.

Freeware

Using ADSI to change a NT password 1.0

This script gives an example on how to use Python COM to instantiate an ADSI object and change a NT user's password.

Freeware

Continuator 1.0

This script yields from a generator used inside anotherpt yieldsr.

Freeware

Generic filter logic strategy 1.0

By storing an object's data in a dictionary, you can easily create a Filter class which tests a given object against a set of nested inclusion rules.

Freeware

Merging sorted iterables 1.2

This script helps you to merge sorted iterables, preserving ordering,without consuming iterables (and computing time) unnecessarily.

Freeware

Automating simple property creation 3.0

This script provides functions for creating simple properties named 'foo' and 'bar' are created for this class.

Freeware

Basic Linear Algebra Matrix 1.1

This script defines the Matrix class, an implementation of a linear algebra matrix.

Freeware

Readable switch construction 1.7

Python's lack of a 'switch' statement has garnered much discussion and even a PEP.

Freeware

Range minima and least common ancestors 1.0

This script implements data structures for solving the following two problems: - Range minimization: given an array X of data, quickly find...

Freeware

Simple lockfile to detect previous instances 1.2

Simple lockfile to detect previous instances script implements a simple lockfile to ensure that only one instance of an application is alive at any...

Freeware

Debug statements include function name 1.0

This script allows a user to place debug messages, error messages and standard messages throughout a program.

Freeware

Grouping objects into disjoint sets 1.0

This class provides a lightweight way to group arbitrary objects together into disjoint sets when a full-blown graph data structure would be overkill.

Freeware

wx twisted support using threads 1.0

This module enables wxPython and twisted to peacefully co-exist.

Freeware

Converting windows 64 bit time 1.0

In Win32 often you'll find time stored in 100-nanosecond intervals since January 1, 1600 UTC.

Freeware

Modify class method in-place 1.0

Once in a while it becomes necessary to globally change the behaviour of classes in a third party library.

Freeware

Vector class 1.2

This vector class stores elements in a list and hence allows the 'vector' to grow dynamically.

Freeware

Getting items in batches 1.0

This script is useful when you want to get the items from a sequence (or other iterable) a batch at a time, including a short batch at the end...

Freeware

Ring List 1.0

The RingList is a class implementing a circular list.

Freeware

Associating parameters with a function 1.2

In functional programming, currying is a way to bind arguments with a function and wait for the rest of the arguments to show up later.

Freeware

Rebind class properties 1.0

Sometimes you define properties in base class and override the getter setter methods in derived classes.

Freeware

Constant Object Passing 1.0

This script shows you how to pass objects as "constant" (immutable) in python.

Freeware

Trace expressions and comments in debug mode 1.0

This script acts like a stepping debugger to diagnose and fix your programs.

Freeware

When to not just use socket.close() 1.4

This script implements a "broken" client/server to show how sock.

Freeware

Exception-based Switch-Case 1.0

This script presents you another way to emulate a switch-case statement, perhaps one you might not have thought of.

Freeware

Transfer Windows login script to Python 1.0

Transfer Windows login script to Python allows Windows administrators to use Python for their allows Wipts.

Freeware

Safe Expression Evaluation 1.2

Often, you might want to let (untrusted) users input simple Python expressions and evaluate them, but the eval-function in Python is unsafe.

Freeware

A tidy property idiom 1.4

This script suggests an idiom for property creation that avoids cluttering the class space with get/set/del methods that will not be used...

Freeware

locust_fetchmail draft 1.0

locust_fetchmail draft script is useful to fetchmail and distribute to every user.

Freeware

RegConfig 1.0

RegConfig script allows you to use the registry as a configuration file.

Freeware

Game theory payoff matrix solver 1.0

This script computes the strategy oddments for two-player zero-sum games of perfect information.

Freeware

Importing a dynamically generated module 1.0

This script will let you import a module from code that is dynamically generated.

Freeware

A numarray set complement 1.2

This script finds the complement of a set of indices from a specific arange(n) array.

Freeware

Lazy attributes 1.2

Lazy attributes script shows how to create attributes with 'computed at first use' values.

Freeware

Pinhole 1.0

Pinhole is a simple network utility that forwards a port to the host specified.

Freeware

Search for list of name server addresses 1.2

This script contains a function named RegistryResolve() that returns a list of ip numbers (dotted quads), by scouring the registry for...

Freeware

Integer set type 1.4

This script initializes an integer set.

Freeware

CookieInfo 1.2

The "CookieInfo" and "Cookie" classes provide developers with an read-only interface to the "cookies.

Freeware

Pythologic -- Prolog syntax in Python 1.0

Some of Python's powerful meta-programming features are used to enable writing Python functions which include Prolog-like statements.

Freeware

Turing Machine Simulator 1.0

Turing Machine Simulator allows an arbitrary machine to be loaded.

Freeware

Maze generator 1.0

The Maze class can create 2D mazes and return their ASCII or HTML representation.

Freeware

Call a Callback when a Tkinter.Text is Modified 1.1

This script shows you how to make use of the virtual event that determines to call your own callback.

Freeware

Coding Standard Adaptor 1.0

This script contains a function, "rename_members", which takes an object, and two strings describing variable naming conventions (e.

Freeware

Quantum Superposition 1.1

This script lets you treat  python sets.

Freeware

Find the most frequent elements 1.1

This script returns a sorted list of the most common to least common elements and their counts.

Freeware

Extensible object to XML converter 1.0

This function generates XML for any Python object through recursive functions.

Freeware

Discrete Cosine/Sine Transformations 1.0

Discrete Cosine/Sine Transformations script is a Python implementation of discrete Cosine/Sine transformations.

Freeware

Dictionary Mixin / Framework 1.1

This script makes it easy to provide a full dictionary interface to a class defining only a few mapping methods for getting, setting,...

Freeware

An interval mapping data structure 1.2

This structure is a kind of dictionary which allows you to map data intervals to values.

Freeware

Parsing the command line 1.1

The module optparse was a great addition to Python 2.

Freeware

Computing permutations with duplicates 1.2

This script handles duplicate values in a list.

Freeware

Right method names suggestion 1.2

This script uses __getattr__ to modify the error messages given when a wrong class method is called.

Freeware

A generator for any number of for loop 1.0

Python has a number of nice methods to handle 'for' loops.

Freeware

Get system/language dependent paths on windows 1.0

This module provides a few functions to retrieve the path names of some windows system directories from the registry and the environment.

Freeware

Simplified attribute accessors using overloading 1.0

This script presents an ideom for simplified accessors, that combines typical getter and setter functionality of an attribute into a single...

Freeware

Quick Test If Strings Are Identifiers 1.2

Quick Test If Strings Are Identifiers script allows you to see if a string is an identifier.

Freeware

Fast copy of an object having a slow __init__ 1.0

Special method __copy__ is the easiest way for an object to cooperate with the copy.

Freeware

Simplecom1 1.2

This script is a limited, but simple and self-contained module giving basic access to the PC Com1 port.

Freeware

Class with default method handler 1.0

This script is a class whose objects can handle undefined method calls, passing them on to a default handler.

Freeware

Null Object Design Pattern 1.0

This script is a sample implementation of the 'Null Object' design pattern.

Freeware

z_sync 1.0

This script gives access to the Sync class.

Freeware

random 3 CNF problem generator 1.0

Given the number of literals and clauses, this script returns a randomly generated 3-CNF sentence composed of clauses in the form of lists of tuples.

Freeware

Constants in Python 1.1

In Python, any variable can be re-bound at will -- and modules don't let you define special methods such as an instance's __setattr__ to stop...

Freeware

Wake On Lan 1.2

This script switches on remote computers using WOL.

Freeware

Decimal to Roman numerals 1.0

Decimal to Roman numerals script allows you to convert decimal numbers to their roman corresponding numerals.

Freeware

Network Of Linked Dictionaries 1.1

Linked dictionaries are dictionaries that can refer to other dictionaries (its bases), similar to class hierarchies, but built at runtime.

Freeware

Permutation and Combination Enumerator 1.1

These two enumerators use a linklist to imitate permutations and a binary tree to imitate combination.

Freeware

Wolfram-style cellular automata 1.1

This is a little script that uses Python to generate the cellular automata that Wolfram discusses in his book "A New Kind of Scilfram disquot;.

Freeware

A class keeps a reference to it's instance 1.1

This script implements a base class, which allows derived classes to track instances in self.

Freeware

Python portscanners 1.0

This script presents a couple of multithreaded portscanners.

Freeware

Real Mixins 1.1

This code creates real mixed-in classes: it actually merges one class into another (c-python specific), taking care of name-mangling, some...

Freeware

Parse Command Line String from CommandLine 1.2

This script represents a way to parse command line from user provided string or try to get the original Argv from Windows OS Platform.

Freeware

Hex_dump 1.0

This program will dump a file to the screen "classic" style.

Freeware

Formats current exception with stack trace 1.0

This script provides functions for formatting exceptions and stack traces so that they are guaranteed to fit in a single line and contain only...

Freeware

Function composition 1.0

This script contains two classes that show two styles of function composition.

Freeware

Standard Error Redirector 1.1

This script was designed for remotely receiving bug reports.

Freeware

Call a function/method X times per second 1.1

This simple generator function is used to call a function X times per second.

Freeware

A quick and dirty Client and Server Socket class 1.0

A quick and dirty Client and Server Socket class presents you a client-server model.

Freeware

DoDefaultMixin 1.1

This script is an alternative way to call superclass method code.

Freeware

HTTP Based Network Check for Windows boxes 1.0

This script is a demonstration of how the Python HTTP server classes can be used.

Freeware

Two-pass Pairing Heap with Auxiliary List 1.3

This script allows you to manage data collections.

Freeware

Encoding A String 1.0

The main purpose of these functions are to allow encoding a string from base 256 to a special base 255.

Freeware

Generating all strings of a given alphabet 1.1

This script shows a way to generate a list of all strings (in this case, string=list of symbols) of a given alphabet having a specified length by...

Freeware

Dijkstra's algorithm for shortest paths 1.0

This script finds the shortest paths from the start vertex to all vertices nearer than or equal to the end.

Freeware

Large File Sizes on 32 bit Windows 1.0

You can't use the os library to determine the size of large files on 32 bit Windows.

Freeware

Sample with replacement 1.0

This script allows you to take k random samples (with replacement) from a population, where k may be greater than len(population).

Freeware

Abstract methods/classes 1.1

The point is that python doesn't have a notion of abstract methods.

Freeware

Dictionary with attribute-style access 1.0

This script defines a dictionary with attribute-style access.

Freeware

Non-Linear Units 1.1

This is a simple way of expressing non-linear scales (such as decibels) in python.

Freeware

Method signature checking decorators 2.1

This script adds parameter type checking to each method or function invocation.

Freeware

Caching decorator with timeout invalidation 1.4

This script is a caching decorator that  collects garbage in a separate thread (for performance).

Freeware

Groupby for ndarrays 1.0

This script is a groupby function for arrays.

Freeware

Quick implementation of DIP (Dynamic IP) protocol 1.4

This script allows you to run a command line prototype to update a Dynamic DNS Service that accepts the GnuDIP protocol.

Freeware

Allowing the Python profiler to profile C modules 1.0

This script lets you take into account time spent in C modules when profiling your Python code.

Freeware

Prototype pattern 1.0

This script is an implementation of the prototype pattern.

Freeware

Infix operators 1.2

Python has the wonderful "in" operator and it would be nice to have additional infix operator like this.

Freeware

Combining simple and specific property creation 1.0

This script provides a function that will automate simple property creation, while allowing its users to provide specific fget/fset/fdel methods.

Freeware

xor for strings 1.0

xor for strings script demonstrates the use of simple xor for strings.

Freeware

Memento design pattern in python 1.0

Memento design pattern in python script allows you to cache instances based on what arguments are passed to them.

Freeware

URL Refresher 1.0

This script will open a certain URL approximately every 0.

Freeware

Finite State Machine (FSM) 1.0

This script shows a Finite State Machine (FSM) that can be used for small parsing tasks.

Freeware

List iterator with advance() and regress() 1.0

The basic iterator for a list doesn't allow one to skip forward (except with "continue"), or backward (at all), nor does it behave well if the...

Freeware

Keyed Dictionary 1.1

The KeyedDict object keeps a list of approved key values.

Freeware

Loop over and descend into sequences 1.0

This is a function to iterate over a container and its elements that checks for recursive traps.

Freeware

Extract a inner function from a class 1.1

This function can extract a inner function from a class or a function.

Freeware

Getting min/max in a sequence 1.0

Getting min/max in a sequence script allows you to find the min/max value in a sequence as compared to a reference.

Freeware

Simple tests using Exceptions 1.1

Exceptions provide very handy ways of performing simple tests.

Freeware

getch() 1.1

This script contains a small utility class to read single characters from standard input, on both Windows and UNIX systems.

Freeware

Method call when exit "with" statement 1.0

This script provides a context manager that allows the user to specify a method on the passed-in object to be called when the 'with' statement is...

Freeware

Data over ICMP 1.0

This script provides you a simple beta-tool that fills the DATA field of an address packet with strings, then send the packet(s) to an host...

Freeware

Simple XOR keyword Encryption 1.0

This script shows a very simple keyword encryption algorithm.

Freeware

Simple Average Calculation 1.0

This script allows you to run a simple program that can average a list of numbers.

Freeware

Getting the data dropped on a window 1.0

Using pygtk and glade you can easily write all you need to provide a log text buffer to output the data dropped.

Freeware

Refining an FTP Site List 1.2

This script introduces a pair of functions for checking whether FTP sites are up.

Freeware

Load data in browser without using temp files 1.2

This script displays the html files in the default web browser without creating a temp file.

Freeware

Missed SIGINT in multithreaded programs 1.0

Multithreaded Python programs often ignore the SIGINT generated by a Keyboard Interrupt, especially if the thread that gets the signal is waiting...

Freeware

Reduce generator 1.0

In this script the builtin function reduce is generalized to a Python 2.

Freeware

IPv4 address set type 1.4

IPv4 address set type script initializes an ip4range class.

Freeware

Format number function 1.1

For many languages it is possible to use the locale module to format numbers.

Freeware

Using wxPython with Twisted Python 1.0

When using wxPython with Twisted in the way described in the Twisted docs wxPython will be stuck on menus and modal dialogs.

Freeware

Simple UDP Multicast Client / Server using twisted 1.0

This script represents a simple example showing how to correctly use the UDP multicast functionality of twisted.

Freeware

Automatic delegation-an alternative to inheritance 1.1

Python classes cannot inherit from any type, just from other classes.

Freeware

Python symbols 1.0

Python symbols is a toy module that shows a way to define symbols inside functions, using a decorator.

Freeware

Public and protected attribute access 1.0

This script presents a way to introduce proper attribute access protection levels using a generic proxy object.

Freeware

Group and partition 1.4

This script enables the group_by functionality like the similar function existing in Ruby on Rails.

Freeware

Pystone measurement decorator 1.1

This script explains how to check that a given function does not run slower than a given pystone rate.

Freeware

Octal Encryption 1.1

This script helps you to get the octal representation of text.

Freeware

LRU cache decorator 1.1

This one-line decorator call adds caching to functions with hashable arguments and no keyword arguments.

Freeware

Simple telnet session scripting 1.1

This class supports simple scripting of a telnet session.

Freeware

Simple Singleton 1.0

This script is an implementation of the singleton without using the __new__ class but by implementing the __call__ method in the metaclass.

Freeware

Simple pattern-based string generator 1.0

This script allows you to generate all the string described by a pattern passed on the command-line.

Freeware

Qt Twisted (threadedselectreactor) 1.0

This script integrates Qt using the threadedselectreactor.

Freeware

A fast prime number list generator 1.4

This is a fast prime number list generator using sieve algorithm.

Freeware

How to implement state-dependent behavior 1.2

An object in a program frequently has an internal "state", and the behavior of the object needs to change when its state changes.

Freeware

Curried functions 1.0

This script is a class to allow programmers to curry functions, so that arguments can be supplied one at a time instead of all at once.

Freeware

Generating combinations of objects 1.0

This script takes multiple sequences and creates a list in which each item is constructed from items from each input sequence, and all...

Freeware

Disk Dumper 1.0

This script will display a hex dump of the disk specified on the command line.

Freeware

ObjectMerger 1.1

The ObjectMerger class dynamically merges two given objects, making one a subclass of the other.

Freeware

Randomized integer range iterator 1.0

Randomized integer range iterator script iterates over all values of a range in random order.

Freeware

Intersection and union of varied form tuples/lists 1.0

This script implements two methods to return the intersection/union of sets of data, where the form of the data is not a limiting factor.

Freeware

Caching and aliasing with descriptors 1.0

This script contains a few simple descriptor classes to compute and cache attribute value on demand and to define attribute as alias to other.

Freeware

Memory usage 1.0

Memory usage script provides a number of functions to get the memory usage of a Python application on Linux.

Freeware

Implementing "Future"s with decorators 1.0

This script shows you how to kick off a slow process without waiting around for the result.

Freeware

Observer Pattern 1.1

This is a Python implementation of the observer pattern.

Freeware

A simple date class 1.0

This script can be used by anyone who wants a date object for a program.

Freeware

Decorator for main method 1.0

Decorator for main method script shows how to do the same thing with a decorator that makes the code much cleaner.

Freeware

Eight Queens using Generator 1.0

This script allows you to solve the classic algorithmic problem - place 8 queens on a chess board so that none is attacked by another.

Freeware

Templated Inheritance in Python 1.0

This script demonstrates a C -like template based inheritance implementation in Python.

Freeware

More accurate sum 1.2

Built-in "sum" function, as well as add.

Freeware

Creating a share on windows 1.0

This script is an example of how one would use python's win32net module to create a share on windows.

Freeware

Manipulating infinite lists 1.1

This script contains some useful functions which work on infinite lists, including generalized versions of map, filter, zip on gLists.

Freeware

Flexible enumerate() 1.1

Flexible enumerate() script adds an additional start argument to the built-in enumerate function.

Freeware

HLLAPI interface 1.2

This program interfaces the 3270 HLLAPI library of an Italian 3270 emulator using the ctypes library.

Freeware

Win32 service administration 1.1

This script provides some packaging for the win32serviceutil module to simplify starting and stopping services.

Freeware

Create an account in MS active directory 1.0

This script contains the basic code to create an account in active directory that shows how to do things like set your own exension...

Freeware

Restrictive APIs for Python 1.0

Python has no inherent provision for a restrictive API that blocks accesses to methods and variables outside an allowed set.

Freeware

Simple multiline interactive interpreter 1.0

This script is a simple embedded multiline python interpreter built around raw_input().

Freeware

Criteria-based cascading priority queue 1.0

This module provides a simple criteria-based priority queue with "priority cascading".

Freeware

Factorial 1.2

This code gets factorial of a number and for negative numbers returns 1.

Freeware

Options management 1.0

The goal of this script is to help the use of classes that need a great number of options in constructor for configuration.

Freeware

Iterator Utilities 1.1

This script includes a collection of small utility functions for iterators (all functions can also be used with normal sequences).

Freeware

RICHVALUE 1.2

While evolving code, there is often a need to enrich an existing simple return scheme of a function by extra/optional return values.

Freeware

Transactionable Objects 1.0

This simple class allows sub-classes to commit changes to an instance to a history, and rollback to previous states.

Freeware

Constructor and Destructor Chaining 1.0

Constructor and Destructor Chaining script combines a constructor and destructor call during object creation/despt combin

Freeware

Memoize Decorator with Timeout 1.4

This simple decorator is different to other memoize decorators in that it will only cache results for a period of time.

Freeware

Length-limited O(1) LRU Cache implementation 1.2

Length-limited O(1) LRU Cache implementation script is an implementation of a length-limited O(1ion scripue.

Freeware

RPN Stack class 1.1

This is an example of how to write a stack and then employ that stack to have a stack for use in an RPN calculator.

Freeware

Functional dictionary and list types 1.8

The purpose of this module is to provide a dictionary and list type that can aid in relational algebra, functional programming, list-oriented...

Freeware

base64 encoding prototype 1.0

This script takes a decimal number, converts it into binary, takes the first six numbers in that, converts that into a decimal number, and from...

Freeware

Fast select 1.0

This script allows you to quickly select the n-th rank ordered element of a given sequence.

Freeware

Sinus Plasma 1.0

This script performs an old-school demo effect, using sine wave interference patterns.

Freeware

First Class Enums in Python 1.6

This script allows you to do true immutable symbolic enumeration with qualified value access.

Freeware

Changing a closed-over value 1.0

In most languages with closures, it is possible to change a closed-over value and have the change visible in other closures which share a reference...

Freeware

Simple Collection class 1.0

This script deals with a collection groups a set of objects together and forwards attribute lookups to all elements of the collection that...

Freeware

List Tools 1.0

This script presents you a collection of some useful list-related functions.

Freeware

Terminating a subprocess on Windows 1.0

The new subprocess module in Python 2.

Freeware

Named Tuples 1.9

This script allows you a fast, lightweight attribute-style access to tuples.

Freeware

Win32com - Batch repathing of Autocad Xrefs 1.0

This script asks for a base directory and then changes all xrefs in all drawings in all subdirectories so that they use relative paths.

Freeware