Sometimes it is useful to know what attributes are available to you for an object in active directory. You cannot ask the object directly for that, instead you need to use the schema of the object. All of this is done with python's COM support using win32com. By default only attributes ...
Visual Studio can be configured to invoke a Python script during your build process. If you need to do this, you'll likely want to report errors and warnings in a way that Visual Studio will understand. This script uses the standard Python warnings framework, and installs a custom warning message formatter that ...
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. E.g., if F = Curry(lambda a,b: a b), then F(1,2) == F(1)(2). ...
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 ...
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). ...
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. ...
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. ...
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. ...
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. ...
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 ...
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. ...
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. ...
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, ...
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. ...
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. ...
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 ...