> Hi; > How does one test to see if a variable is defined? > TIA, > BenO You could check to see if the variable is in the dictionaries returned by vars() and globals() but that won't always work. Probably the easiest way to check is to do something like this: try: eval(var) # Do something except NameError: # Do something else