python extension module
Python chess module 1.0.2a
Python chess module project is a Python chess move adjudicator module. more>>
Python chess module does not know how to play chess, but does understand the rules enough that it can watch moves and verify that they are correct.
It features high abstraction, understands various notations (including algebraic, long algebraic, and standard algebraic notation), does disambiguation, and supports saving and loading the state of a game.
Main features:
- high abstraction
- understands various notations, including algebraic, long algebraic, and standard algebraic notation (as in PGN); does disambiguation
- supports saving and loading of the state of a game
- not a trivial move processor; understands the intracies of the game
Enhancements:
- Bug with en passant moves fixed.
Python config module 0.3.6
Python config module is a hierarchical, easy-to-use, powerful configuration module for Python. more>>
It interfaces easily with environment variables and command line options. Python config module has been developed on Python 2.3, but should work on version 2.2 or greater.
Usage
The simplest scenario is, of course, "Hello, world". Lets look at a very simple configuration file simple.cfg where a message to be printed is configured:
# The message to print (this is a comment)
message: Hello, world!
and the program which uses it:
from config import Config
# You can pass any file-like object; if it has a name attribute,
# that name is used when file format error messages are printed
f = file(simple.cfg)
cfg = Config(f)
print cfg.message
which results in the expected:
Hello, world!
A configuration file is, at the top level, a list of key-value pairs. Each value, as well see later, can be a sequence or a mapping, and these can be nested without any practical limit.
In addition to attribute access (cfg.message in the example above), you can also access a value in the configuration using the getByPath method of a configuration: cfg.getByPath(message) would be equivalent. The parameter passed to getByPath is the path of the required value. The getByPath method is useful for when the path is variable. It could even be read from a configuration.
There is also a get method which acts like the dictionary method of the same name - you can pass a default value which is returned if the value is not found in the configuration. The get method works with dictionary keys or attribute names, rather than paths. Hence, you may call cfg.getByPath(a.b) which is equivalent to cfg.a.b, or you can call cfg.a.get(b, 1234) which will return cfg.a.b if it is defined, and 1234 otherwise.
Enhancements:
- This release makes classes derive from an object (previously, they were old-style classes).
- ConfigMerger has been changed to use a more flexible merge strategy.
- Multi-line strings (using """ or ) are now supported.
- A typo involving raising a ConfigError was fixed.
Python Remote Call Module 0.0.3
Python Remote Call Module allows to transparently work with remote object in a python program. more>>
To make this possible a kind of peer-to-peer design is used. Servers can be created explictly, as can clients by explicitly connecting to a server. If a client needs to have a server, e.g. so a reference to a local object can be passed to a remote destination, it is instantiated as needed.
Clients can have multiple connections. New connections are created when needed, e.g. when a remote reference to a new server is recieved.
WARNING:
This module is still in its experimental phase, so it is kind of usable, but an awful lot of bugs is still in it, and quite a few parts are not coded yet, others arent even designed yet.
Therefor lots of changes and outdated documentation should be expected.
Enhancements:
- All previous stub objects have been replaced by a single stub object which uses on-demand retrieval of attributes of remote objects.
- This way, the behavior of the stub object is much more flexible and smoother.
- A first draft of an authentication framework has been implemented so PyRCall can support many different authentication methods.
- Support for username/password-based authentication has been implemented.
Python logging module 0.4.9.5
Python logging module is a logging module for Python for use with Python 1.5.2 through 2.2.x. more>>
As this package is included in versions 2.3 and later, only users of earlier versions of Python would need to install this module.
There was a need for a standard logging system in Python, as comprehensively documented in PEP 282 and enthusiastically endorsed by the BDFL in the Parade of the PEPs.
By a happy coincidence, the package described here was already in development and fairly close in intent and design to the description in the aforementioned PEP, borrowing as it did heavily from JSR-47 (now JDK 1.4s java.util.logging package) and log4j.
This page describes it in more detail. As I have tweaked the package to meet comments on PEP 282, I have structured this page in the same way as the original PEP.
This package is now part of Python 2.3, but if you have an earlier version of Python, you can download the package from here and use it with Python versions between 1.5.2 and 2.2.x.
Simple Python Fixed-Point Module 0.5
Simple Python Fixed-Point Module is a Python module which provides basic facilities for manipulating (binary) fixed-point number more>>
The number of fractional binary digits is tunable, allowing near-arbitrary precision arithmetic. Arithmetic and mathematical functions such as sqrt, exp, log, sin, and cos are available
Enhancements:
- Inverse sin/cosine routines were improved. Inheritance-based typing was replaced by duck-typing.
Python XHTML 0.4.1
Python XHTML is a simple Python module for the generation of valid XHTML. more>>
ToDo:
* include tests for all methods in xhtml_test.py
* ensure that all text that is added to the document is xml safe
* include methods for added w3.org validation link buttons
* complete support for XHTML 1.1 specification
Python lambda calculus module 1.0
Python lambda calculus module project is a simple but full-featured module for exploring lambda calculus. more>>
It understands the different types of lambda expressions, can extract lists of variables (both free and bound) and subterms, and can simplify complicated expressions by means of application.
Notations for lambda expressions vary slightly, so it is instructive to detail the precise notation used by this module. A variable is expressed with a string of alphanumeric characters, e.g., x or abc1.
Enhancements:
- Initial release.
Python OpenID 1.1.1
Python OpenID is a set of Python packages that support use of the OpenID decentralized identity system. more>>
Python OpenID can be used to enable single sign-on for your Web sites or for running an OpenID server. Example code is supplied and a variety of storage back-ends are supported.
Main features:
- Refined and easy-to-use API.
- Extensive documentation.
- Many storage implemetations including file-based, SQL, and memcached.
- Simple examples to help you get started.
- Licensed under the LGPL.
Enhancements:
- This release includes support for Yadis discovery of OpenID servers and OpenID extensions.
Python in Scheme 0.1
Python in Scheme is a scheme library that allows you to run Python code within Scheme. more>>
Python in Scheme project uses the Python/C API to embed a Python interpreter.
Python-SIP 4.7
Python-SIP is a tool to generate Python bindings from C++ code. more>>
SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries. Python-SIP was originally developed to create PyQt, the Python bindings for the Qt toolkit, but can be used to create bindings for any C or C++ library.
SIP comprises a code generator and a Python module. The code generator processes a set of specification files and generates C or C++ code which is then compiled to create the bindings extension module. The SIP Python module provides support functions to the automatically generated code.
The specification files contains a description of the interface of the C or C++ library, i.e. the classes, methods, functions and variables. The format of a specification file is almost identical to a C or C++ header file, so much so that the easiest way of creating a specification file is to edit the corresponding header file.
SIP makes it easy to exploit existing C or C++ libraries in a productive interpretive programming environment. SIP also makes it easy to take a Python application (maybe a prototype) and selectively implement parts of the application (maybe for performance reasons) in C or C++.
Enhancements:
- This release adds support for consolidated and composite modules.
- It adds support for pickling classes and enums.
Python milter 0.8.7
The milter module for Python provides a python interface to Sendmails libmilter that exploits all its features. more>>
The milter can even run with a different operating system or processor than sendmail. Sendmail talks to the milter via a local or internet socket, and keeps the milter informed of events as it processes a mail connection.
At any point, the milter can cut the conversation short by telling sendmail to ACCEPT, REJECT, or DISCARD the message. After receiving a complete message from sendmail, the milter can again REJECT or DISCARD it, but it can also ACCEPT it with changes to the headers or body.
Enhancements:
- The spf module has been moved to the pyspf package.
- This will cause some confusion when upgrading, since 0.8.6 still has the module and will conflict with pyspf, whereas 0.8.7 does not have spf by itself, and will stop doing SPF if you dont install pyspf.
Wikipedia Lookup Extension 0.3.2
Lookups up the selected word in the Wikipedia encyclopedia. more>> Wikipedia Lookup Extension 0.3.2 is a powerful tool that makes it quick and easy to look up the selected word in the Wikipedia encyclopedia.<<less
Python commandsplus 0.2.3
Python commandsplus is a Python module that complements the existing commands module with an extra function. more>>
Python commandsplus also includes a useful function that protects a command line argument from shell metacharacters.
python-money 0.1
python-money provides carefully designed basic Python primitives for working with money and currencies. more>>
python-money 0.1 provides another extremely useful utility for people who have to work a lot with currencies. It actually offers carefully designed basic Python primitives for this process.
The primary objectives of this module is to aid in the development of financial applications by increasing testability and reusability, reducing code duplication and reducing the risk of defects occurring in the code.
The module defines two basic Python classes -- a Currency class and a Money class. It also pre-defines all the world's currencies, according to the ISO 4217 standard. The classes define some basic operations for working with money, overriding Python's addition, substraction, multiplication, etc. in order to account for working with money in different currencies. They also define currency-aware comparison operators. To avoid floating point precision errors in monetary calculations, the module uses Python's Decimal type exclusively.
The design of the module is based on the Money enterprise design pattern, as described in Martin Fowler's "Patterns of Enterprise Application Architecture". This project also contains Django helper classes for easy integration with python-money.
Major Features:
- Offers testability and reusability, reducing code duplication and reducing the risk of defects occurring in the code
- Defines a currency class and a money class
- Uses Python's Decimal type exclusively to avoid floating point precision errors
- The design of the module is based on the Money enterprise design pattern
- Contains Django helper classes
DNSMasq Webmin Module 0.9
DNSMasq Webmin Module is a Webmin module to allow configuration of DNSMasq, a DNS proxy and DHCP server. more>>