Thanks! That works great, sort of.... I changed the return to only 'list' or 'string' or 'integer' for easy comparison. In a dtml doc or method it works fine. In a ZSQL it does not. Seems that it always sees the input parameters as strings...never a list - even when entered as a list. ['Ford','Dodge',''] is seen as a string when checked inside a dtml-if in the ZSQL method. Are Pythonscripts handled somehow differently inside a ZSQL method? Or something else?? Thanks all -Allen -----Original Message----- From: Elena Schulz [mailto:elena.schulz@gmx.net] Sent: Friday, May 10, 2002 6:56 AM To: zope@zope.org Subject: Re: [Zope] How to check type of variable in DTML Hi Allen, if you want to check the type of a variable use an external python script like: import string def getType(x): if type(x) == type([]): return "type(%s)=list" % (x) if type(x) == type(""): return "type(%s)=string" % (x) if type(x) == type(1): return "type(%s)=integer" % (x) if type(x) == type({1:'s'}): return "type(%s)=dictionary" % (x) if type(x) == type((1)): return "type(%s)=tuple" % (x) if type(x) == type(string): return "type(%s)=module" % (x) else: return "type(%s)=object o. รค." % (x) I took this idea from some earlier postings to the list. Greetings, Elena _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )