Ramashish Baranwal <[EMAIL PROTECTED]> 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 doin
In article <[EMAIL PROTECTED]>,
Wildemar Wildenburger <[EMAIL PROTECTED]> wrote:
.
.
.
>Good God! Is there *anything* that python does not already do? I hardly
>feel the need to write programs anymore ...
>Its really 80% like
Wildemar Wildenburger wrote:
> Peter Otten wrote:
>> 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 modu
Peter Otten wrote:
> 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 cal
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, pyparsin
> > 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* difficul
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
Ramashish Baranwal wrote:
> Hi,
>
> 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
> example-
>
> # mymodule.py
> class B: pass
> c
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
Hi,
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
example-
# mymodule.py
class B: pass
class A: pass
class D: pass
# test.py
import my
10 matches
Mail list logo