Module listing in order.
Wildemar Wildenburger
wildemar at freakmail.de
Wed May 23 08:47:29 EDT 2007
Ramashish Baranwal wrote:
> I want a way to get the contents in the order of their declaration,
> i.e. [B, A, D]. Does anyone know a way to get it?
>
My suggestion would be to actually parse the text of the module. "Brute
force" is what it's called ;). But doing so with, say, pyparsing
shouldn't be *very* difficult.
Just out of curiosity: Why do you need the order?
W
More information about the Python-list
mailing list