On Monday 03 Feb 2003 12:08 pm, you wrote:
> Nick Woolley wrote:
> > Okay, the normal one is about comparing strings and numbers.
>
> [...]
>
> > '01' is not equal to 1.
>
> Yes.  TT uses stringwise comparison in an attempt to Do The Right Thing
> for most of the people, most of the time.
[...]
> Bit of a kludge I'm afraid.  There probably should be some easier way to
> do this.  Suggestions welcome...

Okay - thanks, that's a fairly fast and honest answer.  For now I'm doing:

[% ymv = date.split('-0*') %]

Which strips off the leading zeros of all but the first number, and happens to 
be okay for MySQL dates since they have the year leading, and therefore 
(probably) no leading zeros on the first number.

Later I might this bit of code (which is part of a <select> input generator 
for dates) into a perl subroutine.  (There's not one of these in TT2 already 
is there? Hmmm.... The HTML plugin looks like it might almost fit the bill, 
but maybe not yet.)

> Yes, this is a limitation in Pipermail which Mailman uses to archive the
> mailing list.  A search facility seems to be very high on everyone's
> wishlist.

A lot of mailing lists seem to use pipermail, which frustrates me. I don't 
have a ready solution though.  You probably know about this:

http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.011.htp

> So, if there is anyone out there who wants to take responsibility for the
> FAQ, I'd be most happy to hand it over.

Weeell, one thing I was taught at school was never to volunteer for 
anything.....  but I do have some suggestions.  But maybe you've thought of 
these too.

* Use a FAQ-o-Matic (like mailman does). Mailman FAQ wizard:
http://www.python.org/cgi-bin/faqw-mm.py

* Or, use a Wiki to incrementally build up all your documentation/FAQs.  You 
(or I) could add snippets like the string comparison question into it, as 
they come up.  The existing docs could be pasted in verbatim and would 
require a few tweaks such as indentation and adding formatting/links to be 
serviceable.  Wikis are searchable.  But I don't know how much eyeball load 
they can handle.  And there is the issue of synchonising back into POD.

Ones I've used before, which seem to well regarded:

* UseMod (for simple jobs) www.usemod.com
* TWiki (for more admin control) twiki.org


The existing manual's quite good for most things though, by the way, so your 
brain isn't jelly for nothing.

Cheers,

Nick

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.ourshack.com/mailman/listinfo/templates

Reply via email to