Simon Willison’s Weblog

Subscribe

921 items tagged “python”

2002

Python as middleware

OpenEnterpriseTrends.com: Python Power: Growing Respect for an Open Source Integration Tool. Another excellent piece of Python advocacy, this time highlighting Python’s power and flexibility as a middleware tool to glue together varous large enterprise systems.

[... 36 words]

Object persistence

Simon Brunning talks about persistence, and how much more complicated it is now that objects are involved. The best explanation I’ve seen of how objects and relational databases can be used together was in Martin Fowler’s Patterns of Enterprise Application Architecture, but now that the book has been published he has removed the online version. IBM’s DeveloperWorks has a new article up describing persistence management in Python, which talks in details about Python’s native serialization method (pickling) but only mentions ZODB in passing. I agree with Simon—object databases just don’t seem as elegant a solution as RDBMSs. Object databases may provide persistence but they don’t seem nearly as powerful as relational databases when it comes to flexibility of accessing data.

[... 141 words]

Linux Gazette Python articles

Linux Gazette has a couple of interesting Python articles at the moment. Dealing with User Input in Python is a beginners guide to validating user input, while Pl/Python and Cursors in Pl/Pgsql for PostgreSQL explains how Python can be used to write stored procedures in PostgreSQL.

[... 48 words]

PythonCard scriptlets

Kevin Altis on scripting applications written in PythonCard:

[... 334 words]

Python e-mail features

Python 2.2.2 is out. It’s mostly bug fixes, but they have also included the latest version of the Python email package. I’ve been playing with Python’s email features recently as part of an experimental idea to import all of my mail (from various accounts) in to a mySQL database and build my own web mail / mail application program. Working with email in Python is beautfully simple, thanks to the aforementioned email package and the powerful pop3 and IMAP classes in the standard library.

[... 88 words]

mod_python donated to the ASF

mod_python has been donated to the Apache Software Foundation. This is excellent news—I have always been slightly wary of mod_python as it has a reputation for being unstable, but with the ASF directly supporting it hopefully any stability problems will soon be a thing of the past.

[... 51 words]

effnews part two

Fetching and Parsing RSS Data is the second installment of the effnews project, a series of tutorials on creating an RSS news reader in Python. This time topics covered include exception handling and event based XML parsing using xmllib.

[... 122 words]

Python RSS tutorials

Spotted on Python owns us: Fredrik Lundh is building an RSS newsreader in Python, and writing Python tutorials on the project as he goes along. The first tutorial, Fetching RSS Files, is available now and covers (in detail) retrieving RSS files over the web, including an excellent explanation of asynchronous HTTP requests.

[... 65 words]

Python RSS locator

Mark Pilgrim has written an ultra-liberal RSS locator (in Python, naturally). I guess he had to scratch an itch. The amount of work it puts in to locating an RSS feed for a site is astonishing, especially when you consider how short the actual code is.

[... 50 words]

Another free Python book

How to Think Like a Computer Scientist: Learning with Python is a new Python text book covered by the GNU Free Documentation License and available on the web. The thread discussing it on Slashdot gives mixed reviews, with other recommended free alternatives including Mark Pilgrim’s Dive Into Python and Thinking in Python by Bruce Eckel.

[... 66 words]

Windows SSL support in Python

Adding SSL support to Python on Windows is as easy as dropping a couple of DLLs and a .pyd file in to your Python DLLs directory. Grab the zip file from this page and off you go. I haven’t tried it out yet but it appears to work—the socket.ssl function miraculously appeared when I installed the new files. Why is this useful? Because it opens the way for secure XML-RPC calls from Python applications...

[... 95 words]

PythonCard and PyCrust

Patrick O’Brien: Building GUI Applications with PythonCard and PyCrust. I’m a big fan of PythonCard, an excellent toolkit for creating GUI applications in Python that seperates the GUI layout from the program logic and makes it ridiculously easy to put together a basic GUI in a short space of time. Patrick is the developer of PyCrust, an interactive shell for debugging and interacting with GUI components, and is also a contributor to PythonCard as a whole. Patrick and Kevin Altis, the lead developer of PythonCard, will be presenting a session on PythonCard at OSCON on Thursday.

[... 104 words]

Fun with Amazon

There’s plenty of activity surrounding Amazon web services today. My limited demo barely scratches the surface of the possibilities—people are already experimenting with Amazon’s similarity search and Mark Pilgrim has released PyAmazon, a Python wrapper for the Amazon API. I’ve started listing alternative implementations on the PHP Amazon Search page, and I’ll be sure to blog the more innovative examples as and when I find them.

[... 79 words]

Python in PHP

Python in PHP (via HarryF on the SitePoint Forums):

[... 123 words]

CherryPy

CherryPy is an interesting open source Python application server. Dynamic sites are constructed in a special templating language which is then compiled by CherryPy to create a stand alone executable Python script complete with a built in web server. This can then be deployed anywhere with a Python interpreter. CherryPy comes with an excellent tutorial and a small but useful set of HOWTOs.

[... 70 words]

XML-RPC debugging

Via techno weenie: A Python XML-RPC debugging proxy script. This solves the problem of XML-RPC errors from PHP being sent out with the XML-RPC response packet and breaking any XML parser trying to recieve the packet. Instead you can test your script by aiming at the proxy script which will dump any problems to the console for you.

[... 70 words]

More Python advocacy

More Python advocacy: PYTHON: Yes, You SHOULD Be Using it! The article contains some background information on Python and why it is worth knowing, but the bulk of the article consists of a getting started guide for Python on Linux, complete instructions on using the interactive prompt, code samples and a small CGI script. It is worth noting that the CGI script example should not be deployed anywhere accessible to the public as it could allow crackers to execute code of their chosing on your web server.

[... 88 words]

EuroPython starts

EuroPython 2002 kicks off today, and the EuroPython site is hosting an interview with Alex Martelli (comp.lang.python regular and author of the soon-to-be-released Python Cookbook). I haven’t found anyone who’s blogging the conference yet though.

[... 37 words]

Some Python advocacy

I just engaged in some basic Python advocacy, during which I rolled out my all time favourite Python advocacy link: Why Python? by Eric Raymond.

[... 27 words]

Python and the space shuttle

Dan Shafer: Space shuttle engineers use Python to streamline mission design.

[... 62 words]

Python iterators

Via Daily Python-URL (which appears not to provide permalinks): Introduction to Python iterators. This is an extract from Deitel & Deitel’s “Python How To Program” and includes extensive code samples. Iterators are very cool—as I see it, they allow you to overload an object ready for use with Python’s powerful for ... in ... syntax (as well as other looping methods). This blog is implemented as an object in PHP—had I used Python I could display the whole blog using for entry in blog: print entry.

[... 94 words]