SPYCE - Server Python Pages
SPYCE is a webserver plugin that supports simple and efficient
Python-based dynamic HTML scripting. Those who like Python and are
familiar with JSP, or PHP, or ASP, should have a look at this engine. It
allows one to generate dynamic HTML content just as easily, using Python
for the dynamic parts. Its modular design makes it very flexible and
extensible. It supports FastCGI, CGI and mod_python to plugin into Apache
and most other webservers. It can also be used as a command-line utility
for HTML pre-processing or as a web server proxy.
v1.1.45 released on 13 October 2002.
Get it at:
http://spyce.sourceforge.net
----------
Most important changes since last posting (v1.1.39):
external:
- modules can now accept arguments
- added server-level configuration file
- site and documentation revamp
- exception tracebacks identify specific error lines in code chunks
- file globbing added to command-line interface
- module directive deprecated; replaced with import
internal:
- redesigned modules interface
- extended contants lists to conform to HTTP and HTML specs.
- performance improvements
modules:
- new error handling module
- added redirection to stdout module and loaded implicitly
- new table of contents module
----------
Partial change log:
Change Log
v1.1.45
site and documentation revamp
refactored the spyceModule class (see spyceModule.py)
altered all standard modules to conform to new internal design
new table-of-contents (toc) module (see docs)
improved stdout module (see docs)
added push() and pop() methods
now loaded implicitly
exception tracebacks in chunks identify specific error lines
file globbing added to -O command-line option
v1.1.44
module directive deprecated
replaced with import tag
import tag accepts args attribute
calls module init() method at location of directive
init() methods added to modules: session, compress
see: http://spyce.sourceforge.net/doc_lang_directive.htmlhttp://spyce.sourceforge.net/doc_mod.htmlhttp://spyce.sourceforge.net/doc_mod_compress.htmlhttp://spyce.sourceforge.net/doc_mod_session.htmlhttp://spyce.sourceforge.net/doc_mod_new.html
bugfix - modules finalized on redirect
v1.1.43
bugfix - included files not inheriting modules properly
bugfix - transform module inside included file
v1.1.42
renamed spyce.conf to spyceApache.conf
renamed spyceApache to spyceModpy
renamed run_spyceApache to run_spyceModpy (affect spyceApache.conf)
added server-level configuration file functionality
server module search path
modules to load at startup
server-level error handler
global server variables
see: docs/doc_conf_common.html
added response.isCancelled() function
see: docs/doc_mod_response.html
bugfix - early client disconnect caused problems under mod_python
v1.1.41
extended HTTP response constants to conform to spec
extended HTML entity encoded characters to conform to spec
modified internal buffering semantics to allow eliminiation of special
case code for specific HTTP return codes (redirects) in the common path
performance improvements
convenience functions transform.html_encode() and url_encode() added
error module added: handles errors that occur during spyce processing
bugfix - HTTP return codes propagated correctly under mod_python
v1.1.40
bugfix - spyce syntax error propagated properly
response headers cleared on an internal redirect
case insensitive request.get,post,get1,post1,file
v1.1.39
modified how filter module injects itself into output stream
added response.addFilter() to allow piped functionality
on the output stream, modules can insert write, writeStatic,
writeExpr, flush and clear handlers
added compress module for dynamic compression functionality
compress module documentation
renamed filter module to transform (name conflict with Python builtin)
sys.path forced to be absolute before changing directory in CGI mode
bugfix - spyce path trimmed to just filename when directory changed for
CGI processing
bugfix - spyce web server closes sockets
...
Enjoy,
Rimon.
--
* Rimon Barr Ph.D. candidate, Computer Science, Cornell University
| barr(a)cs.cornell.edu - http://www.cs.cornell.edu/barr - Y!IM: batripler
+----
I am happy to announce the release of the
TextIndexNG Extensions for Python 1.05
These extensions were developed as support modules for the Zope fulltext
index TextIndexNG and they are now available as standalone package.
The package consists of four independent modules:
- TXNGSplitter: a very customisable module to split a string
into words
- PySimilarity: implements the soundex, metaphone, double metaphone
algorithms
- PyStemmer: linguistic stemmer support for 13 languages
- normalizer: linguistic normalization by replacing e.g. accented
characters by a more simpler representation
All modules support unicode.
License: Zope Public License (ZPL)
Download:
http://sourceforge.net/project/showfiles.php?group_id=50052
Optik 1.4
=========
Optik is a powerful, flexible, extensible, easy-to-use command-line
parsing library for Python. Using Optik, you can add intelligent,
sophisticated handling of command-line options to your scripts with very
little overhead.
Here's an example of using Optik to add some command-line options to a
simple script:
from optik import OptionParser
[...]
parser = OptionParser()
parser.add_option("-f", "--file",
action="store", type="string", dest="filename",
help="write report to FILE", metavar="FILE")
parser.add_option("-q", "--quiet",
action="store_false", dest="verbose", default=1,
help="don't print status messages to stdout")
(options, args) = parser.parse_args()
With these few lines of code, users of your script can now do the
"usual thing" on the command-line:
<yourscript> -f outfile --quiet
<yourscript> -qfoutfile
<yourscript> --file=outfile -q
<yourscript> --quiet --file outfile
(All of these result in
options.filename == "outfile"
options.verbose == 0
...just as you might expect.)
Even niftier, users can run one of
<yourscript> -h
<yourscript> --help
and Optik will print out a brief summary of your script's optons:
usage: <yourscript> [options]
options:
-h, --help show this help message and exit
-fFILE, --file=FILE write report to FILE
-q, --quiet don't print status messages to stdout
That's just a taste of the flexibility Optik gives you in parsing your
command-line. See the documentation included in the package for
details.
AUTHOR, COPYRIGHT, AVAILABILITY
-------------------------------
Optik was written by Greg Ward <gward(a)python.net>
The latest version of Optik can be found at
http://optik.sourceforge.net/
Copyright (c) 2001 Gregory P. Ward. All rights reserved.
CHANGES IN OPTIK 1.4
--------------------
[editorial note: most significant code changes in Optik 1.4 were
made by David Goodger; except as noted below, David should be credited
with everything in this list! I just rearranged some of his changes,
renamed a few thing, and put out the release. --Greg]
* Factored the help-formatting code out of OptionParser into
some new classes (HelpFormatter and subclasses) in help.py. This
should make it a lot easier to customize how help is formatted.
* Added the notion of "option groups": an OptionParser can now
contain several option groups, each which contains several options.
The main purpose of this is to enable sensibly-grouped help output,
but it opens up all sorts of interesting (and largely untested)
possibilities for code to throw whole option groups around instead
of individual options. Added two new classes: OptionGroup, and
OptionContainer for code common to OptionParser and OptionGroup.
(OptionContainer should be invisible to programmers using Optik).
* Added the 'description' attribute and set_description() method to
both OptionParser and OptionGroup (actually OptionContainer, but
I just said that class was invisible). Again, this is to make
help output more useful.
* Made it easier for OptionParser subclasses to decide whether
they should have the standard "help" option, by moving the logic
from class level to the _populate_option_list() method.
* Added the "choice" option type, which is just a string type
constrained to a fixed set of values.
* Added method get_default_values() to OptionParser.
* Rewrote how OptionParser recognizes abbreviated long
options; removed a redundant internal instance attribute.
* Simplify parsing logic in OptionParser a tad by relocating a loop
and renaming _process_arg() to _process_args().
--
Greg Ward <gward(a)python.net> http://www.gerg.ca/
Jesus Saves -- and you can too, by redeeming these valuable coupons!
NAME:
ldiftemplate - a small module for quick "boss can add ldap objects" scripts.
DESCRIPTION:
When you're really happy with your ldap tree the moment comes where a dumb
person (boss) asks you how he can hang new objects into this fancy tree
by himself... Ugly... :-)
This class gives me the ability to code simple scripts my boss can use to
add some objects. It uses LDIF templates derived from real objects -- with
simple placeholders in it.
The class gives you a list of placeholders and descriptions so it is easy
to print them before requesting the values (boss can see what he needs).
After doing setPlaceholder( key, val ) for every placeholder you simply call
getTupleList() to get a list with the two args you need for ldap.add_s().
It is fairly simple.
MISSING FEATURES:
- no support for base64 data ("name:: VALUE" in LDIF)
- no detection for cross placeholder replacing
[2 placeholders TTT and BUG: call setPlaceholder( 'TTT', 'HUMBUG') +
setPlaceholder('BUG','something'): --> 'TTT: HUMsomething']
HOMEPAGE:
http://www.home.unix-ag-org/tjabo/ldap/ (german)
The in-source docs are english. And there's a method ".sample()", printing
a sample LDIF template.
Yes, the class's name is "new". I did not want to type "ldiftemplate"
over and over again...
HINT:
Use placeholders with three or more BIG LETTERS!
EXAMPLES/DEMO:
I'll show how to add simple "customer" objects. They need cn and custID:
TEMPLATE (newCustomer.template):
#TITLE Quick new customer.
#DEF XXX Name of customer
#DEF YYY Customer id
dn: cn=XXX,ou=customers,o=company
objectClass: customer
objectClass: top
cn: XXX
custID: YYY
SCRIPT:
#!/usr/bin/env python2.2
import ldiftemplate
t = ldiftemplate.new( 'newCustomer.template' )
ph = t.getPlaceholders() # [ ('XXX', 'Name of customer'), ... ]
print t.title
print " I need: \n - " + "\n - ".join( map( lambda x: x[1], ph ) )
for p in ph:
e = raw_input( "%s> " % ( p[1] ) )
t.setPlaceholder( p[0], e )
print t.getTupleList()
OUTPUT:
Quick new customer.
I need:
- Name of customer
- Customer id
Name of customer> FlyLime Ltd
Customer id> 1034
('cn=FlyLime Ltd,ou=customers,o=company', [('objectClass', ['customer',
'top']), ('custID', ['1034']), ('cn', ['FlyLime Ltd'])])
The next step would be to do ldap.initialize(...), bind(...), and
l.add_s( L[0], L[1] ).
INSTALLATION:
Copy ldiftemplate.py to a good place. :-)
"/usr/lib/python2.2/site-packages/"
or
"<the directory where your program is>"
--
Tjabo Kloppenburg
GnuPG Key is on http://www.home.unix-ag.org/tjabo/kontakt.html
I'm pleased to announce that v. 1.29.0 of the Boost C++ libraries
(http://www.boost.org) has been released!
This marks the first release of v2 of the Boost.Python library
(http://www.boost.org/libs/python), a C++ library enabling seamless
interoperability between C++ and the Python programming language. The
new version has been rewritten from the ground up, with a more
convenient and flexible interface, and many new capabilities,
including support for:
- References and Pointers
- Globally Registered Type Coercions
- Automatic Cross-Module Type Conversions
- Efficient Function Overloading
- C++ to Python Exception Translation
- Default Arguments
- Keyword Arguments
- Manipulating Python objects in C++
- Exporting C++ Iterators as Python Iterators
- Documentation Strings
Of course, the old abilities to wrap classes and functions are still
there. Thanks to all Boost.Python's contributors and users for their patience
and their support.
--
David Abrahams * Boost Consulting
dave(a)boost-consulting.com * http://www.boost-consulting.com
sfcvs is a small Python script that allows people behin http proxies to
automatically retrieve files stored on SourceForge CVS servers. It is using
the viewcvs web interface of sourceforge and should work with little
modification on other similar websites.
Now you can happily cvs checkout python like the others.
It was tested with Python 2.2 on Windows and Linux.
http://www.angelfire.com/rnb/sfcvs/
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
The goal of the Flightdeck-UI project is to apply ideas from
aircraft instrumentation design to general purpose user interfaces.
Release 0.1.3 adds an analog dial element and a status line element
with general annunciator features, as well as making other
enhancements. In addition, most Flightdeck-UI elements are now
created by using a new Singleton class factory. There has also been a
lot more testing of the code since the previous version.
The project homepage is at "http://www.openlight.com/fdui/".
Flightdeck-UI is open source. It is written in Python
and requires Tkinter.
Questions can be emailed to originating address of this message.
FixedPoint release 0.1.1
What it is
==========
This package encapsulates the representation of a fixed point number in
Python. It was originally written by Tim Peters and posted to the Python
Starship.
What it does
============
The FixedPoint object supports all suitable Python operators to enable the developer
to perform fixed point math in a natural way.
What's New
==========
This is a (hasty) bugfix release for 0.1.0
We discovered that my alternative rounding algorithm didn't behave
correctly for negative quotients.
Tim, the original author recommended making _roundQuotient a member of
FixedPoint, enabling the rounding algorithm to become a normal member,
rather than a static member.
While refactoring, I changed the name from 'RoundingAlgorithm'
to the less verbose 'round'.
So instead of
from fixedpoint import FixedPoint, BankersRounding
FixedPoint.RoundingAlgorithm = staticmember(BankersRounding)
you can say
from fixedpoint import FixedPoint, bankersRounding
FixedPoint.round = bankersRounding
We got a good description of rounding philosphy from Tim in an email.
Joe has incorporated this in the documentation.
There's a link to HTML rendering of the LaTex documentation at the
project website:
http://fixedpoint.sourceforge.net
What's Next
===========
This release (really truly) concludes our planned changes to FixedPoint.
We're going to sit back and watch for bug reports and feature
requests, but we won't mess with the code anymore without
provocation.
--
Doug Fort, Programmer
http:/www.dougfort.net
NAME:
PySQLite - Extension module for SQLite databases.
DESCRIPTION:
A Python-DB API 2.0 compliant extension module that uses the SQLite
embedded SQL database. No external SQL server required. Think of
Gadfly, only faster.
SQLite is a powerful, embedded relational database in a compact C
library. It supports a large subset of SQL92, multiple tables and
indices, transactions, and triggers. Sources are uncopyrighted and
can be used for any purpose. More information can be found at
<http://www.hwaci.com/sw/sqlite/index.html>.
HOMEPAGE:
<http://pysqlite.sourceforge.net>
DOWNLOAD:
Source and Windows binary downloads are available at
<http://www.sourceforge.net/projects/pysqlite>
AUTHORS:
Gerhard Häring <gerhard.haering(a)gmx.de>
Michael Owens <mike(a)mikesclutter.com>
LICENSE:
Python
NOTES:
The following are changes and enhancements since the last release:
* Make the test suite less noisy. If you want to enable tracebacks of
user-defined functions or aggregates, you'll now have to enable them via
_sqlite.enable_userfunction_debugging. This closes bug reports #608421 and
#608426.
* Fixed lots of bugs in PgResultSet. Access of columns is now
case-insensitive.
* Added test suite for PgResultSet class.