I've read the docs, FAQ, and searched the mailing list. Haven't seen anything that will answer this question. Maybe it has to do with the fact that I'm still learning Python (About six to eight weeks along now, part time).
I have a snippet of HTML like this: <table py:if="defined('lr.windSpeedAvg')" width="210" cellspacing="0" cellpadding="0" align="center"> And python code like: def __getattr__(self, name): try: return(self.reading[self.nameToColNum[name]]) except KeyError: raise Exception("StationReading: The column name %s is invalid" % name) Now, you probably already know that the defined() call won't do what I want it to do. :) For example, if I do a call to hasattr before I call template.write(), I get: hasattr(t.lr, 'windSpeedAvg') == True hasattr(t, 'lr.windSpeedAvg') == False defined('lr.windSpeedAvg') certainly returns false, even when lr.windSpeedAvg exists, which is expect, as it's a wrapper for hasattr. So, how would I check if an attribute exists when it's an attribute of an object in the templates name space? Thanks! j ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ kid-template-discuss mailing list kid-template-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kid-template-discuss