[Tutor] this module

Chris Fuller cfuller084 at thinkingplanet.net
Sat Aug 8 09:10:56 CEST 2009


On Friday 07 August 2009 21:31, Mark Young wrote:
> Hi, I was reading a tutorial, and it mentioned the "import this" easter
> egg. I was curious, and looked up the contents of the module, and dscovered
> that it had attributes c, d, i, and s. I was wondering if anyone had any
> clue what these attributes were supposed to mean. I think (this.s) is the
> zen of python in some foreign language (dutch maybe?), but I have no clue
> what the significance of the others are. Just wondering if anyone knew, (or
> if they mean anything at all).
>
> Also, I was wondering, when a user first imports this, how does the module
> print the zen of python? I can't figure out how it does it.

"Use the source, Luke!"

You can find this.py, along with the rest of the standard library (most of 
which is written in Python, as opposed to being compiled C code) wherever 
your Python was installed.  For instance, /usr/lib/pythonx.y on unixy 
machines (including macs), and C:\Pythonxy\Lib on that other operating 
system.

Cheers


More information about the Tutor mailing list