decorator module
I have written a decorator module to make easier to write good decorators (i.e. decorators preserving the signature of the functions they decorate). The documentations contains a (hopefully) nice collections of use cases (which are also test cases, sice I take doctest very seriously ;). You can find it here: http://www.phyast.pitt.edu/~micheles/python/decorator.zip It is released under the Python licence. Let me know if you are using it and if you would like further additions/improvements/changes/etc. Feeback is welcome! Michele Simionato -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html
[ANN] pysqlite 2.0.0 final released!
Hello everyone, After pondering about a redesign of pysqlite for years, and now after half a year of development, I am happy to finally announce the first stable release of pysqlite2. pysqlite a DB-API 2.0-compliant database interface for SQLite. SQLite is a relational database management system contained in a relatively small C library. It is a public domain project created by D. Richard Hipp. Unlike the usual client-server paradigm, the SQLite engine is not a standalone process with which the program communicates, but is linked in and thus becomes an integral part of the program. The library implements most of SQL-92 standard, including transactions, triggers and most of complex queries. pysqlite makes this powerful embedded SQL engine available to Python programmers. It stays compatible with the Python database API specification 2.0 as much as possible, but also exposes most of SQLite's native API, so that it is for example possible to create user-defined SQL functions and aggregates in Python. If you need a relational database for your applications, or even small tools or helper scripts, pysqlite is often a good fit. It's easy to use, easy to deploy, and does not depend on any other Python libraries or platform libraries, except SQLite. SQLite itself is ported to most platforms you'd ever care about. It's often a good alternative to MySQL, the Microsoft JET engine or the MSDE, without having any of their license and deployment issues. pysqlite homepage: http://pysqlite.org/ On the homepage, there's also a bug tracking system and a wiki. Sources: http://initd.org/pub/software/pysqlite/releases/2.0/2.0.0/pysqlite-2.0.0.tar.gz Windows binaries for Python 2.3: http://initd.org/pub/software/pysqlite/releases/2.0/2.0.0/pysqlite-2.0.0.win32-py2.3.exe Windows binaries for Python 2.4: http://initd.org/pub/software/pysqlite/releases/2.0/2.0.0/pysqlite-2.0.0.win32-py2.4.exe Advantages of pysqlite 2.0 over pysqlite 1.x - Straightforward: No surprises: pysqlite 2.0 does not convert any types behind your back. With default settings, it only supports the database types SQLite supports out of the box: INTEGER, REAL, TEXT, BLOB and NULL. - Documentation: pysqlite 2.0 now has usable documentation. The usage manual covers the full API. - Advanced type system: It is, however, possible to turn on type detection like in the old pysqlite. Types can be detected by their declared type in the "CREATE TABLE" statement. Or, for values that don't originate directly from tables or views, it's possible to detect the type from the column name via a neat trick. For details, look into the pysqlite usage manual. No more "-- types" hack like in the old pysqlite. Type conversion from Python to SQLite works via PEP-246-like object adaptation. - Fine-grained transaction control: pysqlite 2.0 allows to control which type of transactions are opened via the transaction_isolation property - None for auto-commit mode or one of SQLite's transaction types "DEFERRED", "IMMEDIATE", "EXCLUSIVE". - executemany() uses precompiled statements for optimal speed. - Result sets are not prefetched any more, rows are only fetched on demand. So, pysqlite 2.0 behaves a lot nicer with respect to memory usage. - pysqlite 2.0 supports both the "qmark" and "named" paramstyle. So you can supply query parameters as sequences or as mappings. - Performance: pysqlite 2.0 is almost entirely written in hand-coded C. Under most circumstances, it is noticeably faster than the old pysqlite. On the pysqlite wiki, there's a page with benchmarks: http://initd.org/tracker/pysqlite/wiki/PysqliteBenchmarks The benchmark shows that executemany() is 5 times as fast as in pysqlite 1.1. Open issues: pysqlite 2.0 does currently not compile under MacOS X Tiger (10.2 seems to work for me on the SF compile farm), because of unresolved symbols. Unfortunately, I don't have access to that platform. I will need a patch with a real fix from a MacOS X users to fix the problem. And, for those who have followed the alpha/beta testing: Changes since pysqlite 2.0beta1 === - Removed dead code. - Improved error handling. - Fixed a leak that occurred when erroneous SQL was sent to execute(many)(). - Recognize REPLACE as DML statement and start transactions appropriately. - Issue a Warning when users send more than one SQL statement to execute(many)(). - Changed a few mappings SQLite error => DB-API exception. - Added lots of new unit tests so all testable code paths are tested/executed. This was done when doing coverage testing using gcov. - Implemented a nonstandard convenience method cursor.executescript(sql) to execute several SQL statements in a bunch, for example for creating a database initially. - The converters dictionary was moved from the Connection object into the DB-API module. Register converters with
SoCal Piggies Meeting 05/17
The Southern California Python Interest Group (aka SoCal Piggies) will meet tomorrow 05/17 at USC from 7 PM to 9 PM. If you are interested, please check the group's Wiki for more details: http://agile.unisonis.com/socalpiggies Grig Gheorghiu -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html
Dr. Dobb's Python-URL! - weekly Python news and links (May 16)
QOTW: "As you learn Python, you will find that your PHP code will improve, possibly becoming more and more concise until it disappears completely." - Jorey Bump (Responding to a quotaton of Sturgeon's law: "Ninety percent of everything is crap.") "fwiw, this is of course why google displays 10 results on the first page. according to the law, one of them is always exactly what you want." - Fredrik Lundh Testing for an empty iterator: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413614 Python email libraries, part 1: POP3: http://www.devshed.com/c/a/Python/Python-Email-Libraries-part-1-POP3/ Solipsis, a peer-to-peer system for a massively multi-participant virtual world: http://solipsis.netofpeers.net/wiki/HomePage/ Twisted reStructuredText server: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413609 How can Python's documentation be improved? http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/d96afc7dd63cbe24 Static typing exposed: http://seanmcgrath.blogspot.com/archives/2005_05_08_seanmcgrath_archive.html#111597032916040577 Finding Unique Elements in a List: http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/3011d698d9b764f2 Diving into PyParsing: http://www.advogato.org/person/titus/diary.html?start=89 Notable releases: PyGTK 2.6.2: http://www.pygtk.org/ Python for .NET 1.0 RC1 http://www.zope.org/Members/Brian/PythonNet Everything Python-related you want is probably one or two clicks away in these pages: Python.org's Python Language Website is the traditional center of Pythonia http://www.python.org Notice especially the master FAQ http://www.python.org/doc/FAQ.html PythonWare complements the digest you're reading with the marvelous daily python url http://www.pythonware.com/daily Mygale is a news-gathering webcrawler that specializes in (new) World-Wide Web articles related to Python. http://www.awaretek.com/nowak/mygale.html While cosmetically similar, Mygale and the Daily Python-URL are utterly different in their technologies and generally in their results. For far, FAR more Python reading than any one mind should absorb, much of it quite interesting, several pages index much of the universe of Pybloggers. http://lowlife.jp/cgi-bin/moin.cgi/PythonProgrammersWeblog http://www.planetpython.org/ http://mechanicalcat.net/pyblagg.html comp.lang.python.announce announces new Python software. Be sure to scan this newsgroup weekly. http://groups.google.com/groups?oi=djq&as_ugroup=comp.lang.python.announce Steve Bethard, Tim Lesher, and Tony Meyer continue the marvelous tradition early borne by Andrew Kuchling, Michael Hudson and Brett Cannon of intelligently summarizing action on the python-dev mailing list once every other week. http://www.python.org/dev/summary/ The Python Package Index catalogues packages. http://www.python.org/pypi/ The somewhat older Vaults of Parnassus ambitiously collects references to all sorts of Python resources. http://www.vex.net/~x/parnassus/ Much of Python's real work takes place on Special-Interest Group mailing lists http://www.python.org/sigs/ The Python Business Forum "further[s] the interests of companies that base their business on ... Python." http://www.python-in-business.org Python Success Stories--from air-traffic control to on-line match-making--can inspire you or decision-makers to whom you're subject with a vision of what the language makes practical. http://www.pythonology.com/success The Python Software Foundation (PSF) has replaced the Python Consortium as an independent nexus of activity. It has official responsibility for Python's development and maintenance. http://www.python.org/psf/ Among the ways you can support PSF is with a donation. http://www.python.org/psf/donate.html Kurt B. Kaiser publishes a weekly report on faults and patches. http://www.google.com/groups?as_usubject=weekly%20python%20patch Cetus collects Python hyperlinks. http://www.cetus-links.org/oo_python.html Python FAQTS http://python.faqts.com/ The Cookbook is a collaborative effort to capture useful and interesting recipes. http://aspn.activestate.com/ASPN/Cookbook/Python Among several Python-oriented RSS/RDF feeds available are http://www.python.org/channews.rdf http://bootleg-rss.g-blog.net/pythonware_com_daily.pcgi http://python.de/backend.php For m
ANN: org.keyphrene is now available
org.keyphrene is a Python wrapper for LibSSH2 and OpenSSL libraries. Includes: yEnc coder and decoder org.keyphrene is available for download from the Keyphrene web site: http://www.keyphrene.com/products/org.keyphrene/ -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html
ANN: Rekall/WEB
Hi I would like to announce the release of Rekall/WEB. Through the power of Python, you can now turn your Rekall desktop application into a web based application, with any loss of functionality and with a comparable look 'n feel. You can now design on the desktop and deploy on the web. There is no long an need to go through endless cycles of editing, uploading, and testing. You can even design your database tables, develope and test complex quiries, develope your back-end business logic, etc all within one powerful easy to use desktop application - Rekall. Take a look at www.rekallrevealed.org for a very simple example of a Rekall/WEB powered web site. More information on Rekall/WEB is available at both www.rekallrevealed.org and www.totalrekall.co.uk -- Best Regards John -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html