Miscellaneous Modules

The modules in this category are used for miscellaneous tasks that don’t fit into any of the other categories.

bisect

The bisect module provides support for keeping lists in sorted order. It uses a bisection algorithm to do most of its work.

						bisect(list,
						item
						[,
						low
						[,
						high]])
					

Returns the index of the proper insertion point for item to be placed in list in order to maintain list in sorted order. low and high are indices specifying a subset of the list to be considered.

						insort(list,
						item
						[,
						low
						[,
						high]])
					

Inserts item into list in sorted order.

cmd

The cmd module provides a class Cmd that’s used as a framework for building a line-oriented command interpreter. The Cmd class is never instantiated directly, but is used ...

Get Python Essential Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.