Thanks Bruno, I’ll use this. Much appreciated. Jon -----Original Message----- Jonathan Bowlas wrote: > Hi Listers, > > I have a requirement to test for a data type could someone tell me
if this > is possible in python? > > Basically I have a ZPT in Zope that users can select checkboxes in
a form > which pass arguments for a python function, however if there is
only one > checkbox selected it is passed as a string whereas more than one
checkbox is > passed as a list. You should have posted this on Zope's mailing-list. <OT> There's a mechanism in Zope to handle this case, cf section
"Passing Parameters to Scripts" in: http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/DTML.stx/ScriptingZope.stx The mechanism is based on 'decorating' forms fields names with type annotation. In you case, this would look like: <form name='xxx' action='' method='POST'> <tal:repeat repeat="code deptcodes"> <input type="checkbox" name='selecteddeptcodes:list' value='' tal:attribute="value code" /> </tal:repeat> <!-- rest of the form here --> </form> </OT> HTH -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in
p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list |
-- http://mail.python.org/mailman/listinfo/python-list