Home | Docs | Download | Subversion
Wednesday October 26, 2016


About pyHTMLWigets

pyHTMLWidgets eases the generation of commonly used HTML components in forms, etc., independant of development platform. You may use PyHTMLWidgets whether developing for python cgi, mod_python, twisted web, nevow, or Zope.

pyHTMLWidegets is a collection of class methods that build and render HTML strings. As a result, it can be used from the command line, from a python interactive shell, or within your favorite application server or web development framework.


PyHTMLWidgets was a project that one of us worked on while doing some work for Neosynapse/Croix Connect and was released by Neosynapse as open source. We have taken a pre-release of that software and started another branch of it, ripping the guts out completely and retooling the widgets with Fredrick Lundh's ElementTree. However, we provide links to the oroginal code.

The Future

There are all kinds of things we have in mind for the future of pyHTMLWidgets. Here are just a few:
  • There are only a few widgets so far; we'd like to add tons more widgets, making this an time-saving tool for everyone.
  • We want to implement interfaces using PyProtocols, and we are taking inspiration from the ZopeX3 interfaces.
  • Ultimately, we'd like it to be able to do Plone Archetype-like treatment of Word docs, PDF files, etc., as widgets themselves.
  • Make a niftier logo for the site header ;-)

Example Usage (out of date; new example soon):

>>> from neo.html.widgets import DropDownWidget
>>> heading = 'Test Drop Down Menu'
>>> options = ['a', 'b', 'c', 'd']
>>> widg = DropDownWidget(display=heading, values=options)
>>> print widg.render()
<h5>Test Drop Down Menu
<select name="test_drop_down_menu" size="1"><option>a<option>
How we are using ElementTree:
>>> tag = Element('h3')
>>> tag.text = 'This is a 3rd-level Heading'
>>> tostring(tag)
'<h3>This is a 3rd-level Heading</h3>'


Progress with Interfaces

[ 2004.09.20]  Though we are making slow progress, it is good progress. We have been looking at the ZopeX3 widgetry and are finding many sources of inspiration. We are thinking about using a PEAK component-based approach, and have begun testing prototype components.

Also, we have started using doctests for our unit testing in this project as well as several others. Having used and loved unittest for a while, it was emotionally difficult to consider something else ;-) However, we were quickly won over by the efficiency and rapidity of developing unit tests with doctest.

Three New Developers

[ 2004.09.09]  We'd like to welcome three new developers to the project: fellow python developer Ravi Bhalotia, as well as Tony Bollino and James Roach from AdytumSolutions. This is a volunteer project, and as such, there is no timeline, however, this will be a fun learning experience for everyone :-)

Site Updates and Administrivia

[ 2004.09.08]  The entire project (including this site) is now checked into subversion. There is a restricted-access ViewCVS for the Subversion repository, as well as write access to subversion. We also have a new mail list for the project. The web site has been updated to include this information, as well as a change in the link for documentation (it now points to the wiki).

New Project Web Site

[ 2004.08.14]  New site site is up. Look and feel borrowed from PyWordGen.

pyHTMLWidgets Launched on SF.net

[ 2004.08.13]  pyHTMLWidgets has an official home on SourceForge.net. Although the first version of the code is written, the project site is yet to be completed and there is nothing in CVS at the moment.

Home | Docs | Download | Subversion
Copyright © 2003 AdytumSolutions, Inc.
All rights reserved.
SourceForge.net Logo