stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


A Python & XML Companion







A Python & XML Companion

A Python & XML Companion 12/11/2002 08:23 PM

In the latest Python and XML column Uche Ogbuji offers a companion to the successful Python & XML book by Drake and Jones.




This is a GrokNews Entry: (what is grok?)





Similar Items

A Python & XML Companion

Grok Headline matches for A Python & XML Companion

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 PM
In his latest Python and XML column, Uche Ogbuji continues his tour of XML namespaces support in Python tools, focusing this time on 4Suite.

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 PM
In this month's Python and XML column Uche Ogbuji examines the namespace support in ElementTree, PyRXPU, and libxml.

DBA Companion 1.3


DBA Companion 1.3 12/29/2003 09:21 PM
An Oracle data dictionary browser.

Car Companion 1.0.0


Car Companion 1.0.0 01/16/2004 11:03 AM
Maintain your vehicle’s maintenance schedule.

WoW Companion


WoW Companion 03/29/2005 04:39 AM
WoWC Client v0.1.10 Coming

Car Companion


Car Companion 12/23/2003 09:21 PM
Car Companion 0.0.2 Released

Ragchewer's Companion 1.0


Ragchewer's Companion 1.0 03/21/2003 10:21 AM
10 minute ID Timer for Amateur Radio Operators. This is written in Realbasic. It has some nice background images from around the local area (Dahlonega, Ga).

GamePad Companion 2.2


GamePad Companion 2.2 07/26/2004 10:25 AM
Use your game controllers with Mac OS X games that don’t have built in support for them.

Pop-Up Stopper Companion v4.0.1000


Pop-Up Stopper Companion v4.0.1000 10/31/2003 06:17 PM
Stop Internet Solicitors, pop-up windows and online tracking with this handy browser toolbar for Internet Explorer. Pop-Up Stopper Companion provides more efficient pop-up and pop-under blocking technology in an easy to use Internet Explorer toolbar that is only active when your browser is open. Find and clean tracking files such as cookies, history and browser cache, and clean automatically as you surf from page to page. [Shareware $39.95 30 Days 1 MB]

k12 ltsp windows companion CD


k12 ltsp windows companion CD 04/25/2004 07:20 PM
k12wincd launched

The XML Schema Companion. Chapter 15:
Patterns


The XML Schema Companion. Chapter 15:
Patterns
01/07/2004 06:40 PM
Here, the most crucial concepts are covered first, including mastering the construction of document models, defining data types that can serve as reusable building blocks for your documents, learning how to master the powerful XML Schema pattern language and inheritance techniques. by Addison-Wesley. 0105

FileMaker Web Companion 6.0v2 Updater
released


FileMaker Web Companion 6.0v2 Updater
released
10/29/2003 11:25 AM
FileMaker Inc. has released an update for Mac OS X users sharing FileMaker files over the Web using FileMaker Web Companion. FileMaker Web Companion lets FileMaker users publish databases to the Web instantly -- or with middleware and Web authoring software for customized database Web publishing. The 6.0v2 updater fixes a problem with files unexpectedly closing when published with FileMaker Web Companion on Mac OS X 10.2.

SanDisk Cruzer Micro MP3 Companion


SanDisk Cruzer Micro MP3 Companion 04/09/2004 03:55 PM
JOEL JOHNSON -- SanDisk has a new set of flash drives out, the 'Cruzer Micro,' in 128, 256 and 512MB sizes. I'm at the point where I wouldn't even mention Yet Another Flash Drive, but SanDisk snuck in this marginally crafty Cruzer Micro MP3 companion, a AAA-powered music player that...

Concert Companion Gets Wide Testing


Concert Companion Gets Wide Testing 07/05/2004 08:10 AM

concert_companion.jpg imageGod bless Roland Valliere for disproving what I'd worked so hard to establish: that not everyone from Kansas City is a raving idiot. Valliere's Concert Companion, a Palm-based PDA that can be rented to orchestragoers that displays topical information about the ongoing performance (and that we've mentioned before) is now being widely tested by a variety of organizations, included our own New York Philharmonic. Although it's not an entirely un-bumpy ride -- The Times' reviewer had his unit lock up three times, although they don't mention if it had gotten wet when they hosed out his cage -- the Concert Companion is a great idea, and I'm glad to see it getting the chance it deserves.
Read - PDAs Take a Seat at the Symphony [Yahoo]

Related
The Concert Companion [Gizmodo]


Fairway - Open Source Golfer's Companion


Fairway - Open Source Golfer's Companion 09/24/2004 01:46 PM
Fairway Planning

Use Apple's iDVD Companion to align
buttons and more


Use Apple's iDVD Companion to align
buttons and more
02/17/2004 11:49 AM
I couldn't figure out any possible way to align buttons in iDVD 4 and then I ran across iDVD Companion on Apple's website. It's an AppleScript app which you launch and use along with iDVD. It appears to have been written fo...

TweakGuides.com - The Windows XP
Tweaking Companion (XPTC)


TweakGuides.com - The Windows XP
Tweaking Companion (XPTC)
04/12/2005 05:56 AM
The Windows XP Tweaking Companion (XPTC) .. GO THERE!

tweakguides.com/XPTC.html
track this site | 4 links


Yahoo Adds Targeted Ads to its Companion
Toolbar


Yahoo Adds Targeted Ads to its Companion
Toolbar
05/03/2004 08:58 PM
Search Engine Lowdown May 4 2004 0:12AM GMT

Star Wars: Comics Companion
Announced


Star Wars: Comics Companion
Announced
09/04/2004 12:55 AM
Coming in April from Dark Horse Comics is a guide for reader old and new. Star Wars: Comics Companion will be a softcover book that presents a complete chronological tour throughout the Star Wars comic book timeline. Written by comics writer Ryder Windham and Essential Guides author Daniel Wallace, this 200-page volume will span every comic published from Marvel's first issue up to Episode III. All under a new cover by Tsuneo Sanda.

Star Wars: The Comics Companion Gets
Hyped


Star Wars: The Comics Companion Gets
Hyped
03/14/2005 05:39 PM
Dark Horse has posted a new editorial for their upcoming Star Wars: The Comics Companion book. The definitive guideline spanning 25,000 years of Star Wars history, this book promises to have it all! Check out what co-writers Ryder Windham and Daniel Wallace have to say about the project over at Dark Horse's site.

PBS Companion Site Launched for "Prime
Suspect 6: The Last Witness"


PBS Companion Site Launched for "Prime
Suspect 6: The Last Witness"
05/31/2004 07:05 PM
On this new site you can Re-live the gritty history of this groundbreaking series with a Flash retrospective featuring dozens of scenes from previous installments of "Prime Suspect" and browse through information on each of the past titles in the "Prime Suspect" series. Additionally, have you ever wondered what Helen Mirren thinks of Jane Tennison? Find out in a candid interview online with the newly knighted Dame Helen Mirren, where she talks about returning to her Emmy-winning role after seven years.

Studycard Studio 2.4 Adds Palm OS
Companion Application


Studycard Studio 2.4 Adds Palm OS
Companion Application
03/22/2005 04:52 PM

Create Flashcards on Mac OS, Study on Palm OS

Digital Meadow today announced the release of Studycard Studio 2.4, the latest update to its multimedia flashcard application for Mac OS. Studycard Studio 2.4 becomes the first and only product in its class to offer a companion study application for the Palm OS(R) platform. The software allows students and educators to create flashcards or quizzes on Mac OS, then study them on Palm Powered(TM) handhelds.


Backporting from Python 2.3 to Python
2.2


Backporting from Python 2.3 to Python
2.2
06/08/2004 11:18 PM

We 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.

  1. 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.

  2. 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.

  3. 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.


New Browser Companion Puts Entire
Amazon.com Catalog at Web Surfers'
Fingertips


New Browser Companion Puts Entire
Amazon.com Catalog at Web Surfers'
Fingertips
08/31/2004 02:11 AM
WWWinkazon is an innovative Internet Explorer browser companion which smoothly integrates the Amazon.com catalog searching and buying process into the web browsing experience. Capable of being turned on and off with a single click, it allows surfers to search by simply selecting any text on any page, then displays the results in a compact format right at the bottom of the browser window. [PRWEB Aug 31, 2004]

Review of HP's iPaq rx3715 Mobile Media
Companion Pocket PC


Review of HP's iPaq rx3715 Mobile Media
Companion Pocket PC
09/03/2004 04:28 PM
Engadget Sep 3 2004 7:56PM GMT

New Browser Companion Brings the Web to
Children, Speakers of Foreign Languages,
and the Visually Impaired


New Browser Companion Brings the Web to
Children, Speakers of Foreign Languages,
and the Visually Impaired
07/07/2004 02:59 AM
Infowalker 2.0, released today, is a unique, free browser companion for Internet Explorer, which instantly analyzes web pages and dynamically illustrates, translates, and reads them aloud, displays them in large-type, and links directly to on-line catalogues. [PRWEB Jul 7, 2004]

PhatWare Releases PhatPad 2.0 Beta
Version, Featuring Companion Software
For Desktop PC


PhatWare Releases PhatPad 2.0 Beta
Version, Featuring Companion Software
For Desktop PC
08/11/2004 02:34 AM
Major Upgrade to Highest Rated Note-Taking Application for Windows Mobile software for Pocket PCs Also Includes Customizable Toolbar, Photo Backgrounds and More [PRWEB Aug 11, 2004]

Another look at PHP and Python


Another look at PHP and Python 02/10/2004 02:46 AM
Postscript: 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 PM
A tool to generate Python bindings from C++ code.

Python-SIP 4.0.1


Python-SIP 4.0.1 07/06/2004 06:45 AM
A tool to generate Python bindings from C++ code.

Python-SIP 4.0


Python-SIP 4.0 06/23/2004 12:48 PM
A tool to generate Python bindings from C++ code.

Python-SIP 3.9


Python-SIP 3.9 12/08/2003 04:42 PM
A tool to generate Python bindings from C++ code.

Python 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.

XML with Xen and with Python


XML with Xen and with Python 12/19/2004 03:53 PM
Here 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 AM
From PHP Everywhere today:

Python 2.3.3


Python 2.3.3 12/30/2003 05:13 PM
A high-level scripting language.

MPY (MPi for pYthon)


MPY (MPi for pYthon) 06/26/2004 05:20 PM
MPY Version 0.1 Released

Writev for Python 0.0.3


Writev for Python 0.0.3 12/27/2004 03:22 PM
A Python module that provides access to the POSIX writev call.

Python on the 6600


Python on the 6600 03/06/2004 01:56 AM

I just saw python running on the Nokia 6600. Soo cool. I can't wait to get my hands on it. You may have heard, but python is coming first, not perl. My next python script will be a bot from my phone.


Grok Description matches for A Python & XML Companion
GrokA matches for A Python & XML Companion

A Python & XML Companion

The following phrases have been identified by the grok system as matching this entry:

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

Automatic Numbering,
Part Two

Test Frameworks for
W3C Technologies

Running Multiple
XSLT Engines with
Ant

You Are Here
PHP Class
'lorenphplib_pattern
izer' released

lorenphplib_patterni
zer

Google Slip-Ups!
Future of the car
market

PHP: A love and hate
relationship

saltednutlog (11
December 2002)

TheOpenEnterprise.co
m: PHP5: Ready For
The Enterprise?

GetContentSize
Conference Agreement
PHP is a love-hate
relationship

Fink 0.5.0a
VeriSign Intros
WS-Security
Implementation,
Toolkit

Corel Soups up XML
Platform

Blogger API v2
CompUSA
Serial Adapters
Cookie Jar
New Google Labs!
New Google Lab toys
spamming weblogs?
Kernel Mode Linux
Brandt's Blog
Credit Reports
Back on Track
Conferences Do
Matter

PHP Class 'Cookie
Jar' released

Golden Rules for
optimizing your PHP
pages

Interview with Tim
Perdue

Introduction to CSS
Shorthand

Build a page
framework in ASP.NET

Web Tool Moves More
Food Faster

Olden Times
Forum Banner
2002 thru the eyes
of Google

Popular Press on
Google

Keyword = Domain -
How Long Before it
is a Problem?

sighs
W3C Proposes XML
Encryption,
Decryption Specs

Outlook w/o Exchange
Server

First Amaya Welcome
Page Competition

XML Encryption,
Decryption Become
W3C Recommendations

Review: CSS:
Separating Content
from Presentation

On the 7th Day God
Created phpMyAdmin

Create database
models with Visio

Another Satisfied
Customer

Weblog Statistics
what is grok?