Programming Methods & Algorithms Python scripts - Top 4 Download

Programming Methods & Algorithms Python script downloads

Missed SIGINT in multithreaded programs

Multithreaded Python programs often ignore the SIGINT generated by a Keyboard Interrupt, especially if the thread that gets the signal is waiting or sleeping. This module provides a workaround by forking a child process that executes the rest of the program while the parent process waits for signals and kills the ...
Python

Pipe convenience function for doing pipes

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

kexec the newest linux kernel

Kexec is a mechanism to use linux itself to load a new kernel without going through the BIOS thus minimizing down time. This script kexecs the newest kernel on the system managed by rpm (assumes a Redhat like system). ...
Python

Getting SYSTEM environment variable under Windows

This script allows you to get SYSTEM environment value, as if running under Service or SYSTEM account.As you can see in Windows Control Panel 'System' applet there are two groups of environment variables: USER and SYSTEM. This script presents a function for retrieve SYSTEM variable value.  ...
Python

pkgconfig parser

This script creates a class to allow access to variables stored in pkg-config files ( or '.pc' files ). This is usefull in conjunction with distutils to get correct information for compiling external C/C modules. Variable substitution is performed with string.Template. ...
Python

Tracking file requests in web server access logs

This script helps you to find out how often and by who a particular file is being requested. It prints the requesting addresses, hostnames, access times, and hit counts. ...
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

First Class Enums in Python

This script allows you to do true immutable symbolic enumeration with qualified value access. Most propoqualifiedor an enum in python attempt to solve the issue with a single class. However, fact is that enum has a dual nature: It declares a new anonimous type *and* all possible instances (values) of that ...
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

List and dictionary observer

This script implements an observer pattern for dictionaries and lists. It does not support a one-many relation. The observer is sent enough information so that the change can be undone. ...
Python

get date wrapper to datetime module

The datetime module only accepts inputs of time it understands. For example, the months given to it have to be in range of values 1-12. This wrapper works around that issue and enables you to move forward or backward more arbitrary units of time. It does that by changing the year, ...
Python

Simple lockfile to detect previous instances

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

Logging to a Jabber account

This script contains a handler class which sends a Jabber message for each logging event. If you have long-running scripts on many remote machines and you want to be alarmed if one of them crashes, use the JabberHandler to log it to your account. ...
Python

Finding the value passed to a function by name

Sometimes inside a decorator that creates a function with a generic (*args, **kwargs) signature, you want to access a value passed for a particular parameter name to a wrapped function, but don't know whether that value will be passed as a positional or keyword argument, or whether the wrapped function defines ...
Python

Tabify

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

Using eval To Transform Symbolic Expressions

Using eval() To Transform Symbolic Expressions script allows you to convert simple arithmetic expressions from infix to to converorm. ...
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

split and join

This script will split a file into several smaller files while at the same time hiding the original formatting of the file. The program has a primitive GUI design, allowing a small amount of interaction with the program. ...
Python

Simple multiline interactive interpreter

This script is a simple embedded multiline python interpreter built around raw_input(). It interrupts the control flow at any given location with 'exec prompt' and gives control to the user. Allways runs in the current scope and can even be started from the pdb prompt in debugging mode.It was tested with python, jython ...
Python

Reloading all modules

When you create a Python module, you can use a test script wich import your module. But you probably have noticed that when you run the test script, it always use the first version of your module even if you made changes in the code.This is because the import statement check ...
Python