home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 49 6e 74 72 6f 64 75 |\chapter|{Introdu|
|00000010| 63 74 69 6f 6e 7d 0a 0a | 54 68 65 20 60 60 50 79 |ction}..|The ``Py|
|00000020| 74 68 6f 6e 20 6c 69 62 | 72 61 72 79 27 27 20 63 |thon lib|rary'' c|
|00000030| 6f 6e 74 61 69 6e 73 20 | 73 65 76 65 72 61 6c 20 |ontains |several |
|00000040| 64 69 66 66 65 72 65 6e | 74 20 6b 69 6e 64 73 20 |differen|t kinds |
|00000050| 6f 66 20 63 6f 6d 70 6f | 6e 65 6e 74 73 2e 0a 0a |of compo|nents...|
|00000060| 49 74 20 63 6f 6e 74 61 | 69 6e 73 20 64 61 74 61 |It conta|ins data|
|00000070| 20 74 79 70 65 73 20 74 | 68 61 74 20 77 6f 75 6c | types t|hat woul|
|00000080| 64 20 6e 6f 72 6d 61 6c | 6c 79 20 62 65 20 63 6f |d normal|ly be co|
|00000090| 6e 73 69 64 65 72 65 64 | 20 70 61 72 74 20 6f 66 |nsidered| part of|
|000000a0| 20 74 68 65 0a 60 60 63 | 6f 72 65 27 27 20 6f 66 | the.``c|ore'' of|
|000000b0| 20 61 20 6c 61 6e 67 75 | 61 67 65 2c 20 73 75 63 | a langu|age, suc|
|000000c0| 68 20 61 73 20 6e 75 6d | 62 65 72 73 20 61 6e 64 |h as num|bers and|
|000000d0| 20 6c 69 73 74 73 2e 20 | 20 46 6f 72 20 74 68 65 | lists. | For the|
|000000e0| 73 65 20 74 79 70 65 73 | 2c 0a 74 68 65 20 50 79 |se types|,.the Py|
|000000f0| 74 68 6f 6e 20 6c 61 6e | 67 75 61 67 65 20 63 6f |thon lan|guage co|
|00000100| 72 65 20 64 65 66 69 6e | 65 73 20 74 68 65 20 66 |re defin|es the f|
|00000110| 6f 72 6d 20 6f 66 20 6c | 69 74 65 72 61 6c 73 20 |orm of l|iterals |
|00000120| 61 6e 64 20 70 6c 61 63 | 65 73 20 73 6f 6d 65 0a |and plac|es some.|
|00000130| 63 6f 6e 73 74 72 61 69 | 6e 74 73 20 6f 6e 20 74 |constrai|nts on t|
|00000140| 68 65 69 72 20 73 65 6d | 61 6e 74 69 63 73 2c 20 |heir sem|antics, |
|00000150| 62 75 74 20 64 6f 65 73 | 20 6e 6f 74 20 66 75 6c |but does| not ful|
|00000160| 6c 79 20 64 65 66 69 6e | 65 20 74 68 65 0a 73 65 |ly defin|e the.se|
|00000170| 6d 61 6e 74 69 63 73 2e | 20 20 28 4f 6e 20 74 68 |mantics.| (On th|
|00000180| 65 20 6f 74 68 65 72 20 | 68 61 6e 64 2c 20 74 68 |e other |hand, th|
|00000190| 65 20 6c 61 6e 67 75 61 | 67 65 20 63 6f 72 65 20 |e langua|ge core |
|000001a0| 64 6f 65 73 20 64 65 66 | 69 6e 65 0a 73 79 6e 74 |does def|ine.synt|
|000001b0| 61 63 74 69 63 20 70 72 | 6f 70 65 72 74 69 65 73 |actic pr|operties|
|000001c0| 20 6c 69 6b 65 20 74 68 | 65 20 73 70 65 6c 6c 69 | like th|e spelli|
|000001d0| 6e 67 20 61 6e 64 20 70 | 72 69 6f 72 69 74 69 65 |ng and p|rioritie|
|000001e0| 73 20 6f 66 20 6f 70 65 | 72 61 74 6f 72 73 2e 29 |s of ope|rators.)|
|000001f0| 0a 0a 54 68 65 20 6c 69 | 62 72 61 72 79 20 61 6c |..The li|brary al|
|00000200| 73 6f 20 63 6f 6e 74 61 | 69 6e 73 20 62 75 69 6c |so conta|ins buil|
|00000210| 74 2d 69 6e 20 66 75 6e | 63 74 69 6f 6e 73 20 61 |t-in fun|ctions a|
|00000220| 6e 64 20 65 78 63 65 70 | 74 69 6f 6e 73 20 2d 2d |nd excep|tions --|
|00000230| 2d 0a 6f 62 6a 65 63 74 | 73 20 74 68 61 74 20 63 |-.object|s that c|
|00000240| 61 6e 20 62 65 20 75 73 | 65 64 20 62 79 20 61 6c |an be us|ed by al|
|00000250| 6c 20 50 79 74 68 6f 6e | 20 63 6f 64 65 20 77 69 |l Python| code wi|
|00000260| 74 68 6f 75 74 20 74 68 | 65 20 6e 65 65 64 20 6f |thout th|e need o|
|00000270| 66 20 61 6e 0a 5c 63 6f | 64 65 7b 69 6d 70 6f 72 |f an.\co|de{impor|
|00000280| 74 7d 20 73 74 61 74 65 | 6d 65 6e 74 2e 20 20 53 |t} state|ment. S|
|00000290| 6f 6d 65 20 6f 66 20 74 | 68 65 73 65 20 61 72 65 |ome of t|hese are|
|000002a0| 20 64 65 66 69 6e 65 64 | 20 62 79 20 74 68 65 20 | defined| by the |
|000002b0| 63 6f 72 65 0a 6c 61 6e | 67 75 61 67 65 2c 20 62 |core.lan|guage, b|
|000002c0| 75 74 20 6d 61 6e 79 20 | 61 72 65 20 6e 6f 74 20 |ut many |are not |
|000002d0| 65 73 73 65 6e 74 69 61 | 6c 20 66 6f 72 20 74 68 |essentia|l for th|
|000002e0| 65 20 63 6f 72 65 20 73 | 65 6d 61 6e 74 69 63 73 |e core s|emantics|
|000002f0| 20 61 6e 64 20 61 72 65 | 0a 6f 6e 6c 79 20 64 65 | and are|.only de|
|00000300| 73 63 72 69 62 65 64 20 | 68 65 72 65 2e 0a 0a 54 |scribed |here...T|
|00000310| 68 65 20 62 75 6c 6b 20 | 6f 66 20 74 68 65 20 6c |he bulk |of the l|
|00000320| 69 62 72 61 72 79 2c 20 | 68 6f 77 65 76 65 72 2c |ibrary, |however,|
|00000330| 20 63 6f 6e 73 69 73 74 | 73 20 6f 66 20 61 20 63 | consist|s of a c|
|00000340| 6f 6c 6c 65 63 74 69 6f | 6e 20 6f 66 20 6d 6f 64 |ollectio|n of mod|
|00000350| 75 6c 65 73 2e 0a 54 68 | 65 72 65 20 61 72 65 20 |ules..Th|ere are |
|00000360| 6d 61 6e 79 20 77 61 79 | 73 20 74 6f 20 64 69 73 |many way|s to dis|
|00000370| 73 65 63 74 20 74 68 69 | 73 20 63 6f 6c 6c 65 63 |sect thi|s collec|
|00000380| 74 69 6f 6e 2e 20 20 53 | 6f 6d 65 20 6d 6f 64 75 |tion. S|ome modu|
|00000390| 6c 65 73 20 61 72 65 0a | 77 72 69 74 74 65 6e 20 |les are.|written |
|000003a0| 69 6e 20 43 20 61 6e 64 | 20 62 75 69 6c 74 20 69 |in C and| built i|
|000003b0| 6e 20 74 6f 20 74 68 65 | 20 50 79 74 68 6f 6e 20 |n to the| Python |
|000003c0| 69 6e 74 65 72 70 72 65 | 74 65 72 3b 20 6f 74 68 |interpre|ter; oth|
|000003d0| 65 72 73 20 61 72 65 0a | 77 72 69 74 74 65 6e 20 |ers are.|written |
|000003e0| 69 6e 20 50 79 74 68 6f | 6e 20 61 6e 64 20 69 6d |in Pytho|n and im|
|000003f0| 70 6f 72 74 65 64 20 69 | 6e 20 73 6f 75 72 63 65 |ported i|n source|
|00000400| 20 66 6f 72 6d 2e 20 20 | 53 6f 6d 65 20 6d 6f 64 | form. |Some mod|
|00000410| 75 6c 65 73 20 70 72 6f | 76 69 64 65 0a 69 6e 74 |ules pro|vide.int|
|00000420| 65 72 66 61 63 65 73 20 | 74 68 61 74 20 61 72 65 |erfaces |that are|
|00000430| 20 68 69 67 68 6c 79 20 | 73 70 65 63 69 66 69 63 | highly |specific|
|00000440| 20 74 6f 20 50 79 74 68 | 6f 6e 2c 20 6c 69 6b 65 | to Pyth|on, like|
|00000450| 20 70 72 69 6e 74 69 6e | 67 20 61 20 73 74 61 63 | printin|g a stac|
|00000460| 6b 0a 74 72 61 63 65 3b | 20 73 6f 6d 65 20 70 72 |k.trace;| some pr|
|00000470| 6f 76 69 64 65 20 69 6e | 74 65 72 66 61 63 65 73 |ovide in|terfaces|
|00000480| 20 74 68 61 74 20 61 72 | 65 20 73 70 65 63 69 66 | that ar|e specif|
|00000490| 69 63 20 74 6f 20 70 61 | 72 74 69 63 75 6c 61 72 |ic to pa|rticular|
|000004a0| 0a 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 |.operati|ng syste|
|000004b0| 6d 73 2c 20 6c 69 6b 65 | 20 73 6f 63 6b 65 74 20 |ms, like| socket |
|000004c0| 49 2f 4f 3b 20 6f 74 68 | 65 72 73 20 70 72 6f 76 |I/O; oth|ers prov|
|000004d0| 69 64 65 20 69 6e 74 65 | 72 66 61 63 65 73 20 74 |ide inte|rfaces t|
|000004e0| 68 61 74 20 61 72 65 0a | 73 70 65 63 69 66 69 63 |hat are.|specific|
|000004f0| 20 74 6f 20 61 20 70 61 | 72 74 69 63 75 6c 61 72 | to a pa|rticular|
|00000500| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 64 6f 6d | applica|tion dom|
|00000510| 61 69 6e 2c 20 6c 69 6b | 65 20 74 68 65 20 57 6f |ain, lik|e the Wo|
|00000520| 72 6c 64 2d 57 69 64 65 | 20 57 65 62 2e 0a 53 6f |rld-Wide| Web..So|
|00000530| 6d 65 20 6d 6f 64 75 6c | 65 73 20 61 72 65 20 61 |me modul|es are a|
|00000540| 76 61 69 61 62 6c 65 20 | 69 6e 20 61 6c 6c 20 76 |vaiable |in all v|
|00000550| 65 72 73 69 6f 6e 73 20 | 61 6e 64 20 70 6f 72 74 |ersions |and port|
|00000560| 73 20 6f 66 20 50 79 74 | 68 6f 6e 3b 20 6f 74 68 |s of Pyt|hon; oth|
|00000570| 65 72 73 0a 61 72 65 20 | 6f 6e 6c 79 20 61 76 61 |ers.are |only ava|
|00000580| 69 6c 61 62 6c 65 20 77 | 68 65 6e 20 74 68 65 20 |ilable w|hen the |
|00000590| 75 6e 64 65 72 6c 79 69 | 6e 67 20 73 79 73 74 65 |underlyi|ng syste|
|000005a0| 6d 20 73 75 70 70 6f 72 | 74 73 20 6f 72 20 72 65 |m suppor|ts or re|
|000005b0| 71 75 69 72 65 73 0a 74 | 68 65 6d 3b 20 79 65 74 |quires.t|hem; yet|
|000005c0| 20 6f 74 68 65 72 73 20 | 61 72 65 20 61 76 61 69 | others |are avai|
|000005d0| 6c 61 62 6c 65 20 6f 6e | 6c 79 20 77 68 65 6e 20 |lable on|ly when |
|000005e0| 61 20 70 61 72 74 69 63 | 75 6c 61 72 20 63 6f 6e |a partic|ular con|
|000005f0| 66 69 67 75 72 61 74 69 | 6f 6e 0a 6f 70 74 69 6f |figurati|on.optio|
|00000600| 6e 20 77 61 73 20 63 68 | 6f 73 65 6e 20 61 74 20 |n was ch|osen at |
|00000610| 74 68 65 20 74 69 6d 65 | 20 77 68 65 6e 20 50 79 |the time| when Py|
|00000620| 74 68 6f 6e 20 77 61 73 | 20 63 6f 6d 70 69 6c 65 |thon was| compile|
|00000630| 64 20 61 6e 64 20 69 6e | 73 74 61 6c 6c 65 64 2e |d and in|stalled.|
|00000640| 0a 0a 54 68 69 73 20 6d | 61 6e 75 61 6c 20 69 73 |..This m|anual is|
|00000650| 20 6f 72 67 61 6e 69 7a | 65 64 20 60 60 66 72 6f | organiz|ed ``fro|
|00000660| 6d 20 74 68 65 20 69 6e | 73 69 64 65 20 6f 75 74 |m the in|side out|
|00000670| 27 27 3a 20 69 74 20 66 | 69 72 73 74 20 64 65 73 |'': it f|irst des|
|00000680| 63 72 69 62 65 73 0a 74 | 68 65 20 62 75 69 6c 74 |cribes.t|he built|
|00000690| 2d 69 6e 20 64 61 74 61 | 20 74 79 70 65 73 2c 20 |-in data| types, |
|000006a0| 74 68 65 6e 20 74 68 65 | 20 62 75 69 6c 74 2d 69 |then the| built-i|
|000006b0| 6e 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 6e 64 20 |n functi|ons and |
|000006c0| 65 78 63 65 70 74 69 6f | 6e 73 2c 0a 61 6e 64 20 |exceptio|ns,.and |
|000006d0| 66 69 6e 61 6c 6c 79 20 | 74 68 65 20 6d 6f 64 75 |finally |the modu|
|000006e0| 6c 65 73 2c 20 67 72 6f | 75 70 65 64 20 69 6e 20 |les, gro|uped in |
|000006f0| 63 68 61 70 74 65 72 73 | 20 6f 66 20 72 65 6c 61 |chapters| of rela|
|00000700| 74 65 64 20 6d 6f 64 75 | 6c 65 73 2e 20 20 54 68 |ted modu|les. Th|
|00000710| 65 0a 6f 72 64 65 72 69 | 6e 67 20 6f 66 20 74 68 |e.orderi|ng of th|
|00000720| 65 20 63 68 61 70 74 65 | 72 73 20 61 73 20 77 65 |e chapte|rs as we|
|00000730| 6c 6c 20 61 73 20 74 68 | 65 20 6f 72 64 65 72 69 |ll as th|e orderi|
|00000740| 6e 67 20 6f 66 20 74 68 | 65 20 6d 6f 64 75 6c 65 |ng of th|e module|
|00000750| 73 20 77 69 74 68 69 6e | 0a 65 61 63 68 20 63 68 |s within|.each ch|
|00000760| 61 70 74 65 72 20 69 73 | 20 72 6f 75 67 68 6c 79 |apter is| roughly|
|00000770| 20 66 72 6f 6d 20 6d 6f | 73 74 20 72 65 6c 65 76 | from mo|st relev|
|00000780| 61 6e 74 20 74 6f 20 6c | 65 61 73 74 20 69 6d 70 |ant to l|east imp|
|00000790| 6f 72 74 61 6e 74 2e 0a | 0a 54 68 69 73 20 6d 65 |ortant..|.This me|
|000007a0| 61 6e 73 20 74 68 61 74 | 20 69 66 20 79 6f 75 20 |ans that| if you |
|000007b0| 73 74 61 72 74 20 72 65 | 61 64 69 6e 67 20 74 68 |start re|ading th|
|000007c0| 69 73 20 6d 61 6e 75 61 | 6c 20 66 72 6f 6d 20 74 |is manua|l from t|
|000007d0| 68 65 20 73 74 61 72 74 | 2c 20 61 6e 64 0a 73 6b |he start|, and.sk|
|000007e0| 69 70 20 74 6f 20 74 68 | 65 20 6e 65 78 74 20 63 |ip to th|e next c|
|000007f0| 68 61 70 74 65 72 20 77 | 68 65 6e 20 79 6f 75 20 |hapter w|hen you |
|00000800| 67 65 74 20 62 6f 72 65 | 64 2c 20 79 6f 75 20 77 |get bore|d, you w|
|00000810| 69 6c 6c 20 67 65 74 20 | 61 20 72 65 61 73 6f 6e |ill get |a reason|
|00000820| 61 62 6c 65 0a 6f 76 65 | 72 76 69 65 77 20 6f 66 |able.ove|rview of|
|00000830| 20 74 68 65 20 61 76 61 | 69 6c 61 62 6c 65 20 6d | the ava|ilable m|
|00000840| 6f 64 75 6c 65 73 20 61 | 6e 64 20 61 70 70 6c 69 |odules a|nd appli|
|00000850| 63 61 74 69 6f 6e 20 61 | 72 65 61 73 20 74 68 61 |cation a|reas tha|
|00000860| 74 20 61 72 65 0a 73 75 | 70 70 6f 72 74 65 64 20 |t are.su|pported |
|00000870| 62 79 20 74 68 65 20 50 | 79 74 68 6f 6e 20 6c 69 |by the P|ython li|
|00000880| 62 72 61 72 79 2e 20 20 | 4f 66 20 63 6f 75 72 73 |brary. |Of cours|
|00000890| 65 2c 20 79 6f 75 20 64 | 6f 6e 27 74 20 5c 65 6d |e, you d|on't \em|
|000008a0| 70 68 7b 68 61 76 65 7d | 20 74 6f 0a 72 65 61 64 |ph{have}| to.read|
|000008b0| 20 69 74 20 6c 69 6b 65 | 20 61 20 6e 6f 76 65 6c | it like| a novel|
|000008c0| 20 2d 2d 2d 20 79 6f 75 | 20 63 61 6e 20 61 6c 73 | --- you| can als|
|000008d0| 6f 20 62 72 6f 77 73 65 | 20 74 68 65 20 74 61 62 |o browse| the tab|
|000008e0| 6c 65 20 6f 66 20 63 6f | 6e 74 65 6e 74 73 20 28 |le of co|ntents (|
|000008f0| 69 6e 0a 66 72 6f 6e 74 | 20 6f 66 20 74 68 65 20 |in.front| of the |
|00000900| 6d 61 6e 75 61 6c 29 2c | 20 6f 72 20 6c 6f 6f 6b |manual),| or look|
|00000910| 20 66 6f 72 20 61 20 73 | 70 65 63 69 66 69 63 20 | for a s|pecific |
|00000920| 66 75 6e 63 74 69 6f 6e | 2c 20 6d 6f 64 75 6c 65 |function|, module|
|00000930| 20 6f 72 20 74 65 72 6d | 0a 69 6e 20 74 68 65 20 | or term|.in the |
|00000940| 69 6e 64 65 78 20 28 69 | 6e 20 74 68 65 20 62 61 |index (i|n the ba|
|00000950| 63 6b 29 2e 20 20 41 6e | 64 20 66 69 6e 61 6c 6c |ck). An|d finall|
|00000960| 79 2c 20 69 66 20 79 6f | 75 20 65 6e 6a 6f 79 20 |y, if yo|u enjoy |
|00000970| 6c 65 61 72 6e 69 6e 67 | 20 61 62 6f 75 74 0a 72 |learning| about.r|
|00000980| 61 6e 64 6f 6d 20 73 75 | 62 6a 65 63 74 73 2c 20 |andom su|bjects, |
|00000990| 79 6f 75 20 63 68 6f 6f | 73 65 20 61 20 72 61 6e |you choo|se a ran|
|000009a0| 64 6f 6d 20 70 61 67 65 | 20 6e 75 6d 62 65 72 20 |dom page| number |
|000009b0| 28 73 65 65 20 6d 6f 64 | 75 6c 65 0a 5c 63 6f 64 |(see mod|ule.\cod|
|000009c0| 65 7b 72 61 6e 64 7d 29 | 20 61 6e 64 20 72 65 61 |e{rand})| and rea|
|000009d0| 64 20 61 20 73 65 63 74 | 69 6f 6e 20 6f 72 20 74 |d a sect|ion or t|
|000009e0| 77 6f 2e 0a 0a 4c 65 74 | 20 74 68 65 20 73 68 6f |wo...Let| the sho|
|000009f0| 77 20 62 65 67 69 6e 21 | 0a |w begin!|. |
+--------+-------------------------+-------------------------+--------+--------+