On the Python Edu-sig, Dethe Elza announced a project to write a beginning Python programming book for artists. Many commercial art tools now use Python, including Blender, Poser, and Lightflow. Blender is a 3D animation tool that uses Python as its scripting language. The Poser Pro pack includes an altered version of Python for use in scripting posable figures. Lightflow, a 3D rendering library, has a Python extension module. Add to these ray tracing, OpenGL interfaces, sound tools like Snack, and game development tools like pygame, and Python has much to offer a digital artist.
Elza set up a wiki called Contagious Fun to support the project. Wiki's are collaborative web applications where you can add to or edit the pages your read. Through the site you can add to or edit the book's pages in progress. There is not much there yet, just some basic links to tools like the ones mentioned above. If you have an interest in art and programming, consider contributing to this effort.
Also on the edu-sig list, Daniel Yoo asked about adding pydoc's help function to the interpretor by default. It's easy for students to remember "help"; harder to remember to type "from pydoc import help". Adding it by default isn't bad for the more experienced user either. The solution seemed easy at first, add it to
site.py. Several solutions were offered. Most involved importing
pydoc.help(), but this caused some problems with idle.
Site.py is imported before Idle constructs its windows, and so pydoc bonds to the console's standard I/O, not the Idle session. Guido van Rossum, employing a trick used with
license, gave us the solution:
class _Helper: def __repr__(self): return "Please type help() for interactive help." def __call__(self, *args, **kwds): import pydoc return pydoc.help(*args, **kwds) __builtin__.help = _Helper()
Because pydoc is not imported until you run
help(), it can bind to whatever the proper I/O is for your session.
Stephen Figgins administrates Linux servers for Sunflower Broadband, a cable company.
Read more Python News columns.
Return to the PHP DevCenter.
Copyright © 2009 O'Reilly Media, Inc.