XIST 2.5
Grok Headline matches for XIST 2.5
XIST 2.3
XIST 2.3
12/08/2003 04:42 PMAn XML-based extensible HTML generator written in Python.
XIST 2.4
XIST 2.4
01/02/2004 06:09 PMAn XML-based extensible HTML generator written in Python.
Python and XML: Writing and Reading XML
with XIST
Python and XML: Writing and Reading XML
with XIST
03/17/2005 04:21 AMIn Uche Ogbuji's latest Python and XML column he introduces XIST,
which has been called "object-oriented XSLT for Python" -- a framework
for manipulating XML Pythonically.
Grok Description matches for XIST 2.5
GrokA matches for XIST 2.5
Python and XML: XML Namespaces Support
in Python Tools, Part Three
Python and XML: XML Namespaces Support
in Python Tools, Part Three
06/30/2004 07:31 PMIn this month's Python and XML column Uche Ogbuji examines the
namespace support in ElementTree, PyRXPU, and libxml.
Python and XML: XML Namespaces Support
in Python Tools, Part Two
Python and XML: XML Namespaces Support
in Python Tools, Part Two
05/13/2004 07:55 PMIn his latest Python and XML column, Uche Ogbuji continues his tour of
XML namespaces support in Python tools, focusing this time on 4Suite.
Backporting from Python 2.3 to Python
2.2
Backporting from Python 2.3 to Python
2.2
06/08/2004 11:18 PMWe have a home-grown templating system at work, which I
intend to dedicate an entry to some time in the future. We originally
wrote it in Python 2.2, but upgraded to Python 2.3 a while ago and
have since been evolving our code in that environment. Today I found a
need to load the most recent version of our templating system on to a
small, long neglected application that had been running the original
version ever since it had enough features to be usable.
Unfortunately, this application was running on a server
that only had Python 2.2. Installing Python 2.3 would have been
somewhat more painful here than on other servers we run for reasons I
won't go in to, so I decided to have a go at getting our current code
to run under the older Python version.
In the end, I only had to make three minor changes, all at
the top of the file in question.
I added from __future__ import
generators as the very first line of the file. We use
generators (with the yield statement) in a
few places - this feature was only properly added in Python 2.3, but
was made available in Python 2.2 as a "future enhancement" through the
aforementioned obscure import.
I added True, False = 1,
0 on the next line down. Surprisingly, Python 2.2 had no
support for a boolean type and instead used a test for non-zero
instead. The above line defines constants that behave enough like
Python 2.3's True and False to avoid any problems.
I defined an enumerate
function, which was introduced for real in Python 2.3. Here's the code
I used:
def enumerate(obj):
for i, item in zip(range(len(obj)), obj):
yield i, item
All in all it only took around ten minutes to put the
above together, after which the script worked just fine. It was
interesting to see how our code had grown to rely on Python 2.3
features without us realising it.
Security Update 2004-01-26 (10.3.2
Client) 10.3.2 Client
Security Update 2004-01-26 (10.3.2
Client) 10.3.2 Client
01/26/2004 09:57 PMDelivers a number of security enhancements and is recommended for all
Macintosh users.
Security Update 2004-01-26 (10.2.8
Client) 10.2.8 Client
Security Update 2004-01-26 (10.2.8
Client) 10.2.8 Client
01/26/2004 09:57 PMDelivers a number of security enhancements and is recommended for all
Macintosh users.
SMS 2003 Client Install and v1.2 Client
Upgrade
SMS 2003 Client Install and v1.2 Client
Upgrade
05/09/2004 03:10 AMPython 2.3
Python 2.3
10/28/2003 11:06 PM
Python 2.3 was released
yesterday... and not a moment too soon. I was just swearing under my
breath about this sort of nonsense:
>>> cosmos = technorati.cosmos('http://diveintomark.org/')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "technorati.py", line 214, in cosmos
xmldoc = minidom.parseString(rawdata)
File "/usr/lib/python2.2/site-packages/_xmlplus/dom/minidom.py",
line 1605, in parseString
return expatbuilder.parseString(string)
, in parseString
return builder.parseString(string)
File
"/usr/lib/python2.2/site-packages/_xmlplus/dom/expatbuilder.py",
line 187, in parseString
parser = self.getParser()
File
"/usr/lib/python2.2/site-packages/_xmlplus/dom/expatbuilder.py",
line 119, in getParser
self._parser = self.createParser()
File
"/usr/lib/python2.2/site-packages/_xmlplus/dom/expatbuilder.py",
line 734, in createParser
parser.namespace_prefixes = True
AttributeError: namespace_prefixes
OS X users, don't be discouraged by the mention of there being no
MacPython version yet or daunted by the task of compiling it from
source --
MacP
ython 2.3 lives and is just a few glorious GUI installer clicks
away.
Python 2.3.3
Python 2.3.3
12/30/2003 05:13 PMA high-level scripting language.
Python-SIP 3.9
Python-SIP 3.9
12/08/2003 04:42 PMA tool to generate Python bindings from C++ code.
MPY (MPi for pYthon)
MPY (MPi for pYthon)
06/26/2004 05:20 PMMPY Version 0.1 Released
Another look at PHP and Python
Another look at PHP and Python
02/10/2004 02:46 AMPostscript: Some people have got the impression from this article
that I am moving away from PHP. That is far from the truth. I will
continue to use PHP extensively today, tomorrow and for the forseeable
future.
I find Python harder than PHP.
It could be because we are programming multi-threaded networked
servers in Python, and that
could be inherently harder than coding dynamic web-sites.
Another reason could be lack of familiarity with
Python. For example, I couldn't find the equivalent of htmlspecialchars
and other functions, so i had to roll my own.
Despite all these issues, we are continuing to develop this in
Python because (AFAIK) PHP does not have stable networking frameworks.
So what do I like about Python?
- Neat Syntax
The use of indentation for compound statements discourages deep
nesting, and thus more modular code.
- More Safety Checks
In PHP, when you search using a regular expression, an associative
array is returned.
In Python, a typed object, "match" is returned when a regular
expression search is performed,
and not a generic dictionary. You cannot perform arithmetic on
strings, an explicit cast is required; neither
can you concatenate numbers with strings, explicit typecasts are
needed.
- Supports Multi-Threaded Apps
There exists a global lock in Python that prevents multi-threading
from working effectively on multiple processors - nevertheless Python
has reasonable thread support and allows me to develop reasonably
responsive servers.
- Python's Compiler is Standard
Python has a standard compiler and byte-code format. There is no
such standard in the PHP world, and
most ISP's don't support Zend or Turck MMCache encoded PHP. Better
still, a debugger is included in the package too.
- Python Fully Supports Unicode
Python 2.0 and later has full support for unicode. For example to
convert big5 to unicode is the simple:
unicode_str = unicode(tw_chinese_string, 'big5')
In contrast, see how complicated it is to perform
double-byte to unicode conversions in PHP (see User Notes).
The only issue i had with the unicode support is that it doesn't
come with a complete set of double-byte decoders (eg. big5, gb). After
a 20 minute google search, i found this set of python cjk decoders.
And what I dislike about Python
- Python Is Not Rapid Enough?
I think that PHP is a better tool for rapid application
development, especially for web-sites. Minor type issues are handled
for you transparently in PHP. In Python, once a variable is set,
stricter type-checking is performed on most operations.
So you can argue that Python is safer. But PHP coding is definitely
more rapid.
Another thing i dislike is that Python's import/load facility does
not check .py file modification dates. If i modify a .py file,
Python's run-time environment will not recompile it until i restart
Python, or perform a reload manually from the command-line
interpreter.
- Database Access
Python does not have official database drivers, and you have to
select and download these drivers
yourself. It's easy to get it wrong. For example, only after coding
the adodb_odbc module using PythonWin
odbc extension did i
realize how awful PythonWin odbc was. I then found the mxODBC
extension - unfortunately the mxODBC requires commercial
licensing ($75 per CPU).
- Python is Not That Popular
Popularity is relative. There are lots of Python programmers - but
there are perhaps 3 times more PHP programmers than Python ones. In
Malaysia, the ratio of PHP to Python programmers is probably much
worse (10:1?). And there are many training centers offering PHP
courses. AFAIK, there are no centers in Malaysia offering Python
training.
A quick search in monster.com reveals the following (numbers might
change over time):
PHP: 131 jobs
http://jobsearch.monster.com/jobsearch.asp?q=php&re=0&sort=rv&tm=&fn=6
60&vw=b&cy=US&brd=1%2C1862%2C1863
Python: 41 jobs
http://jobsearch.monster.com/jobsearch.asp?q=python&re=0&sort=rv&t
m=&fn=660&vw=b&cy=US&brd=1%2C1862%2C1863

Python-SIP 4.1.1
Python-SIP 4.1.1
09/24/2004 03:30 PMA tool to generate Python bindings from C++ code.
Python-SIP 4.0
Python-SIP 4.0
06/23/2004 12:48 PMA tool to generate Python bindings from C++ code.
XML with Xen and with Python
XML with Xen and with Python
12/19/2004 03:53 PMHere is a comment on the paper "Programming with Circles,
Triangles and Rectangles" by Erik Meijer et al. Perhaps interesting
for XML programmers.
PHP Everywhere: Python vs. PHP?
PHP Everywhere: Python vs. PHP?
03/30/2005 09:12 AMFrom
PHP
Everywhere today:
Python-SIP 4.0.1
Python-SIP 4.0.1
07/06/2004 06:45 AMA tool to generate Python bindings from C++ code.
python-gammu 0.4
python-gammu 0.4
01/22/2004 08:38 AMPython bindings for Gammu.
Acme-Python-0.01
Acme-Python-0.01
04/05/2005 04:53 PMOptimising Python
Optimising Python
10/29/2003 12:12 AMSome great tips for optimising Python, courtesy of Ian Bicking:
Javascript from Python
Javascript from Python
12/29/2003 06:51 PMIn a way I'm disappointed to see python-sp
idermonkey released. It's a Python wrapper around the Mozilla
project's SpiderMonkey Javascript
engine which allows Python scripts to execute Javascript code in a
rock-solid, battle-tested embedded interpreter.
Why the disappointment? Because just 5 days ago I decided that a
Python wrapper for SpiderMonkey would be the ideal project for me to
finally attempt to do something productive with C. John J. Lee
evidently beat me to it. I can't complain though, as I was estimating
a good six months to figure out how to get it all working.
Pettiness aside, this looks like a really valuable project. In
addition to being critical for such things as web based unit testing
(John's DOMForm does
exactly that) it may also provide a useful "sandbox" protected
interpreted scripting language for Python projects. Python's own rexec
module is meant to provide a safe sandbox for executing
potentially hostile code but has been disabled due to potential
vulnerabilities. The SeaMonkey Javascript interpreter is tried and
tested in this capacity, at least in its incarnation within the
Mozilla family of web browsers.
Python Revisited
Python Revisited
01/01/2004 02:44 PMHappy New Year! Let's talk shop as usual.
Recently, we've been looking at developing some server software in
Python. This is my first serious look at Python since 1999, and I'm
impressed with the improvements. It's a couple of years older than
PHP, and certainly more mature. Python has a reputation for being
more rationally designed than PHP or Perl, and in general that's true;
but you can still see Python's age in the fact that there are many
APIs that do the same thing (eg. the string functions).
PHP is still a better language for web development because it is a
simpler language, easy to teach to Java or Javascript programmers, has
more flexible string processing, and designed to work well with
templates.
But as a general programming language, Python has its advantages. You
can build sophisticated networking software with Python that supports
threads and asynchronous connections with reasonable efficiency
(though Python doesn't really take advantage of multiple CPU's due to
an internal global lock). The Twisted and Dibbler frameworks are testament to that. Python's
C API is well documented and Python can be easily embedded into 3rd
party apps.
Python is also a good source of design ideas. I have noticed that othe
rs have realized that many good Java ideas do not translate well
to PHP. There is an impedence mismatch; many things that are hard in
Java are easy in PHP. It makes sense to create an elaborate framework
in Java to do something that's hard in Java, but to apply the same to
PHP suggests more energy than sense. In contrast, I suspect that
Python and PHP are more complementary than we all suspect...
PS: We also had a look at developing the same server software using
.NET. However .NET doesn't have builtin support for open protocols
such as POP3 and IMAP. I continue to be amused at the (intentional?)
omissions in the .NET framework.

X Python Newsreader 0.2.6
X Python Newsreader 0.2.6
04/24/2004 09:03 AMAn online newsreader with Unicode support.
Python IRC library 0.4.1
Python IRC library 0.4.1
10/30/2003 04:58 AMA Python IRC library.
Possible windows+python bug
Possible windows+python bug
03/22/2005 05:13 PMliquid_at_cyberspace.org (Mar 22 2005)
Exim-Python py1
Exim-Python py1
04/26/2004 06:06 AMAn Exim extension for executing Python functions.
What Python Can Do for the Enterprise
What Python Can Do for the Enterprise
03/20/2003 01:05 PMWith all the attention focused on Java and C#, companies may be
missing out on a programming language that might be better suited to
their needs. It is called Python, and it is known for its simplicity
-- no small feat for a programming language. But can it crack the
enterprise market?
Python Scripting For .NET
Python Scripting For .NET
03/19/2003 10:41 PM
Brian
Lloyd: I've finally been able to post an initial
(experimental) version of Python Scripting for .NET [via
Sean
McGrath]
First impressions: this looks like the first step towards where
PerlNET has
ended up: two VMs, two garbage collected heaps, but on the bright
side, every existing Python application runs without change or
without any performance degradation.
Python Web Objects 0.72
Python Web Objects 0.72
03/16/2003 05:54 AMA dynamic page generation system for embedding Python code in HTML.
Python Web Objects 0.71
Python Web Objects 0.71
03/16/2003 03:05 AMA dynamic page generation system for embedding Python code in HTML.
Re: Possible windows+python bug
Re: Possible windows+python bug
03/22/2005 06:53 PMazurIt (Mar 22 2005)
XIST 2.5