[Pythonmac-SIG] Where is the sys module?

Paul Berkowitz berkowit@silcom.com
Sun, 13 Apr 2003 17:11:12 -0700


On 4/13/03 3:37 PM, "Skip Montanaro" <skip@pobox.com> wrote:

> 
>     Paul> The O'Reilly "Learning Python" tells me I should be able to get
>     Paul> the sys module, and all its attributes, by typing
> 
>     Paul>     dir(sys)
> 
>     Paul> in the interactive Python interpreter. It doesn't work (default OS
>     Paul> 10.2 installation of Python 2.2):
> 
> I think perhaps you're misreading something.  "sys" is a module, so to use
> it you have to import it into the current namespace.  Try this instead:
> 
>>>> import sys
>>>> dir(sys)

Yes, that was it. I was misled by the fact that the first dir searches I
tried were on built-ins.

Thanks.

-- 
Paul Berkowitz