Albatross is a small toolkit for developing highly stateful web
The toolkit has been designed to take a lot of the pain out of
constructing intranet applications although you can also use Albatross
for deploying publicly accessed web applications.
In slightly more than 2600 lines of Python (according to pycount) you
get the following:
* An extensible HTML templating system similar to DTML including tags for:
- Conditional processing.
- Macro definition and expansion.
- Sequence iteration and pagination.
- Tree browsing.
- Lookup tables to translate Python values to arbitrary template
* Application classes which offer the following features:
- Optional server side or browser side sessions.
- The ability to place Python code for each page in a dynamically
loaded module, or to place all page processing code in a single
* The ability to deploy applications either as CGI or via mod_python
by changing less than 10 lines of code.
The toolkit application functionality is defined by a collection of
fine grained mixin classes. Nine different application types and five
different execution contexts are prepackaged, you are able to define
your own drop in replacements for any of the mixins to alter any
aspect of the toolkit semantics.
Application deployment is controlled by your choice of either cgi or
mod_python Request class. It should be possible to develop a Request
class for FastCGI or Medusa to allow applications to be deployed on
those platforms with minimal changes.
Albatross comes with over 130 pages of documentation. HTML, PDF and
PostScript formatted documentation is available from the toolkit
The toolkit homepage:
The Albatross mailing list subscription and archives:
* Prevent variables starting with an underscore from being merged into
the context local namespace from request objects. This prevents
attackers spoofing variables such as __page__, and any user
variables such as authentication data.
* Updated documentation to explain underscore prefixed names in
execution context are protected from browser modification.
* Applied bugfix from Detlef Lannert - null attributes would raise a
TypeError (for example: <al-img expr="..." alt="">). Once fixed,
this exposed another bug where an attribute with a null value would
lose it's value altogether (XHTML requires attributes to have a
value, null or otherwise).
* Exception text is now escaped before being sent to browser.
* The PageModuleMixin does not reload a page module if was previously
loaded by unpickling the session. This is to avoid a problem with
new code in the Python 2.2 pickle/cPickle module which causes the
following to fail.
import pickle, copy
o = copy._EmptyClass()
* Pickling errors are now trapped by looking for the PickleError
* Bug prevented nameexpr from being used in <al-textarea> and
* Radio input was converting "value_attr" to str(), but not "value",
which was causing the "checked" test to fail if value was anything
but a string. Also changed checkbox input to convert both to
strings before doing the comparison.
This is Kaa 0.8, a weblogging tool written in Python. Some data:
- it's client-based
- based on Gadfly database
- aimed at (Python) programmers (although anybody can use it)
- uses Python 2.2 (but older versions may work as well)
- released under the GPL
What can it do?
- one-click publishing: save, post, publish
- create archives per day, week, month, entry, N days, N entries
- use categories; archive per category
- use embedded Python code in templates and entries
- simple HTML macro system (more to come)
- generate custom pages (experimental)
- define your own buttons for common text editing features
So, what's the catch?
This is a 0.x version and can hardly be called "stable". Kaa works, in fact, I
write my own weblog with it, but there may be hidden bugs, and many things may
change at will in future versions. In other words, feel free to use it, but be
aware that this is not a finished product.
I'd like to receive comments, tips, bug reports, patches, ideas, etc. What
features would you like to see in a weblogging tool? What can be improved? How
can I make it more user-friendly? Etc.
Download the latest version at
# decode for email address ;-)
The Pythonic Quarter:: http://www.awaretek.com/nowak/
Announce: pyPgSQL - Version 2.3 beta 1 is released.
pyPgSQL v2.3 beta 1 has been released.
It is available at http://pypgsql.sourceforge.net.
pyPgSQL is a package of two (2) modules that provide a Python DB-API 2.0
compliant interface to PostgreSQL databases. The first module, libpq, is
written in C and exports the PostgreSQL C API to Python. The second module,
PgSQL, provides the DB-API 2.0 compliant interface and support for various
PostgreSQL data types, such as INT8, NUMERIC, MONEY, BOOL, ARRAYS, etc. This
module is written in Python and works with PostgreSQL 7.0 or later and Python
2.0 or later.
It was tested with PostgreSQL 7.0.3, 7.1.3, 7.2.2, 7.3 beta 2, Python 2.0.1,
2.1.3 and 2.2.2.
Note: It is highly recommended that you use PostgreSQL 7.1 or later and Python
2.1 or later. If you want to use PostgreSQL Large Objects under Python 2.2.x,
you *must* use Python 2.2.2, because of a bug in earlier 2.2 versions.
This is the first time we release a beta of pyPgSQL. While there didn't change
much under the hood, the build process was completely rewritten, so pyPgSQL
should now build out of the box on most popular platforms. For you, this means
that a "python setup.py build" will now hopefully just work. And for us, this
means we'll have to answer less boring support questions :-)
These platforms were tested and will build out of the box (of course, more
testing won't hurt): UnixWare 7/OpenUNIX 8, Windows native, Cgwin, FreeBSD
4.7, Redhat Linux 7.3, SuSE Linux 7.3, Debian Linux 3.0.
The build process is also designed to work with these platforms, but they
could not be tested in real life (please do so, if you can!): Mandrake
Linux, NetBSD, OpenBSD, MacOS X.
If your platform isn't supported out of the box, you can edit a
setup.config file to configure the build process. Patches for supporting
additional platforms are more than welcome. Look into setup.py for how to
The other big change is that Gerhard finally gave up on getting more feedback
on his Unicode patch and merged it into the pyPgSQL 2.x line. Hey, if it did
work for Linux 2.4, it can work for us, too <0.7 wink>.
Using Unicode works like this:
from pyPgSQL import PgSQL
con = PgSQL.connect(client_encoding=("utf-8", "ignore"), unicode_results=1)
# where client_encoding are the parameters you normally give to the encode
# method of a Unicode string. unicode_results=1 means pyPgSQL will return
# VARCHAR/CHAR/TEXT fields as Unicode strings instead of byte strings.
# As I refuse to do any magic, you'll also have to set the client encoding
# for the database manually:
cursor = con.cursor()
cursor.execute("SET CLIENT_ENCODING TO UNICODE")
# There are other ways to set the client encoding, including setting a
# special environment variable (see PostgreSQL manual), but I recommend
# doing it in code.
Changes since pyPgSQL Version 2.2
The following source code files were added to Version 2.3 beta 1 of pyPgSQL:
setup.config - Part of the changed distutils-based build process.
If you want to customize the build process (change
include and library directories, for example, you
only need to edit this file; setup.py should not be
edited directly any longer)
unicode_tests.py - Test suite for the new Unicode support. Merged from
the Unicode patch.
Changes to setup.py
* This file was rewritten entirely so that pyPgSQL now builds out of the box
on Windows, Cygwin, Debian Linux, Redhat Linux, SuSE Linux, FreeBSD,
UnixWare 7 and OpenUNIX 8. These are the platforms the new build process has
been tested on. Untested support is available for Mandrake Linux, NetBSD,
OpenBSD and MacOS X.
Changes to README
* Updates for 2.3b1.
* Converted the whole document into reStructuredText, so we
can easily built a HTML version using docutils (http://docutils.sf.net/).
Changes to README.win32
* Remove out of date warning about PostgreSQL on win32
* Reflected change from windows/ to ports/
Changes to PgSQL.py
* Merged the Unicode patch. pyPgSQL now has full Unicode support.
* Added support for the INTERVAL type.
* mxDateTime 1.x is no longer supported. Require mxDateTime 2.x and give
useful error message if import fails.
* Cosmetic changes: use cmp builtin where appropriate.
* Fixed typo where PgTypes.__str__ was spelled incorrectly; compare to None
using "is" operator.
* Take into account that libpq.PgInt8Type might not be
* Convert ROWID to PgInt8 instead of PgInt4 (the original behaviour led to
* Always set the displaysize field of cursor.description to -1.
PostgreSQL 7.3 doesn't provide this information any more and it's pretty
useless nowadays that we've mostly left line printers beyond us.
Changes to pyPgSQL/__init__.py
* Register libpq.PgInt8 with copy_reg only if available.
Changes to pglargeobject.c
* Made the 'closed' attribute of PgLargeObject an int instead of a
Changes to libpqmodule.c:
* Fixed the format string of ParseTuple in libPQbool_FromInt.
This closes a bug that appeared on Linux/Alpha (#625121).
Changes to PgSQLTestcases:
* Don't check for the obsolete displaysize field in
cursor.description. Also don't check the backend encoding.
The windows/ directory has been moved to a port/ directory. Now we *always*
use our own version of various string versions instead of special casing for a
dozen different Windows and Unix platforms.
In order to get the C version of PgInt8Type, it is now required that the
constants LLONG_MAX, LLONG_MIN, ULLONG_MAX and ULLONG_MIN are defined when
including limits.h and that including Python.h defines HAVE_LONG_LONG.
Otherwise, a Python class is used instead.
I'm please to announce the release of txObject ATK 1.3.9.
This release provides developers the ability to use txObject
ATK on Apple's Mac OS X platform. Unix, Linux, and Window
platforms are still supported.
What is it?
txObject ATK is a collection of platform-independent C++ &
Python Class libraries (GPL) that provides a five-layer
framework containing an Object Library, I/O and Timers,
Object-Oriented Threads (Native/Home Grown), Inter-Process
Communication, and Distributed Object Communication. txObject
ATK can be found at either of the following sites:
SourceForge (development & bug tracking)
--Thomas Hazel ( thazel(a)txobject.org )
This is a beta release (the first, and probably the last).
Changes since 0.0.2a:
-Too many to list!
-It works, unlike the alpha release.
-Backported to 1.5.2.
-Many small improvements to the interface.
-All HTML attributes are now accessible.
-Interface is in terms of controls rather than items/inputs.
-Disabled and readonly HTML attributes are now reflected in control
-Netscape / IE behaviour for default value of multiple-selection SELECT
controls is now the default. RFC 1866 behaviour is still available.
-Many bugs fixed.
-Improved tests and documentation.
-Much smaller package, thanks to removing an excessively large test file.
ClientForm is a Python module for handling HTML forms on the client
side, useful for parsing HTML forms, filling them in and returning the
completed forms to the server. It is a port (more-or-less) of Gisle
Aas' Perl module HTML::Form, from the libwww-perl library.
request = urllib2.Request("http://www.acme.com/form.html")
response = urllib2.urlopen(request)
forms = ClientForm.ParseResponse(response)
form = forms
form["cheeses"] = ["parmesan", "leicester", "cheddar"]
form["author"] = "Gisle Aas"
request2 = form.click("Thanks")
response2 = urllib2.urlopen(request2)
print response2.info() # headers
for line in response2.readlines(): # body
All of the standard input types are supported: TEXT, PASSWORD, HIDDEN,
TEXTAREA, RESET, BUTTON, SUBMIT, IMAGE, RADIO, CHECKBOX and
SELECT/OPTION. FILE (for file upload) is not yet supported, but will
be in a future version.
Python 1.5.2 or above is required. To run the tests, you need the
unittest module (from PyUnit, and a standard library module with
Python 2.1 and above).
SuM - Von Stiften und Mäusen
German only: About pens and mice,
a conversion of the well-known didactical learning software to Python.
Eine Umsetzung der bekannten didaktischen Lernsoftware nach Python.
Einführung in die Grundlagen der objektorientierten Programmierung.
Anhand fertiger Klassen "Stift", "Maus", "Bildschirm" u.a. kann in
dieser Lernumgebung der Einstieg in die objektorientierte
mit einfacher Computergrafik vermittelt werden.
1.0 erste öffentliche Version
WHAT IS IT
Mail users, especially in non-English countries, often find that mail
messages arrived in different formats, with different content types, in
different encodings and charsets. Usually this is good because it allows us to
use apropriate format/encoding/whatever. Sometimes, though, some unification is
desireable. For example, one may want to put mail messages into an archive,
make HTML indicies, run search indexer, etc. In such situations converting
messages to text in one character set and skipping some binary atachmetnts is
Here is the solution - mimedecode.py.
This is a program to decode MIME messages. The program expects one input
file (either on command line or on stdin) which is treated as an RFC822 mesage,
and decoded to stdout. If the file is not an RFC822 message it is just piped to
stdout one-to-one. If the file is a simple RFC822 message it is just decoded as
one part. If it is a MIME message with multiple parts ("attachments") all parts
are decoded. Decoding can be controlled by command-line options.
WHAT'S NEW in version 2.0.0
Major rewrite to use python email package. Old version is still inluded in
the archive; the latest bug-fix version is 1.1.7.
WHERE TO GET
Master site: http://phd.pp.ru/Software/Python/#mimedecode
Faster mirrors: http://phd.by.ru/Software/Python/#mimedecodehttp://phd2.chat.ru/Software/Python/#mimedecode
Requires: Python 2.2.2+
Recommends: configured mailcap database.
Documentation (also included in the package):
Oleg Broytmann <phd(a)phd.pp.ru>
Copyright (C) 2001-2002 PhiloSoft Design
Oleg Broytmann http://phd.pp.ru/ phd(a)phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
PyNassi - A program structure chart editor
(DEUTSCH siehe unten)
PyNassi 1.2 (24.10.02)
A program structure chart editor and a debugger written with and
for Python. PyNassi allows the interactive design of
"Nassi Shneiderman" structure charts and can generate
Python source code. Program structure charts permit an easily
understandable diagram of functions and programs.
PyNassi can be used for education for the representation and
production of programs as well as an introduction to the basics of
techniques in the form of program structure charts.
1.2 (first public release)
- english and german language
- new setup dialog
Ein Struktogramm-Editor und Debugger in Python.
PyNassi ermöglicht die Erstellung von Python-Scripten in Form
von Nassi-Shneiderman-Struktogrammen. Struktogramme erlauben
eine leicht verständliche, grafische Darstellung von Funktionen
und Programmen. Besonders im Bereich der Ausbildung zur Einführung
in die Grundlagen der Programmiertechnik bietet sich die
Darstellung und Erstellung von Programmen in Form von
1.2 erste öffentliche Version
I have uploaded a port of Python 2.2.2 to the incoming directories of the
Hobbes (http://hobbes.nmsu.edu/) software archive.
The distributed archives are:
python-2.2.2-emx-bin-021024.zip (binary installation package, 3.16MB)
python-2.2.2-emx-src-021024.zip (source patches and makefiles, 101kB)
While not exhaustively tested, dynamically loadable extension modules
(.pyd) built for the 2.2 & 2.2.1 ports should work with this release.
More information about the port is available at
http://www.andymac.org/python.html, along with the above archives are if
you can't find them at Hobbes.
OS/2 users enjoy!
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: andymac(a)bullseye.apana.org.au | Snail: PO Box 370
andymac(a)pcug.org.au | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
I'm proud to announce the 0.6 release of tarfile.
tarfile is a python module for reading and writing tar archives. The 0.6
release has some important bug fixes and introduces the support for bzip2
compression and tape devices. For users of tarfile versions below 0.6, it
is highly recommended to update.
* platform independent.
* creates POSIX compliant tar archives, GNU tar archives on demand.
* support for gzip and bzip2 compressed archives. (bzip2 compression
requires the bz2 module version 1.1)
* support for tape devices.
* support for the most common GNU tar extensions.
* support for files, directories, hardlinks, symbolic links, fifos and
character and block devices.
* optional zipfile compatible class interface.
* comprehensive documentation and a unittest.
* BSD-style license.
tarfile is available here: