This information mostly comes from Kevin Dangoor’s devcast at http://www.turbogears.org/videos/.
The DataGrid widget uses:
Note that you do not retrieve resource files using a normal file path, instead you use TurboGears packaging system, which is an abstraction on top of a regular file system. Its usefulness comes from being able to specify a URL by using a package name plus a filename and not have to bother with where exactly the file is mounted on your web server. It can also be confusing because the file has three “locations” - the path on your disk, the mounted path on your web server and the name of the package it belongs to.
In this example, the ComboBox widget requests the three files combo.css, combo.js and combo.kid. package.name is the name of the package where you have put your resource files. You must first create a package by registering it. Say that you have a normal directory tree for your project looking like this:
See the pkg_resources documentation for more information on how to use the pkg_resources module.
Now you can define resource files using your packages:
pkg_resources probably also contains heaps more useful functionality and it would be good if someone who knows about can write it down here.