Programming Methods & Algorithms Python scripts - Top 4 Download

Programming Methods & Algorithms Python script downloads

Dictionary Mixin Framework

This script makes it easy to provide a full dictionary interface to a class defining only a few mapping methods for getting, setting, deleting, and listing keys. Also, a function is provided to incorporate the mixin at runtime so that code for existing modules need not be modified.By usmodules nixin as a superclass, ...
Python

Dictionary tool for lazy typers

This script provides an alternative way of generating and updating dictionaries. It saves couple of keystrokes, making routine dict operations easier. ...
Python

Dictionary Tools

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

Dicts from lists

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

Disk Dumper

This script will display a hex dump of the disk specified on the command line. As the last two arguments, the program takes the first sector and last sector that should be displayed by this utility. The size of the sectors is stored in a variable created right after the imports ...
Python

Docstring coverage

This script is a tool to examine lack of docstrings in a module. It prints a rundown of the classes, functions, and methods in the given module that have not been given a docstring. ...
Python

Drawing inheritance diagrams with Dot

Dot is a very nice graph description language developed at MIT. Combined with Python, it makes an ideal tool to automatically generate diagrams. This script produces beautiful inheritance diagrams for Python classes (and metaclasses too). In particular the recipe allows to display the MRO (Method Resolution Order) for complicate inheritance hierarchies. ...
Python

Easily call executables from Python

One common aspect of programming is calling executables and processing results. It is not as easy or elegant to do this in Python as it is in a shell scripting language, such as bash. This script implements a shell-like module in Python which allows you to easily call executables and work ...
Python

Easy binary2decimal and decimal2binary

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

Encoding A String

The main purpose of these functions are to allow encoding a string from base 256 to a special base 255. The function view the strings as numbers and simply change what base they are written in. This is not recommended for very long strings; otherwise, the encoding and decoding process can ...
Python

Encrypting A String

The main purpose of these functions are to encrypt and decrypt a string (or change the string from one "language" into another). The code is simple, but it provides a simple solution to a well-known encryption scheme. As a recommendation, this may be better when used in conjunction with an encoding ...
Python

Ensuring a name definition in a module namespace

This script ensures that a name exists in a target namespace. If it does not, make it available in the target namespace using the given definition. The target should be a namespace dictionary (presumably for a module, see the discussion below otherwise). The default target is __builtins__ (specificially, __builtins__.__dict__). ...
Python

Evaluate upper letters variable name as constants

This code converts variables which is made with upper-leters only, into constants at compile time, if it is possible to be replaced. and generate .pyc file. This script is oriented to the compile time evaluation decreasing, the feature of Constants. ...
Python

Example For winreg

This script is an example of how to use the winreg module. The code had the first purpose of demonstrating the concept of a graphical shell built in Python. The shell was easily modified to make use of the Window's registry but retains traces of its original method of operation. ...
Python

Exception based Switch Case

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

Extending Classes

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

Extending the logging module

This script helps you in adding new format specifiers to the logging module. In this example, it's for the user name and the name of the function that logged the message. ...
Python

Extensible object to XML converter

This function generates XML for any Python object through recursive functions. It is easy to add specific handlers for your own object types for more complex output options. ...
Python

Extract a inner function from a class

This function can extract a inner function from a class or a function. It may be useful when writing a unit test code. ...
Python

Factory pattern

In the factory pattern script you have an object that creates other objects.Factory is useful to separate implementation from interface. It adds a new indirection layer. When you want to instanciate an object you call its factory and the factory creates the instance. ...
Python