Hi, I am writing an application that initializes the global namespace, and afterwards, leaves the user with the python prompt. Now, I want to catch NameErrors in user input like e.g.
>>> some_name Traceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'some_name' is not defined For classes, there are the __getattr__ and __getattribute__ functions. I wonder if there is some related function for (failed) global attribute lookup that is invoked with name as its argument instead. I consulted the docs, but could not find anything. Any ideas? - harold - -- http://mail.python.org/mailman/listinfo/python-list