Printing modules contents

Michael Hudson mwh21 at
Thu Dec 7 13:52:37 CET 2000

joonas <keisari_ at> writes:

> How can I make a script that would print modules contents like below,
> sys
>   sys.__name__ = "sys"
>   sys.stdout = "<PyShell.PseudoFile instance at 7fd530>"
>   sys.winver = "1.5"
>   sys.etc = "spam"

Think "dir" & "repr".  Shouldn't be hard.


39. Re graphics:  A picture is worth 10K  words - but only those 
    to describe the picture. Hardly any sets of 10K words can be 
    adequately described with pictures.
  -- Alan Perlis,

More information about the Python-list mailing list