I'm pleased to announce the V01_01 release of cfgparse.
Whats New
-------------------------------------------------------------
1) Exception argument added to the Configuration parser initializer so
that exceptions may be raised when user errors are encountered instead
of the default call to sys.exit() that doesn't provide traceback.
2) Error messages were enhanced giving more detailed information.
Background
-------------------------------------------------------------
cfgparse is a more convenient, flexible, and powerful module for
parsing configuration files than the standard library ConfigParser
module. cfgparse uses a more declarative style modelled after the
popular optparse standard library module.
cfgparse can optionally cooperate with the optparse module to provide
coordination between command line and configuration file options. In
addition, the cooperation can be used to allow the user to control
features of the parser from the command line.
URLs
-------------------------------------------------------------
Documentation: http://cfgparse.sourceforge.net/
Download: http://sourceforge.net/projects/cfgparse/
Feature Summary
-------------------------------------------------------------
+ Simple ini style configuration syntax.
+ Type checking with error handling and help messages.
+ Help summary modelled after that in optparse.
+ Round trip - read, modify, write configuration files with comment retention.
+ Cooperates with optparse so options may be overridden from command line.
+ Supports heirarchically organized option settings.
* User may store multiple option settings in a arbitrarily deep
keyed dictionary.
* Application uses a key list to walk into the dictionary to obtain
a setting.
* User controls key list with setting in configuration file.
* Keys may be added to the list using command line or environment variables.
+ Supports allowing user control of configuration files used.
* Environment variables may be used to specify a default configuration file.
* Command line may be used to specify additional configuration files.
* Configuration files may include other configuration files.
+ Configuration files may alternatively be written in Python.
* Full power and flexibility of Python available for creation of
option settings.
* Allows options settings to be real Python objects.
* This feature is NOT enabled by default.
+ May be extended to support syntax such as XML.
Enjoy,
Dan Gass
23 or 24.03.2005 I'll put pyExcelerator for download.
In additional message I'll give link.
Sorry for uncomfortable conditions.
Situation will change in few days.
--
Regards,
Roman V. Kiseliov,
unicorn(a)mail.kurskline.ru
ICQ: 282708268
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2005-03-01_2005-03-15.html]
=====================
Summary Announcements
=====================
-----------------------------
Second to last summary for me
-----------------------------
Just a reminder, after this Summary there is only one more left for me to
write. After that Tim Lesher, Tony Meyer, and Steven Bethard will be taking over.
-----------------
See you at PyCon!
-----------------
PyCon_ is practically upon us! If you are going to be there, great! Please
feel free to say hello if you run into me (will be at the sprints and the
conference Wednesday and Thursday; skipping Friday to see a friend). Always
happy to stop-and-chat.
.. _PyCon: http://www.pycon.org/
------------------------
2.4.1 should be out soon
------------------------
Python 2.4c2 has now been released. Assuming no major issues come up, 2.4
final will be out March 29; day after PyCon.
But in order to make sure no issues come up, we need the code to be tested!
Please get the code and run the regression tests. If you are on a UNIX system
it is as easy as running ``make test`` (``make testall`` is even better). The
tests can also be run on non-UNIX systems; see
http://docs.python.org/lib/regrtest.html on how.
=========
Summaries
=========
----------------------
2.4 should be out soon
----------------------
Python 2.4.1c1 was releaseed, but enough bugs were found and subsequently fixed
that c2 release will occur before 2.4 final comes out.
Contributing threads:
- `2.4.1c1 March 10th, 2.4.1 March 17th
<http://mail.python.org/pipermail/python-dev/2005-March/051832.html>`__
- `BRANCH FREEZE for 2.4.1rc1, 0000 UTC, 2005-03-10
<http://mail.python.org/pipermail/python-dev/2005-March/051929.html>`__
- `branch release24-maint is unfrozen, 2.4.1rc2?
<http://mail.python.org/pipermail/python-dev/2005-March/052017.html>`__
- `os.access and Unicode
<http://mail.python.org/pipermail/python-dev/2005-March/051906.html>`__
- `RELEASED Python 2.4.1, release candidate 1
<http://mail.python.org/pipermail/python-dev/2005-March/051992.html>`__
- `distutils fix for building Zope against Python 2.4.1c1
<http://mail.python.org/pipermail/python-dev/2005-March/052068.html>`__
- `Python2.4.1c1 and win32com
<http://mail.python.org/pipermail/python-dev/2005-March/052080.html>`__
- `Open issues for 2.4.1
<http://mail.python.org/pipermail/python-dev/2005-March/052099.html>`__
-------------------------------------------
Getting state of all threads in interpreter
-------------------------------------------
Florent Guillaume wrote some code for Zope that returned the current state of
all threads in the interpreter, regardless of whether they were hung or not.
Tim Peters suggested someone write up some code so that this could be made
available in Python itself.
Fazal Majid has volunteered to implement this.
Contributing threads:
- `Useful thread project for 2.5?
<http://mail.python.org/pipermail/python-dev/2005-March/051856.html>`__
---------------------------------
No new features in micro releases
---------------------------------
A bug in os.access() not allowing Unicode strings triggered the discussion of
whether it was a bugfix to repair the issue or a new feature. In the end it
was decided it was a bugfix. But the point was specified that micro releases
should never have any new feature, no matter how small.
Contributing threads:
- `[Python-checkins] python/dist/src/Modules ossaudiodev.c, 1.35, 1.36
<http://mail.python.org/pipermail/python-dev/2005-March/051889.html>`__
- `No new features
<http://mail.python.org/pipermail/python-dev/2005-March/051919.html>`__
- `os.access and Unicode
<http://mail.python.org/pipermail/python-dev/2005-March/051906.html>`__
- `rationale for the no-new-features approach
<http://mail.python.org/pipermail/python-dev/2005-March/051930.html>`__
-------------------------------------
Python wins Jolt "Productivity Award"
-------------------------------------
Python was runner-up in the `15th annual Jolt Awards`_ in the category of
"Languages and Development Environments", being given the "Productivity Award".
Python is now award-winning. =)
.. _15th annual Jolt Awards:
http://www.sdmagazine.com/jolts/15th_jolt_finalists.html
Contributing threads:
- `FWD: SD MAgazine.com - Jolt Awards Winners
<http://mail.python.org/pipermail/python-dev/2005-March/052008.html>`__
- `Python 2.4 won the "Jolt productivity award" last night
<http://mail.python.org/pipermail/python-dev/2005-March/052246.html>`__
------------------------------
New built-ins: any() and all()
------------------------------
Python 2.5 gains two new built-ins: any(), which returns True if the iterable
passed to it contains any true items, and all(), which returns True if all the
items in the iterable passed to it are true.
Contributing threads:
- `Adding any() and all()
<http://mail.python.org/pipermail/python-dev/2005-March/052010.html>`__
--------------------------------
Abbreviating list comprehensions
--------------------------------
The idea of allowing list comprehensions when the item being appended to the
new list is passed directly in was proposed: ``[x in seq if f(x)`` would be
equivalent to ``[x for x in seq if f(x)]``.
The debate on this one is still going, but my gut says it won't be accepted;
TOOWTDI and all.
Contributing threads:
- `Adding any() and all()
<http://mail.python.org/pipermail/python-dev/2005-March/052010.html>`__
- `comprehension abbreviation
<http://mail.python.org/pipermail/python-dev/2005-March/052059.html>`__
-------------------------
sum() semantics discussed
-------------------------
Guido's blog entry on `the fate of reduce() in Python 3000`_ (which reiterated
Guido's plan to cut map(), reduce(), filter() and lambdas (what about zip()?)
caused a huge discussion on whether sum() worked the best way possible. As it
stands now, sum() only accepts a sequence of numbers (sort of; more later) and
its optional second argument works as an initial value to build off of. You
can abuse the second argument to allow for adding other things (such as
``sum([[1], [2], [3]], [])``), but don't do that. =)
The suggestion was put forth of making the second argument more of a default
argument if the passed-in sequence was empty. Otherwise the second argument
would be ignored. But further discussion solidified the idea that sum() works
quite well as it is and thus won't be changed in Python 3000.
.. _the fate of reduce() in Python 3000:
http://www.artima.com/weblogs/viewpost.jsp?thread=98196
Contributing threads:
- `sum() <http://mail.python.org/pipermail/python-dev/2005-March/052067.html>`__
- `Rationale for sum()'s design?
<http://mail.python.org/pipermail/python-dev/2005-March/052134.html>`__
-----------------------------
Experimenting with subversion
-----------------------------
note: written by Tony Meyer
Martin v. Löwis did an automatic conversion of the Python CVS repository to
(fellow Jolt winner) `Subversion`_, to see how well the process worked. He
discovered that although the conversion process takes several hours, there
were only minor problems with the conversion. It seems likely that if
SourceForge does offer subversion repositories, as they have indicated they
will, then Python will switch to this. Martin plans to continue collecting
issues/complaints about the conversion conversion and to integrate solutions.
.. _Subversion: http://subversion.tigris.org
Contributing threads:
- `Migrating to subversion
<http://mail.python.org/pipermail/python-dev/2005-March/051873.html>`__
--------------------
Ordered Dictionaries
--------------------
note: written by Tony Meyer
A suggestion was made that hashed sets and maps that iterate in the order
that the keys were added to the set/map could be added to 'collections'. The
original use case presented was to remove duplicates without changing order,
but it was pointed out that there are other, better, ways to do this.
Although better use cases were presented, the consensus was that (in Barry
Warsaw's words) "while the concept of 'an ordered dictionary' is nice and
seemingly generic enough, [the] exact semantics and other design factors
will either tend to push the stdlib implementation into ever more
complexity, or won't prevent people from continuing to roll their own
because the stdlib version 'isn't quite right'". A `cookbook recipe`_ is
available, however.
.. _cookbook recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
Contributing threads:
- `LinkedHashSet/LinkedHashMap equivalents
<http://mail.python.org/pipermail/python-dev/2005-March/051915.html>`__
-----------------
Easier decorators
-----------------
note: written by Tony Meyer
Nick Coghlan suggested that an update_meta() function be added that copies
across appropriate metadata of functions being decorated (such as __name__,
__doc__, and __dict__), to make the process of decorating simpler, and more
robust in the long term (e.g. if a new attribute should be copied in the
future, update_meta can be updated, rather than individual decorators). A
`patch`_ implementing this behaviour was submitted.
.. _patch: http://www.python.org/sf/1161819
Contributing threads:
- `@deprecated (was: Useful thread project for 2.5?)
<http://mail.python.org/pipermail/python-dev/2005-March/051935.html>`__
- `func.update_meta (was: @deprecated)
<http://mail.python.org/pipermail/python-dev/2005-March/052084.html>`__
- `(no subject)
<http://mail.python.org/pipermail/python-dev/2005-March/052161.html>`__
===============
Skipped Threads
===============
+ Re: python-dev Summary for 2005-01-16 through 2005-01-31
+ Documentation for __new__
+ Decimal & returning NotImplemented (or not)
+ itemgetter/attrgetter extension
+ Re: [Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.49.2.3,
1.49.2.4 idlever.py, 1.22.2.1, 1.22.2.2
+ code blocks using 'for' loops and generators
+ can we stop pretending _PyTyple_Lookup is internal?
========
Epilogue
========
------------
Introduction
------------
This is a summary of traffic on the `python-dev mailing list`_ from
March 01, 2005 through March 15, 2005.
It is intended to inform the wider Python community of on-going
developments on the list on a semi-monthly basis. An archive_ of
previous summaries is available online.
An `RSS feed`_ of the titles of the summaries is available.
You can also watch comp.lang.python or comp.lang.python.announce for
new summaries (or through their email gateways of python-list or
python-announce, respectively, as found at http://mail.python.org).
This is the sixieth summary written by Brett Cannon (sprinting my Spring Break
away).
To contact me, please send email to brett at python.org. Do *not*
post to comp.lang.python if you wish to reach me.
The `Python Software Foundation`_ is the non-profit organization that
holds the intellectual property for Python. It also tries to advance
the development and use of Python. If you find the python-dev Summary
helpful please consider making a donation. You can make a donation at
http://python.org/psf/donations.html . Every penny helps so even a
small donation with a credit card, check, or by PayPal helps.
If you are looking for a way to expand your knowledge of Python's
development and inner-workings, consider writing the python-dev
Summaries yourself! I am willing to hand over the reins to someone
who is willing to do a comparable or better job of writing the
Summaries. If you are interested, please email me at
brett at python.org.
--------------------
Commenting on Topics
--------------------
To comment on anything mentioned here, just post to
`comp.lang.python`_ (or email python-list(a)python.org which is a
gateway to the newsgroup) 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`_!
-------------------------
How to Read the Summaries
-------------------------
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 for new code; otherwise use the current
documentation as found at http://docs.python.org/ . 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.
Please note that this summary is written using reStructuredText_.
Any unfamiliar punctuation is probably markup for reST_ (otherwise it
is probably regular expression syntax or a typo =); you can safely
ignore it. I do suggest learning reST, though; it's simple and is
accepted for `PEP markup`_ and can be turned into many different
formats like HTML and LaTeX. Unfortunately, even though reST is
standardized, the wonders of programs that like to reformat text do
not allow me to 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`_.
.. _python-dev: http://www.python.org/dev/
.. _SourceForge: http://sourceforge.net/tracker/?group_id=5470
.. _python-dev mailing list: http://mail.python.org/mailman/listinfo/python-dev
.. _c.l.py:
.. _comp.lang.python: http://groups.google.com/groups?q=comp.lang.python
.. _PEP Markup: http://www.python.org/peps/pep-0012.html
.. _Docutils: http://docutils.sf.net/
.. _reST:
.. _reStructuredText: http://docutils.sf.net/rst.html
.. _PSF:
.. _Python Software Foundation: http://python.org/psf/
.. _last summary: http://www.python.org/dev/summary/2005-02-15_2005-02-28.html
.. _original text file: http://www.python.org/dev/summary/2005-03-01_2005-03-15.ht
.. _archive: http://www.python.org/dev/summary/
.. _RSS feed: http://www.python.org/dev/summary/channews.rdf
Hi, all!
I wrote package (about 200k sources, BSD license) for generating
BIFF8 files (Excel 97/2k/XP/2k3) with UNICODE,
shared string table, ...
This isn't port or borrowing of pyXLWriter (it knows only BIFF 5/7) or
Perl::Spreadsheet::WriteExcel. My package is written from scratch.
I'm working now on support of Esher layer in Excel files.
I implemented also from scratch writing of MS Compound Documents.
In addition package contains BIFF8 dumper and OLE2 files dumper.
At present this package used by http://www.kurskline.ru/cgi-bin/prices.pl
for generating .xls
Want someone using such package?
--
Regards,
Roman V. Kiseliov,
unicorn(a)kurskline.ru
ICQ: 282708268
P.S.
Package name is "pyExcelerator"
------------------------------------------
WHAT IS IT:
The Sybase module provides a Python interface to the Sybase relational
database system. It supports all of the Python Database API, version
2.0 with extensions.
NOTES:
This release contains a number of small bugfixes and patches received
from users.
I have been unable to find the source of the memory leak reported here:
http://www.object-craft.com.au/pipermail/python-sybase/2004-December/000346…
The test program I wrote follows:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
import sys
import Sybase
db = Sybase.connect(..., auto_commit=True)
db.execute('''
if exists (select name from sysobjects where name = "sp_test_leak")
begin
drop procedure sp_test_leak
end
''')
db.execute('''
create procedure sp_test_leak
@arg int
as
select @arg
''')
for i in range(200):
for j in range(1000):
c = db.cursor()
c.callproc('sp_test_leak', {'@arg': 12345 })
sys.stdout.write('%3d\r' % i)
sys.stdout.flush()
sys.stdout.write('\n')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If someone is able to modify this and come up with a leaking result I
am interested in working on the fix.
You can build for FreeTDS like this:
python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY
python setup.py install
The module is available here:
http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre1.tar…
The module home page is here:
http://www.object-craft.com.au/projects/sybase/
CHANGES SINCE 0.36:
* Cursor state initialisation fix from Skip Montanaro.
* Callback declaration fix on Windows from Vadim Beloborodov.
* Cursor output parameters now work when parameters are passed as a
sequence.
* Output parameters now work for FreeTDS 0.62.4.
1> create procedure sp_test_output
2> @num int, @result int output
3> as
4> select @result = @num
5> go
params = c.callproc('sp_test_output', {'@num': 12345,
'@result': Sybase.OUTPUT(1)})
print params['@result']
* The CS_STATUS_RESULT result set is now consumed internally in the
Cursor and does not appear in the result sets consumed by the fetch
and nextset methods.
The return value from the stored procedure is available in the
.return_status member of the Cursor. It will only contain a
meaningful value once all of the row result sets have been consumed.
Note that this does not work with FreeTDS 0.62.4. The return_status
seems to always be 0. Research shows that the problem is probably
in the CT emulation layer as tsql displays the correct value, but
sqsh displays 0.
* Output hook patch from Ty Sarna has been applied.
* Applied patch from Andre Sedinin to improve error handling.
* Improved detection of SYBASE_OCS.
- Dave
--
http://www.object-craft.com.au
What is ReleaseForge? How silly of you to ask, but I shall satisfy
your silly curiosity nonetheless.
Are you a project administrator -or- release tech/engineer of at least
one SourceForge-based project? If not, skip this message and don't
read further... ReleaseForge is not for you.
Still with me? Then you must be responsible for file releases of one
or more SourceForge projects, either that, or, you're desperately in
need of a life since ReleaseForge is of no use to you.
ReleaseForge is a GUI application that offers many advantages to using
SourceForge's package release system:
- ReleaseForge allows you to quickly and effortlessly create a new
release of one of your SourceForge project packages.
- When creating a new release, you enter the release information
(version number, change log, release notes) and then specify the files
to include in the release.
- ReleaseForge guesses the type of file (.gz, .zip, .rpm, .exe, etc...)
for each of your files.
Once you are satisfied with the release, ReleaseForge does all of the
tedious work so that you don't have to:
- Contacts SourceForge and adds your new release to your project's
package.
- Uploads all of your files for the release to the SourceForge FTP
server.
- Uploads your release notes and change log.
- Automatically selects each of your uploaded files for inclusion in
your new release.
- Automatically applies the processor type and file type to each of
your files.
- If applicable, notifies monitoring users of the new release.
These are just some of the awesome ReleaseForge features, you can learn
more by checking out the ReleaseForge site at:
http://releaseforge.sourceforge.net
There is a FAQ and lots of pretty pictures of supermodels, err,
screenshots. Either way, you'll be glad you visited the site, or not.
ReleaseForge is written in Python (version 2.3 or greater) and uses
PyQt for it's snazzy user interface.
Phil
I'm happy to say that Snakelets 1.38 is available.
Snakelets is a very simple-to-use Python web application server.
This project provides a built-in threaded web server (so you don't
need to set up Apache or another web server), Ypages (HTML+Python
language, similar to Java's JSPs) and Snakelets: code-centric page
request handlers (similar to Java's Servlets).
Snakelets is fully unicode compatible and it's possible to run it
from a CD (read-only mode).
It's released under the open-source MIT Software license.
You can download from http://snakelets.sourceforge.net
(go to the SF project site, and then the file section).
A selection of the changes:
- Documentation cleanups and improvements, more info on Apache config.
- now requires at least Python 2.3 to run
- added 'smart suffix finder'
- fixed cookie removal problem, templated error page, and other smaller issues
- static asset and url convenience stuff
- documented static-file serving API (to facilitate download pages etc)
- directory lister is now a (server-)plugin
- new plugin distr corresponding with this new version
- many cleanups in the html pages
To start, edit the vhost config file (see docs) and
then run the serv.py script, or the monitor.py script
if you want to start it as a daemon (on Unix).
Enjoy,
--Irmen de Jong.
P.S. if you want to see it in action, visit http://www.razorvine.net/snake/
WHAT IS IT:
The Sybase module provides a Python interface to the Sybase relational
database system. It supports all of the Python Database API, version
2.0 with extensions.
NOTES:
This release contains a number of small bugfixes and patches received
from users.
I have been unable to find the source of the memory leak reported here:
http://www.object-craft.com.au/pipermail/python-sybase/2004-December/000346…
The test program I wrote follows:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
import sys
import Sybase
db = Sybase.connect(..., auto_commit=True)
db.execute('''
if exists (select name from sysobjects where name = "sp_test_leak")
begin
drop procedure sp_test_leak
end
''')
db.execute('''
create procedure sp_test_leak
@arg int
as
select @arg
''')
for i in range(200):
for j in range(1000):
c = db.cursor()
c.callproc('sp_test_leak', {'@arg': 12345 })
sys.stdout.write('%3d\r' % i)
sys.stdout.flush()
sys.stdout.write('\n')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If someone is able to modify this and come up with a leaking result I
am interested in working on the fix.
You can build for FreeTDS like this:
python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY
python setup.py install
The module is available here:
http://www.object-craft.com.au/projects/sybase/download/sybase-0.37pre1.tar…
The module home page is here:
http://www.object-craft.com.au/projects/sybase/
CHANGES SINCE 0.36:
* Cursor output parameters now work when parameters are passed as a
sequence.
* Output parameters now work for FreeTDS 0.62.4.
1> create procedure sp_test_output
2> @num int, @result int output
3> as
4> select @result = @num
5> go
params = c.callproc('sp_test_output', {'@num': 12345,
'@result': Sybase.OUTPUT(1)})
print params['@result']
* The CS_STATUS_RESULT result set is now consumed internally in the
Cursor and does not appear in the result sets consumed by the fetch
and nextset methods.
The return value from the stored procedure is available in the
.return_status member of the Cursor. It will only contain a
meaningful value once all of the row result sets have been consumed.
Note that this does not work with FreeTDS 0.62.4. The return_status
seems to always be 0. Research shows that the problem is probably
in the CT emulation layer as tsql displays the correct value, but
sqsh displays 0.
* Output hook patch from Ty Sarna has been applied.
* Applied patch from Andre Sedinin to improve error handling.
* Improved detection of SYBASE_OCS.
- Dave
--
http://www.object-craft.com.au
I'm pleased to announce the release of ZODB 3.2.6 final. This corresponds
to the ZODB released in Zope 2.7.5 earlier today.
You can download a source tarball or Windows installer from:
http://zope.org/Products/ZODB3.2
Only documentation changes were made since the 3.2.6b1 release.
There are several critical bugfixes in this release, addressing rare
problems in two major areas:
- Thread and asyncore races while ZEO is attempting to make a
connection, leading to connection failure and/or missed messages.
- Rare cases in which FileStorage could reuse object identifiers,
assigning the same oid to two distinct objects.
See the news file for details:
http://zope.org/Products/ZODB3.2/NEWS
ZODB 3.2.6 can be used with Zopes in the 2.7 line, at or after Zope 2.7.3.
Note that ZODB 3.2.6 does not support development on Zope 2.8, Zope X3 or
Zope 3 (they require a ZODB in the 3.3 or 3.4 lines).