Friday, November 16, 2007

Guido's sense of humor.

Guido Van Rossum, has an excellent sense of humor (consider that 'Python' for his language, is not from the well-known snake, but rather from the 'Monty Python' british comedy series):6.2 Standard Modules Python comes with a library of standard modules, described in a separate document, the Python Library Reference (``Library Reference'' hereafter). Some modules are built into the interpreter; these provide access to operations that are not part of the core of the language but are nevertheless built in, either for efficiency or to provide access to operating system primitives such as system calls. The set of such modules is a configuration option which also depends on the underlying platform For example, the amoeba module is only provided on systems that somehow support Amoeba primitives. One particular module deserves some attention: sys, which is built into every Python interpreter. The variables sys.ps1 and sys.ps2 define the strings used as primary and secondary prompts: >>> import sys>>> sys.ps1'>>> '>>> sys.ps2'... '>>> sys.ps1 = 'C> 'C> print 'Yuck!'Yuck!C>

No comments: