The primary intent of the sampler app is to provide code examples. To that end, it displays the source code for every sample it renders. And for every sample displayed, it provides a relevent link to the PyKDE docs.
The secondary intent is to make writing samples easy. To realize this, I wrote the sampler application to introspect its directory for packages, and introspect those packages for modules (and subpackages). Every module found is imported and inspected for a handful of sampler-specific attributes. The values of those attributes are then used to control the placement and appearance of the sample module within the application. The net effect of this is that writing samples is as easy as writing stand-alone modules.
The sampler is far from complete, and you can help remedy that! The first step is to read the HOWTO. Then pick a KDE widget, write a module showing how it's used and send it to me. I'll be glad to include it in the repository and subsequent releases.
This entry was posted on September 11, 2006 by troy. It was filed under kde, python .