I have released pwig, an SWIG extension that allows new language
modules to be developed using Python instead of C++.
To stop any confusion I'll explain it another way: It's a Python SWIG
wrapping for SWIG itself!
It also includes a module (obviously written on Python :-) to generate
wrappers for SWI-Prolog.
pwig home site is at http://pwig.sourceforge.net
Comments, questions, bugs, patches, new language modules, etc. are
python-dev Summary for 2003-08-16 through 2003-08-31
This is a summary of traffic on the `python-dev mailing list`_ from
August 16, 2003 through August 31, 2003. It is intended to inform the
wider Python community of on-going developments on the list. To comment
on anything mentioned here, just post to python-list(a)python.org or
`comp.lang.python`_ with a subject line mentioning what you are
discussing. All python-dev members are interested in seeing ideas
discussed by the community, so don't hesitate to take a stance on
something. And if all of this really interests you then get involved
and join `python-dev`_!
This is the twenty-fourth summary written by Brett Cannon (a year's
worth of summaries by yours truly now under his belt; does this mean I
am certifiably insane?).
All summaries are archived at http://www.python.org/dev/summary/ .
Please note that this summary is written using reStructuredText_ which
can be found at http://docutils.sf.net/rst.html . Any unfamiliar
punctuation is probably markup for reST_ (otherwise it is probably
regular expression syntax or a typo =); you can safely ignore it,
although I suggest learning reST; its simple and is accepted for `PEP
markup`_ and gives some perks for the HTML output. Also, because of the
wonders of programs that like to reformat text, I cannot guarantee you
will be able to run the text version of this summary through Docutils_
as-is unless it is from the original text file.
.. _PEP Markup: http://www.python.org/peps/pep-0012.html
The in-development version of the documentation for Python can be found
at http://www.python.org/dev/doc/devel/ and should be used when looking
up any documentation on something mentioned here. Python PEPs (Python
Enhancement Proposals) are located at http://www.python.org/peps/ . To
view files in the Python CVS online, go to
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/ . Reported bugs
and suggested patches can be found at the SourceForge_ project page.
.. _python-dev: http://www.python.org/dev/
.. _SourceForge: http://sourceforge.net/tracker/?group_id=5470
.. _python-dev mailing list:
.. _comp.lang.python: http://groups.google.com/groups?q=comp.lang.python
.. _Docutils: http://docutils.sf.net/
.. _reStructuredText: http://docutils.sf.net/rst.html
.. _last summary:
This is the twenty-fourth summary written by me. This is significant
because this means I have written enough summaries to cover a year's
worth of email traffic on python-dev (had I not taken a summary off back
in October this milestone would have been hit for the first half of
August which represented a physical year since I started doing the
summaries). It has truly been worth the experience.
But how much of an experience has it been? Well, for a long time now I
have been planning on writing some code to calculate how much email I
have read, who wrote most of that email, and what threads made up the
most. With my move to San Luis Obispo finished I finally had a chance
to write said code in an imperfect manner (imperfect because of things
like names which are a pain because some people have their name set
differently at different computers; "Barry Warsaw" compared to "Barry A.
Warsaw"; threads are worse thanks to the changing of subject titles in
the middle of a thread) so as to give me some approximate numbers.
I have read 9469 emails that have passed through the python-dev mailing
list. The top six emailers (out of approx. 433 unique emailers) have been:
* Brett Cannon (277 emails when you deal with me just using my last
initial; 2.9% of all emails)
* Barry Warsaw (305 emails when you also count his middle initial; 3.2%)
* Skip Montanaro (481 emails; 5.1%)
* Martin v. Löwis (627 emails, when calculated looking for all names
that had "Martin" and "wis" in them; 6.6%)
* Tim Peters (694 emails; 7.3%)
* Guido van Rossum (a whopping 1407 emails; 14.8%)
The average person posted 21.9 emails over the emails I covered. But
only about 24 people had more than a single percentage (more than 94
emails) worth of emails accredited to them. That means that about 5.5%
of the unique posters on python-dev accounted for 66.8% of all email
(and I have gotten to know a good amount of those 24).
As for threads (of which there were approx. 1252 unique threads, and I
mean approximately), the top five are:
* "type categories" (115 emails; 1.2% of all emails)
* "PEP239 (Rational Numbers) Reference Implementation and new issues"
(123 emails; 1.3%)
* "PEP-317" (125 emails: 1.3%)
* "python/dist/src/Python import.c,2.210,2.211" (146 emails; 1.5%)
* "Extended Function syntax" (263 emails; 2.8%)
What does this tell you and me? First, I have an addiction to Python.
Second, PEPs really do get discussed. And third, Python development is
alive and well.
OK, enough statistics. As for this summary, it turned out rather light
thanks to a couple of things. One is the shutdown of mail delivery by
mail.python.org during the SoBig virus' peak. This not only cut back on
the number of emails, but also led to me deleting *a lot* of bogus email
on my other emails accounts. My blanket deleting may have caught
legitimate emails so it is possible I accidently deleted some python-dev
stuff, although if I did it was minimal. Another contributing factor to
the light summary is that a lot of regulars on python-dev were on
vacation. This looks like it will happen again for the first half of
September so expect the next summary to be light as well.
Python using Parrot; new code interpreter or strange evolutionary
Pirate_ has now reached version 0.01 alpha. It lacks classes and
imports but can run a decent amount of Python code. At least there is
now a proof-of-concept that Python running on top of the Parrot_ VM is
.. _Pirate: http://pirate.tangentcode.com/
.. _Parrot: http://www.parrotcode.org/
- `pirate 0.01 alpha!
Python 2.3.1 on its way?
Raymond Hettinger suggesting pushing for a quick release of Python 2.3.1
so that the 2.3 branch could be established as a stable version.
Several bugs and performance enhancements have been committed to the 2.3
maintenance branch. Anthony Baxter stepped forward as release czar with
Raymond Hettinger saying he would help and Barry Warsaw volunteering his
wisdom as a battle-hardened release czar.
This discussion also brought up the question of whether a .chm help file
for the Windows distribution would be worth using instead of including
the HTML distribution of the documentation as it stands now. It was
agreed that it was a good thing to have since it allowed for better
searching. Tim Peters also discovered the install went faster since it
would not have to copy a ton of individual HTML files.
Python 2.3.1 has a "verbal" release date of the third week of September;
there has not been a PEP to set the release schedule officially.
Help would be appreciated in dealing with bug and patch reports on
SourceForge. Even if all you do is add a comment saying "this patch
looks fine" or "I can reproduce this bug" it can be a great help.
- `HTMLHelp for Py2.3.1
- `Fixing Patches and Bugs for Py2.3.1
Making looping generators more efficient
Would you like to see deeply nested generators be more efficient in
returning their values? Clark Evans would and made such a request. He
essentially wanted to have nested generator calls propogate their values
to the first non-generator call directly and thus bypass all of the
generator maintenance code. There was no direct reaction to this.
Shane Holloway followed with the idea of having special syntax for when
you yield each value of an iterator. The idea, once again, would be to
speed this common case in the interpreter by skipping some bookkeeping
overhead. A few syntax versions were offered, but the idea was all the
same: special-case ``for item in iterable: yield item`` to something
like ``yield *iterable``.
- `cooperative generators
- `Graph exploration with generators
Use of the logging package in the standard library
Want to help out the development of Python? Know how to use the logging
package? Then python-dev wants you! There are several modules in the
stdlib that have home-grown logging code that could (and probably
should) be using the logging package instead to simplify life. Read the
email that started the contributing thread and see if you can't help out
by converting the module over to using the logging package today!
- `Unification of logging in Python's Standard Library
Some waxings on PEP 310
PEP 310 proposes the 'with' syntax that came up a while back that
sparked an immense discussion on python-dev. The idea was to have a
more fool-proof way of having an enter and exit method be called before
executing some specified code. The common example was acquiring a lock,
executing some code, and then releasing the lock all without having to
deal with an explicit try/finally statement. Samuele Pedroni tried to
clarify how it should work exactly by requiring __exit__ instead of
making it optional (read the PEP to understand what this means).
- `PEP 310(with-syntax): close synonym of __exit__
Proposed PEP for a 'close' method for generators
Samuele Pedroni has written a pre-PEP on defining a way to have
generators grow a way to have a 'close' method that is called when their
execution is finished so as to handle resources correctly. This is in
response to not being able to contain yield statements within
- `pre-PEP: Resource-Release Support for Generators
Barry Warsaw has created the `email-sig`_ to steer development of
version 3 of the email package in hopes of having it done for Python 2.4 .
.. _email-sig: http://www.python.org/sigs/email-sig/
- `New SIG: email-sig <New SIG: email-sig>`__
The next meeting of PyGTA will be held at the usual location and time,
on Tuesday September 23.
Site: 519 Church St. Community Centre
Room no: 31 (signs will be posted)
Address: 519 Church St., near Wellesley
Date: Tuesday, September 23
Time: 8-10 PM
A later announcement will provide details of any presentation which might
be occurring that evening...
I missed the last couple but understand they went very well, with
interesting presentations and discussion. (Hmm.... maybe I should be
staying away from more of them? ;-)
Don't miss out!
-Peter Hansen, for the PyGTA gang...
This version is beta software. CUTE is a QT and Scintilla based code editor,
scriptable with python. CUTE is completely configured with python scripts.
The python API allows to define new commands, which can be mapped to a
shortcut or added to a menu.
There is a handbook for CUTE, but this is still work in progress. The
CUTE/python API is also documented.
CUTE`s page is http://cute.sourceforge.net
Hi folks & Pythonistas!
I have just made a new source-code only release of SalStat - version
20030911 (codenamed "Texas!") which is available at the website
http://salstat.sunsite.dk. The download is
http://salstat.sunsite.dk/salstat.20030911.tar.gz (447k or
thereabouts). Sorry, but binaries are not available as I'm up to my
ears in Ph.D. work right now.
SalStat is a Python/wxPython application for statistical analysis, a
bit like a low-powered SPSS, but is growing all the time (should grow
faster when my Ph.D. is finished..!), and is available under the GPL.
I have also merged in wxPyPlot to produce some basic charts which can
be saved in bitmapped graphics format (bmp, png and jpeg if I'm not
This version also features data transformations with buttons for
common transforms (square, square root, reciprocal and log), but users
can also enter whatever Python function they want. The transforms are
non-destructive - any transformed data are automatically put into a
new data column, leaving the existing data untouched.
Future plans: Finished the xml data format which will enable users to
audit their entire analysis session; add the multi-factorial anova
(plus post-hoc tests and simple effects); improve the charting /
graphing; move the code base up to Python 2.3 and wxPython 2.4.x;
release executables for Windows & Linux; Add post-hoc analysis
procecures for the nonparametric tests like Kruskal Wallis and
Friedmans; Save the world from certain destruction... And dominate
it... Joking about the last two. ;)
All bug reports and suggestions for interface improvements are, as
usual, more than welcome. Have fun!
Alan James Salmoni
need a break, soon... With PyObjC the most difficult thing increa-
singly becomes writing the README... "Tesselatica" is a very simple
"tesselation explorer", although restricted to only very specific
ones. As such it maybe makes a nice demo, but I won't tell yet, what
the background for this is... ;-) Please see the attached Readme
below. Comments are appreciated!
Dinu C. Gherman
"Of course America had often been discovered before Columbus,
but it had always been hushed up." (Oscar Wilde)
Tesselatica is a demo for interactively exploring rect. tessalations.
Tesselatica is a Mac OS X demo tool for interactively exploring some
kind of regular rectangular tesselations with certain mathematical
Tesselatica is very intuitive to use. It displays a rectangular view,
devided into N equally sized rectangular tiles. The only constraint
for these tiles is that their shape must be as close to a square as
possible. As you change N and the size of the entire window, the
optimal tesselation is being calculated and displayed (I hope).
:0.1: first release, packaged with Python 2.2.3 and PyObjC 1.0b.
There are no special requirements for running Tesselatica. It ships
as a standalone application which should be running on any Mac OS X
10.x, althouth it was developped on 10.2. As it comes with full
source code you can build Tesselatica yourself, if you have Apple's
developer tools installed, plus some Python interpreter version 2.2
or higher, plus PyObjC 1.0b _.
Tesselatica is released under the GPL - see the included file,
The Tesselatica distribution, screenshots and a sample movie of
Tesselatica in action are all available from:
Tesselatica is a very simple demo and does what I wanted it to do.
Of course, one might want to explor all sorts of regular tesselations,
not only the specific rectangular ones shown here. I don't have any
plans to do that, but feel free to take this as a starting point!
..  http://pyobjc.sourceforge.net
dinu at mac dot com,
and on we go.... "TimeCyclerLab" is a light prototyping workbench
for my TimeCycler screensaver on Mac OS X. The PyObjC code is *so*
much simpler compared to the ObjC one for the real screensaver!
Please see the attached Readme below. Glad to hear your comments!
Dinu C. Gherman
"I am a gentlemen: I live by robbing the poor." (George Bernard Shaw)
TimeCyclerLab is a prototyping workbench for a similar screensaver.
TimeCyclerLab is a Mac OS X Cocoa GUI tool which has been used for
prototyping the TimeCycler screensaver _. It provides two modes,
interactive and clock mode and serves as graphic testing workbench.
TimeCyclerLab provides a nested set of stacked circular progress
bars - in other words: an analog clock! This application allows
to set the individual hands interactively by just clicking and/or
dragging them in interactive mode. In clock mode the analog clock
shows the current time.
:0.1: first release, packaged with Python 2.2.3 and PyObjC 1.0b _.
There are no special requirements for running TimeCyclerLab. It
ships as a standalone application which should be running on any
Mac OS X 10.x, althouth it was developped on 10.2. As it comes with
full source code you can build TimeCyclerLab yourself, if you have
Apple's developer tools installed, plus some Python interpreter
version 2.2 or higher, plus PyObjC 1.0b.
TimeCyclerLab is released under the GPL - see the included file,
The TimeCyclerLab distribution, screenshots and a sample movie of
TimeCyclerLab in action are all available from:
I tried using the ubiquitous metal look for TimeCyclerLab, but when
doing so, it behaves really strange: when dragging single clock hands
the entire window moves across the screen. I'd be interested to know
how to fix this...
TimeCycler, the real screensaver which was prototyped using this
application contains many more knobs to play with. I'll probably
bring all of them back to to this prototype, again, one day.
..  http://python.net/~gherman/TimeCycler.html
..  http://pyunit.sourceforge.net/
dinu at mac dot com,
The first non-beta release of the Python Computer Graphics Kit is
available at http://cgkit.sourceforge.net
What is it?
The kit is a collection of Python modules that contain the basic types
and functions required for creating 3D computer graphics images. The
kit includes several new types such as vectors, matrices and
quaternions. It contains a binding for Pixar's RenderMan interface
which is a renderer independent API to communicate 3D data to
renderers which will finally produce a 2D image. There are already
several RenderMan compliant renderers freely available (they are not
part of the kit). The kit also includes some of the functionality from
the RenderMan Shading Language which enables you to create procedural
models or textures from within Python.
Even though the kit focuses on RenderMan, the new types or the
Shading Language functionality can also be used for other rendering
mechanism such as OpenGL or other renderers such as POV-Ray.
The kit should run on any platform where Python (and a C/C++ compiler)
is available. Windows users can download a binary version for
Python 2.2 and Python 2.3.
Finished the previously incomplete modules and added the corresponding
documentation. For a list of other minor bug fixes and enhancements
see the change log.
There has been release 1.0 available for a couple of days but the
binary for Python 2.2 was broken and the source zip contained a
modified version of the pre-generated file cgtypes.c which didn't work
on Linux. Release 1.0.1 is fixing these issues. If you were among
those who downloaded release 1.0 and you got it to work then you don't
have to download 1.0.1 again as there's no difference in
For more information, visit:
- Matthias -
hashtar is a utility designed for encrypted archiving to media
vulnerable to corruption (eg, CDR, DVDR).
Comments, bug reports, suggestions for improvement all welcome.
hashtar: an encrypted archive utility designed for secure archiving
to media vulnerable to corruption.
Recursively encrypt the files and directories passed as arguments.
Rather than preserving the directory structure, or archiving to a
single file as in tar, the files are encrypted to a single dir and
named with the hash of their relative path. The file information
(filename, hash, permission mode, uid, gid) is encrypted and stored
in the header of the file itself, and can be used to restore the
original file with dir structure from the archive file.
For example, the command
> hashtar.py -cvf tmp.htar finance/
prompts for a password and generates an encrypted recursive archive
of the finance dir in the tmp.htar dir, with filenames mapped like
finance/irs/98/f1040.pdf -> tmp.htar/e5/e5ed546c0bc0191d80d791bc2f73c890
finance/sale_house/notes -> tmp.htar/58/580e89bad7563ae76c295f75aecea030
finance/online/accounts.gz.mcr -> tmp.htar/bb/bbf12f06dc3fcee04067d40b9781f4a8
finance/phone/prepaid1242.doc -> tmp.htar/c1/c1fe52a9d8cbef55eff8840d379d972a
The encrypted files are placed in subdirs based on the first two
characters in their hash name because if too many files are placed
in one dir, it may not be possible to pass all of them as command
line arguments to the restore command. The entire finance dir
structure can later be restored with
> hashtar.py -xvf tmp.htar
The advantage of this method of encrypted archiving, as opposed to
archiving to a single tar file and encrypting it, is that this
method is not sensitive to single byte corruption, which becomes
important especially on externally stored archives, such as on CDR,
or DVDR. Any individual file contains all the information needed to
restore itself, with directory structure, permission bits, etc. So
only the specific files that are corrupted on the media will be
The alternative strategy, encrypting all the files in place and then
archiving to external media, doesn't suffer from single byte
corruption but affords less privacy since the filenames, dir
structure, and permission bits are available, and less security
since a filename may indicate contents and thus expose the archive
to a known plaintext attack.
A match string allows you to only extract files matching a given
pattern. Eg, to only extract pdf and xls files, do
> hashtar.py -m pdf,xls -xvf tmp.htar
Because the filenames are stored in the header, only a small portion
of the file needs to be decrypted to determine the match, so this is
Data can be encrypted and decrypted across platforms (tested between
linux and win32 and vice-versa) but of course some information may
be lost, such as uid, gid for platforms that don't support it.
> hashtar.py [OPTIONS] files
-h, --help Show help message and exit
-fDIR, --arcdir=DIR Write hashed filenames to archive dir
Get passwd from FILE, otherwise prompt
Only extract files that match PATTERN.
PATTERN is a comma separated list of strings,
one of which must match the filename
-u, --unlink Delete files after archiving them
-c, --create Create archive dir
-x, --extract Extract files recursively from archive dir
-v, --verbose Decrypt files recursively
I think this software is suitable to protect your data from your
sister, your boss, and even the nosy computer hacker next door, but
not the NSA.
python2.3 - python.org
yawPyCrypto and Flatten - http://yawpycrypto.sourceforge.net/
pycrypto - http://www.amk.ca/python/code/crypto.html
The python dependencies are very easy to install; just do the usual
> python setup.py install
Tested on linux and win32
John D. Hunter <jdhunter(a)ace.bsd.uchicago.edu>
same as python2.3
Ignores symbolic links
For Erik Curiel, who's life's work I lost when I volunteered to
backup the only copy of his home dir on a CD containing a single
encrypted gzipped tar file, which was subsequently corrupted.