Mike,

Once again, thanks for your work on webhelpers.  I found a bug, I
think:

>>> food = ["apple", "banana", "carrot", "daikon", "egg", "fish", "gelato", 
>>> "honey"]
>>> table = distribute(food, 3, "V", "")
>>> table = distribute(food, 2, "V", "")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "c:\python25\lib\site-packages\pysmvt-libs-trunk
\webhelpers-0.6.1-py2.5.egg\webhelpers\containers.py", line 480, in
distribute
IndexError: list assignment index out of range

Looks like 3 columns is OK, but not 2.


On Oct 2, 7:04 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote:
> WebHelpers 0.6.2 has been uploaded to PyPI.  Changelog:
>
> * nl2br() and format-paragraphs were not literal-safe.
>
> * webhelpers.converters:
>   - New helper transpose() to turn a 2D list sideways (making the rows columns
>     and the columns rows).
>
> * webhelpers.markdown:
>   - Upgrade to Markdown 1.7.
>   - Add a warning about escaping untrusted HTML to
>     webhelpers.html.converters.markdown() docstring.
>   - Did not include Markdown's extensions due to relative import issues.
>     Use the full Markdown package if you want footnotes or RSS.
>
> * webhelpers.media:
>   - New module for muiltimedia helpers.  Initial functions determine the size
>     of an image and choose a scaling factor.
>
> * webhelpers.html.tags:
>   - Options tuple contains Option objects for select/checkbox/radio groups.
>     select() now uses this automatically.
>   - checkbox() and radio() now have a ``label`` argument.
>
> * webhelpers.number:
>   - Population standard deviation contributed by Lorenzo Catucci.
>
> I've started work on some field layout helpers to decorates an input
> control with its title, required-ness, error message and help text,
> and to format a group of checkboxes.  The preliminary code is in
> webhelpers.html.form_layout, and in unfinished/group.py in the source
> distribution.  I'm still not satisifed with it as there's a tradeoff
> between HTML correctness, flexibility, and simplicity.  These are
> based on functions contributed by James Gardner, but the originals use
> tables for layout which is archaic HTML and also quite verbose when
> spoken by a screen reader.  My approach uses <div>'s, but then you get
> into issues of single vs multiple controls (a single control should
> have <label> around its title but a group of controls should not), how
> to format columns of checkboxes/radios (one site uses an <ul> with
> <div>s around groups of <li>s for the columns, which is questionable
> HTML), and how to do <label for=""> when the control is created by
> another helper so you don't know its ID, and you don't want to force
> the user to specify the ID twice or mix the field() arguments with the
> input control arguments (text()).  So this is all experimental, and
> feedback would be welcome.  The form_layout module has a warning in
> the docstring to copy it to your application if you want to use it, to
> avoid incompatibilities as the original changes.
>
> --
> Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to