En Wed, 23 May 2007 04:32:42 -0300, Ramashish Baranwal <[EMAIL PROTECTED]> escribió:
> I want to get a module's contents (classes, functions and variables) > in the order in which they are declared. Using dir(module) therefore > doesn't work for me as it returns a list in alphabetical order. As an Once the module is created, you can't: its namespace is a dictionary, with no key ordering. So you have to play with the module creation: get some kind of dictionary that remembers insertion order, and use it as the globals argument to __import__. (Some builtin operations require a true dictionary or use it in a non-polimorphic way, so this may or may not work - you'll have to try and please follow up with your findings) -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list