python code
Python rope 0.6.1
Python rope is a Python IDE. more>>
Refactoring: In recent years refactoring has become a basic task of everyday programing, specially in java community. In the agile programing methodologies, like Extreme Programing, Refactoring is one of the core practices.
Some IDEs support some basic refactorings like PyDev (which uses bicycle repair man). These IDEs have a limited set of refactorings and fail when doing refactorings that need to know the type of objects in the source code (specially for relatively large projects). rope tries to provide a rich set of refactorings. Some of the refactorings require type inferencing which is described later.
Auto Completion: One of the basic features of modern IDEs is the availability of auto-completion. Some Python IDEs have auto-completion support but in a limited form. Since the type of many variables cannot be deduced from simple analysis of the source code. Auto-completing modules names, class names, static methods, class methods, function names and variable names are easy. But auto-completing the methods and attributes of an object is hard. Because the IDE needs to know the type of the object that cannot be achieved easily most of the time in dynamic languages. rope uses Type Inferencing algorithms to solve this problem.
Type Inferencing: One disadvantage of dynamic languages like python is that you cannot know the type of variables by a simple analysis of program source code most of the time. Knowing the type of variables is very essential for providing many of the refactorings and auto-completions. rope will use type inferencing to overcome this problem.
Static type inferencing uses program source code to guess the type of objects. But type inferencing python programs is very hard. There have been some attempts though not very successful (examples: psycho: only str and int types, StarKiller: wasnt released and ShedSkin: good but limited). They where mostly directed at speeding up python programs by transforming its code to other typed languages rather than building IDEs. Such algorithms might be helpful.
There is another approach toward type inferencing. That is the analysis of running programs. This dynamic approach records the types variables are assigned to during the program execution. Although this approach is a lot easier to implement than the alternative, it is limited. Only the parts of the program that are executed are analyzed. If developers write unit tests and use test driven development this approach works very well.
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-dime 0.1
python-dime project provides a way to parse and generate DIME messages. more>>
Direct Internet Message Encapsulation (DIME) is a binary message format that can be used to encapsulate multiple payloads into a single message.
Python 2.5.1
Python is a high-level scripting language. more>>
Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface.
The Python implementation is portable: it runs on many brands of UNIX, on Windows, OS/2, Mac, Amiga, and many other platforms. If your favorite system isnt listed here, it may still be supported, if theres a C compiler for it.
The Python implementation is copyrighted but freely usable and distributable, even for commercial use.
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.
Pythons simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
Often, programmers fall in love with Python because of the increased productivity it provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error, it raises an exception.
When the program doesnt catch the exception, the interpreter prints a stack trace. A source level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so on.
The debugger is written in Python itself, testifying to Pythons introspective power. On the other hand, often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.
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-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
Python CD 2004-07-02
Python CD is a bootable CD based on Debian GNU/Linux and KNOPPIX. more>>
The special thing about it is that it has lots of Python stuff!
Installable Python packages
In the top level directory of the CD is a directory python/, containing several packages of Python:
- Python for Linux - most Linux distributions include Python, so we dont provide it for them
- Python for Mac OS X
- Python for Windows, win32all extension
- Python for DOS - no maintainer yet, so we only provide an URL
- Python source code, if you want to compile it yourself
Ready-to-Use Python
On the bootable Linux system, Python is already installed and ready to run:
- Python 2.3.4 (latest and greatest, use this!)
- Python 2.2.3
- Python 2.1.3
Python CD Packages
Here is an overview of popular packages installed on the PythonCd.
PythonCdRawPackageList has a complete raw list of installed debian packages.
IDEs (Integrated Development Environments)
- eric3 - a very nice and powerful GUI IDE
- IDLE - a simpler, but also popular GUI IDE
- DrPython - another GUI IDE
- IPython - an extended interactive Python command interpreter
GUI Builders
- BoaConstructor
- PythonCard
- ? WxGlade
GUI Toolkit bindings
- PyGtk
- PyQt
- WxPython
Graphics libs
- PIL
- PyGame
- PyOpenGL
Web/HTML/XML stuff
- MoinMoin wiki - you are using it right now
- TwistedMatrix AKA Twisted - a Python internet framework, very powerful
- Quixote
- PyXML, libxml2 and other XML packages
Scientific
- python-numeric and python-numarray - math extensions
- python-pyx - module for generating PostScript graphics, plotting
Database
- Gadfly
- python-mysqldb - interface for MySQL
- python-pgsql - DB-API 2.0 interface to PostgreSQL v7.x
- python-pygresql - PostgreSQL module
Misc
- PyChecker - checks your source code for common errors"
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 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.
Gst-Python 0.10.6
Gst-Python provides Python bindings for the GStreamer project. more>>
python-gammu 0.21
python-gammu are Python bindings for Gammu library. more>>
CORBA-Python 0.30
CORBA-Python is a package supplies the following tools : idl2py : IDL compiler to Python. more>>
idl2pyemb : IDL compiler to Python embedded with C idl2pyext : IDL compiler to Python extension with C idl2pycli : RPC-GIOP client stub generator idl2pysrv : RPC-GIOP server skeleton generator
Python-LDAP 2.3.1
Python-LDAP provides an object-oriented API to access LDAP directory servers from Python programs. more>>
Additionally the package contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, etc.).

Pydiction 1.1
Pydiction offers you a powerful and very useful utility which allows you to Tab-complete Python code in Vim, including: standard, custom and third-party modules and packages. more>>
Pydiction 1.1 offers you a powerful and very useful utility which allows you to Tab-complete Python code in Vim, including: standard, custom and third-party modules and packages. Plus keywords, built-ins, and string literals. It consists of three main files:
- python_pydiction.vim -- The Vim plugin that creates the Tab-completion functionality for Python files.
- complete-dict -- A Vim dictionary file that contains Python keywords and module structure. This is what the plugin looks at to know which things are completable.
- pydiction.py -- (Optional) Python script used to generate the dictionary. You can optionally run this script to add more modules to complete.
Major Features:
- Pydiction can complete Python's keywords, built-in functions, and string literals, as well as standard, custom and third-party package and module names and their attributes and methods. It can also complete fully-qualified names such as "module.submodule.method", as well as non-fully qualified names such as simply "method".
- Pydiction uses the Tab key to do completion, rather than inefficient Ctrl key combinations and the like.
- Unlike omni-completion, Pydiction works with more than just imported modules. For example you can complete Python built-in functions and keywords, such as "print", "raw_input", and so on.
- Pydiction doesn't require Python support to be compiled into your version of Vim, nor do you need to have Python installed on the machine you use it from (unless you want to use pydiction.py)
- Using a special dictionary file to complete from, Pydiction doesn't pollute any other menus that you you may be using for other types of completion, such as omni-completion or ins-completion.
- Since Pydiction uses a dictionary of possible completion items, it can complete 3rd-party modules much more accurately, and quickly, than other ways. And you have full control over what can and cannot complete. If it's unable to complete anything, you can either use pydiction.py--to automatically add a new module's contents to the dictionary-- or you can manually add them using a text editor. The dictionary is just a plain text file, which also makes it portable across all platforms.
- Also because Pydiction uses a dictionary file, you don't have to import a module before you can complete it, nor do you even have to have the module installed on your machine. This makes completion faster than omni-completion since it doesn't need to do any type deducing.
- Pydiction only attempts to complete while editing Python files.
- You can still use omni-completion, and other forms of completion, with Pydiction. In fact, they can all make a great team.
- Pydiction knows when you're completing a callable method or not and, if you are, it will automatically insert an opening parentheses.
- The Tab key will work as normal for everything else. Pydiction will only try to use the Tab key to complete Python code if you're editing a Python file and you first type part of some Python module or keyword.
- Pydiction is far form perfect, but it was created because none of the other forms of Python completion for Vim were perfect either. There is a new project underway called PySmell that also looks promising. Keep in mind that Pydiction was originally started in 2003 and back then there wasn't really anything else.
Enhancements:
- Added quoted string method completion
- ZSI Web Services module completion
- Fixed a bug with the -v option.
Pydiction is a perfect and extremely useful utility which can let you Tab-complete Python code in Vim, including: standard, custom and third-party modules and packages. Pydiction 1.0 - RyanLicense:GPL
Python Web Objects 1.3
Python Web Objects is a dynamic page generation system that allows the developer to embed Python code inside HTML. more>>
Download the latest version, then read the documentation. If youre into antiques, you can always browse the archives, but theres no reason to use an old version.
To install PWO, first decompress the tarball you downloaded.
$ gunzip pwo-0.XX.tar.gz
$ tar xvf pwo-0.XX.tar
Then, copy the pwo.py module into some location in your PYTHONPATH. The proper location is usually /usr/local/lib/python2.x/site-packages/
$ cp pwo-0.XX/pwo.py /usr/local/lib/python2.2/site-packages/
PWO should now be ready to use.
To configure a directory to make PWO pages, you first need to make sure that the directory is visible on the web. Ask your friendly Apache sysadmin if you dont know what this means. In this document, the path youll be keeping your .pwo files in is called /path/to/pwodir/, and its corresponding URL is http://yourserver/url/to/pwodir/.
Let Apache and mod_python know that the pwo.py will be handling requests to .pwo files in that directory. Do this by adding a few lines to our entry in your httpd.conf file.
AddHandler python-program .pwo
PythonHandler pwo
PythonDebug On
The PythonDebug directive is optional, but you will most likely want it enabled while you are developing. It will make exceptions print tracebacks to the browser in plain-text format. For security reasons, you should comment it out on production systems.
Now a file /path/to/pwodir/some_file.pwo will generate its page at http://yourserver/url/to/pwodir/some_file.pwo. Try copying a simple one of the included samples, like hello.pwo, to this directory to test your installation.
If youve never used PWO before, learn the syntax, and/or check out some sample pages.