Home arrow Python arrow Page 2 - Essential Resources for the Python Professional

What Can You Do With Python? - Python

What books are good for learning Python? What editor should you use when writing Python? What exactly is Python? All these questions, and more, are answered in this great new article.

  1. Essential Resources for the Python Professional
  2. What Can You Do With Python?
  3. Web Sites
  4. Books
  5. The Python Community
  6. Development Environments
By: Boudewijn Rempt
Rating: starstarstarstarstar / 5
October 25, 2000

print this article


There are a few things you cannot do with Python, such as writing device drivers or operating system kernels, but it's a perfect solution for most other purposes.

Web Publishing

Web publishing is one area where Python shines. Whether it's for CGI scripting to complete Web site authoring systems, such as Zope, Python has a solution.

If you're ambitious, you can write your own Web server. This is astonishingly easy, and Python's standard library includes the basics. For more complex approaches, take a look at either my creation, Kura, which is a dedicated Web server, or Chuck Esterbrook's WebWare, which is a lightweight Web application development kit. Another example is Medusa, which takes a very interesting approach to building a high-performance Web server in Python.

XML Handling

Python is an excellent language for writing XML applications. You can use the xmllib library that's included with Python, or you can opt for the full-featured SAX and DOM implementation created by the XML-SIG. I prefer to use xmllib (which is included in the standard distribution) for simple parsing applications such as Web templates, and then use 4DOM for complicated, DOM-based applications such as an XML editor. Lars M. Garshol has developed other libraries, including a SAX library, a validating parser, an Xpointer implementation, and a DTD documentation generator.

GUI Applications

Using Python is an absolute paradise for people who want to experiment with GUIs. More specifically, you can choose from a bewildering variety of bindings to GUI libraries, such as MFC, Tk, or Qt. No current binding standard exists; Tkinter used to be the standard, but it's old-fashioned (for instance, it hasn't got a standard tree control) and it doesn't look very pretty. Besides, serious problems can arise from running Tkinter on Macintoshes.

wxPython is a binding to the cross-platform (Windows and Unix) wxWindows library. Its main disadvantage is that you need several libraries: the original GUI (GTK on Unix), wxWindows, and wxPython. That makes it a big library, and one that's difficult to install.

PyQT and PyKDE are bindings to Qt and KDE. These are very complete, flexible bindings that offer a great object model for your applications. You can use PyQT on both Windows and Unix, but PyKDE is usable only on Unix. PyKDE extends PyQt by offering desktop integration and complex objects, such as an HTML widget. If you'd like to read more, I've written a beginners' tutorial on the subject.

PyGTK and PyGnome are bindings to the GTK widget set and the Gnome desktop. Personally, I think that the GTK object model isn't as clean or as clear as that of PyQT or wxPython, and the GTK C documentation isn't as readable as the Qt C++ documentation.

Apart from these mainstream GUI bindings, smaller offerings exist, such as PyFLTK. This is worth checking out if you're curious—Amulet is especially interesting. Look for more at Gadfly, at, but you can also access MySQL, Sybase, Oracle, and others with the DB-API II database access API. However, this API is rather low-level, it is not object-oriented, and not yet pervasive. For instance, there's no DB-API II module for the popular PostgreSQL database. When I do database work, I write an object-oriented wrapper API around the DB-API II, which makes it easy to switch to another access API. Of course, you can also go for ODBC, with mxODBC, but you'll pay a (not too severe) performance penalty.

Extending Python

It's really easy to extend Python. On Windows, you can use any COM object in your Python applications. If you use JPython, the Python in Java, you'll have access to every Java library and every Java bean. You can also easily wrap any compiled library in Python with either SWIG, which is best suited for C applications and very well-documented, or SIP, the "small SWIG" created by Phil Thompson to wrap C++ libraries. SIP is underdocumented, but it offers support for Qt's signals and slot mechanism.

Find the answers you need at InformIT.com

Article courtesy of InformIT.com
Copyright 2000 InformIT.
All Rights Reserved


>>> More Python Articles          >>> More By Boudewijn Rempt

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Python Big Data Company Gets DARPA Funding
- Python 32 Now Available
- Final Alpha for Python 3.2 is Released
- Python 3.1: String Formatting
- Python 3.1: Strings and Quotes
- Python 3.1: Programming Basics and Strings
- Tuples and Other Python Object Types
- The Dictionary Python Object Type
- String and List Python Object Types
- Introducing Python Object Types
- Mobile Programming using PyS60: Advanced UI ...
- Nested Functions in Python
- Python Parameters, Functions and Arguments
- Python Statements and Functions
- Statements and Iterators in Python

Developer Shed Affiliates


Dev Shed Tutorial Topics: