Changes since Amara 18.104.22.168:
* Fix bindery bug with e.g. del html.head.title
* Fix bindery bug with elements named "None"
* Fix bindery bug when a string object gets into a binding
* Minor documentation and packaging tweaks
Amara XML Toolkit is a collection of Python tools for XML processing--
not just tools that happen to be written in Python, but tools built from
the ground up to use Python's conventions and take advantage of the many
advantages of the language.
Amara builds on 4Suite [http://4Suite.org], but whereas 4Suite offers
more on literal implementation of XML standards in Python, Amara
focuses on Pythonic idiom. It provides tools you can trust to conform
with XML standards without losing the familiar Python feel.
The components of Amara are:
* Bindery: data binding tool (a very Pythonic XML API)
* Scimitar: implementation of the ISO Schematron schema language for
XML; converts Schematron files to Python scripts
* domtools: set of tools to augment Python DOMs
* saxtools: set of tools to make SAX easier to use in Python
* Flextyper: user-defined datatypes in Python for XML processing
There's a lot in Amara, but here are highlights:
Amara Bindery: XML as easy as py
Bindery reads an XML document and it returns a data structure of
Python objects corresponding to the vocabulary used in the XML document,
for maximum clarity.
Bindery turns the document
<python spam="eggs">What do you mean "bleh"</python>
<python ministry="abuse">But I was looking for argument</python>
Would become a set of objects so that you could write
In order to get the value "eggs" (as a Python Unicode object) or
In order to get the element object with the contents "But I was looking
There are other such tools for Python, and what makes Bindery unique is
that it's driven by a very declarative rules-based system for binding
XML to the Python data. You can register rules that are triggered by
XPattern expressions specialized binding behavior. It includes XPath
support and is very efficient, using SAX to generate bindings.
See the user documentation, manual.html, for more details.
Scimitar: exceptional schema language for an exceptional programming
Scimitar is an implementation of ISO Schematron that compiles a Schematron
schema into a Python validator script. You typically use scimitar in two
phases. Say you have a schematron schema schema1.stron and you want to
validate multiple XML files against it, instance1.xml, instance2.xml,
First you run schema1.stron through the scimitar compiler script,
A file, schema1-stron.py, is generated in the current working directory.
If you'd prefer a different location or file name, use the "-o" option.
The generated file is a validator script in Python. It checks the
schematron rules specified in schema1.stron.
Run this validator on each XML file you wish to validate:
python schema1.py instance1.xml
The validation report is generated on standard output by default, or you
can use the "-o" option to redirect it to a file.
The validation report is an XML external parsed entity, a format much like
a well-formed XML document, but with some restrictions relaxed.
Amara DOM Tools: giving DOM a more Pythonic face
Amara DOM Tools features pushdom, similar to xml.dom.pulldom, but easier
to use, and a function to return an XPath location for any DOM node.
Amara SAX Tools: SAX without the brain explosion
Tenorsax (amara.saxtools.tenorsax) is a framework for "linerarizing" SAX
so it flows a bit more naturally, needing much less state machine wizardry.
Amara is open source, provided under the 4Suite variant of the Apache
license. See the file COPYING for details.
Amara requires Python 2.4 or more recent and 4Suite-XML 1.0 or more
recent. The easiest way to install it is:
If this does not work you are probably not set up for easy_install and I
suggest you follow the simple instructions at
easy_install will automatically take care of installing dependencies for
you. If you prefer not to use easy_install, grab a 4Suite-XML package more
recent than 1.0 and install that, then install the Amara package
using the usual:
python setup.py install
Or a Windows installer, or other method.
Uche Ogbuji http://uche.ogbuji.net
Linked-in profile: http://www.linkedin.com/in/ucheogbuji
Announcing Urwid 0.9.8.1
Urwid home page:
About this release:
This is a maintenance release that fixes a number of bugs that have been
found in 0.9.8.
New in this release:
* Fixed a Filler render() bug
* Fixed a raw_display start()/stop() bug
* Fixed a number of problems triggered by very small terminal window
Urwid is a console UI library for Python. It features fluid interface
resizing, UTF-8 support, multiple text layouts, simple attribute markup,
powerful scrolling list boxes and flexible interface design.
Urwid is released under the GNU LGPL.
I've just uploaded bbfreeze 0.94.0 to python's cheeseshop.
bbfreeze creates standalone executables from python scripts. It's similar
in functionality to py2exe or cx_Freeze.
New in this version is support for relative imports. It also contains some
for packaging PyXML and cElementTree.
It offers the following features:
bbfreeze can be installed with setuptools' easy_install command.
zip/egg file import tracking
bbfreeze tracks imports from zip files. Note that calls to setuptools'
pkg_resources.require will be replaced with a dummy implementation.
Calls to resource handling functions are *not* implemented, and
freezing packages using these features of pkg_resources will not be
possible without further work.
multiple script freezing
bbfreeze can freeze multiple scripts at once.
python interpreter included
bbfreeze will create an extra executable named 'py', which might be
used like the python executable itself.
bbfreeze works on windows and UNIX-like operating systems. It
currently does not work on OS X. bbfreeze has been tested with python
2.4 and 2.5. bbfreeze will not work with python versions prior to 2.3
as it uses the zipimport feature introduced with python 2.3.
cheese shop entry:
The PyPy team is sprinting at EuroPython again and we invite
you to participate in our 3 day long sprint at the conference hotel
- Reval Hotel Lietuva.
If you plan to attend the sprint we recommend you to listen to the PyPy
technical talks (`EuroPython schedule`_) during the
conference since it will give you a good overview of the status of development.
On the morning of the first sprint day (12th) we will also have a
tutorial session for those new to PyPy development. As 3 days is relatively
short for a PyPy sprint we suggest to travel back home on the 15th if
possible (but it is ok to attend less than 3 days too).
Goals and topics of the sprint
There are many possible and interesting sprint topics to work on - here
we list some possible task areas:
* completing the missing python 2.5 features and support
* write or port more extension modules (e.g. zlib is missing)
* identify slow areas of PyPy through benchmarking and work on improvements,
possibly moving app-level parts of the Python interpreter to interp-level
* there are some parts of PyPy in need of refactoring, we may spend some time
on those, for example:
- rctypes and the extension compiler need some rethinking
- support for LLVM 2.0 for the llvm backend
* some JIT improvement work
* port the stackless transform to ootypesystem
* other interesting stuff that you would like to work on ...;-)
If you'd like to come, please subscribe to the `pypy-sprint mailing list`_
and drop a note about your interests and post any questions. More
organisational information will be sent to that list.
Please register by adding yourself on the following list (via svn):
or on the pypy-sprint mailing list if you do not yet have check-in rights:
Preparation (if you feel it is needed):
* read the `getting-started`_ pages on http://codespeak.net/pypy
* for inspiration, overview and technical status you are welcome to
read `the technical reports available and other relevant documentation`_
* please direct any technical and/or development oriented questions to
pypy-dev at codespeak.net and any sprint organizing/logistical
questions to pypy-sprint at codespeak.net
* if you need information about the conference, potential hotels,
directions etc we recommend to look at http://www.europython.org.
We are looking forward to meet you at the Vilnius Post EuroPython
The PyPy team
.. See also ..
.. _`pypy-sprint mailing list`:
.. _`the technical reports available and other relevant
.. _`EuroPython schedule`: http://europython.org/timetable
Grig Gheorghiu, Jason Huggins and I have just finished a book, _An
Introduction to Testing Web Applications with twill and Selenium_. It
is available as an inexpensive e-book through O'Reilly:
While the entire book uses Python throughout, the last chapter of the
book should be particularly interesting for Python programmers: it
introduces testing of the simple Django "poll" application with both
Selenium and twill.
We would love some feedback.
Pydev and Pydev Extensions 1.3.5 have been released
Details on Pydev Extensions: http://www.fabioz.com/pydev
Details on Pydev: http://pydev.sf.net
Details on its development: http://pydev.blogspot.com
Release Highlights in Pydev Extensions:
o Import is now set in correct line even with multi-line imports.
o Added option to disable the introduction of auto-imports.
o Added option to remove modules that start with '_' from the imports
(so, tokens would have to be found in __init__.py files).
* Code Analysis: Having a list comprehension with a subscript was not being
* Debugger: Working with jython.
* Debugger: Working with wxPython.
Release Highlights in Pydev:
* Eclipse 3.3 Integration: Does not keep eclipse from a correct shutdown
* Docstrings and code completion pop-up:
o The docstrings are now wrapped to the size of the pop-up window.
o The initial columns with whitespaces that are common for all the
docstring is now removed.
o The previous size of the pop-up window in completions is now
* Extract method refactoring: was not adding 'if' statement correctly on a
* Organize imports: (Ctrl+Shift+O): comments are not erased in import lines
when using it anymore.
* Interpreter Config: solved a concurrency issue (which could issue an
exception when configuring the interpreter).
* Jython integration: can now work with a j9 vm.
* Jython integration: those that don't use jython can now use eclipse
without JDT (but it's still required for jython development).
o The comments are now set in the correct level (below module, class
o Comments are sorted by their position even when alphabetic sorting
is in place.
o Comments are added to the outline if they start or end with '---'.
What is PyDev?
PyDev is a plugin that enables users to use Eclipse for Python and Jython
development -- making Eclipse a first class Python IDE -- It comes with many
goodies such as code completion, syntax highlighting, syntax analysis,
refactor, debug and many others.
ESSS - Engineering Simulation and Scientific Software
Pydev - Python Development Enviroment for Eclipse
This Saturday we'll be holding our 4th Saturday meeting of the DFW Pythoneers,
at the usual location of Nerdbooks.com bookstore in Richardson. For
directions, visit the Nerdbooks.com website. We start at 2pm and run until
5pm, and then go out for a group dinner.
At this meeting one of our local members, Jeremy Dunck, will be giving us a
preview of a 60-minute advanced Django tutorial he is helping to give at OSCON
next month. The advanced material will cover the unicode branch, signals and
either stateful views or gis branch.
Since many of our members are not experienced with Django, Jeremy will present
a 45-minute introduction to Django first, which will cover URLConf, views,
models and perhaps middleware.
By the way, I've been contacted by a developer at the Travelocity Dallas
office, who is looking for local Python developers with experience in Django
or Genshi. If you're interested, let me know and I can put you in touch.
And just to give a heads-up for July, our own Patrick R. Michaud has agreed to
give our group a presentation on the status of support for Python in the
virtual machine, Parrot, underlying Perl 6 and many other languages. For more
info, check out:
Patrick will present to us on the 2nd Saturday of July, the 14th. Patrick is
the author of PGE, the parrot/Perl6 Grammar engine and is also the Perl 6
See you there!
DFW Pythoneers Organizer
1 hour 20 minutes of lessons in how to build a complete and tested Python application from scratch. The series is aimed at beginners, all necessary material is provided, viewers can ask me (the author) questions as they go.
Commercial series: 'Python 101 - easygui and csv':
The 17 episodes walk a new Python programmer through all necessary steps to build a working and unit-tested Python program. In this series I use Wingware's Wing IDE but any Python development environment can be used.
The program reads in a csv data file (e.g. from Excel) using a file-open dialog (easygui), the data is processed, a mathematical average generated and a modified csv file is written out. easygui's messagebox and yes/no dialog are also used.
I show how to document the code, refactor the early script using functions and test functions using nosetests. Several exercises are set which extend the viewer's knowledge of easygui. They also provide practice for writing code, refactoring and applying test-driven development.
The viewer is encouraged to ask questions using the Comments section, I'll answer all questions and everyone is encouraged to help each other. Full source is provided and the viewer can download the videos for off-line viewing.
Further details are available here:
http://ShowMeDo.comhttp://ShowMeDo.com/about (our pictures)
Just a quick announcement to let everyone know that there is still
time to register for the upcoming Python Bootcamp course being
offered by Big Nerd Ranch in Frankfurt, Germany, July 16-20, 2007.
Further details about the class are available here:
As the instructor, I am very excited about this class and think that
it has a lot to offer to programmers with or without prior Python
experience. Probably the most exciting aspect of the course is that
it has been developed from the ground up to target modern Python. As
a result, it fully covers the latest language features and library
modules. These topics include iterators, generators, metaclasses,
the etree module, ctypes, and more. In addition to this, the course
strongly focuses on topics such as such as common Python programming
patterns, how to write reliable code, unit testing, debugging,
systems, and network programming.
More information is available at the above website. I can also be
contacted directly for further inquiries regarding course content.
Hope to see a few Python fans in Europe!
Brief Instructor Bio: David Beazley is the author of the "Python
Essential Reference, 3rd Ed." and several well-known Python packages
including SWIG and PLY. More information is available at http://