Ant wrote: > Ant wrote: > ... >> But this feels like a hack... Is there a cleaner way for accessing the >> functions of the current module similar to the __dict__ attribute of >> classes? i.e. a way to access the local symbol table? > > Sorry - posted too soon. Found the globals() built-in...
You can also import __main__ tests = [x for x in dir(__main__) if x.endswith("test")] for test in tests: getattr(__main__, test)() but I second the suggestion of looking in to unittest or one of the other test frameworks. Kent -- http://mail.python.org/mailman/listinfo/python-list