%!PS-Adobe-2.0 %%Creator: dvips(k) 5.96.1 Copyright 2007 Radical Eye Software %%Title: paper-letter/mac.dvi %%CreationDate: Fri Dec 19 16:19:39 2008 %%Pages: 57 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%DocumentFonts: Helvetica Helvetica-Oblique Times-Roman Times-Bold %%+ CMSY10 Times-Italic Courier Helvetica-Bold Courier-Bold %%+ Times-BoldItalic %%DocumentPaperSizes: Letter %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -N0 -t letter -o paper-letter/mac.ps %+ paper-letter/mac.dvi %DVIPSParameters: dpi=600 %DVIPSSource: TeX output 2008.12.19:1619 %%BeginProcSet: tex.pro 0 0 %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S /BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet %%BeginProcSet: 8r.enc 0 0 % File 8r.enc TeX Base 1 Encoding Revision 2.0 2002-10-30 % % @@psencodingfile@{ % author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry, % W. Schmidt, P. Lehman", % version = "2.0", % date = "27nov06", % filename = "8r.enc", % email = "tex-fonts@@tug.org", % docstring = "This is the encoding vector for Type1 and TrueType % fonts to be used with TeX. This file is part of the % PSNFSS bundle, version 9" % @} % % The idea is to have all the characters normally included in Type 1 fonts % available for typesetting. This is effectively the characters in Adobe % Standard encoding, ISO Latin 1, Windows ANSI including the euro symbol, % MacRoman, and some extra characters from Lucida. % % Character code assignments were made as follows: % % (1) the Windows ANSI characters are almost all in their Windows ANSI % positions, because some Windows users cannot easily reencode the % fonts, and it makes no difference on other systems. The only Windows % ANSI characters not available are those that make no sense for % typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen % (173). quotesingle and grave are moved just because it's such an % irritation not having them in TeX positions. % % (2) Remaining characters are assigned arbitrarily to the lower part % of the range, avoiding 0, 10 and 13 in case we meet dumb software. % % (3) Y&Y Lucida Bright includes some extra text characters; in the % hopes that other PostScript fonts, perhaps created for public % consumption, will include them, they are included starting at 0x12. % These are /dotlessj /ff /ffi /ffl. % % (4) hyphen appears twice for compatibility with both ASCII and Windows. % % (5) /Euro was assigned to 128, as in Windows ANSI % % (6) Missing characters from MacRoman encoding incorporated as follows: % % PostScript MacRoman TeXBase1 % -------------- -------------- -------------- % /notequal 173 0x16 % /infinity 176 0x17 % /lessequal 178 0x18 % /greaterequal 179 0x19 % /partialdiff 182 0x1A % /summation 183 0x1B % /product 184 0x1C % /pi 185 0x1D % /integral 186 0x81 % /Omega 189 0x8D % /radical 195 0x8E % /approxequal 197 0x8F % /Delta 198 0x9D % /lozenge 215 0x9E % /TeXBase1Encoding [ % 0x00 /.notdef /dotaccent /fi /fl /fraction /hungarumlaut /Lslash /lslash /ogonek /ring /.notdef /breve /minus /.notdef /Zcaron /zcaron % 0x10 /caron /dotlessi /dotlessj /ff /ffi /ffl /notequal /infinity /lessequal /greaterequal /partialdiff /summation /product /pi /grave /quotesingle % 0x20 /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash % 0x30 /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question % 0x40 /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O % 0x50 /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore % 0x60 /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o % 0x70 /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef % 0x80 /Euro /integral /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /Omega /radical /approxequal % 0x90 /.notdef /.notdef /.notdef /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /Delta /lozenge /Ydieresis % 0xA0 /.notdef /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron % 0xB0 /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown % 0xC0 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis % 0xD0 /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls % 0xE0 /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis % 0xF0 /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndProcSet %%BeginProcSet: texps.pro 0 0 %! TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0 ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{ pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type /nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[ exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if} forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def end %%EndProcSet %%BeginFont: CMSY10 %!PS-AdobeFont-1.1: CMSY10 1.0 %%CreationDate: 1991 Aug 15 07:20:57 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMSY10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -14.035 def /isFixedPitch false def end readonly def /FontName /CMSY10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 13 /circlecopyrt put dup 15 /bullet put readonly def /FontBBox{-29 -960 1116 775}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964 7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4 A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85 E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A 221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A 27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF 5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09 0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730 DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A 71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09 4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C 515DB70A8D4F6146FE068DC1E5DE8BC57036431151EC603C8BCFE359BBD953AD 5F3D998D8365AF76D4CF6A06FB66E1CBCFDB3A67D8880377CD677B9705EE853A D849F88A828E244FA5816B7D081D4D1975A56D771790C21AE05809BEE6613452 953F26C39CE61F0E134BC35404FE2F0B7D244D9A6F66E4D817D1C65024013AD3 5F242EDE94633B8E20EA42B07F83BA649F12B784B2AAFA542BC597C6C2C9AE9C 39D60FBA6CD16AADB5DFDABF22F37E244DF3987FBFA55031CFCD46ADF03650CE D6CDFFD87BF7407FFB63F3FE4C29FE753896101B2CEAB9007B66E29D6A5B85D3 FF91F888E445677157A5996FC7A3BD19BAF3A3BCF33F0719B992A0F013B1F0A1 82E42DF6F651071FB407F448DFF37653E2A0569BDD8EABC3280B3582745DB98B 644E5B341F531B0D81ED85F815B993C2B8B34CDDC6AE97606F6B3B1C5427F174 362FAB82B935087B568E6F526347058C406E878F1CC2DD05C26D35565347C5A5 7575891BB4 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont TeXDict begin 40258431 52099146 1000 600 600 (paper-letter/mac.dvi) @start /Fa 131[45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 2[45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 1[45 45 45 4[45 34[{TeXBase1Encoding ReEncodeFont}81 74.7198 /Courier rf /Fb 214[25 25 40[{TeXBase1Encoding ReEncodeFont}2 74.7198 /Times-Roman rf /Fc 139[23 32 32 1[42 42 111[{ TeXBase1Encoding ReEncodeFont}5 83.022 /Times-BoldItalic rf /Fd 141[53 3[66 8[53 66 97[66 2[{TeXBase1Encoding ReEncodeFont}5 119.552 /Times-Bold rf /Fe 162[40 1[40 91[{ TeXBase1Encoding ReEncodeFont}2 119.552 /Times-Roman rf /Ff 134[72 72 1[72 72 72 72 72 1[72 72 72 72 72 72 1[72 72 72 72 72 72 72 72 72 9[72 2[72 72 72 72 72 72 72 72 72 2[72 72 72 72 72 72 72 1[72 18[72 4[72 72 40[{ TeXBase1Encoding ReEncodeFont}43 119.552 /Courier rf /Fg 133[50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 1[50 4[50 50 1[50 1[50 50 50 50 50 50 50 50 50 50 50 1[50 50 50 50 50 50 50 50 50 18[50 46[{TeXBase1Encoding ReEncodeFont}51 83.022 /Courier-Bold rf /Fh 134[50 50 72 50 55 28 50 33 1[55 55 55 83 22 50 22 22 55 55 28 55 55 50 55 55 8[66 94 1[72 61 66 72 1[66 78 1[83 55 2[28 72 78 61 66 72 72 66 66 7[55 55 55 55 55 55 55 55 55 55 1[28 43[50 2[{ TeXBase1Encoding ReEncodeFont}55 99.6264 /Helvetica rf /Fi 104[120 29[60 60 86 60 66 33 60 40 1[66 66 66 100 27 60 27 27 66 66 33 66 66 60 66 66 9[113 80 86 73 80 86 93 80 93 86 100 66 80 1[33 86 93 73 80 86 86 80 80 7[66 66 66 66 66 66 66 66 66 66 1[33 6[27 36[60 2[{ TeXBase1Encoding ReEncodeFont}60 119.552 /Helvetica rf /Fj 167[48 9[48 4[22 73[{TeXBase1Encoding ReEncodeFont}3 66.4176 /Times-Roman rf /Fk 168[113 80 86 73 1[86 2[93 86 4[33 86 1[73 80 3[86 65[{TeXBase1Encoding ReEncodeFont}12 119.552 /Helvetica-Bold rf /Fl 104[83 29[42 42 60 42 46 23 42 28 1[46 46 46 69 18 42 18 18 46 46 23 46 46 42 46 46 8[55 1[55 60 51 55 60 1[55 65 60 69 46 2[23 60 65 1[55 60 60 1[55 7[46 46 46 46 46 46 46 46 46 46 1[23 6[18 36[42 2[{TeXBase1Encoding ReEncodeFont}56 83.022 /Helvetica rf /Fm 133[50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 1[50 1[50 1[50 50 50 1[50 1[50 50 50 50 50 50 50 50 50 50 50 1[50 50 50 50 50 50 50 50 50 1[50 1[50 2[50 2[50 50 50 1[50 50 50 50 1[50 50 50 50 50 50 50 50 4[50 34[{ TeXBase1Encoding ReEncodeFont}71 83.022 /Courier rf /Fn 134[37 37 55 37 42 23 32 32 42 42 42 42 60 23 37 23 23 42 42 23 37 42 37 42 42 12[46 42 51 60 51 60 55 69 46 55 1[28 2[51 51 60 55 51 51 3[56 2[28 7[42 42 42 1[21 28 21 1[42 38[42 42 2[{TeXBase1Encoding ReEncodeFont}53 83.022 /Times-Italic rf /Fo 133[37 42 42 60 42 46 28 32 37 46 46 42 46 69 23 2[23 46 42 28 37 46 37 46 42 7[60 1[83 60 60 55 46 60 1[51 65 60 78 55 2[32 65 65 51 55 60 60 55 60 1[42 4[28 42 42 42 42 42 42 42 42 42 42 1[21 28 11[28 30[46 2[{TeXBase1Encoding ReEncodeFont}61 83.022 /Times-Bold rf /Fp 240[42 1[83 13[{}2 83.022 /CMSY10 rf /Fq 104[83 2[37 37 24[37 42 42 60 42 42 23 32 28 42 42 42 42 65 23 42 23 23 42 42 28 37 42 37 42 37 28 5[51 60 60 78 60 60 51 46 55 60 46 60 60 74 51 60 1[28 60 60 46 51 60 55 55 60 5[23 23 42 42 42 42 42 42 42 42 42 42 23 21 28 21 47 1[28 28 28 35[46 46 2[{ TeXBase1Encoding ReEncodeFont}77 83.022 /Times-Roman rf /Fr 103[25 29[37 37 37 54 37 42 21 37 25 42 42 42 42 62 17 37 17 17 42 42 21 42 42 37 42 42 8[50 3[46 50 54 1[50 58 54 62 42 2[21 2[46 2[54 1[50 76 5[21 42 42 42 1[42 1[42 42 42 42 21 21 25 9[42 32[37 2[{ TeXBase1Encoding ReEncodeFont}55 74.7198 /Helvetica rf /Fs 134[50 1[72 1[55 33 1[44 2[50 55 4[28 55 1[33 44 55 2[50 13[55 2[61 9[61 70[{TeXBase1Encoding ReEncodeFont}16 99.6264 /Times-Bold rf /Ft 139[28 1[33 4[78 28 2[28 50 2[44 1[44 50 44 27[61 72 9[28 50 50 5[50 50 50 3[25 44[{ TeXBase1Encoding ReEncodeFont}19 99.6264 /Times-Roman rf /Fu 137[72 80 40 72 48 2[80 80 120 1[72 1[32 3[80 80 2[80 14[104 5[80 1[72 2[112 88 1[104 21[40 1[40 44[{ TeXBase1Encoding ReEncodeFont}21 143.462 /Helvetica rf /Fv 140[72 6[32 6[80 3[80 14[104 28[80 1[80 80 3[40 46[{ TeXBase1Encoding ReEncodeFont}9 143.462 /Helvetica-Oblique rf /Fw 134[103 103 2[115 57 103 69 2[115 115 172 46 2[46 115 115 1[115 115 103 115 115 8[138 2[149 126 138 2[138 161 149 172 115 2[57 149 2[138 149 149 1[138 65[{ TeXBase1Encoding ReEncodeFont}33 206.559 /Helvetica rf end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%BeginPaperSize: Letter /setpagedevice where { pop << /PageSize [612 792] >> setpagedevice } { /letter where { pop letter } if } ifelse %%EndPaperSize end %%EndSetup %%Page: 1 1 TeXDict begin 1 0 bop 0 83 3901 9 v 1428 446 a Fw(Macintosh)58 b(Libr)n(ar)6 b(y)56 b(Modules)3015 676 y Fv(Release)38 b(2.5.3)2684 1852 y Fu(Guido)g(v)l(an)i(Rossum)2365 2035 y(F)-6 b(red)39 b(L.)g(Dr)o(ak)m(e)n(,)f(Jr)-7 b(.,)39 b(editor)3044 4091 y Ft(19th)24 b(December)l(,)h(2008)2676 5201 y Fs(Python)g(Softwar)n(e)h(F)n(oundation)3019 5317 y Ft(Email:)k Fr(docs@p)n(ython.org)p eop end %%Page: 2 2 TeXDict begin 2 1 bop 0 83 a Fq(Cop)o(yright)380 80 y(c)357 83 y Fp(\015)20 b Fq(2001-2008)d(Python)i(Softw)o(are)h(F)o(oundation.) i(All)f(rights)f(reserv)o(ed.)0 230 y(Cop)o(yright)380 227 y(c)357 230 y Fp(\015)g Fq(2000)f(BeOpen.com.)24 b(All)c(rights)g(reserv)o(ed.)0 377 y(Cop)o(yright)380 374 y(c)357 377 y Fp(\015)g Fq(1995-2000)d(Corporation)h(for)h (National)h(Research)g(Initiati)n(v)o(es.)k(All)d(rights)f(reserv)o (ed.)0 524 y(Cop)o(yright)380 521 y(c)357 524 y Fp(\015)g Fq(1991-1995)d(Stichting)j(Mathematisch)f(Centrum.)24 b(All)d(rights)f(reserv)o(ed.)0 671 y(See)h(the)f(end)f(of)h(this)h (document)d(for)i(complete)f(license)h(and)g(permissions)f (information.)p eop end %%Page: 1 3 TeXDict begin 1 2 bop 1796 2460 a Fo(Abstract)0 2690 y Fq(This)18 b(library)f(reference)f(manual)h(documents)f(Python')-5 b(s)17 b(e)o(xtensions)g(for)g(the)h(Macintosh.)23 b(It)c(should)d(be)i (used)g(in)g(conjunction)d(with)0 2789 y(the)20 b Fn(Python)f(Libr)o (ary)h(Refer)m(ence)p Fq(,)g(which)f(documents)g(the)h(standard)f (library)g(and)h(b)n(uilt-in)f(types.)0 2936 y(This)26 b(manual)f(assumes)i(basic)f(kno)n(wledge)e(about)h(the)h(Python)f (language.)41 b(F)o(or)25 b(an)h(informal)f(introduction)f(to)i (Python,)g(see)h(the)0 3036 y Fn(Python)h(T)-5 b(utorial)p Fq(;)34 b(the)29 b Fn(Python)e(Refer)m(ence)i(Manual)f Fq(remains)g(the)h(highest)g(authority)e(on)i(syntactic)f(and)h (semantic)g(questions.)0 3135 y(Finally)-5 b(,)19 b(the)i(manual)e (entitled)h Fn(Extending)e(and)i(Embedding)e(the)i(Python)f(Interpr)m (eter)h Fq(describes)g(ho)n(w)f(to)i(add)e(ne)n(w)h(e)o(xtensions)f(to) 0 3235 y(Python)g(and)h(ho)n(w)f(to)i(embed)e(it)i(in)f(other)f (applications.)p eop end %%Page: 2 4 TeXDict begin 2 3 bop eop end %%Page: 1 5 TeXDict begin 1 4 bop 2764 747 a Fw(CONTENTS)0 1594 y Fo(1)83 b(Using)20 b(Python)g(on)g(a)g(Macintosh)2691 b(1)125 1694 y Fq(1.1)110 b(Getting)20 b(and)g(Installing)f(MacPython) 45 b(.)c(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)143 b(1)125 1793 y(1.2)110 b(The)20 b(IDE)77 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(2)125 1893 y(1.3)110 b(Installing)20 b(Additional)f(Python)g(P)o (ackages)86 b(.)41 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)143 b(2)125 1993 y(1.4)110 b(GUI)21 b(Programming)c(on)j(the)g (Mac)31 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)g(.)143 b(3)125 2092 y(1.5)110 b(Distrib)n(uting)20 b(Python)f(Applications)g(on)h(the)g(Mac)53 b(.)41 b(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(3)125 2192 y(1.6)110 b(Application)19 b(Scripting)h(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(3)125 2291 y(1.7)110 b(Other)20 b(Resources)63 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(3)0 2474 y Fo(2)83 b(MacPython)19 b(Modules)2998 b(5)125 2574 y Fq(2.1)110 b Fm(macpath)20 b Fq(\227)h(MacOS)f(path)g(manipulation)e (functions)54 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(5)125 2673 y(2.2)110 b Fm(macfs)20 b Fq(\227)h(V)-9 b(arious)19 b(\002le)i(system)g(services)67 b(.)41 b(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(5)125 2773 y(2.3)110 b Fm(ic)21 b Fq(\227)g(Access)f(to)h(Internet)e(Con\002g)41 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)143 b(8)125 2873 y(2.4)110 b Fm(MacOS)20 b Fq(\227)h(Access)g (to)f(Mac)g(OS)h(interpreter)e(features)32 b(.)42 b(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)143 b(9)125 2972 y(2.5)110 b Fm(macostools)19 b Fq(\227)i(Con)m(v)o(enience)d(routines)h(for)h(\002le)g(manipulation) 63 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)102 b(10)125 3072 y(2.6)110 b Fm(findertools)19 b Fq(\227)i(The)f Fo(\002nder)p Fq(')-5 b(s)21 b(Apple)f(Ev)o(ents)f (interf)o(ace)51 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(11)125 3171 y(2.7)110 b Fm(EasyDialogs)19 b Fq(\227)i(Basic)g(Macintosh)e (dialogs)59 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(11)125 3271 y(2.8)110 b Fm(FrameWork)19 b Fq(\227)i(Interacti)n(v)o (e)e(application)f(frame)n(w)o(ork)37 b(.)k(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)102 b(13)125 3371 y(2.9)110 b Fm(autoGIL)20 b Fq(\227)h(Global)e (Interpreter)f(Lock)i(handling)e(in)i(e)n(v)o(ent)g(loops)51 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)102 b(17)0 3553 y Fo(3)83 b(MacPython)19 b(OSA)h(Modules)2766 b(19)125 3653 y Fq(3.1)110 b Fm(gensuitemodule)19 b Fq(\227)h(Generate)g(OSA)g(stub)h(packages)65 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(20)125 3753 y(3.2)110 b Fm(aetools)20 b Fq(\227)h(OSA)f(client)h(support)58 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)102 b(21)125 3852 y(3.3)110 b Fm(aepack)20 b Fq(\227)h(Con)m(v)o (ersion)d(between)h(Python)g(v)n(ariables)h(and)f(AppleEv)o(ent)f(data) i(containers)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(22)125 3952 y(3.4)110 b Fm(aetypes)20 b Fq(\227)h(AppleEv)o(ent)d (objects)49 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)102 b(23)125 4051 y(3.5)110 b Fm(MiniAEFrame)19 b Fq(\227)i(Open)e(Scripting)h(Architecture)e(serv)o(er)i(support)63 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)g(.)102 b(24)0 4234 y Fo(4)83 b(MacOS)20 b(T)-8 b(oolbox)20 b(Modules)2796 b(27)125 4334 y Fq(4.1)110 b Fm(Carbon.AE)19 b Fq(\227)i(Apple)f(Ev)o(ents)28 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)102 b(28)125 4433 y(4.2)110 b Fm(Carbon.AH)19 b Fq(\227)i(Apple)f(Help)29 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(28)125 4533 y(4.3)110 b Fm(Carbon.App)19 b Fq(\227)i(Appearance)d(Manager)25 b(.)41 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(28)125 4633 y(4.4)110 b Fm(Carbon.CF)19 b Fq(\227)i(Core)f(F)o (oundation)40 b(.)h(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)102 b(28)125 4732 y(4.5)110 b Fm(Carbon.CG)19 b Fq(\227)i(Core)f(Graphics)57 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 4832 y(4.6)110 b Fm(Carbon.CarbonEvt)18 b Fq(\227)j(Carbon)e(Ev)o(ent)g (Manager)39 b(.)i(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 4932 y(4.7)110 b Fm(Carbon.Cm)19 b Fq(\227)i(Component)d (Manager)k(.)41 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)102 b(29)125 5031 y(4.8)110 b Fm(Carbon.Ctl)19 b Fq(\227)i(Control)f(Manager)42 b(.)g(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 5131 y(4.9)110 b Fm(Carbon.Dlg)19 b Fq(\227)i(Dialog)f(Manager)70 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 5230 y(4.10)68 b Fm(Carbon.Evt)19 b Fq(\227)i(Ev)o(ent)e (Manager)42 b(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)102 b(29)125 5330 y(4.11)68 b Fm(Carbon.Fm)19 b Fq(\227)i(F)o(ont)f(Manager)71 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)p 0 5549 3901 4 v 3882 5649 a Fl(i)p eop end %%Page: 2 6 TeXDict begin 2 5 bop 125 83 a Fq(4.12)68 b Fm(Carbon.Folder)19 b Fq(\227)h(F)o(older)g(Manager)56 b(.)41 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 183 y(4.13)68 b Fm(Carbon.Help)19 b Fq(\227)i(Help)f(Manager)j(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) 102 b(29)125 282 y(4.14)68 b Fm(Carbon.List)19 b Fq(\227)i(List)g (Manager)55 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)102 b(29)125 382 y(4.15)68 b Fm(Carbon.Menu)19 b Fq(\227)i(Menu)e(Manager)53 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 482 y(4.16)68 b Fm(Carbon.Mlte)19 b Fq(\227)i(MultiLingual)d(T)-6 b(e)o(xt)20 b(Editor)38 b(.)j(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 581 y(4.17)68 b Fm(Carbon.Qd)19 b Fq(\227)i(QuickDra)o(w)27 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)102 b(29)125 681 y(4.18)68 b Fm(Carbon.Qdoffs)19 b Fq(\227)h(QuickDra)o(w)f(Of)n(fscreen)43 b(.)e(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 780 y(4.19)68 b Fm(Carbon.Qt)19 b Fq(\227)i(QuickT)m(ime)38 b(.)k(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 880 y(4.20)68 b Fm(Carbon.Res)19 b Fq(\227)i(Resource)f(Manager)f(and)g (Handles)54 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 980 y(4.21)68 b Fm(Carbon.Scrap)19 b Fq(\227)i(Scrap)e (Manager)71 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)102 b(29)125 1079 y(4.22)68 b Fm(Carbon.Snd)19 b Fq(\227)i(Sound)e(Manager)j(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 1179 y(4.23)68 b Fm(Carbon.TE)19 b Fq(\227)i(T)-6 b(e)o(xtEdit)68 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 1279 y(4.24)68 b Fm(Carbon.Win)19 b Fq(\227)i(W)m(indo)n(w)e(Manager)79 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(29)125 1378 y(4.25)68 b Fm(ColorPicker)19 b Fq(\227)i(Color)f (selection)g(dialog)78 b(.)42 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)102 b(29)0 1561 y Fo(5)83 b(Undocumented)20 b(Modules)2828 b(31)125 1660 y Fq(5.1)110 b Fm(applesingle)19 b Fq(\227)i(AppleSingle) e(decoder)50 b(.)41 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)102 b(31)125 1760 y(5.2)110 b Fm(buildtools)19 b Fq(\227)i(Helper)f(module)f(for)g(BuildApplet)g(and)h(Friends)30 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)102 b(31)125 1860 y(5.3)110 b Fm(cfmfile)20 b Fq(\227)h(Code)f(Fragment)f(Resource)g(module)j(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(31)125 1959 y(5.4)110 b Fm(icopen)20 b Fq(\227)h(Internet)e(Con\002g)h (replacement)e(for)i Fm(open\(\))66 b Fq(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) 102 b(31)125 2059 y(5.5)110 b Fm(macerrors)19 b Fq(\227)i(Mac)g(OS)f (Errors)36 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)102 b(32)125 2159 y(5.6)110 b Fm(macresource)19 b Fq(\227)i(Locate)f(script)g(resources)46 b(.)c(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(32)125 2258 y(5.7)110 b Fm(Nav)21 b Fq(\227)f(Na)n(vServices)g(calls)61 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)102 b(32)125 2358 y(5.8)110 b Fm(PixMapWrapper)19 b Fq(\227)h(Wrapper)g(for)f(PixMap)h(objects)77 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(32)125 2457 y(5.9)110 b Fm(videoreader)19 b Fq(\227)i(Read)f(QuickT)m(ime)f(mo)o(vies)49 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(32)125 2557 y(5.10)68 b Fm(W)21 b Fq(\227)g(W)m(idgets)f(b)n(uilt)g (on)g Fm(FrameWork)43 b Fq(.)f(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)g(.)102 b(32)0 2740 y Fo(A)65 b(History)19 b(and)h(License)2983 b(33)125 2839 y Fq(A.1)92 b(History)20 b(of)g(the)g(softw)o(are)34 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(33)125 2939 y(A.2)92 b(T)-6 b(erms)20 b(and)g(conditions)f(for)g (accessing)h(or)g(otherwise)g(using)f(Python)47 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)102 b(34)125 3039 y(A.3)92 b(Licenses)21 b(and)e(Ackno)n (wledgements)e(for)j(Incorporated)d(Softw)o(are)54 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)102 b(37)0 3221 y Fo(Module)21 b(Index)3321 b(47)0 3404 y(Index)3614 b(49)p 0 5549 3901 4 v 0 5649 a Fl(ii)p eop end %%Page: 1 7 TeXDict begin 1 6 bop 0 83 3901 9 v 3503 230 a Fl(CHAPTER)3641 427 y Fk(ONE)p 0 515 V 1156 978 a Fw(Using)57 b(Python)h(on)f(a)g (Macintosh)0 1468 y Fq(Python)17 b(on)g(a)h(Macintosh)f(running)f(Mac)i (OS)g(X)h(is)f(in)g(principle)f(v)o(ery)g(similar)h(to)g(Python)e(on)i (an)o(y)f(other)i(U)t Fj(N)t(I)t(X)i Fq(platform,)16 b(b)n(ut)i(there)0 1568 y(are)i(a)h(number)d(of)i(additional)f (features)g(such)h(as)h(the)f(IDE)h(and)e(the)h(P)o(ackage)f(Manager)g (that)i(are)f(w)o(orth)f(pointing)g(out.)0 1714 y(Python)j(on)h(Mac)g (OS)h(9)f(or)g(earlier)g(can)g(be)g(quite)f(dif)n(ferent)g(from)g (Python)g(on)j(U)t Fj(N)t(I)t(X)h Fq(or)d(W)m(indo)n(ws,)g(b)n(ut)g(is) h(be)o(yond)d(the)i(scope)g(of)0 1814 y(this)h(manual,)f(as)h(that)f (platform)f(is)i(no)f(longer)f(supported,)g(starting)h(with)h(Python)e (2.4.)33 b(See)24 b Fr(http://www)l(.cwi.nl/\230jac)o(k/macp)n(ytho)o (n)0 1914 y Fq(for)c(installers)g(for)g(the)g(latest)h(2.3)e(release)i (for)e(Mac)h(OS)h(9)g(and)e(related)h(documentation.)0 2241 y Fi(1.1)121 b(Getting)34 b(and)h(Installing)f(MacPython)0 2474 y Fq(Mac)18 b(OS)h(X)g(10.4)e(comes)h(with)g(Python)f(2.3)g (pre-installed)g(by)h(Apple.)24 b(Ho)n(we)n(v)o(er)m(,)16 b(you)h(are)h(encouraged)e(to)i(install)h(the)f(most)g(recent)0 2574 y(v)o(ersion)k(of)g(Python)g(from)f(the)i(Python)f(website)h(\()p Fr(http://www)l(.p)n(ython.org)-7 b Fq(\).)33 b(A)23 b(\223uni)n(v)o(ersal)f(binary\224)f(b)n(uild)h(of)h(Python)f(2.5,)g (which)0 2673 y(runs)e(nati)n(v)o(ely)f(on)g(the)i(Mac')-5 b(s)20 b(ne)n(w)g(Intel)g(and)g(le)o(gac)o(y)e(PPC)k(CPU')-5 b(s,)21 b(is)g(a)n(v)n(ailable)f(there.)0 2820 y(What)h(you)e(get)h (after)g(installing)g(is)h(a)g(number)d(of)i(things:)125 3050 y Fp(\017)41 b Fq(A)25 b(`)p Fr(MacPython)e(2.5)p Fq(')h(folder)g(in)h(your)e(`)p Fr(Applications)p Fq(')e(folder)-5 b(.)38 b(In)25 b(here)f(you)g(\002nd)g(IDLE,)g(the)h(de)n(v)o(elopment) d(en)m(vironment)208 3150 y(that)h(is)h(a)g(standard)e(part)h(of)g(of)n (\002cial)g(Python)f(distrib)n(utions;)i(PythonLauncher)m(,)c(which)i (handles)h(double-clicking)d(Python)208 3249 y(scripts)h(from)e(the)i (Finder;)f(and)h(the)f(\223Build)h(Applet\224)f(tool,)h(which)f(allo)n (ws)h(you)f(to)h(package)e(Python)g(scripts)i(as)h(standalone)208 3349 y(applications)d(on)g(your)g(system.)125 3515 y Fp(\017)41 b Fq(A)17 b(frame)n(w)o(ork)f(`)p Fr(/Libr)o(ar)r(y/F)m(r)o (ame)o(w)o(or)q(ks/Python.fr)o(ame)n(w)o(or)q(k)p Fq(',)c(which)17 b(includes)g(the)g(Python)f(e)o(x)o(ecutable)g(and)g(libraries.)24 b(The)208 3614 y(installer)16 b(adds)h(this)g(location)e(to)i(your)f (shell)h(path.)23 b(T)-7 b(o)17 b(uninstall)f(MacPython,)f(you)h(can)g (simply)h(remo)o(v)o(e)d(these)j(three)f(things.)208 3714 y(A)k(symlink)g(to)g(the)g(Python)f(e)o(x)o(ecutable)f(is)k (placed)d(in)h(/usr/local/bin/.)0 3944 y(The)69 b(Apple-pro)o(vided)c (b)n(uild)k(of)g(Python)f(is)i(installed)g(in)f(`)p Fr(/System/Libr)o (ar)r(y/F)m(r)o(ame)o(w)o(or)q(ks/Python.fr)o(ame)o(w)n(or)q(k)p Fq(')64 b(and)0 4044 y(`)p Fr(/usr/bin/p)n(ython)p Fq(',)24 b(respecti)n(v)o(ely)-5 b(.)43 b(Y)-9 b(ou)27 b(should)f(ne)n(v)o(er)f (modify)h(or)g(delete)h(these,)i(as)f(the)o(y)e(are)h(Apple-controlled) c(and)k(are)g(used)0 4143 y(by)20 b(Apple-)f(or)h(third-party)e(softw)o (are.)0 4290 y(IDLE)g(includes)g(a)h(help)f(menu)g(that)g(allo)n(ws)h (you)f(to)g(access)i(Python)d(documentation.)k(If)e(you)e(are)i (completely)e(ne)n(w)h(to)h(Python)e(you)0 4390 y(should)i(start)i (reading)e(the)h(tutorial)f(introduction)f(in)i(that)h(document.)0 4537 y(If)h(you)f(are)h(f)o(amiliar)f(with)h(Python)f(on)h(other)h(U)t Fj(N)t(I)t(X)i Fq(platforms)20 b(you)h(should)g(read)h(the)g(section)f (on)h(running)e(Python)g(scripts)j(from)0 4636 y(the)f(U)t Fj(N)t(I)t(X)h Fq(shell.)0 4921 y Fh(1.1.1)100 b(Ho)o(w)28 b(to)f(r)q(un)j(a)e(Python)g(scr)q(ipt)0 5124 y Fq(Y)-9 b(our)19 b(best)i(w)o(ay)f(to)h(get)f(started)g(with)h(Python)e(on)h (Mac)g(OS)h(X)g(is)g(through)e(the)h(IDLE)g(inte)o(grated)f(de)n(v)o (elopment)e(en)m(vironment,)g(see)0 5224 y(section)j(1.2)f(and)h(use)h (the)f(Help)g(menu)f(when)h(the)g(IDE)g(is)h(running.)p 0 5549 3901 4 v 3854 5649 a Fl(1)p eop end %%Page: 2 8 TeXDict begin 2 7 bop 0 83 a Fq(If)47 b(you)e(w)o(ant)i(to)g(run)f (Python)g(scripts)h(from)e(the)i(T)-6 b(erminal)46 b(windo)n(w)g (command)e(line)j(or)g(from)e(the)i(Finder)f(you)g(\002rst)0 183 y(need)37 b(an)g(editor)g(to)g(create)h(your)e(script.)76 b(Mac)38 b(OS)g(X)g(comes)f(with)h(a)f(number)f(of)h(standard)i(U)t Fj(N)t(I)t(X)h Fq(command)35 b(line)j(edi-)0 282 y(tors,)i Fo(vim)c Fq(and)f Fo(emacs)h Fq(among)f(them.)71 b(If)36 b(you)f(w)o(ant)h(a)g(more)f(Mac-lik)o(e)h(editor)m(,)i Fo(BBEdit)g Fq(or)d Fo(T)-8 b(extWrangler)35 b Fq(from)g(Bare)0 382 y(Bones)29 b(Softw)o(are)f(\(see)g Fr(http://www)l(.barebones)o (.com/p)o(rod)o(ucts/b)o(be)o(di)o(t/i)o(nd)o(e)n(x.shtml)-7 b Fq(\))29 b(are)g(good)e(choices,)j(as)f(is)g Fo(T)-8 b(extMate)28 b Fq(\(see)0 482 y Fr(http://macromates)o(.com/)m Fq(\).)d(Other)19 b(editors)h(include)f Fo(Gvim)h Fq(\()p Fr(http://macvim.org)m Fq(\))h(and)e Fo(Aquamacs)i Fq(\()p Fr(http://aquamacs)o(.org)-6 b Fq(\).)0 628 y(T)f(o)20 b(run)g(your)f(script)h(from)f(the)h(T)-6 b(erminal)20 b(windo)n(w)f(you)g(must)h(mak)o(e)g(sure)g(that)g(`)p Fr(/usr/local/bin)p Fq(')d(is)k(in)f(your)f(shell)i(search)f(path.)0 775 y(T)-7 b(o)20 b(run)g(your)f(script)h(from)f(the)h(Finder)g(you)f (ha)n(v)o(e)h(tw)o(o)g(options:)125 1005 y Fp(\017)41 b Fq(Drag)19 b(it)i(to)g Fo(PythonLauncher)125 1171 y Fp(\017)41 b Fq(Select)19 b Fo(PythonLauncher)g Fq(as)h(the)f(def)o (ault)f(application)g(to)h(open)f(your)g(script)i(\(or)e(an)o(y)g(.p)o (y)h(script\))g(through)e(the)i(\002nder)g(Info)208 1271 y(windo)n(w)i(and)i(double-click)d(it.)33 b Fo(PythonLauncher)22 b Fq(has)h(v)n(arious)f(preferences)f(to)i(control)e(ho)n(w)i(your)e (script)i(is)h(launched.)208 1370 y(Option-dragging)d(allo)n(ws)k(you)g (to)g(change)f(these)h(for)g(one)f(in)m(v)n(ocation,)h(or)g(use)g(its)h (Preferences)e(menu)h(to)g(change)f(things)208 1470 y(globally)-5 b(.)0 1755 y Fh(1.1.2)100 b(Running)30 b(scr)q(ipts)e(with)g(a)g(GUI)0 1958 y Fq(W)m(ith)c(older)f(v)o(ersions)g(of)g(Python,)h(there)f(is)i (one)e(Mac)h(OS)h(X)f(quirk)e(that)i(you)f(need)g(to)h(be)g(a)o(w)o (are)g(of:)32 b(programs)22 b(that)i(talk)g(to)g(the)0 2058 y(Aqua)16 b(windo)n(w)h(manager)e(\(in)i(other)f(w)o(ords,)h(an)o (ything)e(that)i(has)h(a)f(GUI\))g(need)f(to)i(be)f(run)f(in)h(a)h (special)f(w)o(ay)-5 b(.)23 b(Use)18 b Fo(pythonw)f Fq(instead)0 2157 y(of)j Fo(python)g Fq(to)g(start)h(such)f(scripts.)0 2304 y(W)m(ith)g(Python)g(2.5,)f(you)g(can)h(use)h(either)e Fo(python)h Fq(or)g Fo(pythonw)p Fq(.)0 2589 y Fh(1.1.3)100 b(Con\002gur)o(ation)0 2792 y Fq(Python)20 b(on)g(OS)i(X)f(honors)f (all)h(standard)h(U)t Fj(N)t(I)t(X)i Fq(en)m(vironment)18 b(v)n(ariables)i(such)h(as)h(PYTHONP)-8 b(A)f(TH,)20 b(b)n(ut)h(setting)g(these)g(v)n(ariables)0 2891 y(for)h(programs)g (started)h(from)f(the)h(Finder)f(is)i(non-standard)c(as)k(the)f(Finder) g(does)f(not)h(read)g(your)f(`)p Fr(.pro\002le)p Fq(')f(or)h(`)p Fr(.cshrc)p Fq(')i(at)f(startup.)0 2991 y(Y)-9 b(ou)20 b(need)f(to)h(create)g(a)h(\002le)g(`)p Fr(\230/.MacOSX/en)o (vironment.plist)p Fq('.)e(See)i(Apple')-5 b(s)20 b(T)-6 b(echnical)19 b(Document)g(QA1067)f(for)i(details.)0 3138 y(F)o(or)k(more)g(information)f(on)h(installation)g(Python)g (packages)g(in)g(MacPython,)h(see)g(section)f(1.3,)h(\223Installing)f (Additional)g(Python)0 3238 y(P)o(ackages.)-6 b(\224)0 3565 y Fi(1.2)121 b(The)34 b(IDE)0 3798 y Fq(MacPython)17 b(ships)i(with)f(the)h(standard)e(IDLE)i(de)n(v)o(elopment)c(en)m (vironment.)21 b(A)f(good)d(introduction)f(to)i(using)g(IDLE)g(can)h (be)f(found)0 3897 y(at)j Fr(http://hkn.eecs)o(.ber)q(k)o(ele)n(y)-7 b(.ed)o(u/)14 b(dy)o(oo/p)n(ython/idle)p 1596 3897 23 4 v 22 w(intro/inde)n(x.html)-5 b Fq(.)0 4225 y Fi(1.3)121 b(Installing)34 b(Additional)g(Python)g(P)-5 b(ac)n(kages)0 4458 y Fq(There)19 b(are)h(se)n(v)o(eral)g(methods)f(to)h(install)h (additional)e(Python)g(packages:)125 4688 y Fp(\017)41 b Fr(http://p)n(ythonmac.org/pa)o(c)o(kage)o(s/)15 b Fq(contains)20 b(selected)g(compiled)e(packages)h(for)h(Python)f(2.5,)g (2.4,)h(and)f(2.3.)125 4854 y Fp(\017)41 b Fq(P)o(ackages)19 b(can)h(be)g(installed)g(via)g(the)h(standard)e(Python)g(distutils)h (mode)g(\(`)p Fm(python)48 b(setup.py)g(install)p Fq('\).)125 5020 y Fp(\017)41 b Fq(Man)o(y)19 b(packages)g(can)h(also)g(be)g (installed)h(via)f(the)g Fo(setuptools)g Fq(e)o(xtension.)p 0 5549 3901 4 v 0 5649 a Fl(2)2312 b(Chapter)23 b(1.)52 b(Using)23 b(Python)h(on)f(a)h(Macintosh)p eop end %%Page: 3 9 TeXDict begin 3 8 bop 0 88 a Fi(1.4)121 b(GUI)34 b(Prog)o(r)o(amming)f (on)h(the)g(Mac)0 321 y Fq(There)19 b(are)h(se)n(v)o(eral)g(options)f (for)h(b)n(uilding)f(GUI)h(applications)f(on)h(the)g(Mac)g(with)h (Python.)0 468 y Fn(PyObjC)h Fq(is)g(a)h(Python)d(binding)g(to)i (Apple')-5 b(s)22 b(Objecti)n(v)o(e-C/Cocoa)e(frame)n(w)o(ork,)g(which) h(is)h(the)g(foundation)d(of)j(most)g(modern)d(Mac)0 567 y(de)n(v)o(elopment.)j(Information)17 b(on)j(PyObjC)h(is)g(a)n(v)n (ailable)e(from)h Fr(http://p)n(ybojc.sourcef)n(orge)n(.n)o(et)-6 b Fq(.)0 714 y(The)24 b(standard)g(Python)g(GUI)g(toolkit)h(is)g Fm(Tkinter)p Fq(,)g(based)f(on)h(the)f(cross-platform)f(Tk)i(toolkit)f (\()p Fr(http://www)l(.tcl.tk)l Fq(\).)39 b(An)25 b(Aqua-)0 814 y(nati)n(v)o(e)h(v)o(ersion)g(of)h(Tk)g(is)h(b)n(undled)d(with)i (OS)h(X)g(by)e(Apple,)i(and)f(the)g(latest)h(v)o(ersion)e(can)h(be)g (do)n(wnloaded)d(and)j(installed)g(from)0 914 y Fr(http://www)l(.activ) n(estate)o(.com)-5 b Fq(;)21 b(it)g(can)f(also)g(be)h(b)n(uilt)f(from)f (source.)0 1060 y Fn(wxPython)e Fq(is)i(another)d(popular)g (cross-platform)g(GUI)i(toolkit)f(that)h(runs)g(nati)n(v)o(ely)f(on)g (Mac)h(OS)h(X.)f(P)o(ackages)f(and)h(documentation)0 1160 y(are)i(a)n(v)n(ailable)g(from)f Fr(http://www)l(.wxp)n(ython.org) -6 b Fq(.)0 1307 y Fn(PyQt)23 b Fq(is)g(another)e(popular)g (cross-platform)f(GUI)j(toolkit)e(that)i(runs)f(nati)n(v)o(ely)f(on)h (Mac)h(OS)g(X.)g(More)f(information)e(can)i(be)g(found)0 1407 y(at)f Fr(http://www)l(.r)q(iv)n(erbankcomputin)o(g.co)m(.)o(uk/p) m(yqt/)-6 b Fq(.)0 1734 y Fi(1.5)121 b(Distr)r(ib)n(uting)33 b(Python)i(Applications)e(on)i(the)f(Mac)0 1967 y Fq(The)20 b(\223Build)h(Applet\224)f(tool)h(that)f(is)i(placed)e(in)h(the)f (MacPython)f(2.5)h(folder)g(is)i(\002ne)e(for)g(packaging)f(small)i (Python)f(scripts)h(on)f(your)0 2066 y(o)n(wn)28 b(machine)g(to)h(run)g (as)g(a)h(standard)e(Mac)h(application.)50 b(This)29 b(tool,)h(ho)n(we)n(v)o(er)m(,)f(is)h(not)f(rob)n(ust)f(enough)f(to)i (distrib)n(ute)g(Python)0 2166 y(applications)19 b(to)h(other)g(users.) 0 2313 y(The)e(standard)f(tool)h(for)f(deplo)o(ying)f(standalone)h (Python)g(applications)g(on)h(the)g(Mac)g(is)h Fo(py2app)p Fq(.)24 b(More)17 b(information)f(on)i(installing)0 2413 y(and)i(using)f(p)o(y2app)g(can)h(be)g(found)e(at)j Fr (http://unde\002ned.org/p)m(yth)o(on/)o(#p)m(y2ap)o(p)-6 b Fq(.)0 2740 y Fi(1.6)121 b(Application)34 b(Scr)r(ipting)0 2973 y Fq(Python)i(can)h(also)h(be)f(used)h(to)f(script)h(other)e(Mac)i (applications)e(via)h(Apple')-5 b(s)38 b(Open)e(Scripting)h (Architecture)f(\(OSA\);)h(see)0 3072 y Fr(http://appscr)q(ipt.sourcef) n(orge)n(.n)o(et)-6 b Fq(.)47 b(Appscript)26 b(is)i(a)g(high-le)n(v)o (el,)f(user)n(-friendly)e(Apple)h(e)n(v)o(ent)h(bridge)f(that)h(allo)n (ws)h(you)e(to)h(con-)0 3172 y(trol)21 b(scriptable)g(Mac)g(OS)h(X)g (applications)e(using)g(ordinary)f(Python)h(scripts.)29 b(Appscript)20 b(mak)o(es)h(Python)f(a)i(serious)f(alternati)n(v)o(e)e (to)0 3272 y(Apple')-5 b(s)19 b(o)n(wn)g Fn(AppleScript)f Fq(language)g(for)h(automating)e(your)i(Mac.)24 b(A)c(related)f (package,)f Fn(PyOSA)p Fq(,)h(is)h(an)g(OSA)g(language)d(compo-)0 3371 y(nent)k(for)f(the)h(Python)f(scripting)h(language,)e(allo)n(wing) h(Python)g(code)h(to)g(be)g(e)o(x)o(ecuted)f(by)g(an)o(y)h(OSA-enabled) e(application)h(\(Script)0 3471 y(Editor)m(,)f(Mail,)h(iT)l(unes,)g (etc.\).)25 b(PyOSA)20 b(mak)o(es)g(Python)f(a)i(full)f(peer)f(to)i (AppleScript.)0 3798 y Fi(1.7)121 b(Other)34 b(Resources)0 4031 y Fq(The)20 b(MacPython)e(mailing)i(list)h(is)g(an)f(e)o(xcellent) g(support)e(resource)h(for)h(Python)f(users)h(and)g(de)n(v)o(elopers)e (on)i(the)g(Mac:)0 4178 y Fr(http://www)l(.p)n(ython.org/comm)o(un)o (ity/sig)o(s/curren)o(t/p)m(ytho)o(nmac-sig)o(/)0 4325 y Fq(Another)f(useful)g(resource)g(is)j(the)e(MacPython)e(wiki:)0 4472 y Fr(http://wiki.p)n(ython.org/moi)o(n/)o(MacPython)p 0 5549 3901 4 v 0 5649 a Fl(1.4.)52 b(GUI)23 b(Prog)o(r)o(amming)h(on)g (the)f(Mac)2563 b(3)p eop end %%Page: 4 10 TeXDict begin 4 9 bop 0 5549 3901 4 v 0 5649 a Fl(4)p eop end %%Page: 5 11 TeXDict begin 5 10 bop 0 83 3901 9 v 3503 230 a Fl(CHAPTER)3623 427 y Fk(TW)n(O)p 0 515 V 1971 978 a Fw(MacPython)58 b(Modules)0 1466 y Fq(The)20 b(follo)n(wing)e(modules)i(are)g(only)f(a) n(v)n(ailable)h(on)g(the)g(Macintosh,)f(and)g(are)i(documented)c(here:) 50 1609 y Fg(macpath)297 b Fq(MacOS)21 b(path)e(manipulation)f (functions.)50 1709 y Fg(macfs)397 b Fq(Support)19 b(for)h(FSSpec,)g (the)g(Alias)h(Manager)m(,)d Fo(\002nder)j Fq(aliases,)g(and)f(the)g (Standard)f(File)i(package.)50 1809 y Fg(ic)547 b Fq(Access)21 b(to)g(Internet)e(Con\002g.)50 1908 y Fg(MacOS)397 b Fq(Access)21 b(to)g(Mac)f(OS-speci\002c)g(interpreter)f(features.)50 2008 y Fg(macostools)147 b Fq(Con)m(v)o(enience)18 b(routines)h(for)h (\002le)h(manipulation.)50 2108 y Fg(findertools)97 b Fq(Wrappers)20 b(around)e(the)i Fo(\002nder)p Fq(')-5 b(s)22 b(Apple)d(Ev)o(ents)h(interf)o(ace.)50 2207 y Fg(EasyDialogs)97 b Fq(Basic)22 b(Macintosh)d(dialogs.)50 2307 y Fg(FrameWork)197 b Fq(Interacti)n(v)o(e)19 b(application)g (frame)n(w)o(ork.)50 2406 y Fg(autoGIL)297 b Fq(Global)20 b(Interpreter)e(Lock)i(handling)e(in)i(e)n(v)o(ent)g(loops.)0 2711 y Fi(2.1)121 b Ff(macpath)31 b Fi(\227)i(MacOS)g(path)i (manipulation)g(functions)0 2944 y Fq(This)26 b(module)f(is)i(the)f (Mac)g(OS)h(9)f(\(and)g(earlier\))f(implementation)f(of)i(the)g Fm(os.path)f Fq(module.)42 b(It)26 b(can)g(be)g(used)g(to)g(manipulate) 0 3043 y(old-style)i(Macintosh)g(pathnames)g(on)g(Mac)h(OS)h(X)f(\(or)f (an)o(y)g(other)g(platform\).)50 b(Refer)28 b(to)h(the)g Fn(Python)f(Libr)o(ary)h(Refer)m(ence)f Fq(for)0 3143 y(documentation)17 b(of)j Fm(os.path)p Fq(.)0 3290 y(The)45 b(follo)n(wing)g(functions)f(are)i(a)n(v)n(ailable)f(in)h(this)h (module:)75 b Fm(normcase\(\))p Fq(,)50 b Fm(normpath\(\))p Fq(,)h Fm(isabs\(\))p Fq(,)g Fm(join\(\))p Fq(,)0 3389 y Fm(split\(\))p Fq(,)19 b Fm(isdir\(\))p Fq(,)h Fm(isfile\(\))p Fq(,)f Fm(walk\(\))p Fq(,)h Fm(exists\(\))p Fq(.)25 b(F)o(or)20 b(other)f(functions)g(a)n(v)n(ailable)h(in)h Fm(os.path)e Fq(dummy)g(coun-)0 3489 y(terparts)h(are)g(a)n(v)n(ailable.)0 3816 y Fi(2.2)121 b Ff(macfs)32 b Fi(\227)g(V)-8 b(ar)r(ious)33 b(\002le)g(system)g(ser)t(vices)0 4049 y Fo(Depr)o(ecated)21 b(since)j(r)o(elease)e(2.3.)31 b Fq(The)23 b(macfs)f(module)f(should)h (be)h(considered)d(obsolete.)32 b(F)o(or)22 b Fm(FSSpec)p Fq(,)h Fm(FSRef)f Fq(and)g Fm(Alias)0 4149 y Fq(handling)j(use)i(the)g Fm(Carbon.File)e Fq(or)h Fm(Carbon.Folder)f Fq(module.)43 b(F)o(or)27 b(\002le)g(dialogs)f(use)h(the)g Fm(EasyDialogs)e Fq(module.)0 4248 y(Also,)20 b(this)h(module)e(is)i(kno)n(wn)e(to)h (not)g(w)o(ork)f(correctly)g(with)i(UFS)g(partitions.)0 4395 y(This)e(module)f(pro)o(vides)f(access)i(to)h(Macintosh)e Fm(FSSpec)g Fq(handling,)f(the)i(Alias)h(Manager)m(,)d Fo(\002nder)j Fq(aliases)g(and)e(the)h(Standard)f(File)0 4495 y(package.)0 4642 y(Whene)n(v)o(er)i(a)j(function)d(or)i(method)e (e)o(xpects)i(a)g Fn(\002le)g Fq(ar)o(gument,)e(this)j(ar)o(gument)c (can)j(be)g(one)g(of)f(three)h(things:)f(\(1\))h(a)g(full)g(or)g (partial)0 4741 y(Macintosh)k(pathname,)h(\(2\))g(an)g Fm(FSSpec)g Fq(object)f(or)h(\(3\))g(a)g(3-tuple)f Fm(\()p Fn(wdRefNum)p Fm(,)49 b Fn(parID)p Fm(,)g Fn(name)p Fm(\))26 b Fq(as)i(described)e(in)h Fn(Inside)0 4841 y(Macintosh:)21 b(F)l(iles)p Fq(.)32 b(An)22 b Fm(FSSpec)f Fq(can)h(point)g(to)g(a)h (non-e)o(xisting)c(\002le,)24 b(as)e(long)g(as)h(the)f(folder)f (containing)f(the)i(\002le)h(e)o(xists.)32 b(Under)0 4941 y(MacPython)22 b(the)i(same)f(is)i(true)e(for)g(a)h(pathname,)f(b) n(ut)h(not)f(under)h(U)t Fj(N)t(I)t(X)r Fq(-Python)f(because)g(of)g (the)g(w)o(ay)h(pathnames)e(and)i(FSRefs)0 5040 y(w)o(orks.)h(See)20 b(Apple')-5 b(s)20 b(documentation)d(for)j(details.)0 5187 y(A)h(description)d(of)i(aliases)h(and)f(the)g(Standard)f(File)i (package)e(can)h(also)g(be)g(found)f(there.)0 5334 y Fg(FSSpec)p Fm(\()p Fn(\002le)p Fm(\))p 0 5549 3901 4 v 3854 5649 a Fl(5)p eop end %%Page: 6 12 TeXDict begin 6 11 bop 208 83 a Fq(Create)20 b(an)g Fm(FSSpec)g Fq(object)f(for)h(the)g(speci\002ed)g(\002le.)0 230 y Fg(RawFSSpec)p Fm(\()p Fn(data)p Fm(\))208 330 y Fq(Create)26 b(an)h Fm(FSSpec)f Fq(object)g(gi)n(v)o(en)f(the)i(ra)o(w)f(data)h(for) f(the)g(C)i(structure)d(for)h(the)h Fm(FSSpec)f Fq(as)h(a)g(string.)44 b(This)27 b(is)g(mainly)208 429 y(useful)19 b(if)i(you)e(ha)n(v)o(e)h (obtained)e(an)i Fm(FSSpec)g Fq(structure)f(o)o(v)o(er)g(a)i(netw)o (ork.)0 576 y Fg(RawAlias)p Fm(\()p Fn(data)p Fm(\))208 676 y Fq(Create)h(an)g Fm(Alias)f Fq(object)h(gi)n(v)o(en)e(the)i(ra)o (w)g(data)g(for)f(the)h(C)h(structure)e(for)g(the)h(alias)h(as)f(a)h (string.)30 b(This)22 b(is)h(mainly)e(useful)g(if)208 775 y(you)e(ha)n(v)o(e)g(obtained)g(an)h Fm(FSSpec)g Fq(structure)f(o)o(v)o(er)g(a)i(netw)o(ork.)0 922 y Fg(FInfo)p Fm(\(\))208 1022 y Fq(Create)f(a)h(zero-\002lled)e Fm(FInfo)g Fq(object.)0 1169 y Fg(ResolveAliasFile)p Fm(\()p Fn(\002le)p Fm(\))208 1268 y Fq(Resolv)o(e)27 b(an)h(alias)g(\002le.)48 b(Returns)28 b(a)g(3-tuple)e Fm(\()p Fn(fsspec)p Fm(,)49 b Fn(isfolder)r Fm(,)h Fn(aliased)r Fm(\))27 b Fq(where)g Fn(fsspec)h Fq(is)h(the)e(resulting)g Fm(FSSpec)208 1368 y Fq(object,)h Fn(isfolder)h Fq(is)f(true)f(if)g Fn(fsspec)h Fq(points)e(to)i(a)f(folder)f(and)h Fn(aliased)i Fq(is)f(true)e(if)i (the)f(\002le)h(w)o(as)g(an)f(alias)h(in)f(the)g(\002rst)h(place)208 1468 y(\(otherwise)19 b(the)h Fm(FSSpec)g Fq(object)f(for)h(the)g (\002le)h(itself)g(is)g(returned\).)0 1614 y Fg(StandardGetFile)p Fm(\()p Fe([)p Fn(type)o(,)c(...)12 b Fe(])p Fm(\))208 1714 y Fq(Present)25 b(the)g(user)h(with)f(a)h(standard)e(\223open)g (input)h(\002le\224)h(dialog.)40 b(Optionally)-5 b(,)24 b(you)h(can)g(pass)h(up)f(to)g(four)g(4-character)e(\002le)208 1814 y(types)f(to)i(limit)f(the)g(\002les)h(the)f(user)g(can)g(choose)f (from.)32 b(The)23 b(function)e(returns)h(an)h Fm(FSSpec)f Fq(object)h(and)f(a)i(\003ag)f(indicating)208 1913 y(that)d(the)g(user) g(completed)f(the)h(dialog)f(without)h(cancelling.)0 2060 y Fg(PromptGetFile)p Fm(\()p Fn(pr)l(ompt)q Fe([)p Fn(,)d(type)o(,)j(...)12 b Fe(])p Fm(\))208 2160 y Fq(Similar)18 b(to)h Fm(StandardGetFile\(\))d Fq(b)n(ut)j(allo)n(ws)f(you)g(to)h (specify)f(a)h(prompt)e(which)h(will)h(be)g(displayed)e(at)i(the)g(top) f(of)h(the)208 2259 y(dialog.)0 2406 y Fg(StandardPutFile)p Fm(\()p Fn(pr)l(ompt)q Fe([)p Fn(,)e(default)c Fe(])p Fm(\))208 2506 y Fq(Present)20 b(the)h(user)g(with)g(a)g(standard)f (\223open)g(output)f(\002le\224)j(dialog.)k Fn(pr)l(ompt)c Fq(is)g(the)f(prompt)e(string,)i(and)f(the)h(optional)e Fn(default)208 2606 y Fq(ar)o(gument)g(initializes)i(the)h(output)e (\002le)i(name.)28 b(The)21 b(function)f(returns)h(an)g Fm(FSSpec)g Fq(object)g(and)g(a)g(\003ag)h(indicating)e(that)i(the)208 2705 y(user)e(completed)e(the)i(dialog)g(without)f(cancelling.)0 2852 y Fg(GetDirectory)p Fm(\()p Fe([)p Fn(pr)l(ompt)13 b Fe(])p Fm(\))208 2952 y Fq(Present)28 b(the)g(user)g(with)g(a)g (non-standard)d(\223select)k(a)f(directory\224)e(dialog.)48 b(Y)-9 b(ou)27 b(ha)n(v)o(e)h(to)g(\002rst)h(open)e(the)h(directory)e (before)208 3051 y(clicking)19 b(on)i(the)g(\223select)g(current)f (directory\224)f(b)n(utton.)26 b Fn(pr)l(ompt)c Fq(is)g(the)e(prompt)g (string)g(which)h(will)g(be)g(displayed)f(at)h(the)g(top)208 3151 y(of)e(the)i(dialog.)j(Return)19 b(an)i Fm(FSSpec)e Fq(object)h(and)g(a)g(success-indicator)-5 b(.)0 3298 y Fg(SetFolder)p Fm(\()p Fe([)p Fn(fsspec)12 b Fe(])p Fm(\))208 3397 y Fq(Set)26 b(the)g(folder)e(that)i(is)h(initially)f (presented)e(to)i(the)g(user)g(when)f(one)g(of)h(the)g(\002le)g (selection)g(dialogs)f(is)i(presented.)40 b Fn(fsspec)208 3497 y Fq(should)19 b(point)g(to)h(a)h(\002le)f(in)h(the)f(folder)m(,)e (not)i(the)g(folder)f(itself)h(\(the)g(\002le)h(need)e(not)h(e)o(xist,) g(though\).)i(If)e(no)g(ar)o(gument)e(is)j(passed)208 3597 y(the)f(folder)f(will)i(be)f(set)h(to)f(the)g(current)f(directory) -5 b(,)18 b(i.e.)25 b(what)20 b Fm(os.getcwd\(\))f Fq(returns.)208 3729 y(Note)29 b(that)h(starting)f(with)h(System)f(7.5)g(the)h(user)f (can)h(change)e(Standard)g(File)j(beha)n(viour)c(with)j(the)f (\223general)g(controls\224)208 3829 y(control)19 b(panel,)g(thereby)g (making)f(this)j(call)g(inoperati)n(v)o(e.)0 3976 y Fg(FindFolder)p Fm(\()p Fn(wher)m(e)o(,)d(whic)o(h,)i(cr)m(eate)p Fm(\))208 4076 y Fq(Locates)d(one)g(of)h(the)f(\223special\224)h(folders)f(that)h (Mac)f(OS)i(kno)n(ws)e(about,)g(such)g(as)i(the)e(trash)h(or)g(the)f (Preferences)g(folder)-5 b(.)23 b Fn(wher)m(e)208 4175 y Fq(is)e(the)h(disk)e(to)i(search,)e Fn(whic)o(h)h Fq(is)h(the)f (4-character)e(string)h(specifying)g(which)g(folder)g(to)h(locate.)27 b(Setting)21 b Fn(cr)m(eate)g Fq(causes)h(the)208 4275 y(folder)d(to)h(be)g(created)f(if)i(it)g(does)f(not)g(e)o(xist.)25 b(Returns)20 b(a)g Fm(\()p Fn(vr)m(efnum)p Fm(,)49 b Fn(dirid)r Fm(\))20 b Fq(tuple.)208 4408 y(The)f(constants)h(for)g Fn(wher)m(e)g Fq(and)g Fn(whic)o(h)g Fq(can)g(be)g(obtained)f(from)g (the)h(standard)f(module)g Fn(Carbon.F)-9 b(older)o(s)p Fq(.)0 4555 y Fg(NewAliasMinimalFromFullPath)p Fm(\()p Fn(path)o(na)o(me)p Fm(\))208 4654 y Fq(Return)22 b(a)h(minimal)e Fm(alias)i Fq(object)f(that)g(points)g(to)h(the)g(gi)n(v)o(en)e (\002le,)i(which)f(must)h(be)f(speci\002ed)h(as)g(a)g(full)f(pathname.) 30 b(This)208 4754 y(is)21 b(the)f(only)f(w)o(ay)h(to)h(create)f(an)g Fm(Alias)g Fq(pointing)e(to)j(a)f(non-e)o(xisting)e(\002le.)0 4901 y Fg(FindApplication)p Fm(\()p Fn(cr)m(eator)r Fm(\))208 5000 y Fq(Locate)j(the)i(application)e(with)h(4-character)f(creator)g (code)h Fn(cr)m(eator)r Fq(.)31 b(The)22 b(function)f(returns)g(an)i Fm(FSSpec)e Fq(object)h(pointing)208 5100 y(to)e(the)g(application.)p 0 5549 3901 4 v 0 5649 a Fl(6)2640 b(Chapter)23 b(2.)52 b(MacPython)23 b(Modules)p eop end %%Page: 7 13 TeXDict begin 7 12 bop 0 83 a Fh(2.2.1)100 b(FSSpec)29 b(Objects)0 272 y Fg(data)208 372 y Fq(The)19 b(ra)o(w)h(data)g(from)g (the)g(FSSpec)g(object,)g(suitable)g(for)f(passing)h(to)g(other)g (applications,)f(for)g(instance.)0 518 y Fg(as_pathname)p Fm(\(\))208 618 y Fq(Return)g(the)i(full)f(pathname)e(of)i(the)g (\002le)h(described)e(by)h(the)g Fm(FSSpec)g Fq(object.)0 765 y Fg(as_tuple)p Fm(\(\))208 865 y Fq(Return)f(the)i Fm(\()p Fn(wdRefNum)p Fm(,)48 b Fn(parID)p Fm(,)h Fn(name)p Fm(\))19 b Fq(tuple)h(of)g(the)g(\002le)h(described)e(by)h(the)g Fm(FSSpec)g Fq(object.)0 1011 y Fg(NewAlias)p Fm(\()p Fe([)p Fn(\002le)12 b Fe(])p Fm(\))208 1111 y Fq(Create)21 b(an)g(Alias)g(object)g(pointing)e(to)i(the)g(\002le)h(described)e(by)g (this)i(FSSpec.)27 b(If)21 b(the)g(optional)f Fn(\002le)h Fq(parameter)e(is)j(present)f(the)208 1211 y(alias)f(will)h(be)g (relati)n(v)o(e)e(to)h(that)h(\002le,)f(otherwise)g(it)h(will)g(be)f (absolute.)0 1358 y Fg(NewAliasMinimal)p Fm(\(\))208 1457 y Fq(Create)g(a)h(minimal)e(alias)i(pointing)e(to)h(this)h (\002le.)0 1604 y Fg(GetCreatorType)p Fm(\(\))208 1704 y Fq(Return)e(the)i(4-character)d(creator)h(and)g(type)h(of)g(the)g (\002le.)0 1851 y Fg(SetCreatorType)p Fm(\()p Fn(cr)m(eator)-9 b(,)17 b(type)p Fm(\))208 1950 y Fq(Set)j(the)h(4-character)d(creator)h (and)h(type)f(of)h(the)g(\002le.)0 2097 y Fg(GetFInfo)p Fm(\(\))208 2197 y Fq(Return)f(a)i Fm(FInfo)f Fq(object)f(describing)g (the)h(\002nder)g(info)f(for)h(the)g(\002le.)0 2343 y Fg(SetFInfo)p Fm(\()p Fn(\002nfo)p Fm(\))208 2443 y Fq(Set)g(the)h (\002nder)e(info)h(for)f(the)h(\002le)h(to)g(the)f(v)n(alues)g(gi)n(v)o (en)e(as)j Fn(\002nfo)f Fq(\(an)f Fm(FInfo)h Fq(object\).)0 2590 y Fg(GetDates)p Fm(\(\))208 2690 y Fq(Return)f(a)h(tuple)f(with)g (three)g(\003oating)g(point)g(v)n(alues)g(representing)e(the)j (creation)e(date,)i(modi\002cation)e(date)h(and)g(backup)f(date)208 2789 y(of)h(the)i(\002le.)0 2936 y Fg(SetDates)p Fm(\()p Fn(cr)m(date)o(,)d(moddate)o(,)h(bac)n(kupdate)p Fm(\))208 3036 y Fq(Set)24 b(the)f(creation,)h(modi\002cation)e(and)h(backup)f (date)h(of)g(the)h(\002le.)36 b(The)23 b(v)n(alues)g(are)h(in)g(the)f (standard)g(\003oating)g(point)g(format)208 3135 y(used)c(for)h(times)h (throughout)c(Python.)0 3420 y Fh(2.2.2)100 b(Alias)29 b(Objects)0 3609 y Fg(data)208 3709 y Fq(The)19 b(ra)o(w)h(data)g(for)g (the)g(Alias)h(record,)e(suitable)h(for)f(storing)h(in)g(a)h(resource)e (or)h(transmitting)f(to)h(other)f(programs.)0 3856 y Fg(Resolve)p Fm(\()p Fe([)p Fn(\002le)12 b Fe(])p Fm(\))208 3955 y Fq(Resolv)o(e)17 b(the)h(alias.)24 b(If)18 b(the)f(alias)i(w)o (as)f(created)f(as)h(a)h(relati)n(v)o(e)d(alias)j(you)d(should)h(pass)h (the)g(\002le)g(relati)n(v)o(e)f(to)h(which)f(it)h(is.)25 b(Return)208 4055 y(the)19 b(FSSpec)g(for)g(the)g(\002le)h(pointed)e (to)i(and)e(a)i(\003ag)g(indicating)e(whether)g(the)h Fm(Alias)g Fq(object)g(itself)h(w)o(as)g(modi\002ed)e(during)g(the)208 4155 y(search)h(process.)25 b(If)20 b(the)g(\002le)h(does)f(not)g(e)o (xist)g(b)n(ut)g(the)g(path)g(leading)f(up)h(to)g(it)h(does)f(e)o(xist) h(a)f(v)n(alid)g(fsspec)g(is)h(returned.)0 4301 y Fg(GetInfo)p Fm(\()p Fn(num)p Fm(\))208 4401 y Fq(An)f(interf)o(ace)f(to)h(the)h(C)g (routine)e Fm(GetAliasInfo\(\))p Fq(.)0 4548 y Fg(Update)p Fm(\()p Fn(\002le)p Fe([)p Fn(,)f(\002le2)12 b Fe(])p Fm(\))208 4648 y Fq(Update)19 b(the)h(alias)h(to)g(point)e(to)h(the)h Fn(\002le)f Fq(gi)n(v)o(en.)j(If)d Fn(\002le2)g Fq(is)h(present)f(a)g (relati)n(v)o(e)g(alias)h(will)g(be)f(created.)0 4794 y(Note)31 b(that)g(it)h(is)g(currently)d(not)i(possible)g(to)g (directly)f(manipulate)g(a)h(resource)f(as)i(an)f Fm(Alias)f Fq(object.)57 b(Hence,)33 b(after)e(calling)0 4894 y Fm(Update\(\))23 b Fq(or)h(after)f Fm(Resolve\(\))g Fq(indicates)h (that)g(the)g(alias)h(has)f(changed)e(the)i(Python)f(program)e(is)k (responsible)e(for)g(getting)0 4994 y(the)d Fm(data)g Fq(v)n(alue)g(from)f(the)h Fm(Alias)g Fq(object)g(and)f(modifying)f (the)i(resource.)p 0 5549 3901 4 v 0 5649 a Fl(2.2.)52 b Fm(macfs)22 b Fl(\227)h(V)-6 b(ar)q(ious)24 b(\002le)f(system)g(ser)r (vices)2262 b(7)p eop end %%Page: 8 14 TeXDict begin 8 13 bop 0 83 a Fh(2.2.3)100 b(FInf)m(o)28 b(Objects)0 286 y Fq(See)21 b Fn(Inside)e(Macintosh:)24 b(F)l(iles)d Fq(for)f(a)g(complete)g(description)e(of)i(what)g(the)h(v) n(arious)e(\002elds)h(mean.)0 433 y Fg(Creator)208 532 y Fq(The)f(4-character)g(creator)g(code)g(of)h(the)g(\002le.)0 679 y Fg(Type)208 779 y Fq(The)f(4-character)g(type)g(code)h(of)g(the)g (\002le.)0 926 y Fg(Flags)208 1025 y Fq(The)f(\002nder)h(\003ags)g(for) g(the)g(\002le)h(as)g(16-bit)e(inte)o(ger)-5 b(.)24 b(The)c(bit)h(v)n (alues)e(in)i Fn(Fla)o(gs)f Fq(are)g(de\002ned)f(in)h(standard)f (module)g Fm(MACFS)p Fq(.)0 1172 y Fg(Location)208 1272 y Fq(A)h(Point)g(gi)n(ving)f(the)h(position)g(of)g(the)g(\002le')-5 b(s)21 b(icon)f(in)g(its)h(folder)-5 b(.)0 1419 y Fg(Fldr)208 1518 y Fq(The)19 b(folder)g(the)i(\002le)f(is)i(in)e(\(as)h(an)f(inte)o (ger\).)0 1846 y Fi(2.3)121 b Ff(ic)32 b Fi(\227)h(Access)g(to)h(Inter) s(net)h(Con\002g)0 2079 y Fq(This)20 b(module)f(pro)o(vides)g(access)h (to)h(v)n(arious)e(internet-related)f(preferences)g(set)j(through)d Fo(System)j(Pr)o(efer)o(ences)d Fq(or)i(the)g Fo(Finder)p Fq(.)0 2226 y(There)h(is)i(a)f(lo)n(w-le)n(v)o(el)f(companion)e(module) i Fm(icglue)g Fq(which)h(pro)o(vides)e(the)i(basic)g(Internet)f (Con\002g)g(access)i(functionality)-5 b(.)27 b(This)0 2325 y(lo)n(w-le)n(v)o(el)16 b(module)g(is)j(not)e(documented,)e(b)n (ut)j(the)f(docstrings)g(of)g(the)g(routines)g(document)e(the)j (parameters)e(and)h(the)h(routine)e(names)0 2425 y(are)25 b(the)h(same)g(as)g(for)f(the)g(P)o(ascal)h(or)g(C)g(API)g(to)g (Internet)e(Con\002g,)i(so)g(the)g(standard)e(IC)i(programmers')d (documentation)f(can)k(be)0 2524 y(used)20 b(if)g(this)h(module)e(is)i (needed.)0 2671 y(The)e Fm(ic)g Fq(module)e(de\002nes)i(the)g Fm(error)g Fq(e)o(xception)e(and)h(symbolic)g(names)h(for)f(all)i (error)e(codes)g(Internet)g(Con\002g)h(can)g(produce;)e(see)0 2771 y(the)j(source)g(for)f(details.)0 2918 y Fo(exception)g Fg(error)208 3017 y Fq(Exception)f(raised)i(on)g(errors)f(in)h(the)h Fm(ic)f Fq(module.)0 3164 y(The)g Fm(ic)g Fq(module)f(de\002nes)h(the)g (follo)n(wing)f(class)i(and)f(function:)0 3311 y Fo(class)h Fg(IC)p Fm(\()p Fe([)p Fn(signatur)m(e)p Fe([)p Fn(,)d(ic)12 b Fe(])g(])p Fm(\))208 3411 y Fq(Create)38 b(an)h(Internet)e(Con\002g)h (object.)80 b(The)38 b(signature)g(is)h(a)g(4-character)e(creator)g (code)h(of)g(the)h(current)e(application)208 3510 y(\(def)o(ault)h Fm('Pyth')p Fq(\))h(which)h(may)f(in\003uence)g(some)g(of)h(ICs)h (settings.)84 b(The)39 b(optional)g Fn(ic)h Fq(ar)o(gument)e(is)j(a)f (lo)n(w-le)n(v)o(el)208 3610 y Fm(icglue.icinstance)16 b Fq(created)j(beforehand,)e(this)j(may)f(be)g(useful)g(if)h(you)e(w)o (ant)i(to)g(get)f(preferences)f(from)g(a)i(dif)n(ferent)208 3710 y(con\002g)f(\002le,)h(etc.)0 3857 y Fg(launchurl)p Fm(\()p Fn(url)p Fe([)p Fn(,)e(hint)13 b Fe(])p Fm(\))0 3956 y Fg(parseurl)p Fm(\()p Fn(data)p Fe([)p Fn(,)k(start)q Fe([)p Fn(,)k(end)r Fe([)p Fn(,)f(hint)13 b Fe(])f(])g(])p Fm(\))0 4056 y Fg(mapfile)p Fm(\()p Fn(\002le)p Fm(\))0 4155 y Fg(maptypecreator)p Fm(\()p Fn(type)o(,)17 b(cr)m(eator)r Fe([)p Fn(,)j(\002lename)12 b Fe(])p Fm(\))0 4255 y Fg(settypecreator)p Fm(\()p Fn(\002le)p Fm(\))208 4355 y Fq(These)20 b(functions)e(are)i (\223shortcuts\224)g(to)g(the)g(methods)f(of)h(the)h(same)f(name,)f (described)g(belo)n(w)-5 b(.)0 4640 y Fh(2.3.1)100 b(IC)28 b(Objects)0 4842 y Fm(IC)c Fq(objects)g(ha)n(v)o(e)g(a)h(mapping)d (interf)o(ace,)i(hence)f(to)i(obtain)e(the)h(mail)g(address)g(you)f (simply)h(get)h Fn(ic)p Fm(['MailAddress'])p Fq(.)34 b(As-)0 4942 y(signment)19 b(also)i(w)o(orks,)e(and)h(changes)f(the)h (option)f(in)i(the)f(con\002guration)d(\002le.)0 5089 y(The)28 b(module)f(kno)n(ws)h(about)f(v)n(arious)h(datatypes,)h(and)f (con)m(v)o(erts)f(the)h(internal)g(IC)h(representation)d(to)j(a)g (\223logical\224)e(Python)h(data)0 5189 y(structure.)c(Running)17 b(the)i Fm(ic)g Fq(module)f(standalone)f(will)j(run)e(a)i(test)g (program)c(that)j(lists)i(all)e(k)o(e)o(ys)g(and)f(v)n(alues)h(in)g (your)f(IC)h(database,)0 5288 y(this)i(will)g(ha)n(v)o(e)e(to)i(serv)o (e)e(as)i(documentation.)p 0 5549 3901 4 v 0 5649 a Fl(8)2640 b(Chapter)23 b(2.)52 b(MacPython)23 b(Modules)p eop end %%Page: 9 15 TeXDict begin 9 14 bop 0 83 a Fq(If)24 b(the)g(module)f(does)h(not)g (kno)n(w)f(ho)n(w)h(to)g(represent)f(the)h(data)g(it)h(returns)e(an)h (instance)g(of)g(the)g Fm(ICOpaqueData)f Fq(type,)h(with)h(the)0 183 y(ra)o(w)20 b(data)g(in)g(its)i Fm(data)e Fq(attrib)n(ute.)k (Objects)d(of)e(this)i(type)f(are)g(also)g(acceptable)g(v)n(alues)f (for)h(assignment.)0 330 y(Besides)h(the)f(dictionary)f(interf)o(ace,)g Fm(IC)h Fq(objects)g(ha)n(v)o(e)g(the)g(follo)n(wing)e(methods:)0 476 y Fg(launchurl)p Fm(\()p Fn(url)p Fe([)p Fn(,)g(hint)13 b Fe(])p Fm(\))208 576 y Fq(P)o(arse)26 b(the)h(gi)n(v)o(en)e(URL,)i (launch)e(the)i(correct)e(application)g(and)h(pass)h(it)g(the)g(URL.)f (The)h(optional)e Fn(hint)i Fq(can)g(be)f(a)h(scheme)208 676 y(name)g(such)h(as)h Fm('mailto:')p Fq(,)g(in)f(which)g(case)h (incomplete)d(URLs)k(are)e(completed)e(with)j(this)g(scheme.)48 b(If)28 b Fn(hint)i Fq(is)f(not)208 775 y(pro)o(vided,)17 b(incomplete)i(URLs)i(are)f(in)m(v)n(alid.)0 922 y Fg(parseurl)p Fm(\()p Fn(data)p Fe([)p Fn(,)d(start)q Fe([)p Fn(,)k(end)r Fe([)p Fn(,)f(hint)13 b Fe(])f(])g(])p Fm(\))208 1022 y Fq(Find)18 b(an)h(URL)g(some)n(where)f(in)h Fn(data)e Fq(and)i(return)e(start)j(position,)e(end)g(position)g(and)g(the)h (URL.)g(The)f(optional)g Fn(start)j Fq(and)d Fn(end)208 1121 y Fq(can)24 b(be)g(used)g(to)g(limit)h(the)g(search,)f(so)h(for)f (instance)g(if)g(a)h(user)f(clicks)h(in)f(a)h(long)f(te)o(xt)g(\002eld) g(you)g(can)g(pass)h(the)f(whole)g(te)o(xt)208 1221 y(\002eld)i(and)f (the)h(click-position)d(in)j Fn(start)i Fq(and)e(this)g(routine)f(will) h(return)f(the)g(whole)h(URL)g(in)g(which)f(the)h(user)g(click)o(ed.)41 b(As)208 1321 y(abo)o(v)o(e,)18 b Fn(hint)j Fq(is)g(an)g(optional)d (scheme)i(used)g(to)g(complete)g(incomplete)e(URLs.)0 1468 y Fg(mapfile)p Fm(\()p Fn(\002le)p Fm(\))208 1567 y Fq(Return)k(the)i(mapping)d(entry)h(for)h(the)g(gi)n(v)o(en)f Fn(\002le)p Fq(,)i(which)e(can)h(be)g(passed)g(as)h(either)f(a)h (\002lename)e(or)h(an)h Fm(FSSpec\(\))e Fq(result,)208 1667 y(and)d(which)h(need)f(not)h(e)o(xist.)208 1800 y(The)27 b(mapping)e(entry)i(is)h(returned)e(as)i(a)g(tuple)f Fm(\()p Fn(ver)o(sion)p Fm(,)49 b Fn(type)p Fm(,)g Fn(cr)m(eator)r Fm(,)f Fn(postcr)m(eator)r Fm(,)h Fn(\003a)o(gs)p Fm(,)f Fn(e)n(xtension)p Fm(,)h Fn(app-)208 1899 y(name)p Fm(,)f Fn(postappname)p Fm(,)e Fn(mimetype)p Fm(,)j Fn(entryname)p Fm(\))p Fq(,)35 b(where)e Fn(ver)o(sion)h Fq(is)g(the)f(entry)g(v)o (ersion)f(number)m(,)i Fn(type)f Fq(is)h(the)g(4-)208 1999 y(character)d(\002letype,)k Fn(cr)m(eator)g Fq(is)e(the)g (4-character)d(creator)i(type,)j Fn(postcr)m(eator)f Fq(is)f(the)g(4-character)e(creator)g(code)h(of)h(an)208 2098 y(optional)16 b(application)g(to)i(post-process)e(the)i(\002le)g (after)f(do)n(wnloading,)e Fn(\003a)o(gs)i Fq(are)h(v)n(arious)e(bits)j (specifying)d(whether)g(to)i(trans-)208 2198 y(fer)25 b(in)g(binary)f(or)h(ascii)h(and)f(such,)h Fn(e)n(xtension)f Fq(is)h(the)g(\002lename)f(e)o(xtension)e(for)i(this)h(\002le)g(type,)g Fn(appname)d Fq(is)j(the)g(printable)208 2298 y(name)21 b(of)h(the)h(application)e(to)h(which)g(this)h(\002le)g(belongs,)e Fn(postappname)f Fq(is)j(the)g(name)e(of)i(the)f(postprocessing)e (application,)208 2397 y Fn(mimetype)f Fq(is)j(the)e(MIME)g(type)f(of)h (this)h(\002le)g(and)e Fn(entryname)h Fq(is)h(the)f(name)f(of)h(this)h (entry)-5 b(.)0 2544 y Fg(maptypecreator)p Fm(\()p Fn(type)o(,)17 b(cr)m(eator)r Fe([)p Fn(,)j(\002lename)12 b Fe(])p Fm(\))208 2644 y Fq(Return)19 b(the)h(mapping)e(entry)h(for)g(\002les)i(with)f (gi)n(v)o(en)e(4-character)g Fn(type)h Fq(and)h Fn(cr)m(eator)h Fq(codes.)k(The)19 b(optional)g Fn(\002lename)f Fq(may)i(be)208 2743 y(speci\002ed)f(to)i(further)d(help)i(\002nding)f(the)h(correct)g (entry)f(\(if)h(the)g(creator)g(code)f(is)i Fm('????')p Fq(,)f(for)f(instance\).)208 2876 y(The)g(mapping)g(entry)g(is)i (returned)e(in)h(the)g(same)h(format)e(as)i(for)e Fn(map\002le)p Fq(.)0 3023 y Fg(settypecreator)p Fm(\()p Fn(\002le)p Fm(\))208 3123 y Fq(Gi)n(v)o(en)f(an)h(e)o(xisting)f Fn(\002le)p Fq(,)h(speci\002ed)g(either)g(as)h(a)g(\002lename)e(or)h (as)h(an)f Fm(FSSpec\(\))f Fq(result,)h(set)h(its)g(creator)f(and)f (type)h(correctly)208 3222 y(based)g(on)h(its)h(e)o(xtension.)j(The)c (\002nder)f(is)i(told)f(about)f(the)i(change,)d(so)j(the)f(\002nder)f (icon)h(will)h(be)f(updated)f(quickly)-5 b(.)0 3550 y Fi(2.4)121 b Ff(MacOS)32 b Fi(\227)g(Access)h(to)h(Mac)f(OS)g(inter)t (preter)i(f)l(eatures)0 3783 y Fq(This)27 b(module)e(pro)o(vides)g (access)i(to)g(MacOS)g(speci\002c)f(functionality)f(in)i(the)f(Python)g (interpreter)m(,)g(such)g(as)i(ho)n(w)e(the)g(interpreter)0 3882 y(e)n(v)o(entloop)18 b(functions)h(and)g(the)h(lik)o(e.)26 b(Use)21 b(with)f(care.)0 4029 y(Note)g(the)g(capitalization)f(of)h (the)h(module)d(name;)i(this)h(is)g(a)f(historical)g(artif)o(act.)0 4176 y Fg(runtimemodel)208 4276 y Fq(Al)o(w)o(ays)25 b Fm('macho')p Fq(,)h(from)e(Python)g(2.4)h(on.)40 b(In)25 b(earlier)g(v)o(ersions)f(of)h(Python)g(the)g(v)n(alue)g(could)f(also)i (be)f Fm('ppc')g Fq(for)g(the)208 4375 y(classic)c(Mac)f(OS)h(8)f (runtime)f(model)g(or)h Fm('carbon')g Fq(for)f(the)h(Mac)h(OS)f(9)h (runtime)e(model.)0 4522 y Fg(linkmodel)208 4622 y Fq(The)j(w)o(ay)h (the)h(interpreter)d(has)i(been)g(link)o(ed.)33 b(As)24 b(e)o(xtension)d(modules)h(may)h(be)g(incompatible)e(between)h(linking) g(models,)208 4721 y(packages)h(could)h(use)h(this)h(information)c(to)j (gi)n(v)o(e)f(more)h(decent)f(error)f(messages.)40 b(The)24 b(v)n(alue)g(is)i(one)f(of)f Fm('static')g Fq(for)208 4821 y(a)i(statically)f(link)o(ed)g(Python,)h Fm('framework')e Fq(for)h(Python)f(in)i(a)g(Mac)g(OS)g(X)g(frame)n(w)o(ork,)e Fm('shared')h Fq(for)g(Python)f(in)208 4921 y(a)k(standard)h(U)t Fj(N)t(I)t(X)i Fq(shared)d(library)-5 b(.)47 b(Older)28 b(Pythons)f(could)h(also)g(ha)n(v)o(e)g(the)g(v)n(alue)f Fm('cfm')h Fq(for)g(Mac)g(OS)h(9-compatible)208 5020 y(Python.)0 5167 y Fo(exception)19 b Fg(Error)208 5267 y Fq(This)25 b(e)o(xception)e(is)j(raised)f(on)f(MacOS)h(generated)f (errors,)h(either)f(from)g(functions)g(in)h(this)h(module)d(or)i(from)f (other)g(mac-)208 5366 y(speci\002c)g(modules)f(lik)o(e)h(the)h (toolbox)d(interf)o(aces.)36 b(The)24 b(ar)o(guments)e(are)j(the)f (inte)o(ger)f(error)g(code)g(\(the)h Fm(OSErr)g Fq(v)n(alue\))f(and)p 0 5549 3901 4 v 0 5649 a Fl(2.4.)52 b Fm(MacOS)22 b Fl(\227)h(Access)f (to)h(Mac)g(OS)g(inter)r(preter)h(f)n(eatures)1878 b(9)p eop end %%Page: 10 16 TeXDict begin 10 15 bop 208 83 a Fq(a)25 b(te)o(xtual)f(description)g (of)h(the)g(error)e(code.)39 b(Symbolic)24 b(names)h(for)f(all)i(kno)n (wn)d(error)h(codes)h(are)g(de\002ned)f(in)h(the)g(standard)208 183 y(module)18 b Fm(macerrors)p Fq(.)0 330 y Fg(GetErrorString)p Fm(\()p Fn(errno)p Fm(\))208 429 y Fq(Return)h(the)i(te)o(xtual)e (description)g(of)h(MacOS)g(error)f(code)h Fn(errno)p Fq(.)0 576 y Fg(DebugStr)p Fm(\()p Fn(messa)o(g)o(e)f Fe([)p Fn(,)h(object)13 b Fe(])p Fm(\))208 676 y Fq(On)20 b(Mac)g(OS)g(X)h(the)f(string)g(is)h(simply)e(printed)g(to)h(stderr)g (\(on)f(older)g(Mac)i(OS)f(systems)h(more)e(elaborate)g(functionality)f (w)o(as)208 775 y(a)n(v)n(ailable\),)h(b)n(ut)h(it)h(pro)o(vides)d(a)j (con)m(v)o(enient)c(location)j(to)g(attach)g(a)h(breakpoint)c(in)k(a)f (lo)n(w-le)n(v)o(el)f(deb)n(ugger)f(lik)o(e)j Fo(gdb)p Fq(.)0 922 y Fg(SysBeep)p Fm(\(\))208 1022 y Fq(Ring)f(the)g(bell.)0 1169 y Fg(GetTicks)p Fm(\(\))208 1268 y Fq(Get)g(the)g(number)f(of)h (clock)f(ticks)i(\(1/60th)d(of)i(a)h(second\))e(since)h(system)h(boot.) 0 1415 y Fg(GetCreatorAndType)p Fm(\()p Fn(\002le)p Fm(\))208 1515 y Fq(Return)j(the)g(\002le)i(creator)d(and)h(\002le)i(type)e(as)h (tw)o(o)g(four)n(-character)d(strings.)38 b(The)24 b Fn(\002le)h Fq(parameter)e(can)i(be)f(a)h(pathname)e(or)i(an)208 1614 y Fm(FSSpec)19 b Fq(or)h Fm(FSRef)g Fq(object.)0 1761 y Fg(SetCreatorAndType)p Fm(\()p Fn(\002le)o(,)d(cr)m(eator)-9 b(,)19 b(type)p Fm(\))208 1861 y Fq(Set)h(the)f(\002le)i(creator)d(and) h(\002le)h(type.)25 b(The)19 b Fn(\002le)g Fq(parameter)f(can)i(be)f(a) h(pathname)e(or)i(an)f Fm(FSSpec)g Fq(or)g Fm(FSRef)g Fq(object.)25 b Fn(cr)m(eator)208 1961 y Fq(and)19 b Fn(type)h Fq(must)g(be)h(four)e(character)g(strings.)0 2107 y Fg(openrf)p Fm(\()p Fn(name)f Fe([)p Fn(,)j(mode)12 b Fe(])p Fm(\))208 2207 y Fq(Open)28 b(the)h(resource)f(fork)g(of)h(a)g (\002le.)53 b(Ar)o(guments)27 b(are)i(the)g(same)g(as)h(for)e(the)h(b)n (uilt-in)g(function)e Fm(open\(\))p Fq(.)51 b(The)29 b(object)208 2307 y(returned)18 b(has)i(\002le-lik)o(e)h(semantics,)f (b)n(ut)g(it)h(is)g(not)f(a)g(Python)f(\002le)i(object,)f(so)g(there)g (may)g(be)g(subtle)g(dif)n(ferences.)0 2454 y Fg(WMAvailable)p Fm(\(\))208 2553 y Fq(Checks)31 b(whether)f(the)h(current)f(process)g (has)i(access)f(to)h(the)f(windo)n(w)f(manager)-5 b(.)56 b(The)31 b(method)f(will)i(return)e Fm(False)g Fq(if)208 2653 y(the)25 b(windo)n(w)g(manager)f(is)j(not)e(a)n(v)n(ailable,)i (for)e(instance)g(when)g(running)f(on)h(Mac)h(OS)h(X)f(Serv)o(er)f(or)g (when)g(logged)g(in)h(via)208 2752 y(ssh,)32 b(or)d(when)f(the)h (current)f(interpreter)g(is)i(not)f(running)e(from)i(a)g(fullblo)n(wn)f (application)g(b)n(undle.)51 b(A)29 b(script)h(runs)f(from)208 2852 y(an)24 b(application)f(b)n(undle)h(either)g(when)g(it)h(has)g (been)f(started)g(with)h Fo(pythonw)f Fq(instead)g(of)g Fo(python)h Fq(or)f(when)g(running)e(as)k(an)208 2952 y(applet.)0 3279 y Fi(2.5)121 b Ff(macostools)30 b Fi(\227)j(Con)n(v)m (enience)j(routines)e(f)l(or)g(\002le)f(manipulation)0 3512 y Fq(This)24 b(module)f(contains)g(some)g(con)m(v)o(enience)e (routines)i(for)g(\002le-manipulation)f(on)h(the)h(Macintosh.)35 b(All)25 b(\002le)f(parameters)f(can)h(be)0 3612 y(speci\002ed)c(as)h (pathnames,)d Fm(FSRef)i Fq(or)g Fm(FSSpec)f Fq(objects.)25 b(This)20 b(module)f(e)o(xpects)g(a)i(\002lesystem)f(which)g(supports)f (fork)o(ed)f(\002les,)j(so)0 3711 y(it)g(should)e(not)h(be)g(used)g(on) g(UFS)h(partitions.)0 3858 y(The)f Fm(macostools)f Fq(module)g (de\002nes)h(the)g(follo)n(wing)e(functions:)0 4005 y Fg(copy)p Fm(\()p Fn(sr)m(c,)i(dst)q Fe([)p Fn(,)h(cr)m(eatepath)p Fe([)p Fn(,)d(copytimes)12 b Fe(])g(])p Fm(\))208 4104 y Fq(Cop)o(y)24 b(\002le)i Fn(sr)m(c)g Fq(to)g Fn(dst)q Fq(.)41 b(If)25 b Fn(cr)m(eatepath)f Fq(is)i(non-zero)d(the)i(folders)f (leading)g(to)i Fn(dst)h Fq(are)e(created)g(if)g(necessary)-5 b(.)39 b(The)25 b(method)208 4204 y(copies)j(data)i(and)e(resource)g (fork)g(and)h(some)g(\002nder)g(information)e(\(creator)m(,)i(type,)i (\003ags\))e(and)g(optionally)f(the)h(creation,)208 4304 y(modi\002cation)24 b(and)i(backup)e(times)j(\(def)o(ault)e(is)i(to)g (cop)o(y)e(them\).)42 b(Custom)27 b(icons,)g(comments)e(and)h(icon)f (position)h(are)g(not)208 4403 y(copied.)0 4550 y Fg(copytree)p Fm(\()p Fn(sr)m(c,)19 b(dst)q Fm(\))208 4650 y Fq(Recursi)n(v)o(ely)29 b(cop)o(y)h(a)h(\002le)h(tree)e(from)g Fn(sr)m(c)i Fq(to)f Fn(dst)q Fq(,)j(creating)c(folders)g(as)h(needed.)55 b Fn(sr)m(c)32 b Fq(and)e Fn(dst)j Fq(should)d(be)g(speci\002ed)h(as) 208 4749 y(pathnames.)0 4896 y Fg(mkalias)p Fm(\()p Fn(sr)m(c,)19 b(dst)q Fm(\))208 4996 y Fq(Create)h(a)h(\002nder)e(alias)i Fn(dst)h Fq(pointing)d(to)h Fn(sr)m(c)p Fq(.)0 5143 y Fg(touched)p Fm(\()p Fn(dst)q Fm(\))208 5242 y Fq(T)-6 b(ell)21 b(the)h(\002nder)e(that)i(some)f(bits)h(of)f(\002nder)n (-information)c(such)k(as)h(creator)f(or)g(type)g(for)f(\002le)i Fn(dst)i Fq(has)d(changed.)27 b(The)21 b(\002le)h(can)208 5342 y(be)e(speci\002ed)g(by)f(pathname)g(or)h(fsspec.)25 b(This)20 b(call)h(should)e(tell)i(the)f(\002nder)f(to)i(redra)o(w)e (the)h(\002les)h(icon.)p 0 5549 3901 4 v 0 5649 a Fl(10)2594 b(Chapter)23 b(2.)52 b(MacPython)23 b(Modules)p eop end %%Page: 11 17 TeXDict begin 11 16 bop 0 83 a Fg(BUFSIZ)208 183 y Fq(The)19 b(b)n(uf)n(fer)g(size)i(for)f Fm(copy)p Fq(,)f(def)o(ault)h(1)g(me)o (gabyte.)0 330 y(Note)26 b(that)h(the)f(process)g(of)h(creating)e (\002nder)h(aliases)h(is)h(not)e(speci\002ed)g(in)g(the)h(Apple)f (documentation.)41 b(Hence,)27 b(aliases)g(created)0 429 y(with)20 b Fm(mkalias\(\))f Fq(could)h(concei)n(v)n(ably)d(ha)n(v) o(e)j(incompatible)e(beha)n(viour)g(in)j(some)f(cases.)0 754 y Fi(2.6)121 b Ff(findertools)30 b Fi(\227)j(The)h Fd(\002nder)p Fi(')-6 b(s)34 b(Apple)g(Ev)m(ents)g(interf)l(ace)0 987 y Fq(This)25 b(module)e(contains)g(routines)h(that)g(gi)n(v)o(e)g (Python)f(programs)f(access)j(to)g(some)f(functionality)e(pro)o(vided)g (by)i(the)g(\002nder)-5 b(.)38 b(The)o(y)0 1087 y(are)20 b(implemented)e(as)j(wrappers)e(around)g(the)h(AppleEv)o(ent)e(interf)o (ace)h(to)i(the)f(\002nder)-5 b(.)0 1234 y(All)21 b(\002le)g(and)e (folder)g(parameters)g(can)h(be)g(speci\002ed)g(either)g(as)h(full)f (pathnames,)f(or)h(as)h Fm(FSRef)e Fq(or)h Fm(FSSpec)g Fq(objects.)0 1381 y(The)g Fm(findertools)f Fq(module)f(de\002nes)i (the)h(follo)n(wing)d(functions:)0 1528 y Fg(launch)p Fm(\()p Fn(\002le)p Fm(\))208 1627 y Fq(T)-6 b(ell)26 b(the)g(\002nder)f(to)h(launch)f Fn(\002le)p Fq(.)42 b(What)27 b(launching)d(means)h(depends)g(on)g(the)h(\002le:)38 b(applications)25 b(are)h(started,)h(folders)e(are)208 1727 y(opened)18 b(and)i(documents)e(are)i(opened)f(in)h(the)g(correct) g(application.)0 1874 y Fg(Print)p Fm(\()p Fn(\002le)p Fm(\))208 1973 y Fq(T)-6 b(ell)21 b(the)h(\002nder)e(to)h(print)g(a)h (\002le.)28 b(The)21 b(beha)n(viour)e(is)k(identical)d(to)i(selecting)f (the)g(\002le)h(and)e(using)h(the)g(print)g(command)e(in)j(the)208 2073 y(\002nder')-5 b(s)19 b(\002le)i(menu.)0 2220 y Fg(copy)p Fm(\()p Fn(\002le)o(,)e(destdir)r Fm(\))208 2319 y Fq(T)-6 b(ell)24 b(the)g(\002nder)g(to)g(cop)o(y)g(a)g(\002le)h (or)f(folder)f Fn(\002le)h Fq(to)h(folder)e Fn(destdir)r Fq(.)37 b(The)23 b(function)g(returns)g(an)h Fm(Alias)g Fq(object)g(pointing)e(to)208 2419 y(the)e(ne)n(w)g(\002le.)0 2566 y Fg(move)p Fm(\()p Fn(\002le)o(,)f(destdir)r Fm(\))208 2666 y Fq(T)-6 b(ell)23 b(the)h(\002nder)e(to)h(mo)o(v)o(e)f(a)i (\002le)g(or)f(folder)f Fn(\002le)h Fq(to)g(folder)f Fn(destdir)r Fq(.)34 b(The)23 b(function)f(returns)g(an)h Fm(Alias)g Fq(object)g(pointing)e(to)208 2765 y(the)f(ne)n(w)g(\002le.) 0 2912 y Fg(sleep)p Fm(\(\))208 3012 y Fq(T)-6 b(ell)20 b(the)g(\002nder)g(to)g(put)g(the)g(Macintosh)g(to)g(sleep,)g(if)h (your)d(machine)h(supports)h(it.)0 3159 y Fg(restart)p Fm(\(\))208 3258 y Fq(T)-6 b(ell)20 b(the)g(\002nder)g(to)g(perform)e (an)j(orderly)d(restart)i(of)g(the)g(machine.)0 3405 y Fg(shutdown)p Fm(\(\))208 3505 y Fq(T)-6 b(ell)20 b(the)g(\002nder)g (to)g(perform)e(an)j(orderly)d(shutdo)n(wn)h(of)h(the)g(machine.)0 3830 y Fi(2.7)121 b Ff(EasyDialogs)30 b Fi(\227)j(Basic)f(Macintosh)i (dialogs)0 4063 y Fq(The)22 b Fm(EasyDialogs)e Fq(module)h(contains)g (some)h(simple)g(dialogs)g(for)f(the)h(Macintosh.)30 b(All)23 b(routines)e(tak)o(e)h(an)g(optional)f(resource)0 4162 y(ID)k(parameter)f Fn(id)j Fq(with)e(which)f(one)h(can)g(o)o(v)o (erride)d(the)j Fm(DLOG)g Fq(resource)f(used)g(for)h(the)g(dialog,)g (pro)o(vided)d(that)j(the)g(dialog)f(items)0 4262 y(correspond)18 b(\(both)h(type)g(and)h(item)g(number\))e(to)j(those)f(in)g(the)g(def)o (ault)g Fm(DLOG)g Fq(resource.)j(See)e(source)f(code)f(for)h(details.)0 4409 y(The)g Fm(EasyDialogs)f Fq(module)f(de\002nes)i(the)h(follo)n (wing)d(functions:)0 4556 y Fg(Message)p Fm(\()p Fn(str)r Fe([)p Fn(,)h(id)r Fe([)p Fn(,)i(ok)13 b Fe(])f(])p Fm(\))208 4655 y Fq(Displays)18 b(a)h(modal)f(dialog)g(with)g(the)h(message)f(te) o(xt)h Fn(str)r Fq(,)g(which)f(should)g(be)g(at)h(most)g(255)f (characters)f(long.)24 b(The)18 b(b)n(utton)g(te)o(xt)208 4755 y(def)o(aults)i(to)i(\223OK\224,)f(b)n(ut)h(is)g(set)g(to)f(the)h (string)f(ar)o(gument)e Fn(ok)j Fq(if)g(the)f(latter)h(is)g(supplied.) 27 b(Control)21 b(is)h(returned)e(when)g(the)i(user)208 4855 y(clicks)e(the)g(\223OK\224)h(b)n(utton.)0 5001 y Fg(AskString)p Fm(\()p Fn(pr)l(ompt)q Fe([)p Fn(,)d(default)q Fe([)p Fn(,)i(id)r Fe([)p Fn(,)g(ok)q Fe([)p Fn(,)g(cancel)12 b Fe(])g(])g(])g(])p Fm(\))208 5101 y Fq(Asks)20 b(the)g(user)g(to)f (input)h(a)g(string)f(v)n(alue)g(via)h(a)h(modal)d(dialog.)24 b Fn(pr)l(ompt)d Fq(is)g(the)f(prompt)e(message,)i(and)f(the)h (optional)e Fn(default)208 5201 y Fq(supplies)f(the)h(initial)g(v)n (alue)g(for)f(the)h(string)g(\(otherwise)f Fm("")h Fq(is)h(used\).)k (The)18 b(te)o(xt)g(of)f(the)h(\223OK\224)g(and)g(\223Cancel\224)g(b)n (uttons)f(can)h(be)208 5300 y(changed)i(with)h(the)h Fn(ok)h Fq(and)f Fn(cancel)f Fq(ar)o(guments.)27 b(All)c(strings)e(can) h(be)g(at)g(most)g(255)f(bytes)g(long.)29 b Fm(AskString\(\))20 b Fq(returns)208 5400 y(the)g(string)g(entered)f(or)h Fm(None)g Fq(in)g(case)h(the)f(user)g(cancelled.)p 0 5549 3901 4 v 0 5649 a Fl(2.6.)52 b Fm(findertools)21 b Fl(\227)i(The)g Fo(\002nder)p Fl(')l(s)g(Apple)i(Ev)n(ents)e(interf)n (ace)1657 b(11)p eop end %%Page: 12 18 TeXDict begin 12 17 bop 0 83 a Fg(AskPassword)p Fm(\()p Fn(pr)l(ompt)q Fe([)p Fn(,)18 b(default)q Fe([)p Fn(,)h(id)r Fe([)p Fn(,)h(ok)q Fe([)p Fn(,)g(cancel)12 b Fe(])g(])g(])g(])p Fm(\))208 183 y Fq(Asks)17 b(the)f(user)h(to)g(input)f(a)h(string)f(v)n (alue)g(via)h(a)g(modal)f(dialog.)22 b(Lik)o(e)17 b Fm(AskString\(\))p Fq(,)f(b)n(ut)g(with)h(the)g(te)o(xt)f(sho)n(wn)g(as)h(b)n(ullets.)208 282 y(The)i(ar)o(guments)g(ha)n(v)o(e)g(the)h(same)h(meaning)d(as)j (for)f Fm(AskString\(\))p Fq(.)0 429 y Fg(AskYesNoCancel)p Fm(\()p Fn(question)p Fe([)p Fn(,)c(default)q Fe([)p Fn(,)j(yes)p Fe([)p Fn(,)i(no)p Fe([)p Fn(,)e(cancel)p Fe([)p Fn(,)g(id)14 b Fe(])e(])g(])g(])g(])p Fm(\))208 529 y Fq(Presents)26 b(a)h(dialog)e(with)i(prompt)d Fn(question)i Fq(and)f(three)h(b)n(uttons)g(labelled)g(\223Y)-8 b(es\224,)27 b(\223No\224,)h(and)d(\223Cancel\224.)43 b(Returns)27 b Fm(1)f Fq(for)208 628 y(\223Y)-8 b(es\224,)22 b Fm(0)h Fq(for)f(\223No\224)g(and)g Fm(-1)h Fq(for)f(\223Cancel\224.)31 b(The)23 b(v)n(alue)e(of)i Fn(default)g Fq(\(or)f Fm(0)h Fq(if)f Fn(default)h Fq(is)h(not)e(supplied\))f(is)j(returned)c(when) 208 728 y(the)i Fm(RETURN)f Fq(k)o(e)o(y)h(is)h(pressed.)30 b(The)22 b(te)o(xt)g(of)g(the)g(b)n(uttons)g(can)f(be)i(changed)d(with) i(the)g Fn(yes)p Fq(,)h Fn(no)p Fq(,)f(and)g Fn(cancel)f Fq(ar)o(guments;)g(to)208 828 y(pre)n(v)o(ent)d(a)j(b)n(utton)e(from)g (appearing,)f(supply)h Fm("")h Fq(for)g(the)g(corresponding)d(ar)o (gument.)0 975 y Fg(ProgressBar)p Fm(\()p Fe([)p Fn(title)p Fe([)p Fn(,)h(maxval)p Fe([)p Fn(,)h(label)p Fe([)p Fn(,)h(id)13 b Fe(])f(])g(])g(])p Fm(\))208 1074 y Fq(Displays)20 b(a)g(modeless)g(progress-bar)d(dialog.)24 b(This)c(is)h(the)f (constructor)e(for)i(the)g Fm(ProgressBar)e Fq(class)j(described)e (belo)n(w)-5 b(.)208 1174 y Fn(title)18 b Fq(is)h(the)f(te)o(xt)g (string)g(displayed)e(\(def)o(ault)h(\223W)-7 b(orking...)h(\224\),)16 b Fn(maxval)i Fq(is)h(the)f(v)n(alue)f(at)i(which)e(progress)g(is)i (complete)e(\(def)o(ault)208 1273 y Fm(0)p Fq(,)24 b(indicating)f(that) g(an)h(indeterminate)e(amount)g(of)h(w)o(ork)h(remains)f(to)g(be)h (done\),)f(and)g Fn(label)h Fq(is)g(the)g(te)o(xt)f(that)h(is)h (displayed)208 1373 y(abo)o(v)o(e)18 b(the)i(progress)f(bar)h(itself.)0 1520 y Fg(GetArgv)p Fm(\()p Fe([)p Fn(optionlist)q Fe([)e Fn(commandlist)q Fe([)p Fn(,)h(addold\002le)p Fe([)p Fn(,)f(addne)o(w\002le)p Fe([)p Fn(,)f(addfolder)r Fe([)p Fn(,)i(id)13 b Fe(])f(])g(])g(])g(])g(])p Fm(\))208 1620 y Fq(Displays)36 b(a)h(dialog)f(which)f(aids)i(the)g(user)f(in)g (constructing)f(a)i(command-line)c(ar)o(gument)h(list.)75 b(Returns)36 b(the)h(list)g(in)208 1719 y Fm(sys.argv)22 b Fq(format,)h(suitable)h(for)f(passing)g(as)h(an)f(ar)o(gument)f(to)h Fm(getopt.getopt\(\))p Fq(.)33 b Fn(addold\002le)p Fq(,)22 b Fn(addne)o(w\002le)p Fq(,)g(and)208 1819 y Fn(addfolder)16 b Fq(are)f(boolean)g(ar)o(guments.)21 b(When)16 b(nonzero,)e(the)o(y)h (enable)g(the)h(user)g(to)g(insert)g(into)f(the)h(command)e(line)i (paths)g(to)g(an)208 1918 y(e)o(xisting)21 b(\002le,)i(a)f (\(possibly\))f(not-yet-e)o(xistent)e(\002le,)k(and)f(a)g(folder)m(,)f (respecti)n(v)o(ely)-5 b(.)28 b(\(Note:)h(Option)21 b(ar)o(guments)f (must)i(appear)208 2018 y(in)f(the)g(command)e(line)i(before)f(\002le)i (and)f(folder)f(ar)o(guments)f(in)i(order)f(to)h(be)g(recognized)e(by)i Fm(getopt.getopt\(\))p Fq(.\))k(Ar)n(-)208 2118 y(guments)17 b(containing)f(spaces)i(can)g(be)g(speci\002ed)g(by)g(enclosing)f(them) g(within)h(single)g(or)g(double)f(quotes.)23 b(A)c Fm(SystemExit)208 2217 y Fq(e)o(xception)f(is)j(raised)f(if)g(the)h(user)f(presses)g(the) g(\223Cancel\224)h(b)n(utton.)208 2344 y Fn(optionlist)28 b Fq(is)h(a)f(list)g(that)g(determines)e(a)i(popup)e(menu)h(from)f (which)i(the)f(allo)n(wed)g(options)g(are)g(selected.)47 b(Its)29 b(items)f(can)208 2444 y(tak)o(e)g(one)g(of)h(tw)o(o)g(forms:) 41 b Fn(optstr)31 b Fq(or)d Fm(\()p Fn(optstr)r Fm(,)50 b Fn(descr)r Fm(\))p Fq(.)g(When)29 b(present,)g Fn(descr)i Fq(is)f(a)f(short)f(descripti)n(v)o(e)g(string)g(that)h(is)208 2543 y(displayed)24 b(in)h(the)g(dialog)g(while)g(this)h(option)e(is)i (selected)f(in)g(the)h(popup)d(menu.)39 b(The)25 b(correspondence)d (between)i Fn(optstr)r Fq(s)208 2643 y(and)19 b(command-line)f(ar)o (guments)g(is:)1248 2766 y Fc(optstr)i Fo(f)n(ormat)p 1810 2796 4 100 v 155 w(Command-line)h(f)n(ormat)p 1198 2800 1713 4 v 1248 2869 a Fm(x)p 1810 2899 4 100 v 563 w Fo(-x)f Fq(\(short)g(option\))1248 2969 y Fm(x:)25 b Fq(or)20 b Fm(x=)p 1810 2999 V 298 w Fo(-x)g Fq(\(short)g(option)f (with)h(v)n(alue\))1248 3069 y Fm(xyz)p 1810 3098 V 463 w Fo(--xyz)f Fq(\(long)g(option\))1248 3168 y Fm(xyz:)25 b Fq(or)19 b Fm(xyz=)p 1810 3198 V 99 w Fo(--xyz)g Fq(\(long)g(option)g (with)i(v)n(alue\))208 3291 y Fn(commandlist)j Fq(is)g(a)g(list)h(of)f (items)g(of)f(the)h(form)f Fn(cmdstr)j Fq(or)d Fm(\()p Fn(cmdstr)r Fm(,)50 b Fn(descr)r Fm(\))p Fq(,)24 b(where)f Fn(descr)j Fq(is)f(as)g(abo)o(v)o(e.)33 b(The)24 b Fn(cmdstr)r Fq(s)208 3390 y(will)j(appear)f(in)h(a)g(popup)e(menu.)44 b(When)26 b(chosen,)i(the)f(te)o(xt)f(of)h Fn(cmdstr)i Fq(will)f(be)e(appended)f(to)i(the)g(command)d(line)j(as)h(is,)208 3490 y(e)o(xcept)19 b(that)h(a)h(trailing)e(`)p Fm(:)p Fq(')25 b(or)20 b(`)p Fm(=)p Fq(')g(\(if)g(present\))f(will)i(be)f (trimmed)f(of)n(f.)208 3617 y(Ne)n(w)h(in)g(v)o(ersion)f(2.0.)0 3764 y Fg(AskFileForOpen)p Fm(\()28 b Fe([)p Fn(messa)o(g)o(e)12 b Fe(])29 b([)p Fn(,)k(typeList)13 b Fe(])31 b([)p Fn(,)h (defaultLocation)12 b Fe(])27 b([)p Fn(,)33 b(defaultOptionFla)o(gs)12 b Fe(])26 b([)p Fn(,)33 b(location)12 b Fe(])28 b([)p Fn(,)33 b(client-)750 3863 y(Name)12 b Fe(])26 b([)p Fn(,)31 b(windowT)-5 b(itle)12 b Fe(])29 b([)p Fn(,)j (actionButtonLabel)12 b Fe(])25 b([)p Fn(,)31 b(cancelButtonLabel)12 b Fe(])26 b([)p Fn(,)31 b(pr)m(efer)m(enceK)m(e)n(y)12 b Fe(])27 b([)p Fn(,)750 3963 y(popupExtension)11 b Fe(])k([)p Fn(,)20 b(e)o(ventPr)l(oc)12 b Fe(])19 b([)p Fn(,)h(pr)m(e)o(vie)o(wPr) l(oc)12 b Fe(])19 b([)p Fn(,)i(\002lterPr)l(oc)12 b Fe(])20 b([)p Fn(,)g(wanted)13 b Fe(])20 b Fm(\))208 4046 y Fq(Post)d(a)h (dialog)e(asking)g(the)i(user)e(for)h(a)g(\002le)h(to)f(open,)g(and)f (return)g(the)h(\002le)h(selected)f(or)g Fm(None)g Fq(if)g(the)g(user)g (cancelled.)23 b Fn(messa)o(g)o(e)208 4146 y Fq(is)28 b(a)h(te)o(xt)f(message)f(to)h(display)-5 b(,)29 b Fn(typeList)h Fq(is)f(a)f(list)h(of)f(4-char)e(\002letypes)i(allo)n(w)o(able,)h Fn(defaultLocation)d Fq(is)j(the)e(pathname,)208 4246 y Fm(FSSpec)f Fq(or)h Fm(FSRef)g Fq(of)f(the)h(folder)f(to)h(sho)n(w)g (initially)-5 b(,)28 b Fn(location)e Fq(is)i(the)f Fm(\(x,)49 b(y\))28 b Fq(position)e(on)g(the)h(screen)g(where)g(the)208 4345 y(dialog)20 b(is)j(sho)n(wn,)e Fn(actionButtonLabel)d Fq(is)k(a)g(string)g(to)f(sho)n(w)h(instead)f(of)g(\223Open\224)g(in)g (the)h(OK)g(b)n(utton,)f Fn(cancelButtonLabel)208 4445 y Fq(is)e(a)g(string)g(to)g(sho)n(w)f(instead)h(of)f(\223Cancel\224)h (in)f(the)h(cancel)f(b)n(utton,)g Fn(wanted)j Fq(is)e(the)g(type)f(of)h (v)n(alue)f(w)o(anted)g(as)h(a)g(return:)24 b Fm(str)p Fq(,)208 4545 y Fm(unicode)p Fq(,)19 b Fm(FSSpec)p Fq(,)g Fm(FSRef)h Fq(and)g(subtypes)f(thereof)g(are)h(acceptable.)208 4671 y(F)o(or)32 b(a)i(description)e(of)h(the)g(other)f(ar)o(guments)f (please)i(see)h(the)f(Apple)g(Na)n(vigation)f(Services)h(documentation) d(and)j(the)208 4771 y Fm(EasyDialogs)18 b Fq(source)i(code.)0 4918 y Fg(AskFileForSave)p Fm(\()27 b Fe([)p Fn(messa)o(g)o(e)12 b Fe(])30 b([)p Fn(,)i(savedF)l(ileName)12 b Fe(])29 b([)p Fn(,)j(defaultLocation)12 b Fe(])27 b([)p Fn(,)32 b(defaultOptionFla)o(gs)12 b Fe(])26 b([)p Fn(,)32 b(location)12 b Fe(])28 b([)p Fn(,)750 5018 y(clientName)12 b Fe(])21 b([)p Fn(,)k(windowT)-5 b(itle)12 b Fe(])24 b([)p Fn(,)i (actionButtonLabel)12 b Fe(])20 b([)p Fn(,)26 b(cancelButtonLabel)12 b Fe(])20 b([)p Fn(,)25 b(pr)m(efer)m(enceK)m(e)n(y)750 5117 y Fe(])18 b([)p Fn(,)i(popupExtension)12 b Fe(])k([)p Fn(,)21 b(\002leT)-6 b(ype)12 b Fe(])19 b([)p Fn(,)h(\002leCr)m(eator) 14 b Fe(])20 b([)p Fn(,)g(e)o(ventPr)l(oc)12 b Fe(])19 b([)p Fn(,)h(wanted)13 b Fe(])21 b Fm(\))208 5201 y Fq(Post)28 b(a)g(dialog)f(asking)h(the)f(user)h(for)g(a)g(\002le)g(to)g(sa)n(v)o (e)h(to,)g(and)f(return)e(the)i(\002le)h(selected)f(or)f Fm(None)h Fq(if)g(the)g(user)g(cancelled.)208 5300 y Fn(savedF)l(ileName)23 b Fq(is)i(the)f(def)o(ault)f(for)h(the)g(\002le) g(name)g(to)g(sa)n(v)o(e)g(to)h(\(the)e(return)g(v)n(alue\).)36 b(See)24 b Fm(AskFileForOpen\(\))e Fq(for)h(a)208 5400 y(description)18 b(of)i(the)g(other)g(ar)o(guments.)p 0 5549 3901 4 v 0 5649 a Fl(12)2594 b(Chapter)23 b(2.)52 b(MacPython)23 b(Modules)p eop end %%Page: 13 19 TeXDict begin 13 18 bop 0 83 a Fg(AskFolder)p Fm(\()20 b Fe([)p Fn(messa)o(g)o(e)12 b Fe(])20 b([)p Fn(,)i(defaultLocation)12 b Fe(])18 b([)p Fn(,)j(defaultOptionFla)o(gs)12 b Fe(])18 b([)p Fn(,)j(location)12 b Fe(])19 b([)p Fn(,)j(clientName)12 b Fe(])20 b([)p Fn(,)h(windowT)-5 b(itle)12 b Fe(])500 183 y([)p Fn(,)17 b(actionButtonLabel)12 b Fe(])19 b([)p Fn(,)d(cancelButtonLabel)c Fe(])19 b([)p Fn(,)d(pr)m(efer)m(enceK)m(e)n (y)c Fe(])19 b([)p Fn(,)e(popupExtension)12 b Fe(])19 b([)p Fn(,)d(e)o(ventPr)l(oc)c Fe(])19 b([)p Fn(,)500 282 y(\002lterPr)l(oc)12 b Fe(])18 b([)p Fn(,)i(wanted)13 b Fe(])21 b Fm(\))208 366 y Fq(Post)f(a)h(dialog)f(asking)f(the)i(user) f(to)g(select)h(a)g(folder)m(,)e(and)g(return)h(the)g(folder)f (selected)h(or)g Fm(None)h Fq(if)f(the)h(user)f(cancelled.)k(See)208 465 y Fm(AskFileForOpen\(\))17 b Fq(for)j(a)g(description)f(of)h(the)g (ar)o(guments.)0 612 y Fo(See)h(Also:)0 759 y Fn(Navigation)e(Services) h(Refer)m(ence)0 859 y Fb(\()p Fr(http://de)n(v)n(eloper)l(.app)o(le)n (.com/do)o(cumen)o(tati)o(on)o(/Car)o(bo)o(n/Re)o(f)n(e)o(ren)o(ce/Na)n (vig)o(ati)o(on)p 2418 859 23 4 v 20 w(Ser)r(vices)p 2728 859 V 27 w(Ref/)o Fb(\))208 958 y Fq(Programmer')-5 b(s)18 b(reference)g(documentation)f(for)j(the)g(Na)n(vigation)f (Services,)h(a)g(part)g(of)g(the)g(Carbon)f(frame)n(w)o(ork.)0 1243 y Fh(2.7.1)100 b(Prog)o(ressBar)31 b(Objects)0 1446 y Fm(ProgressBar)16 b Fq(objects)h(pro)o(vide)f(support)g(for)h (modeless)g(progress-bar)e(dialogs.)24 b(Both)17 b(determinate)f (\(thermometer)g(style\))h(and)0 1546 y(indeterminate)24 b(\(barber)n(-pole)g(style\))i(progress)f(bars)i(are)f(supported.)41 b(The)26 b(bar)g(will)h(be)g(determinate)d(if)j(its)g(maximum)e(v)n (alue)h(is)0 1646 y(greater)16 b(than)g(zero;)i(otherwise)e(it)i(will)f (be)g(indeterminate.)47 b(Changed)16 b(in)h(v)o(ersion)e(2.2:)i (Support)e(for)h(indeterminate-style)f(progress)0 1745 y(bars)20 b(w)o(as)h(added.)0 1892 y(The)g(dialog)g(is)h(displayed)e (immediately)g(after)h(creation.)28 b(If)21 b(the)g(dialog')-5 b(s)21 b(\223Cancel\224)g(b)n(utton)g(is)h(pressed,)f(or)g(if)h Fm(Cmd-.)28 b Fq(or)21 b Fm(ESC)h Fq(is)0 1992 y(typed,)e(the)h(dialog) f(windo)n(w)g(is)i(hidden)d(and)i Fm(KeyboardInterrupt)d Fq(is)k(raised)f(\(b)n(ut)f(note)h(that)g(this)g(response)f(does)h(not) g(occur)0 2091 y(until)j(the)h(progress)f(bar)g(is)i(ne)o(xt)d (updated,)h(typically)g(via)h(a)g(call)g(to)g Fm(inc\(\))f Fq(or)h Fm(set\(\))p Fq(\).)37 b(Otherwise,)26 b(the)e(bar)h(remains)f (visible)0 2191 y(until)c(the)g Fm(ProgressBar)f Fq(object)h(is)h (discarded.)0 2338 y Fm(ProgressBar)e Fq(objects)h(possess)g(the)h (follo)n(wing)d(attrib)n(utes)i(and)g(methods:)0 2485 y Fg(curval)208 2584 y Fq(The)30 b(current)f(v)n(alue)i(\(of)f(type)g (inte)o(ger)g(or)g(long)g(inte)o(ger\))g(of)g(the)h(progress)f(bar)-5 b(.)56 b(The)31 b(normal)e(access)j(methods)d(coerce)208 2684 y Fm(curval)19 b Fq(between)h Fm(0)g Fq(and)g Fm(maxval)p Fq(.)k(This)d(attrib)n(ute)e(should)g(not)h(be)g(altered)g(directly)-5 b(.)0 2831 y Fg(maxval)208 2930 y Fq(The)18 b(maximum)f(v)n(alue)g (\(of)h(type)g(inte)o(ger)g(or)g(long)g(inte)o(ger\))f(of)h(the)h (progress)e(bar;)i(the)g(progress)e(bar)h(\(thermometer)e(style\))j(is) 208 3030 y(full)g(when)g Fm(curval)g Fq(equals)h Fm(maxval)p Fq(.)k(If)c Fm(maxval)f Fq(is)h Fm(0)p Fq(,)g(the)g(bar)f(will)i(be)f (indeterminate)d(\(barber)n(-pole\).)22 b(This)e(attrib)n(ute)208 3130 y(should)f(not)h(be)g(altered)f(directly)-5 b(.)0 3277 y Fg(title)p Fm(\()p Fe([)p Fn(ne)o(wstr)14 b Fe(])p Fm(\))208 3376 y Fq(Sets)21 b(the)f(te)o(xt)g(in)g(the)h(title)f(bar)g (of)g(the)g(progress)f(dialog)h(to)g Fn(ne)o(wstr)r Fq(.)0 3523 y Fg(label)p Fm(\()p Fe([)p Fn(ne)o(wstr)14 b Fe(])p Fm(\))208 3623 y Fq(Sets)21 b(the)f(te)o(xt)g(in)g(the)h(progress)e (box)g(of)h(the)g(progress)f(dialog)g(to)i Fn(ne)o(wstr)r Fq(.)0 3770 y Fg(set)p Fm(\()p Fn(value)p Fe([)p Fn(,)d(max)12 b Fe(])p Fm(\))208 3869 y Fq(Sets)32 b(the)f(progress)f(bar')-5 b(s)31 b Fm(curval)g Fq(to)g Fn(value)p Fq(,)i(and)e(also)g Fm(maxval)g Fq(to)g Fn(max)h Fq(if)f(the)g(latter)h(is)g(pro)o(vided.) 55 b Fn(value)31 b Fq(is)h(\002rst)208 3969 y(coerced)25 b(between)g(0)i(and)f Fm(maxval)p Fq(.)43 b(The)26 b(thermometer)f(bar) h(is)h(updated)e(to)i(re\003ect)f(the)h(changes,)f(including)f(a)i (change)208 4068 y(from)19 b(indeterminate)f(to)i(determinate)f(or)h (vice)g(v)o(ersa.)0 4215 y Fg(inc)p Fm(\()p Fe([)p Fn(n)12 b Fe(])p Fm(\))208 4315 y Fq(Increments)k(the)j(progress)e(bar')-5 b(s)18 b Fm(curval)g Fq(by)g Fn(n)p Fq(,)h(or)f(by)g Fm(1)h Fq(if)f Fn(n)h Fq(is)g(not)f(pro)o(vided.)k(\(Note)c(that)g Fn(n)h Fq(may)f(be)g(ne)o(gati)n(v)o(e,)f(in)h(which)208 4415 y(case)h(the)f(ef)n(fect)g(is)i(a)f(decrement.\))j(The)c(progress) g(bar)g(is)i(updated)d(to)h(re\003ect)h(the)f(change.)24 b(If)18 b(the)h(bar)f(is)h(indeterminate,)e(this)208 4514 y(causes)i(one)f(\223spin\224)h(of)g(the)g(barber)f(pole.)24 b(The)19 b(resulting)f Fm(curval)g Fq(is)i(coerced)e(between)g(0)h(and) g Fm(maxval)g Fq(if)g(incrementing)208 4614 y(causes)h(it)h(to)f(f)o (all)h(outside)e(this)i(range.)0 4941 y Fi(2.8)121 b Ff(FrameWork)31 b Fi(\227)h(Inter)o(activ)m(e)j(application)g(fr)o(ame) n(w)o(or)r(k)0 5174 y Fq(The)17 b Fm(FrameWork)g Fq(module)f(contains)i (classes)g(that)g(together)f(pro)o(vide)e(a)k(frame)n(w)o(ork)c(for)i (an)h(interacti)n(v)o(e)e(Macintosh)h(application.)0 5274 y(The)32 b(programmer)d(b)n(uilds)j(an)g(application)f(by)h (creating)f(subclasses)i(that)f(o)o(v)o(erride)e(v)n(arious)h(methods)g (of)h(the)g(bases)h(classes,)0 5373 y(thereby)17 b(implementing)f(the)i (functionality)f(w)o(anted.)24 b(Ov)o(erriding)15 b(functionality)i (can)h(often)f(be)i(done)e(on)h(v)n(arious)f(dif)n(ferent)g(le)n(v)o (els,)p 0 5549 3901 4 v 0 5649 a Fl(2.8.)52 b Fm(FrameWork)22 b Fl(\227)h(Inter)o(activ)n(e)g(application)i(fr)o(ame)n(w)o(or)q(k) 1832 b(13)p eop end %%Page: 14 20 TeXDict begin 14 19 bop 0 83 a Fq(i.e.)25 b(to)19 b(handle)g(clicks)g (in)g(a)h(single)f(dialog)g(windo)n(w)f(in)h(a)h(non-standard)d(w)o(ay) i(it)h(is)g(not)f(necessary)g(to)g(o)o(v)o(erride)e(the)i(complete)f(e) n(v)o(ent)0 183 y(handling.)0 330 y(W)-7 b(ork)19 b(on)f(the)h Fm(FrameWork)e Fq(has)i(pretty)f(much)g(stopped,)g(no)n(w)g(that)h Fm(PyObjC)f Fq(is)i(a)n(v)n(ailable)e(for)g(full)h(Cocoa)f(access)h (from)f(Python,)0 429 y(and)26 b(the)h(documentation)d(describes)j (only)f(the)h(most)g(important)e(functionality)-5 b(,)26 b(and)h(not)f(in)h(the)g(most)g(logical)g(manner)e(at)j(that.)0 529 y(Examine)c(the)g(source)h(or)f(the)h(e)o(xamples)f(for)g(more)g (details.)40 b(The)24 b(follo)n(wing)f(are)i(some)g(comments)f(posted)g (on)g(the)h(MacPython)0 628 y(ne)n(wsgroup)18 b(about)h(the)h (strengths)g(and)g(limitations)g(of)g Fm(FrameWork)p Fq(:)332 858 y(The)g(strong)g(point)f(of)h Fm(FrameWork)f Fq(is)j(that)e(it)h(allo)n(ws)g(you)e(to)i(break)e(into)h(the)g (control-\003o)n(w)f(at)i(man)o(y)e(dif)n(ferent)208 958 y(places.)24 b Fm(W)p Fq(,)17 b(for)g(instance,)g(uses)h(a)g(dif)n (ferent)d(w)o(ay)j(to)f(enable/disable)f(menus)g(and)h(that)h(plugs)e (right)h(in)h(lea)n(ving)e(the)i(rest)208 1058 y(intact.)26 b(The)20 b(weak)h(points)f(of)g Fm(FrameWork)g Fq(are)g(that)h(it)g (has)g(no)f(abstract)h(command)d(interf)o(ace)i(\(b)n(ut)h(that)f (shouldn')o(t)208 1157 y(be)g(dif)n(\002cult\),)f(that)h(its)h(dialog)e (support)g(is)i(minimal)f(and)g(that)g(its)h(control/toolbar)c(support) i(is)i(non-e)o(xistent.)0 1387 y(The)f Fm(FrameWork)f Fq(module)g(de\002nes)h(the)g(follo)n(wing)e(functions:)0 1534 y Fg(Application)p Fm(\(\))208 1634 y Fq(An)31 b(object)f (representing)f(the)i(complete)f(application.)56 b(See)32 b(belo)n(w)e(for)g(a)i(description)d(of)i(the)g(methods.)57 b(The)30 b(def)o(ault)208 1733 y Fm(__init__\(\))18 b Fq(routine)h(creates)i(an)f(empty)f(windo)n(w)g(dictionary)g(and)g(a)i (menu)e(bar)h(with)g(an)g(apple)g(menu.)0 1880 y Fg(MenuBar)p Fm(\(\))208 1980 y Fq(An)g(object)f(representing)g(the)h(menubar)-5 b(.)23 b(This)e(object)e(is)i(usually)f(not)g(created)f(by)h(the)g (user)-5 b(.)0 2127 y Fg(Menu)p Fm(\()p Fn(bar)c(,)19 b(title)p Fe([)p Fn(,)h(after)14 b Fe(])p Fm(\))208 2226 y Fq(An)21 b(object)g(representing)e(a)j(menu.)27 b(Upon)20 b(creation)h(you)f(pass)i(the)f Fm(MenuBar)g Fq(the)g(menu)g(appears)f (in,)i(the)f Fn(title)h Fq(string)f(and)208 2326 y(a)f(position)g (\(1-based\))e Fn(after)k Fq(where)e(the)g(menu)f(should)g(appear)g (\(def)o(ault:)25 b(at)20 b(the)h(end\).)0 2473 y Fg(MenuItem)p Fm(\()p Fn(menu,)d(title)p Fe([)p Fn(,)i(shortcut,)g(callbac)n(k)13 b Fe(])p Fm(\))208 2572 y Fq(Create)32 b(a)g(menu)f(item)h(object.)59 b(The)31 b(ar)o(guments)f(are)i(the)f(menu)g(to)h(create,)i(the)e(item) g(title)h(string)e(and)g(optionally)g(the)208 2672 y(k)o(e)o(yboard)26 b(shortcut)j(and)g(a)h(callback)f(routine.)51 b(The)30 b(callback)e(is)j(called)e(with)h(the)f(ar)o(guments)f(menu-id,)i(item) f(number)208 2772 y(within)20 b(menu)f(\(1-based\),)f(current)h(front)g (windo)n(w)g(and)h(the)g(e)n(v)o(ent)f(record.)208 2904 y(Instead)h(of)h(a)h(callable)f(object)g(the)g(callback)g(can)g(also)h (be)f(a)h(string.)28 b(In)21 b(this)g(case)h(menu)f(selection)g(causes) g(the)h(lookup)d(of)i(a)208 3004 y(method)e(in)j(the)f(topmost)g(windo) n(w)f(and)h(the)g(application.)27 b(The)21 b(method)f(name)g(is)i(the)g (callback)e(string)h(with)h Fm('domenu_')208 3104 y Fq(prepended.)208 3236 y(Calling)h(the)g Fm(MenuBar)f(fixmenudimstate\(\))e Fq(method)i(sets)i(the)f(correct)f(dimming)f(for)h(all)i(menu)e(items)h (based)g(on)208 3336 y(the)d(current)f(front)g(windo)n(w)-5 b(.)0 3483 y Fg(Separator)p Fm(\()p Fn(menu)p Fm(\))208 3583 y Fq(Add)19 b(a)i(separator)e(to)h(the)g(end)g(of)g(a)h(menu.)0 3729 y Fg(SubMenu)p Fm(\()p Fn(menu,)d(label)p Fm(\))208 3829 y Fq(Create)i(a)h(submenu)d(named)h Fn(label)h Fq(under)f(menu)g Fn(menu)p Fq(.)24 b(The)c(menu)g(object)f(is)i(returned.)0 3976 y Fg(Window)p Fm(\()p Fn(par)m(ent)q Fm(\))208 4076 y Fq(Creates)e(a)h(\(modeless\))e(windo)n(w)-5 b(.)23 b Fn(P)-7 b(ar)m(ent)20 b Fq(is)g(the)f(application)f(object)h(to)g (which)f(the)i(windo)n(w)e(belongs.)23 b(The)c(windo)n(w)f(is)i(not)208 4175 y(displayed)f(until)h(later)-5 b(.)0 4322 y Fg(DialogWindow)p Fm(\()p Fn(par)m(ent)q Fm(\))208 4422 y Fq(Creates)20 b(a)h(modeless)f(dialog)f(windo)n(w)-5 b(.)0 4569 y Fg(windowbounds)p Fm(\()p Fn(width,)18 b(height)q Fm(\))208 4668 y Fq(Return)j(a)i Fm(\()p Fn(left)q Fm(,)50 b Fn(top)p Fm(,)e Fn(right)q Fm(,)i Fn(bottom)p Fm(\))21 b Fq(tuple)h(suitable)f(for)h(creation)f (of)g(a)i(windo)n(w)e(of)h(gi)n(v)o(en)e(width)i(and)f(height.)30 b(The)208 4768 y(windo)n(w)19 b(will)i(be)g(staggered)e(with)i(respect) f(to)g(pre)n(vious)f(windo)n(ws,)h(and)g(an)g(attempt)g(is)i(made)e(to) g(k)o(eep)g(the)h(whole)f(windo)n(w)208 4867 y(on-screen.)j(Ho)n(we)n (v)o(er)m(,)18 b(the)i(windo)n(w)f(will)i(ho)n(we)n(v)o(er)d(al)o(w)o (ays)j(be)f(the)g(e)o(xact)g(size)h(gi)n(v)o(en,)e(so)h(parts)g(may)g (be)g(of)n(fscreen.)0 5014 y Fg(setwatchcursor)p Fm(\(\))208 5114 y Fq(Set)g(the)h(mouse)e(cursor)g(to)i(a)f(w)o(atch.)0 5261 y Fg(setarrowcursor)p Fm(\(\))208 5360 y Fq(Set)g(the)h(mouse)e (cursor)g(to)i(an)f(arro)n(w)-5 b(.)p 0 5549 3901 4 v 0 5649 a Fl(14)2594 b(Chapter)23 b(2.)52 b(MacPython)23 b(Modules)p eop end %%Page: 15 21 TeXDict begin 15 20 bop 0 83 a Fh(2.8.1)100 b(Application)30 b(Objects)0 286 y Fq(Application)19 b(objects)h(ha)n(v)o(e)f(the)i (follo)n(wing)d(methods,)h(among)g(others:)0 433 y Fg(makeusermenus)p Fm(\(\))208 532 y Fq(Ov)o(erride)f(this)j(method)e(if)h(you)f(need)h (menus)f(in)i(your)e(application.)k(Append)c(the)h(menus)g(to)g(the)g (attrib)n(ute)g Fm(menubar)p Fq(.)0 679 y Fg(getabouttext)p Fm(\(\))208 779 y Fq(Ov)o(erride)31 b(this)j(method)d(to)j(return)d(a)j (te)o(xt)f(string)g(describing)e(your)h(application.)62 b(Alternati)n(v)o(ely)-5 b(,)34 b(o)o(v)o(erride)d(the)i Fm(do_-)208 879 y(about\(\))19 b Fq(method)g(for)g(more)h(elaborate)f (\223about\224)g(messages.)0 1025 y Fg(mainloop)p Fm(\()p Fe([)p Fn(mask)q Fe([)p Fn(,)f(wait)13 b Fe(])f(])p Fm(\))208 1125 y Fq(This)22 b(routine)e(is)j(the)f(main)f(e)n(v)o(ent)g(loop,)g (call)i(it)f(to)g(set)h(your)e(application)f(rolling.)29 b Fn(Mask)23 b Fq(is)g(the)f(mask)g(of)f(e)n(v)o(ents)g(you)g(w)o(ant) 208 1225 y(to)28 b(handle,)g Fn(wait)i Fq(is)f(the)f(number)e(of)i (ticks)g(you)f(w)o(ant)h(to)h(lea)n(v)o(e)e(to)h(other)g(concurrent)d (application)i(\(def)o(ault)f(0,)k(which)e(is)208 1324 y(probably)18 b(not)i(a)h(good)e(idea\).)26 b(While)21 b(raising)g Fn(self)33 b Fq(to)21 b(e)o(xit)f(the)h(mainloop)e(is)i (still)h(supported)d(it)i(is)h(not)e(recommended:)j(call)208 1424 y Fm(self._quit\(\))18 b Fq(instead.)208 1557 y(The)30 b(e)n(v)o(ent)g(loop)g(is)i(split)f(into)f(man)o(y)g(small)h(parts,)i (each)e(of)f(which)h(can)f(be)h(o)o(v)o(erridden.)53 b(The)31 b(def)o(ault)f(methods)g(tak)o(e)208 1656 y(care)24 b(of)g(dispatching)g(e)n(v)o(ents)g(to)g(windo)n(ws)g(and)h(dialogs,)g (handling)d(drags)i(and)h(resizes,)h(Apple)e(Ev)o(ents,)h(e)n(v)o(ents) f(for)g(non-)208 1756 y(FrameW)-7 b(ork)19 b(windo)n(ws,)g(etc.)208 1889 y(In)25 b(general,)g(all)i(e)n(v)o(ent)d(handlers)h(should)f (return)h Fm(1)h Fq(if)g(the)f(e)n(v)o(ent)g(is)h(fully)f(handled)f (and)h Fm(0)h Fq(otherwise)f(\(because)g(the)h(front)208 1988 y(windo)n(w)g(w)o(as)j(not)e(a)h(FrameW)-7 b(ork)27 b(windo)n(w)-5 b(,)28 b(for)f(instance\).)47 b(This)28 b(is)g(needed)f(so)h(that)g(update)e(e)n(v)o(ents)h(and)h(such)f(can)h (be)208 2088 y(passed)19 b(on)g(to)h(other)f(windo)n(ws)g(lik)o(e)h (the)g(Sioux)f(console)g(windo)n(w)-5 b(.)23 b(Calling)d Fm(MacOS.HandleEvent\(\))c Fq(is)21 b(not)e(allo)n(wed)208 2188 y(within)e Fn(our)p 559 2188 25 4 v 29 w(dispatc)o(h)f Fq(or)h(its)h(callees,)h(since)e(this)h(may)f(result)g(in)h(an)f (in\002nite)g(loop)g(if)h(the)f(code)g(is)h(called)f(through)e(the)j (Python)208 2287 y(inner)n(-loop)g(e)n(v)o(ent)h(handler)-5 b(.)0 2434 y Fg(asyncevents)p Fm(\()p Fn(onof)o(f)12 b Fm(\))208 2534 y Fq(Call)31 b(this)g(method)e(with)h(a)h(nonzero)e (parameter)f(to)j(enable)f(asynchronous)d(e)n(v)o(ent)j(handling.)53 b(This)31 b(will)g(tell)g(the)f(inner)208 2633 y(interpreter)24 b(loop)i(to)h(call)g(the)f(application)f(e)n(v)o(ent)h(handler)f Fn(async)p 2193 2633 V 29 w(dispatc)o(h)g Fq(whene)n(v)o(er)f(e)n(v)o (ents)i(are)h(a)n(v)n(ailable.)43 b(This)27 b(will)208 2733 y(cause)19 b(FrameW)-7 b(ork)20 b(windo)n(w)e(updates)i(and)f(the) h(user)g(interf)o(ace)f(to)h(remain)f(w)o(orking)g(during)f(long)h (computations,)f(b)n(ut)i(will)208 2833 y(slo)n(w)25 b(the)g(interpreter)f(do)n(wn)g(and)g(may)h(cause)g(surprising)f (results)h(in)h(non-reentrant)c(code)i(\(such)g(as)i(FrameW)-7 b(ork)25 b(itself\).)208 2932 y(By)e(def)o(ault)f Fn(async)p 776 2932 V 29 w(dispatc)o(h)g Fq(will)h(immediately)f(call)h Fn(our)p 1959 2932 V 29 w(dispatc)o(h)f Fq(b)n(ut)h(you)f(may)g(o)o(v)o (erride)f(this)i(to)g(handle)f(only)g(certain)208 3032 y(e)n(v)o(ents)d(asynchronously)-5 b(.)21 b(Ev)o(ents)f(you)f(do)h(not) g(handle)f(will)i(be)f(passed)g(to)g(Sioux)g(and)g(such.)208 3165 y(The)f(old)h(on/of)n(f)f(v)n(alue)g(is)i(returned.)0 3312 y Fg(_quit)p Fm(\(\))208 3411 y Fq(T)-6 b(erminate)19 b(the)h(running)e Fm(mainloop\(\))h Fq(call)h(at)h(the)f(ne)o(xt)g(con) m(v)o(enient)d(moment.)0 3558 y Fg(do_char)p Fm(\()p Fn(c,)i(e)o(vent)q Fm(\))208 3658 y Fq(The)i(user)h(typed)f(character)g Fn(c)p Fq(.)30 b(The)22 b(complete)f(details)h(of)g(the)g(e)n(v)o(ent)f (can)g(be)h(found)f(in)h(the)g Fn(e)o(vent)h Fq(structure.)29 b(This)22 b(method)208 3757 y(can)e(also)i(be)f(pro)o(vided)d(in)j(a)h Fm(Window)e Fq(object,)h(which)f(o)o(v)o(errides)f(the)i (application-wide)e(handler)h(if)h(the)g(windo)n(w)f(is)i(front-)208 3857 y(most.)0 4004 y Fg(do_dialogevent)p Fm(\()p Fn(e)o(vent)q Fm(\))208 4104 y Fq(Called)c(early)g(in)h(the)f(e)n(v)o(ent)g(loop)g (to)g(handle)g(modeless)g(dialog)f(e)n(v)o(ents.)24 b(The)18 b(def)o(ault)g(method)f(simply)h(dispatches)g(the)g(e)n(v)o(ent)208 4203 y(to)f(the)h(rele)n(v)n(ant)f(dialog)g(\(not)g(through)f(the)h Fm(DialogWindow)f Fq(object)i(in)m(v)n(olv)o(ed\).)j(Ov)o(erride)16 b(if)j(you)d(need)i(special)f(handling)208 4303 y(of)i(dialog)h(e)n(v)o (ents)f(\(k)o(e)o(yboard)f(shortcuts,)h(etc\).)0 4450 y Fg(idle)p Fm(\()p Fn(e)o(vent)q Fm(\))208 4549 y Fq(Called)g(by)g (the)h(main)f(e)n(v)o(ent)g(loop)f(when)h(no)g(e)n(v)o(ents)g(are)h(a)n (v)n(ailable.)k(The)19 b(null-e)n(v)o(ent)e(is)k(passed)e(\(so)h(you)e (can)i(look)e(at)i(mouse)208 4649 y(position,)f(etc\).)0 4934 y Fh(2.8.2)100 b(Windo)o(w)29 b(Objects)0 5137 y Fq(W)m(indo)n(w)19 b(objects)h(ha)n(v)o(e)g(the)g(follo)n(wing)f (methods,)f(among)h(others:)0 5284 y Fg(open)p Fm(\(\))208 5383 y Fq(Ov)o(erride)32 b(this)j(method)f(to)g(open)g(a)h(windo)n(w)-5 b(.)66 b(Store)34 b(the)h(MacOS)f(windo)n(w-id)f(in)i Fm(self.wid)e Fq(and)h(call)h(the)g Fm(do_-)p 0 5549 3901 4 v 0 5649 a Fl(2.8.)52 b Fm(FrameWork)22 b Fl(\227)h(Inter)o (activ)n(e)g(application)i(fr)o(ame)n(w)o(or)q(k)1832 b(15)p eop end %%Page: 16 22 TeXDict begin 16 21 bop 208 83 a Fm(postopen\(\))18 b Fq(method)h(to)i(re)o(gister)e(the)h(windo)n(w)f(with)i(the)f(parent)f (application.)0 230 y Fg(close)p Fm(\(\))208 330 y Fq(Ov)o(erride)j (this)j(method)e(to)i(do)f(an)o(y)f(special)i(processing)e(on)h(windo)n (w)f(close.)37 b(Call)26 b(the)e Fm(do_postclose\(\))e Fq(method)h(to)208 429 y(cleanup)c(the)h(parent)f(state.)0 576 y Fg(do_postresize)p Fm(\()p Fn(width,)e(height,)j(macoswindowid)r Fm(\))208 676 y Fq(Called)g(after)g(the)g(windo)n(w)f(is)i(resized.)k (Ov)o(erride)19 b(if)h(more)f(needs)h(to)h(be)f(done)f(than)h(calling)f Fm(InvalRect)p Fq(.)0 823 y Fg(do_contentclick)p Fm(\()p Fn(local,)e(modi\002er)o(s,)i(e)o(vent)q Fm(\))208 922 y Fq(The)h(user)g(click)o(ed)h(in)f(the)h(content)f(part)g(of)g(a)h (windo)n(w)-5 b(.)25 b(The)c(ar)o(guments)d(are)j(the)f(coordinates)f (\(windo)n(w-relati)n(v)o(e\),)f(the)i(k)o(e)o(y)208 1022 y(modi\002ers)f(and)h(the)g(ra)o(w)g(e)n(v)o(ent.)0 1169 y Fg(do_update)p Fm(\()p Fn(macoswindowid,)d(e)o(vent)q Fm(\))208 1268 y Fq(An)j(update)f(e)n(v)o(ent)g(for)h(the)g(windo)n(w)f (w)o(as)i(recei)n(v)o(ed.)i(Redra)o(w)d(the)g(windo)n(w)-5 b(.)0 1415 y Fg(do_activate)p Fm(\()p Fn(activate)o(,)17 b(e)o(vent)q Fm(\))208 1515 y Fq(The)27 b(windo)n(w)f(w)o(as)i(acti)n (v)n(ated)f(\()p Fn(activate)48 b Fm(==)h(1)p Fq(\))28 b(or)f(deacti)n(v)n(ated)f(\()p Fn(activate)48 b Fm(==)h(0)p Fq(\).)e(Handle)26 b(things)h(lik)o(e)h(focus)f(high-)208 1614 y(lighting,)18 b(etc.)0 1899 y Fh(2.8.3)100 b(ControlsWindo)o(w)30 b(Object)0 2102 y Fq(ControlsW)m(indo)n(w)18 b(objects)i(ha)n(v)o(e)g (the)g(follo)n(wing)f(methods)g(besides)h(those)g(of)g Fm(Window)f Fq(objects:)0 2249 y Fg(do_controlhit)p Fm(\()p Fn(window)-6 b(,)17 b(contr)l(ol,)j(pcode)o(,)f(e)o(vent)q Fm(\))208 2349 y Fq(P)o(art)h Fn(pcode)f Fq(of)h(control)f Fn(contr)l(ol)h Fq(w)o(as)h(hit)f(by)g(the)g(user)-5 b(.)25 b(T)m(racking)19 b(and)h(such)f(has)i(already)e(been)g(tak)o(en) h(care)g(of.)0 2634 y Fh(2.8.4)100 b(ScrolledWindo)o(w)31 b(Object)0 2836 y Fq(ScrolledW)m(indo)n(w)18 b(objects)i(are)g (ControlsW)m(indo)n(w)e(objects)i(with)h(the)f(follo)n(wing)e(e)o(xtra) i(methods:)0 2983 y Fg(scrollbars)p Fm(\()p Fe([)p Fn(wantx)p Fe([)p Fn(,)e(wanty)12 b Fe(])g(])p Fm(\))208 3083 y Fq(Create)25 b(\(or)f(destro)o(y\))g(horizontal)f(and)i(v)o(ertical)f (scrollbars.)39 b(The)24 b(ar)o(guments)f(specify)i(which)f(you)g(w)o (ant)h(\(def)o(ault:)34 b(both\).)208 3183 y(The)19 b(scrollbars)h(al)o (w)o(ays)h(ha)n(v)o(e)e(minimum)g Fm(0)h Fq(and)g(maximum)f Fm(32767)p Fq(.)0 3329 y Fg(getscrollbarvalues)p Fm(\(\))208 3429 y Fq(Y)-9 b(ou)28 b(must)i(supply)e(this)i(method.)51 b(It)30 b(should)e(return)g(a)i(tuple)f Fm(\()p Fn(x)p Fm(,)49 b Fn(y)p Fm(\))30 b Fq(gi)n(ving)e(the)h(current)f(position)h (of)g(the)g(scrollbars)208 3529 y(\(between)f Fm(0)i Fq(and)f Fm(32767)p Fq(\).)51 b(Y)-9 b(ou)29 b(can)h(return)e Fm(None)h Fq(for)g(either)g(to)g(indicate)g(the)h(whole)f(document)e (is)j(visible)g(in)f(that)208 3628 y(direction.)0 3775 y Fg(updatescrollbars)p Fm(\(\))208 3875 y Fq(Call)g(this)g(method)e (when)h(the)h(document)d(has)j(changed.)49 b(It)28 b(will)i(call)f Fm(getscrollbarvalues\(\))c Fq(and)j(update)g(the)208 3974 y(scrollbars.)0 4121 y Fg(scrollbar_callback)p Fm(\()p Fn(whic)o(h,)16 b(what,)k(value)p Fm(\))208 4221 y Fq(Supplied)e(by)g (you)h(and)f(called)h(after)g(user)g(interaction.)k Fn(whic)o(h)c Fq(will)h(be)f Fm('x')g Fq(or)g Fm('y')p Fq(,)g Fn(what)i Fq(will)f(be)f Fm('-')p Fq(,)g Fm('--')p Fq(,)g Fm('set')p Fq(,)208 4321 y Fm('++')h Fq(or)f Fm('+')p Fq(.)25 b(F)o(or)20 b Fm('set')p Fq(,)g Fn(value)f Fq(will)i(contain)e(the)i(ne)n(w)f (scrollbar)f(position.)0 4467 y Fg(scalebarvalues)p Fm(\()p Fn(absmin,)e(absmax,)i(curmin,)g(curmax)p Fm(\))208 4567 y Fq(Auxiliary)d(method)g(to)i(help)f(you)g(calculate)g(v)n(alues)g(to) h(return)e(from)h Fm(getscrollbarvalues\(\))p Fq(.)j(Y)-9 b(ou)17 b(pass)i(document)208 4667 y(minimum)g(and)i(maximum)e(v)n (alue)h(and)h(topmost)f(\(leftmost\))g(and)g(bottommost)g (\(rightmost\))f(visible)i(v)n(alues)f(and)h(it)g(returns)208 4766 y(the)f(correct)f(number)f(or)i Fm(None)p Fq(.)0 4913 y Fg(do_activate)p Fm(\()p Fn(onof)o(f)o(,)d(e)o(vent)q Fm(\))208 5013 y Fq(T)-7 b(ak)o(es)19 b(care)g(of)g (dimming/highlighting)c(scrollbars)j(when)h(a)h(windo)n(w)e(becomes)g (frontmost.)23 b(If)c(you)g(o)o(v)o(erride)d(this)k(method,)208 5112 y(call)g(this)h(one)f(at)g(the)g(end)g(of)g(your)f(method.)0 5259 y Fg(do_postresize)p Fm(\()p Fn(width,)e(height,)j(window)p Fm(\))208 5359 y Fq(Mo)o(v)o(es)f(scrollbars)g(to)i(the)f(correct)f (position.)24 b(Call)d(this)g(method)e(initially)h(if)g(you)g(o)o(v)o (erride)e(it.)p 0 5549 3901 4 v 0 5649 a Fl(16)2594 b(Chapter)23 b(2.)52 b(MacPython)23 b(Modules)p eop end %%Page: 17 23 TeXDict begin 17 22 bop 0 83 a Fg(do_controlhit)p Fm(\()p Fn(window)-6 b(,)17 b(contr)l(ol,)j(pcode)o(,)f(e)o(vent)q Fm(\))208 183 y Fq(Handles)24 b(scrollbar)g(interaction.)38 b(If)25 b(you)f(o)o(v)o(erride)f(it)j(call)f(this)h(method)d(\002rst,)k (a)e(nonzero)e(return)h(v)n(alue)h(indicates)f(the)h(hit)208 282 y(w)o(as)c(in)f(the)g(scrollbars)g(and)f(has)i(been)e(handled.)0 567 y Fh(2.8.5)100 b(DialogWindo)o(w)30 b(Objects)0 770 y Fq(DialogW)m(indo)n(w)18 b(objects)i(ha)n(v)o(e)g(the)g(follo)n(wing) f(methods)g(besides)h(those)g(of)g Fm(Window)f Fq(objects:)0 917 y Fg(open)p Fm(\()p Fn(r)m(esid)r Fm(\))208 1017 y Fq(Create)h(the)g(dialog)g(windo)n(w)-5 b(,)18 b(from)h(the)h(DLOG)h (resource)e(with)h(id)g Fn(r)m(esid)r Fq(.)26 b(The)20 b(dialog)f(object)h(is)h(stored)f(in)g Fm(self.wid)p Fq(.)0 1163 y Fg(do_itemhit)p Fm(\()p Fn(item,)e(e)o(vent)q Fm(\))208 1263 y Fq(Item)h(number)g Fn(item)i Fq(w)o(as)g(hit.)k(Y)-9 b(ou)19 b(are)h(responsible)f(for)h(redra)o(wing)e(toggle)h(b)n (uttons,)h(etc.)0 1591 y Fi(2.9)121 b Ff(autoGIL)31 b Fi(\227)i(Global)h(Inter)t(preter)h(Loc)n(k)e(handling)i(in)f(e)l(v)m (ent)h(loops)0 1823 y Fq(The)17 b Fm(autoGIL)f Fq(module)g(pro)o(vides) g(a)h(function)f Fm(installAutoGIL)f Fq(that)i(automatically)f(locks)h (and)g(unlocks)f(Python')-5 b(s)16 b(Global)0 1923 y(Interpreter)i (Lock)h(when)h(running)e(an)i(e)n(v)o(ent)f(loop.)0 2070 y Fo(exception)g Fg(AutoGILError)208 2169 y Fq(Raised)j(if)h(the)f (observ)o(er)e(callback)h(cannot)g(be)h(installed,)g(for)g(e)o(xample)e (because)i(the)g(current)f(thread)g(does)h(not)f(ha)n(v)o(e)h(a)g(run) 208 2269 y(loop.)0 2416 y Fg(installAutoGIL)p Fm(\(\))208 2516 y Fq(Install)e(an)h(observ)o(er)d(callback)i(in)h(the)f(e)n(v)o (ent)g(loop)f(\(CFRunLoop\))g(for)h(the)g(current)f(thread,)h(that)g (will)i(lock)e(and)g(unlock)f(the)208 2615 y(Global)f(Interpreter)g (Lock)g(\(GIL\))h(at)h(appropriate)c(times,)k(allo)n(wing)f(other)f (Python)g(threads)h(to)g(run)g(while)g(the)h(e)n(v)o(ent)e(loop)h(is) 208 2715 y(idle.)208 2848 y(A)-6 b(v)n(ailability:)24 b(OSX)d(10.1)e(or)h(later)-5 b(.)p 0 5549 3901 4 v 0 5649 a Fl(2.9.)52 b Fm(autoGIL)22 b Fl(\227)h(Global)h(Inter)r(preter)g (Loc)n(k)e(handling)j(in)f(e)n(v)n(ent)e(loops)1428 b(17)p eop end %%Page: 18 24 TeXDict begin 18 23 bop 0 5549 3901 4 v 0 5649 a Fl(18)p eop end %%Page: 19 25 TeXDict begin 19 24 bop 0 83 3901 9 v 3503 230 a Fl(CHAPTER)3495 427 y Fk(THREE)p 0 515 V 1478 978 a Fw(MacPython)57 b(OSA)g(Modules)0 1466 y Fq(This)23 b(chapter)f(describes)g(the)h(current)f (implementation)e(of)j(the)g(Open)f(Scripting)g(Architecure)g(\(OSA,)g (also)i(commonly)c(referred)0 1566 y(to)j(as)g(AppleScript\))e(for)h (Python,)f(allo)n(wing)h(you)f(to)i(control)e(scriptable)h (applications)f(from)g(your)h(Python)f(program,)g(and)h(with)g(a)0 1665 y(f)o(airly)g(p)o(ythonic)e(interf)o(ace.)31 b(De)n(v)o(elopment) 20 b(on)h(this)i(set)g(of)f(modules)f(has)i(stopped,)e(and)h(a)h (replacement)d(is)j(e)o(xpected)e(for)h(Python)0 1765 y(2.5.)0 1912 y(F)o(or)f(a)g(description)f(of)h(the)g(v)n(arious)f (components)f(of)i(AppleScript)f(and)h(OSA,)h(and)e(to)i(get)f(an)g (understanding)d(of)j(the)g(architecture)0 2012 y(and)c(terminology)-5 b(,)15 b(you)h(should)g(read)h(Apple')-5 b(s)17 b(documentation.)k(The) c(\224Applescript)g(Language)e(Guide\224)i(e)o(xplains)f(the)h (conceptual)0 2111 y(model)j(and)g(the)h(terminology)-5 b(,)18 b(and)i(documents)f(the)i(standard)e(suite.)27 b(The)21 b(\224Open)f(Scripting)g(Architecture\224)f(document)g(e)o (xplains)0 2211 y(ho)n(w)g(to)g(use)h(OSA)g(from)e(an)i(application)e (programmers)e(point)j(of)g(vie)n(w)-5 b(.)24 b(In)19 b(the)h(Apple)f(Help)g(V)-5 b(ie)n(wer)19 b(these)h(books)e(are)i (located)e(in)0 2310 y(the)i(De)n(v)o(eloper)e(Documentation,)g(Core)i (T)-6 b(echnologies)18 b(section.)0 2457 y(As)31 b(an)e(e)o(xample)g (of)g(scripting)g(an)h(application,)g(the)g(follo)n(wing)e(piece)i(of)f (AppleScript)g(will)h(get)g(the)g(name)f(of)g(the)h(frontmost)0 2557 y Fo(Finder)21 b Fq(windo)n(w)e(and)g(print)h(it:)236 2795 y Fa(tell)44 b(application)f("Finder")416 2886 y(get)h(name)g(of)h (window)e(1)236 2978 y(end)i(tell)0 3264 y Fq(In)20 b(Python,)f(the)h (follo)n(wing)e(code)i(fragment)e(will)j(do)f(the)g(same:)236 3502 y Fa(import)44 b(Finder)236 3685 y(f)h(=)g(Finder.Finder\(\))236 3776 y(print)f(f.get\(f.window\(1\).name\))0 4063 y Fq(As)20 b(distrib)n(uted)f(the)g(Python)g(library)f(includes)h(packages)f(that) i(implement)e(the)i(standard)e(suites,)i(plus)g(packages)e(that)i (interf)o(ace)e(to)0 4163 y(a)j(small)f(number)f(of)h(common)e (applications.)0 4309 y(T)-7 b(o)22 b(send)f(AppleEv)o(ents)f(to)i(an)f (application)f(you)h(must)h(\002rst)g(create)f(the)h(Python)f(package)f (interf)o(acing)g(to)i(the)f(terminology)e(of)j(the)0 4409 y(application)e(\(what)g Fo(Script)i(Editor)f Fq(calls)h(the)f (\224Dictionary\224\).)k(This)d(can)e(be)h(done)f(from)g(within)h(the)g Fo(PythonIDE)g Fq(or)g(by)g(running)0 4509 y(the)f(`)p Fr(gensuitemodule)o(.p)n(y)p Fq(')15 b(module)k(as)i(a)f(standalone)f (program)f(from)h(the)i(command)d(line.)0 4656 y(The)27 b(generated)f(output)g(is)j(a)f(package)e(with)i(a)f(number)f(of)h (modules,)i(one)e(for)f(e)n(v)o(ery)h(suite)h(used)f(in)g(the)h (program)d(plus)j(an)f Fm(_-)0 4755 y(_init__)f Fq(module)f(to)i(glue)f (it)i(all)f(together)-5 b(.)43 b(The)27 b(Python)e(inheritance)g(graph) h(follo)n(ws)g(the)h(AppleScript)e(inheritance)g(graph,)0 4855 y(so)k(if)f(a)h(program')-5 b(s)26 b(dictionary)h(speci\002es)i (that)f(it)h(includes)f(support)e(for)i(the)g(Standard)f(Suite,)k(b)n (ut)d(e)o(xtends)f(one)h(or)g(tw)o(o)g(v)o(erbs)0 4954 y(with)h(e)o(xtra)f(ar)o(guments)f(then)h(the)h(output)e(suite)i(will)h (contain)d(a)j(module)d Fm(Standard_Suite)g Fq(that)h(imports)g(and)h (re-e)o(xports)0 5054 y(e)n(v)o(erything)g(from)i Fm (StdSuites.Standard_Suite)d Fq(b)n(ut)k(o)o(v)o(errides)e(the)i (methods)f(that)h(ha)n(v)o(e)f(e)o(xtra)g(functionality)-5 b(.)58 b(The)0 5154 y(output)18 b(of)h Fm(gensuitemodule)f Fq(is)i(pretty)f(readable,)f(and)h(contains)g(the)g(documentation)e (that)i(w)o(as)h(in)g(the)f(original)g(AppleScript)0 5253 y(dictionary)f(in)j(Python)e(docstrings,)g(so)h(reading)f(it)i(is) g(a)g(good)d(source)i(of)g(documentation.)p 0 5549 3901 4 v 3808 5649 a Fl(19)p eop end %%Page: 20 26 TeXDict begin 20 25 bop 0 83 a Fq(The)23 b(output)f(package)g (implements)g(a)h(main)g(class)h(with)g(the)f(same)g(name)g(as)h(the)f (package)f(which)g(contains)h(all)h(the)f(AppleScript)0 183 y(v)o(erbs)30 b(as)h(methods,)i(with)e(the)f(direct)h(object)f(as)i (the)f(\002rst)g(ar)o(gument)e(and)h(all)h(optional)f(parameters)f(as)j (k)o(e)o(yw)o(ord)d(ar)o(guments.)0 282 y(AppleScript)19 b(classes)i(are)f(also)h(implemented)d(as)j(Python)e(classes,)i(as)g (are)f(comparisons)f(and)g(all)i(the)f(other)g(thingies.)0 429 y(The)i(main)g(Python)g(class)h(implementing)e(the)i(v)o(erbs)e (also)i(allo)n(ws)g(access)g(to)g(the)g(properties)e(and)h(elements)g (declared)g(in)g(the)h(Ap-)0 529 y(pleScript)17 b(class)i (\224application\224.)k(In)17 b(the)h(current)f(release)h(that)g(is)h (as)f(f)o(ar)g(as)h(the)f(object)f(orientation)f(goes,)i(so)h(in)f(the) g(e)o(xample)e(abo)o(v)o(e)0 628 y(we)21 b(need)e(to)h(use)h Fm(f.get\(f.window\(1\).name\))16 b Fq(instead)k(of)g(the)g(more)g (Pythonic)f Fm(f.window\(1\).name.get\(\))p Fq(.)0 775 y(If)h(an)g(AppleScript)f(identi\002er)h(is)h(not)f(a)g(Python)f (identi\002er)h(the)g(name)g(is)h(mangled)d(according)h(to)h(a)h(small) f(number)f(of)h(rules:)125 989 y Fp(\017)41 b Fq(spaces)20 b(are)g(replaced)f(with)h(underscores)125 1155 y Fp(\017)41 b Fq(other)19 b(non-alphanumeric)d(characters)j(are)h(replaced)f(with)h Fm(_xx_)g Fq(where)g Fm(xx)g Fq(is)i(the)e(he)o(xadecimal)e(character)h (v)n(alue)125 1321 y Fp(\017)41 b Fq(an)o(y)19 b(Python)g(reserv)o(ed)g (w)o(ord)g(gets)i(an)f(underscore)e(appended)0 1534 y(Python)29 b(also)i(has)f(support)f(for)h(creating)g(scriptable)f(applications)g (in)i(Python,)g(b)n(ut)g(The)f(follo)n(wing)f(modules)g(are)h(rele)n(v) n(ant)f(to)0 1634 y(MacPython)19 b(AppleScript)g(support:)50 1777 y Fg(gensuitemodule)97 b Fq(Create)20 b(a)h(stub)f(package)f(from) g(an)h(OSA)h(dictionary)50 1876 y Fg(aetools)447 b Fq(Basic)21 b(support)e(for)g(sending)g(Apple)h(Ev)o(ents)50 1976 y Fg(aepack)497 b Fq(Con)m(v)o(ersion)18 b(between)h(Python)g(v)n (ariables)h(and)f(AppleEv)o(ent)f(data)i(containers.)50 2076 y Fg(aetypes)447 b Fq(Python)19 b(representation)f(of)i(the)g (Apple)g(Ev)o(ent)f(Object)h(Model.)50 2175 y Fg(MiniAEFrame)247 b Fq(Support)19 b(to)h(act)g(as)h(an)f(Open)g(Scripting)f(Architecture) g(\(OSA\))h(serv)o(er)f(\(\223)-7 b(Apple)20 b(Ev)o(ents\224\).)0 2317 y(In)48 b(addition,)54 b(support)47 b(modules)g(ha)n(v)o(e)h(been) g(pre-generated)d(for)j Fm(Finder)p Fq(,)54 b Fm(Terminal)p Fq(,)h Fm(Explorer)p Fq(,)f Fm(Netscape)p Fq(,)0 2417 y Fm(CodeWarrior)p Fq(,)18 b Fm(SystemEvents)h Fq(and)h Fm(StdSuites)p Fq(.)0 2744 y Fi(3.1)121 b Ff(gensuitemodule)29 b Fi(\227)k(Gener)o(ate)i(OSA)e(stub)h(pac)n(kages)0 2977 y Fq(The)18 b Fm(gensuitemodule)e Fq(module)g(creates)i(a)h (Python)e(package)f(implementing)g(stub)i(code)g(for)f(the)h (AppleScript)f(suites)i(that)f(are)0 3077 y(implemented)g(by)i(a)h (speci\002c)f(application,)f(according)f(to)i(its)h(AppleScript)e (dictionary)-5 b(.)0 3224 y(It)16 b(is)h(usually)e(in)m(v)n(ok)o(ed)g (by)g(the)h(user)g(through)e(the)h Fo(PythonIDE)p Fq(,)h(b)n(ut)g(it)h (can)e(also)i(be)e(run)h(as)g(a)h(script)f(from)e(the)i(command)e(line) i(\(pass)g Fo(-)0 3323 y(-help)g Fq(for)f(help)g(on)g(the)h(options\))e (or)h(imported)f(from)h(Python)f(code.)23 b(F)o(or)15 b(an)g(e)o(xample)f(of)i(its)g(use)g(see)g(`)p Fr(Mac/scr)q (ipts/genallsuites)o(.p)n(y)p Fq(')0 3423 y(in)k(a)h(source)e(distrib)n (ution,)g(which)h(generates)f(the)h(stub)g(packages)f(that)i(are)f (included)f(in)h(the)g(standard)f(library)-5 b(.)0 3570 y(It)20 b(de\002nes)g(the)h(follo)n(wing)d(public)h(functions:)0 3717 y Fg(is_scriptable)p Fm(\()p Fn(application)p Fm(\))208 3816 y Fq(Returns)e(true)g(if)h Fm(application)p Fq(,)e(which)h(should) f(be)i(passed)f(as)h(a)g(pathname,)e(appears)h(to)g(be)g(scriptable.)24 b(T)-7 b(ak)o(e)17 b(the)h(return)208 3916 y(v)n(alue)h(with)h(a)h (grain)e(of)h(salt:)26 b Fo(Inter)o(net)20 b(Explor)o(er)g Fq(appears)f(not)h(to)g(be)h(scriptable)e(b)n(ut)h(de\002nitely)g(is.)0 4063 y Fg(processfile)p Fm(\()p Fn(application)p Fe([)p Fn(,)15 b(output,)k(basepkgname)o(,)f(edit)p 1934 4063 25 4 v 29 w(modnames,)h(cr)m(eator)o(signatur)m(e)o(,)f(dump,)h (verbose)12 b Fe(])p Fm(\))208 4162 y Fq(Create)20 b(a)h(stub)f (package)e(for)i Fm(application)p Fq(,)e(which)i(should)f(be)h(passed)g (as)h(a)g(full)f(pathname.)j(F)o(or)d(a)h(`)p Fr(.app)p Fq(')d(b)n(undle)h(this)208 4262 y(is)24 b(the)g(pathname)e(to)h(the)h (b)n(undle,)f(not)g(to)h(the)g(e)o(x)o(ecutable)d(inside)j(the)f(b)n (undle;)h(for)f(an)h(unb)n(undled)d(CFM)j(application)e(you)208 4362 y(pass)e(the)g(\002lename)g(of)g(the)g(application)f(binary)-5 b(.)208 4495 y(This)30 b(function)e(asks)i(the)g(application)e(for)h (its)i(OSA)f(terminology)e(resources,)i(decodes)f(these)h(resources)f (and)g(uses)i(the)208 4594 y(resultant)19 b(data)h(to)h(create)f(the)g (Python)f(code)g(for)h(the)g(package)f(implementing)f(the)i(client)g (stubs.)208 4727 y Fm(output)g Fq(is)j(the)e(pathname)f(where)h(the)g (resulting)g(package)f(is)j(stored,)e(if)g(not)g(speci\002ed)h(a)f (standard)g(\224sa)n(v)o(e)g(\002le)h(as\224)g(dialog)208 4827 y(is)28 b(presented)e(to)h(the)h(user)-5 b(.)46 b Fm(basepkgname)26 b Fq(is)j(the)e(base)g(package)f(on)h(which)g(this) h(package)e(will)i(b)n(uild,)g(and)f(def)o(aults)208 4926 y(to)f Fm(StdSuites)p Fq(.)44 b(Only)26 b(when)g(generating)f Fm(StdSuites)h Fq(itself)h(do)f(you)g(need)g(to)h(specify)f(this.)45 b Fm(edit_modnames)208 5026 y Fq(is)25 b(a)g(dictionary)d(that)j(can)f (be)g(used)h(to)f(change)f(modulenames)f(that)j(are)f(too)g(ugly)g (after)g(name)g(mangling.)36 b Fm(creator_-)208 5126 y(signature)17 b Fq(can)h(be)g(used)g(to)g(o)o(v)o(erride)e(the)i (4-char)f(creator)g(code,)h(which)f(is)i(normally)e(obtained)f(from)i (the)g(`)p Fr(PkgInf)n(o)p Fq(')e(\002le)208 5225 y(in)21 b(the)h(package)e(or)i(from)e(the)i(CFM)h(\002le)f(creator)f (signature.)28 b(When)22 b Fm(dump)f Fq(is)i(gi)n(v)o(en)d(it)j(should) e(refer)f(to)i(a)g(\002le)h(object,)e(and)208 5325 y Fm(processfile)f Fq(will)i(stop)g(after)g(decoding)d(the)j(resources)f (and)g(dump)g(the)g(Python)g(representation)f(of)h(the)h(terminology)p 0 5549 3901 4 v 0 5649 a Fl(20)2395 b(Chapter)24 b(3.)51 b(MacPython)24 b(OSA)f(Modules)p eop end %%Page: 21 27 TeXDict begin 21 26 bop 208 83 a Fq(resources)19 b(to)h(this)g(\002le.) 26 b Fm(verbose)19 b Fq(should)g(also)h(be)g(a)g(\002le)h(object,)e (and)h(specifying)e(it)j(will)f(cause)g Fm(processfile)f Fq(to)h(tell)208 183 y(you)f(what)h(it)h(is)g(doing.)0 330 y Fg(processfile_fromresource)p Fm(\()p Fn(applica)o(tion)p Fe([)o Fn(,)35 b(output,)k(basepkgname)o(,)f(edit)p 2642 330 25 4 v 29 w(modnames,)h(cr)m(eator)o(signatur)m(e)o(,)g(dump,)1250 429 y(verbose)12 b Fe(])p Fm(\))208 513 y Fq(This)25 b(function)e(does)h(the)h(same)g(as)h Fm(processfile)p Fq(,)e(e)o(xcept)g(that)h(it)h(uses)f(a)h(dif)n(ferent)d(method)g(to)i (get)g(the)g(terminology)208 612 y(resources.)31 b(It)23 b(opens)f Fm(application)f Fq(as)j(a)f(resource)e(\002le)i(and)g(reads) f(all)h Fm("aete")f Fq(and)h Fm("aeut")f Fq(resources)f(from)h(this)208 712 y(\002le.)0 1039 y Fi(3.2)121 b Ff(aetools)31 b Fi(\227)i(OSA)g (client)g(suppor)5 b(t)0 1272 y Fq(The)25 b Fm(aetools)g Fq(module)f(contains)h(the)g(basic)h(functionality)d(on)j(which)f (Python)f(AppleScript)g(client)i(support)e(is)i(b)n(uilt.)41 b(It)26 b(also)0 1372 y(imports)e(and)g(re-e)o(xports)e(the)i(core)g (functionality)e(of)i(the)h Fm(aetypes)f Fq(and)f Fm(aepack)h Fq(modules.)37 b(The)24 b(stub)g(packages)f(generated)0 1471 y(by)g Fm(gensuitemodule)f Fq(import)h(the)g(rele)n(v)n(ant)g (portions)f(of)i Fm(aetools)p Fq(,)f(so)i(usually)e(you)f(do)i(not)f (need)g(to)h(import)f(it)h(yourself.)0 1571 y(The)c(e)o(xception)e(to)i (this)h(is)g(when)f(you)f(cannot)g(use)i(a)f(generated)f(suite)h (package)f(and)h(need)f(lo)n(wer)n(-le)n(v)o(el)g(access)i(to)f (scripting.)0 1718 y(The)h Fm(aetools)f Fq(module)f(itself)j(uses)g (the)f(AppleEv)o(ent)d(support)i(pro)o(vided)f(by)h(the)h Fm(Carbon.AE)f Fq(module.)26 b(This)21 b(has)g(one)g(dra)o(w-)0 1818 y(back:)34 b(you)24 b(need)g(access)h(to)g(the)g(windo)n(w)f (manager)m(,)g(see)h(section)f(1.1.2)g(for)g(details.)39 b(This)25 b(restriction)f(may)g(be)h(lifted)g(in)g(future)0 1917 y(releases.)0 2064 y(The)20 b Fm(aetools)f Fq(module)g(de\002nes)h (the)g(follo)n(wing)f(functions:)0 2211 y Fg(packevent)p Fm(\()p Fn(ae)o(,)f(par)o(ameter)o(s,)i(attrib)n(utes)p Fm(\))208 2311 y Fq(Stores)50 b(parameters)g(and)g(attrib)n(utes)h(in)g (a)g(pre-created)e Fm(Carbon.AE.AEDesc)f Fq(object.)117 b Fm(parameters)49 b Fq(and)208 2410 y Fm(attributes)25 b Fq(are)i(dictionaries)e(mapping)g(4-character)g(OSA)i(parameter)e(k)o (e)o(ys)h(to)h(Python)f(objects.)44 b(The)26 b(objects)h(are)208 2510 y(pack)o(ed)19 b(using)g Fm(aepack.pack\(\))p Fq(.)0 2657 y Fg(unpackevent)p Fm(\()p Fn(ae)p Fe([)p Fn(,)e(formodulename)12 b Fe(])p Fm(\))208 2756 y Fq(Recursi)n(v)o(ely)28 b(unpacks)h(a)h Fm(Carbon.AE.AEDesc)e Fq(e)n(v)o(ent)h(to)h(Python)f(objects.)54 b(The)30 b(function)e(returns)h(the)h(parameter)208 2856 y(dictionary)18 b(and)i(the)g(attrib)n(ute)g(dictionary)-5 b(.)23 b(The)d Fm(formodulename)f Fq(ar)o(gument)f(is)j(used)f(by)g (generated)f(stub)h(packages)f(to)208 2956 y(control)g(where)g (AppleScript)g(classes)i(are)g(look)o(ed)d(up.)0 3102 y Fg(keysubst)p Fm(\()p Fn(ar)m(guments,)f(k)o(e)n(ydict)q Fm(\))208 3202 y Fq(Con)m(v)o(erts)d(a)j(Python)e(k)o(e)o(yw)o(ord)f (ar)o(gument)f(dictionary)i Fm(arguments)f Fq(to)i(the)g(format)f (required)g(by)g Fm(packevent)g Fq(by)h(replac-)208 3302 y(ing)22 b(the)h(k)o(e)o(ys,)f(which)h(are)f(Python)g(identi\002ers,)g (by)h(the)f(four)n(-character)e(OSA)j(k)o(e)o(ys)g(according)d(to)j (the)g(mapping)e(speci\002ed)208 3401 y(in)f Fm(keydict)p Fq(.)k(Used)c(by)g(the)g(generated)f(suite)h(packages.)0 3548 y Fg(enumsubst)p Fm(\()p Fn(ar)m(guments,)d(k)o(e)n(y)-5 b(,)20 b(edict)q Fm(\))208 3648 y Fq(If)f(the)g Fm(arguments)f Fq(dictionary)f(contains)h(an)h(entry)g(for)f Fm(key)h Fq(con)m(v)o(ert)e(the)j(v)n(alue)e(for)h(that)g(entry)f(according)f (to)i(dictionary)208 3747 y Fm(edict)p Fq(.)29 b(This)22 b(con)m(v)o(erts)e(human-readable)f(Python)h(enumeration)g(names)h(to)h (the)g(OSA)h(4-character)c(codes.)30 b(Used)22 b(by)g(the)208 3847 y(generated)c(suite)j(packages.)0 3994 y(The)f Fm(aetools)f Fq(module)g(de\002nes)h(the)g(follo)n(wing)f(class:)0 4141 y Fo(class)i Fg(TalkTo)p Fm(\()p Fe([)p Fn(signatur)m(e=None)o(,)c (start=0,)j(timeout=0)12 b Fe(])p Fm(\))208 4240 y Fq(Base)19 b(class)h(for)e(the)g(proxy)f(used)i(to)f(talk)h(to)g(an)f (application.)23 b Fm(signature)18 b Fq(o)o(v)o(errides)e(the)j(class)h (attrib)n(ute)e Fm(_signature)208 4340 y Fq(\(which)24 b(is)i(usually)e(set)i(by)f(subclasses\))g(and)f(is)i(the)f(4-char)f (creator)g(code)g(de\002ning)g(the)h(application)f(to)h(talk)g(to.)40 b Fm(start)208 4440 y Fq(can)20 b(be)h(set)g(to)g(true)g(to)g(enable)f (running)e(the)j(application)e(on)i(class)g(instantiation.)26 b Fm(timeout)20 b Fq(can)h(be)f(speci\002ed)h(to)g(change)208 4539 y(the)f(def)o(ault)f(timeout)h(used)g(while)g(w)o(aiting)g(for)f (an)i(AppleEv)o(ent)d(reply)-5 b(.)0 4686 y Fg(_start)p Fm(\(\))208 4786 y Fq(T)f(est)20 b(whether)g(the)g(application)f(is)i (running,)c(and)j(attempt)g(to)g(start)h(it)g(if)f(not.)0 4933 y Fg(send)p Fm(\()p Fn(code)o(,)e(subcode)p Fe([)p Fn(,)h(par)o(ameter)o(s,)g(attrib)n(utes)12 b Fe(])p Fm(\))208 5032 y Fq(Create)35 b(the)g(AppleEv)o(ent)e Fm(Carbon.AE.AEDesc)g Fq(for)h(the)h(v)o(erb)f(with)h(the)g(OSA)h (designation)d Fm(code,)49 b(subcode)208 5132 y Fq(\(which)29 b(are)i(the)g(usual)f(4-character)f(strings\),)k(pack)d(the)g Fm(parameters)g Fq(and)g Fm(attributes)f Fq(into)i(it,)j(send)c(it)i (to)f(the)208 5232 y(tar)o(get)18 b(application,)f(w)o(ait)j(for)e(the) h(reply)-5 b(,)18 b(unpack)f(the)i(reply)f(with)h Fm(unpackevent)f Fq(and)g(return)g(the)h(reply)f(applee)n(v)o(ent,)f(the)208 5331 y(unpack)o(ed)h(return)h(v)n(alues)g(as)i(a)g(dictionary)d(and)i (the)g(return)f(attrib)n(utes.)p 0 5549 3901 4 v 0 5649 a Fl(3.2.)52 b Fm(aetools)22 b Fl(\227)h(OSA)g(client)h(suppor)s(t)2445 b(21)p eop end %%Page: 22 28 TeXDict begin 22 27 bop 0 88 a Fi(3.3)121 b Ff(aepack)50 b Fi(\227)g(Con)n(v)m(ersion)j(betw)o(een)h(Python)f(v)m(ar)r(iab)n (les)e(and)i(AppleEv)m(ent)286 238 y(data)35 b(containers)0 470 y Fq(The)19 b Fm(aepack)g Fq(module)f(de\002nes)h(functions)f(for)h (con)m(v)o(erting)d(\(packing\))h(Python)i(v)n(ariables)f(to)i(AppleEv) o(ent)d(descriptors)h(and)h(back)0 570 y(\(unpacking\).)i(W)m(ithin)e (Python)e(the)i(AppleEv)o(ent)e(descriptor)g(is)j(handled)d(by)h (Python)g(objects)g(of)h(b)n(uilt-in)f(type)g Fm(AEDesc)p Fq(,)h(de\002ned)0 670 y(in)h(module)f Fm(Carbon.AE)p Fq(.)0 816 y(The)h Fm(aepack)f Fq(module)g(de\002nes)h(the)g(follo)n (wing)f(functions:)0 963 y Fg(pack)p Fm(\()p Fn(x)p Fe([)p Fn(,)g(for)m(cetype)12 b Fe(])p Fm(\))208 1063 y Fq(Returns)23 b(an)g Fm(AEDesc)g Fq(object)g(containing)e(a)j(con)m(v)o(ersion)d(of)i (Python)f(v)n(alue)h(x.)34 b(If)24 b Fn(for)m(cetype)e Fq(is)j(pro)o(vided)c(it)j(speci\002es)g(the)208 1163 y(descriptor)e(type)h(of)g(the)g(result.)35 b(Otherwise,)24 b(a)f(def)o(ault)g(mapping)f(of)h(Python)f(types)h(to)h(Apple)f(Ev)o (ent)f(descriptor)g(types)i(is)208 1262 y(used,)19 b(as)i(follo)n(ws:) 1267 1385 y Fo(Python)f(type)p 1742 1415 4 100 v 98 w(descriptor)g (type)p 1217 1418 1673 4 v 1267 1488 a Fm(FSSpec)p 1742 1518 4 100 v 226 w Fq(typeFSS)1267 1588 y Fm(FSRef)p 1742 1618 V 276 w Fq(typeFSRef)1267 1687 y Fm(Alias)p 1742 1717 V 276 w Fq(typeAlias)1267 1787 y(inte)o(ger)p 1742 1817 V 295 w(typeLong)e(\(32)i(bit)g(inte)o(ger\))1267 1887 y(\003oat)p 1742 1917 V 378 w(typeFloat)g(\(64)f(bit)i(\003oating) e(point\))1267 1986 y(string)p 1742 2016 V 336 w(typeT)-6 b(e)o(xt)1267 2086 y(unicode)p 1742 2116 V 261 w(typeUnicodeT)g(e)o(xt) 1267 2186 y(list)p 1742 2215 V 425 w(typeAEList)1267 2285 y(dictionary)p 1742 2315 V 187 w(typeAERecord)1267 2385 y(instance)p 1742 2415 V 253 w Fn(see)21 b(below)208 2513 y Fq(If)i Fn(x)i Fq(is)g(a)g(Python)d(instance)i(then)g(this)g (function)f(attempts)h(to)g(call)g(an)g Fm(__aepack__\(\))f Fq(method.)35 b(This)24 b(method)f(should)208 2612 y(return)c(an)h Fm(AEDesc)f Fq(object.)208 2745 y(If)25 b(the)h(con)m(v)o(ersion)e Fn(x)j Fq(is)f(not)g(de\002ned)f(abo)o(v)o(e,)h(this)g(function)f (returns)g(the)h(Python)f(string)g(representation)f(of)i(a)h(v)n(alue)e (\(the)208 2845 y(repr\(\))18 b(function\))g(encoded)h(as)i(a)f(te)o (xt)g(descriptor)-5 b(.)0 2992 y Fg(unpack)p Fm(\()p Fn(x)p Fe([)p Fn(,)19 b(formodulename)12 b Fe(])p Fm(\))208 3091 y Fn(x)j Fq(must)h(be)f(an)g(object)g(of)g(type)g Fm(AEDesc)p Fq(.)22 b(This)16 b(function)d(returns)i(a)g(Python)f (object)h(representation)e(of)i(the)g(data)g(in)h(the)f(Apple)208 3191 y(Ev)o(ent)g(descriptor)h Fn(x)p Fq(.)24 b(Simple)17 b(AppleEv)o(ent)e(data)h(types)h(\(inte)o(ger)m(,)f(te)o(xt,)h (\003oat\))f(are)h(returned)e(as)j(their)e(ob)o(vious)f(Python)h(coun-) 208 3291 y(terparts.)34 b(Apple)24 b(Ev)o(ent)e(lists)j(are)f(returned) e(as)i(Python)f(lists,)i(and)e(the)h(list)h(elements)e(are)h(recursi)n (v)o(ely)d(unpack)o(ed.)34 b(Object)208 3390 y(references)23 b(\(e)o(x.)37 b Fm(line)49 b(3)h(of)f(document)g(1)p Fq(\))24 b(are)h(returned)d(as)k(instances)e(of)h Fm (aetypes.ObjectSpecifier)p Fq(,)208 3490 y(unless)i Fm(formodulename)f Fq(is)i(speci\002ed.)46 b(AppleEv)o(ent)26 b(descriptors)g(with)i (descriptor)e(type)g(typeFSS)i(are)f(returned)f(as)208 3589 y Fm(FSSpec)h Fq(objects.)48 b(AppleEv)o(ent)26 b(record)h(descriptors)f(are)i(returned)f(as)h(Python)f(dictionaries,)i (with)f(4-character)e(string)208 3689 y(k)o(e)o(ys)19 b(and)h(elements)g(recursi)n(v)o(ely)e(unpack)o(ed.)208 3822 y(The)g(optional)g Fm(formodulename)f Fq(ar)o(gument)f(is)k(used)f (by)f(the)h(stub)g(packages)f(generated)f(by)h Fm(gensuitemodule)p Fq(,)f(and)208 3922 y(ensures)j(that)h(the)g(OSA)g(classes)h(for)e (object)h(speci\002ers)g(are)f(look)o(ed)g(up)g(in)h(the)g(correct)f (module.)26 b(This)21 b(ensures)f(that)h(if,)g(say)-5 b(,)208 4021 y(the)20 b(Finder)g(returns)g(an)h(object)f(speci\002er)g (for)g(a)h(windo)n(w)f(you)g(get)g(an)h(instance)f(of)g Fm(Finder.Window)f Fq(and)h(not)h(a)g(generic)208 4121 y Fm(aetypes.Window)p Fq(.)g(The)c(former)f(kno)n(ws)g(about)g(all)i (the)f(properties)f(and)h(elements)f(a)i(windo)n(w)e(has)i(in)f(the)g (Finder)m(,)g(while)208 4220 y(the)j(latter)g(kno)n(ws)g(no)f(such)h (things.)0 4367 y Fo(See)h(Also:)0 4514 y Fq(Module)e Fm(Carbon.AE)g Fq(\(section)h(4.1\):)208 4614 y(Built-in)g(access)g(to) h(Apple)e(Ev)o(ent)h(Manager)e(routines.)0 4761 y(Module)h Fm(aetypes)g Fq(\(section)h(3.4\):)208 4860 y(Python)f(de\002nitions)g (of)h(codes)g(for)f(Apple)h(Ev)o(ent)f(descriptor)g(types.)21 5007 y Fn(Inside)g(Macintosh:)24 b(Inter)o(application)17 b(Communication)0 5107 y Fb(\()p Fr(http://de)n(v)n(eloper)l(.app)o(le) n(.com/te)o(chpu)o(bs/mac/IA)m(C/IA)n(C)o(-2.h)o(tml)-6 b Fb(\))208 5206 y Fq(Information)17 b(about)i(inter)n(-process)g (communications)f(on)h(the)i(Macintosh.)p 0 5549 3901 4 v 0 5649 a Fl(22)2395 b(Chapter)24 b(3.)51 b(MacPython)24 b(OSA)f(Modules)p eop end %%Page: 23 29 TeXDict begin 23 28 bop 0 86 a Fi(3.4)121 b Ff(aetypes)31 b Fi(\227)i(AppleEv)m(ent)h(objects)0 319 y Fq(The)20 b Fm(aetypes)f Fq(de\002nes)h(classes)i(used)d(to)i(represent)e(Apple)h (Ev)o(ent)f(data)h(descriptors)f(and)g(Apple)h(Ev)o(ent)f(object)h (speci\002ers.)0 466 y(Apple)h(Ev)o(ent)f(data)h(is)i(contained)d(in)h (descriptors,)f(and)h(these)h(descriptors)e(are)h(typed.)28 b(F)o(or)21 b(man)o(y)f(descriptors)g(the)i(Python)e(repre-)0 566 y(sentation)e(is)h(simply)f(the)h(corresponding)14 b(Python)k(type:)24 b Fm(typeText)17 b Fq(in)i(OSA)g(is)g(a)g(Python)e (string,)h Fm(typeFloat)g Fq(is)h(a)g(\003oat,)f(etc.)0 665 y(F)o(or)j(OSA)g(types)g(that)g(ha)n(v)o(e)g(no)f(direct)h(Python)f (counterpart)f(this)i(module)f(declares)g(classes.)29 b(P)o(acking)20 b(and)g(unpacking)f(instances)0 765 y(of)h(these)g (classes)i(is)f(handled)d(automatically)h(by)h Fm(aepack)p Fq(.)0 912 y(An)h(object)f(speci\002er)h(is)g(essentially)g(an)g (address)f(of)g(an)h(object)f(implemented)f(in)i(a)g(Apple)f(Ev)o(ent)g (serv)o(er)-5 b(.)26 b(An)21 b(Apple)f(Ev)o(ent)g(spec-)0 1011 y(i\002er)30 b(is)h(used)e(as)h(the)g(direct)f(object)g(for)g(an)h (Apple)f(Ev)o(ent)g(or)g(as)h(the)g(ar)o(gument)d(of)j(an)f(optional)g (parameter)-5 b(.)52 b(The)29 b Fm(aetypes)0 1111 y Fq(module)j (contains)g(the)i(base)f(classes)h(for)f(OSA)h(classes)g(and)f (properties,)i(which)d(are)h(used)g(by)g(the)g(packages)f(generated)g (by)0 1211 y Fm(gensuitemodule)18 b Fq(to)i(populate)f(the)h(classes)i (and)d(properties)g(in)h(a)h(gi)n(v)o(en)e(suite.)0 1358 y(F)o(or)j(reasons)f(of)h(backw)o(ard)f(compatibility)-5 b(,)20 b(and)i(for)f(cases)i(where)e(you)h(need)f(to)h(script)g(an)h (application)d(for)i(which)f(you)g(ha)n(v)o(e)h(not)0 1457 y(generated)e(the)i(stub)g(package)e(this)j(module)d(also)j (contains)e(object)g(speci\002ers)h(for)g(a)g(number)e(of)i(common)e (OSA)i(classes)h(such)f(as)0 1557 y Fm(Document)p Fq(,)d Fm(Window)p Fq(,)g Fm(Character)p Fq(,)g(etc.)0 1704 y(The)h Fm(AEObjects)f Fq(module)g(de\002nes)h(the)g(follo)n(wing)e (classes)k(to)e(represent)f(Apple)h(Ev)o(ent)f(descriptor)g(data:)0 1851 y Fo(class)i Fg(Unknown)p Fm(\()p Fn(type)o(,)d(data)p Fm(\))208 1950 y Fq(The)h(representation)f(of)i(OSA)h(descriptor)d (data)i(for)f(which)h(the)g Fm(aepack)f Fq(and)h Fm(aetypes)f Fq(modules)g(ha)n(v)o(e)h(no)f(support,)g(i.e.)208 2050 y(an)o(ything)f(that)i(is)h(not)f(represented)e(by)i(the)g(other)g (classes)h(here)f(and)f(that)i(is)g(not)f(equi)n(v)n(alent)e(to)i(a)h (simple)f(Python)f(v)n(alue.)0 2197 y Fo(class)i Fg(Enum)p Fm(\()p Fn(enum)p Fm(\))208 2296 y Fq(An)f(enumeration)e(v)n(alue)h (with)h(the)h(gi)n(v)o(en)e(4-character)f(string)i(v)n(alue.)0 2443 y Fo(class)h Fg(InsertionLoc)p Fm(\()p Fn(of)o(,)d(pos)p Fm(\))208 2543 y Fq(Position)i Fm(pos)g Fq(in)g(object)g Fm(of)p Fq(.)0 2690 y Fo(class)h Fg(Boolean)p Fm(\()p Fn(bool)p Fm(\))208 2789 y Fq(A)f(boolean.)0 2936 y Fo(class)h Fg(StyledText)p Fm(\()p Fn(style)o(,)e(te)n(xt)q Fm(\))208 3036 y Fq(T)-6 b(e)o(xt)19 b(with)i(style)f(information)e(\(font,)h(f)o (ace,)h(etc\))g(included.)0 3183 y Fo(class)h Fg(AEText)p Fm(\()p Fn(script,)e(style)o(,)i(te)n(xt)q Fm(\))208 3282 y Fq(T)-6 b(e)o(xt)19 b(with)i(script)f(system)g(and)g(style)h (information)c(included.)0 3429 y Fo(class)k Fg(IntlText)p Fm(\()p Fn(script,)e(langua)o(g)o(e)o(,)f(te)n(xt)q Fm(\))208 3529 y Fq(T)-6 b(e)o(xt)19 b(with)i(script)f(system)g(and)g(language)f (information)e(included.)0 3676 y Fo(class)k Fg(IntlWritingCode)p Fm(\()p Fn(script,)c(langua)o(g)o(e)p Fm(\))208 3775 y Fq(Script)j(system)g(and)g(language)e(information.)0 3922 y Fo(class)j Fg(QDPoint)p Fm(\()p Fn(v)-6 b(,)19 b(h)p Fm(\))208 4022 y Fq(A)h(quickdra)o(w)e(point.)0 4169 y Fo(class)j Fg(QDRectangle)p Fm(\()p Fn(v0,)c(h0,)j(v1,)g(h1)p Fm(\))208 4268 y Fq(A)g(quickdra)o(w)e(rectangle.)0 4415 y Fo(class)j Fg(RGBColor)p Fm(\()p Fn(r)-9 b(,)19 b(g)o(,)h(b)p Fm(\))208 4515 y Fq(A)g(color)-5 b(.)0 4662 y Fo(class)21 b Fg(Type)p Fm(\()p Fn(type)p Fm(\))208 4761 y Fq(An)f(OSA)h(type)e(v)n (alue)h(with)g(the)g(gi)n(v)o(en)f(4-character)f(name.)0 4908 y Fo(class)j Fg(Keyword)p Fm(\()p Fn(name)p Fm(\))208 5008 y Fq(An)f(OSA)h(k)o(e)o(yw)o(ord)d(with)i(the)g(gi)n(v)o(en)f (4-character)f(name.)0 5155 y Fo(class)j Fg(Range)p Fm(\()p Fn(start,)e(stop)p Fm(\))208 5254 y Fq(A)h(range.)p 0 5549 3901 4 v 0 5649 a Fl(3.4.)52 b Fm(aetypes)22 b Fl(\227)h(AppleEv)n (ent)i(objects)2431 b(23)p eop end %%Page: 24 30 TeXDict begin 24 29 bop 0 83 a Fo(class)21 b Fg(Ordinal)p Fm(\()p Fn(abso)p Fm(\))208 183 y Fq(Non-numeric)c(absolute)i (positions,)h(such)g(as)h Fm("firs")p Fq(,)e(\002rst,)i(or)f Fm("midd")p Fq(,)f(middle.)0 330 y Fo(class)i Fg(Logical)p Fm(\()p Fn(lo)o(gc,)d(term)p Fm(\))208 429 y Fq(The)h(logical)h(e)o (xpression)f(of)h(applying)e(operator)g Fm(logc)i Fq(to)h Fm(term)p Fq(.)0 576 y Fo(class)g Fg(Comparison)p Fm(\()p Fn(obj1,)c(r)m(elo,)j(obj2)p Fm(\))208 676 y Fq(The)f(comparison)g Fm(relo)h Fq(of)f Fm(obj1)h Fq(to)h Fm(obj2)p Fq(.)0 823 y(The)k(follo)n(wing)g(classes)i(are)e(used)h(as)g(base)g(classes)h (by)f(the)f(generated)g(stub)g(packages)g(to)h(represent)f(AppleScript) f(classes)j(and)0 922 y(properties)19 b(in)h(Python:)0 1069 y Fo(class)h Fg(ComponentItem)p Fm(\()p Fn(whic)o(h)p Fe([)p Fn(,)c(fr)d Fe(])p Fm(\))208 1169 y Fq(Abstract)23 b(baseclass)g(for)g(an)g(OSA)h(class.)35 b(The)23 b(subclass)h(should)e (set)i(the)g(class)g(attrib)n(ute)f Fm(want)g Fq(to)g(the)h (4-character)d(OSA)208 1268 y(class)h(code.)28 b(Instances)21 b(of)g(subclasses)h(of)f(this)h(class)g(are)f(equi)n(v)n(alent)f(to)h (AppleScript)g(Object)g(Speci\002ers.)28 b(Upon)21 b(instanti-)208 1368 y(ation)e(you)h(should)f(pass)i(a)f(selector)g(in)g Fm(which)p Fq(,)g(and)g(optionally)e(a)j(parent)e(object)h(in)g Fm(fr)p Fq(.)0 1515 y Fo(class)h Fg(NProperty)p Fm(\()p Fn(fr)r Fm(\))208 1614 y Fq(Abstract)31 b(baseclass)h(for)f(an)g(OSA)i (property)-5 b(.)56 b(The)31 b(subclass)h(should)f(set)h(the)g(class)g (attrib)n(utes)g Fm(want)f Fq(and)g Fm(which)g Fq(to)208 1714 y(designate)19 b(which)h(property)e(we)i(are)g(talking)g(about.)k (Instances)19 b(of)h(subclasses)h(of)f(this)g(class)i(are)e(Object)g (Speci\002ers.)0 1861 y Fo(class)h Fg(ObjectSpecifier)p Fm(\()p Fn(want,)c(form,)j(seld)r Fe([)p Fn(,)g(fr)14 b Fe(])p Fm(\))208 1961 y Fq(Base)32 b(class)h(of)e Fm(ComponentItem)e Fq(and)i Fm(NProperty)p Fq(,)j(a)d(general)g(OSA)h(Object)f (Speci\002er)-5 b(.)60 b(See)32 b(the)f(Apple)g(Open)208 2060 y(Scripting)19 b(Architecture)f(documentation)g(for)h(the)h (parameters.)k(Note)c(that)h(this)f(class)h(is)h(not)d(abstract.)0 2386 y Fi(3.5)121 b Ff(MiniAEFrame)30 b Fi(\227)j(Open)h(Scr)r(ipting)g (Architecture)g(ser)t(v)m(er)e(suppor)5 b(t)0 2618 y Fq(The)29 b(module)g Fm(MiniAEFrame)f Fq(pro)o(vides)g(a)i(frame)n(w)o (ork)e(for)h(an)h(application)e(that)i(can)f(function)f(as)j(an)f(Open) f(Scripting)f(Ar)n(-)0 2718 y(chitecture)d(\(OSA\))h(serv)o(er)m(,)g (i.e.)42 b(recei)n(v)o(e)25 b(and)h(process)f(AppleEv)o(ents.)41 b(It)26 b(can)g(be)f(used)h(in)g(conjunction)e(with)i Fm(FrameWork)f Fq(or)0 2818 y(standalone.)f(As)d(an)f(e)o(xample,)e(it) j(is)g(used)f(in)h Fo(PythonCGISla)n(v)o(e)p Fq(.)0 2964 y(The)f Fm(MiniAEFrame)f Fq(module)f(de\002nes)i(the)h(follo)n(wing)d (classes:)0 3111 y Fo(class)j Fg(AEServer)p Fm(\(\))208 3211 y Fq(A)32 b(class)h(that)f(handles)f(AppleEv)o(ent)e(dispatch.)59 b(Y)-9 b(our)31 b(application)g(should)f(subclass)i(this)h(class)g (together)d(with)i(either)208 3311 y Fm(MiniApplication)c Fq(or)j Fm(FrameWork.Application)p Fq(.)53 b(Y)-9 b(our)30 b Fm(__init__\(\))f Fq(method)h(should)g(call)h(the)g Fm(__-)208 3410 y(init__\(\))19 b Fq(method)g(for)g(both)h(classes.)0 3557 y Fo(class)h Fg(MiniApplication)p Fm(\(\))208 3657 y Fq(A)31 b(class)h(that)e(is)i(more)e(or)h(less)h(compatible)d(with)i Fm(FrameWork.Application)c Fq(b)n(ut)k(with)g(less)h(functionality)-5 b(.)54 b(Its)208 3756 y(e)n(v)o(ent)22 b(loop)g(supports)g(the)h(apple) g(menu,)g(command-dot)d(and)i(AppleEv)o(ents;)h(other)g(e)n(v)o(ents)f (are)h(passed)g(on)g(to)h(the)f(Python)208 3856 y(interpreter)29 b(and/or)g(Sioux.)56 b(Useful)30 b(if)h(your)f(application)f(w)o(ants)i (to)g(use)g Fm(AEServer)e Fq(b)n(ut)i(does)f(not)h(pro)o(vide)d(its)k (o)n(wn)208 3956 y(windo)n(ws,)19 b(etc.)0 4238 y Fh(3.5.1)100 b(AESer)s(v)n(er)30 b(Objects)0 4425 y Fg(installaehandler)p Fm(\()p Fn(classe)o(,)17 b(type)o(,)j(callbac)n(k)q Fm(\))208 4525 y Fq(Installs)c(an)f(AppleEv)o(ent)f(handler)-5 b(.)23 b Fn(classe)16 b Fq(and)f Fn(type)h Fq(are)f(the)h(four)n (-character)d(OSA)j(Class)h(and)f(T)-7 b(ype)15 b(designators,)g Fm(')3651 4540 y(****)3851 4525 y(')208 4624 y Fq(wildcards)k(are)i (allo)n(wed.)k(When)20 b(a)h(matching)e(AppleEv)o(ent)g(is)i(recei)n(v) o(ed)e(the)i(parameters)e(are)h(decoded)f(and)h(your)f(callback)208 4724 y(is)i(in)m(v)n(ok)o(ed.)0 4871 y Fg(callback)p Fm(\()p 455 4871 25 4 v 28 w Fn(object,)f(**kwar)m(gs)p Fm(\))208 4971 y Fq(Y)-9 b(our)29 b(callback)g(is)i(called)f(with)h (the)f(OSA)h(Direct)f(Object)g(as)h(\002rst)g(positional)e(parameter)-5 b(.)54 b(The)30 b(other)g(parameters)f(are)208 5070 y(passed)d(as)h(k)o (e)o(yw)o(ord)e(ar)o(guments,)h(with)h(the)f(4-character)f(designator)g (as)i(name.)44 b(Three)26 b(e)o(xtra)f(k)o(e)o(yw)o(ord)g(parameters)h (are)208 5170 y(passed:)31 b Fm(_class)23 b Fq(and)f Fm(_type)h Fq(are)g(the)h(Class)h(and)d(T)-7 b(ype)23 b(designators)f(and)h Fm(_attributes)f Fq(is)i(a)g(dictionary)d(with)j (the)208 5269 y(AppleEv)o(ent)18 b(attrib)n(utes.)208 5400 y(The)h(return)g(v)n(alue)h(of)g(your)f(method)g(is)i(pack)o(ed)e (with)h Fm(aetools.packevent\(\))d Fq(and)j(sent)g(as)h(reply)-5 b(.)p 0 5549 3901 4 v 0 5649 a Fl(24)2395 b(Chapter)24 b(3.)51 b(MacPython)24 b(OSA)f(Modules)p eop end %%Page: 25 31 TeXDict begin 25 30 bop 0 83 a Fq(Note)19 b(that)g(there)f(are)h(some)f (serious)h(problems)e(with)i(the)g(current)e(design.)24 b(AppleEv)o(ents)17 b(which)h(ha)n(v)o(e)g(non-identi\002er)f (4-character)0 183 y(designators)22 b(for)h(ar)o(guments)f(are)h(not)g (implementable,)f(and)h(it)i(is)f(not)f(possible)h(to)f(return)g(an)g (error)f(to)i(the)g(originator)-5 b(.)33 b(This)24 b(will)0 282 y(be)c(addressed)f(in)i(a)f(future)f(release.)p 0 5549 3901 4 v 0 5649 a Fl(3.5.)52 b Fm(MiniAEFrame)21 b Fl(\227)i(Open)g(Scr)q(ipting)i(Architecture)e(ser)r(v)n(er)f(suppor) s(t)1367 b(25)p eop end %%Page: 26 32 TeXDict begin 26 31 bop 0 5549 3901 4 v 0 5649 a Fl(26)p eop end %%Page: 27 33 TeXDict begin 27 32 bop 0 83 3901 9 v 3503 230 a Fl(CHAPTER)3561 427 y Fk(FOUR)p 0 515 V 1555 978 a Fw(MacOS)57 b(T)-25 b(oolbo)-6 b(x)57 b(Modules)0 1457 y Fq(There)23 b(are)g(a)h(set)g(of)g (modules)e(that)i(pro)o(vide)d(interf)o(aces)i(to)h(v)n(arious)e(MacOS) i(toolbox)o(es.)33 b(If)23 b(applicable)f(the)i(module)e(will)i (de\002ne)0 1556 y(a)e(number)d(of)i(Python)f(objects)h(for)f(the)h(v)n (arious)f(structures)h(declared)e(by)i(the)g(toolbox,)f(and)g (operations)g(will)i(be)f(implemented)e(as)0 1656 y(methods)i(of)h(the) h(object.)31 b(Other)22 b(operations)f(will)i(be)f(implemented)e(as)k (functions)d(in)h(the)g(module.)31 b(Not)22 b(all)h(operations)e (possible)0 1756 y(in)28 b(C)g(will)g(also)g(be)f(possible)g(in)h (Python)e(\(callbacks)h(are)g(often)g(a)h(problem\),)f(and)f (parameters)h(will)h(occasionally)e(be)h(dif)n(ferent)0 1855 y(in)c(Python)g(\(input)f(and)h(output)f(b)n(uf)n(fers,)h (especially\).)33 b(All)24 b(methods)e(and)h(functions)f(ha)n(v)o(e)h (a)g Fm(__doc__)g Fq(string)g(describing)f(their)0 1955 y(ar)o(guments)c(and)i(return)f(v)n(alues,)g(and)h(for)g(additional)e (description)h(you)g(are)h(referred)f(to)h Fn(Inside)g(Macintosh)f Fq(or)h(similar)g(w)o(orks.)0 2102 y(These)f(modules)g(all)h(li)n(v)o (e)f(in)h(a)f(package)g(called)g Fm(Carbon)p Fq(.)24 b(Despite)c(that)f(name)g(the)o(y)g(are)g(not)g(all)h(part)f(of)h(the)f (Carbon)g(frame)n(w)o(ork:)0 2201 y(CF)i(is)g(really)f(in)h(the)f (CoreF)o(oundation)d(frame)n(w)o(ork)h(and)i(Qt)g(is)i(in)e(the)g (QuickT)m(ime)f(frame)n(w)o(ork.)k(The)d(normal)f(use)h(pattern)f(is) 236 2348 y Fa(from)44 b(Carbon)g(import)g(AE)0 2635 y Fo(W)-5 b(ar)o(ning!)27 b Fq(These)22 b(modules)e(are)h(not)g(yet)g (documented.)26 b(If)21 b(you)f(wish)i(to)g(contrib)n(ute)d (documentation)g(of)i(an)o(y)f(of)h(these)h(modules,)0 2735 y(please)e(get)g(in)h(touch)e(with)h Fr(docs@p)n(ython.org)p Fq(.)50 2878 y Fg(Carbon.AE)446 b Fq(Interf)o(ace)19 b(to)i(the)f(Apple)g(Ev)o(ents)f(toolbox.)50 2978 y Fg(Carbon.AH)446 b Fq(Interf)o(ace)19 b(to)i(the)f(Apple)g(Help)g(manager)-5 b(.)50 3077 y Fg(Carbon.App)396 b Fq(Interf)o(ace)19 b(to)i(the)f(Appearance)e(Manager)-5 b(.)50 3177 y Fg(Carbon.CF)446 b Fq(Interf)o(ace)19 b(to)i(the)f(Core)g(F)o(oundation.)50 3277 y Fg(Carbon.CG)446 b Fq(Interf)o(ace)19 b(to)i(the)f(Component)e (Manager)-5 b(.)50 3376 y Fg(Carbon.CarbonEvt)96 b Fq(Interf)o(ace)19 b(to)i(the)f(Carbon)f(Ev)o(ent)g(Manager)-5 b(.)50 3476 y Fg(Carbon.Cm)446 b Fq(Interf)o(ace)19 b(to)i(the)f(Component)e (Manager)-5 b(.)50 3576 y Fg(Carbon.Ctl)396 b Fq(Interf)o(ace)19 b(to)i(the)f(Control)f(Manager)-5 b(.)50 3675 y Fg(Carbon.Dlg)396 b Fq(Interf)o(ace)19 b(to)i(the)f(Dialog)g(Manager)-5 b(.)50 3775 y Fg(Carbon.Evt)396 b Fq(Interf)o(ace)19 b(to)i(the)f(classic)h(Ev)o(ent)e(Manager)-5 b(.)50 3874 y Fg(Carbon.Fm)446 b Fq(Interf)o(ace)19 b(to)i(the)f(F)o(ont)g(Manager) -5 b(.)50 3974 y Fg(Carbon.Folder)246 b Fq(Interf)o(ace)19 b(to)i(the)f(F)o(older)f(Manager)-5 b(.)50 4074 y Fg(Carbon.Help)346 b Fq(Interf)o(ace)19 b(to)i(the)f(Carbon)f(Help)h(Manager)-5 b(.)50 4173 y Fg(Carbon.List)346 b Fq(Interf)o(ace)19 b(to)i(the)f(List)h(Manager)-5 b(.)50 4273 y Fg(Carbon.Menu)346 b Fq(Interf)o(ace)19 b(to)i(the)f(Menu)f(Manager)-5 b(.)50 4373 y Fg(Carbon.Mlte)346 b Fq(Interf)o(ace)19 b(to)i(the)f (MultiLingual)e(T)-6 b(e)o(xt)20 b(Editor)-5 b(.)50 4472 y Fg(Carbon.Qd)446 b Fq(Interf)o(ace)19 b(to)i(the)f(QuickDra)o(w)f (toolbox.)50 4572 y Fg(Carbon.Qdoffs)246 b Fq(Interf)o(ace)19 b(to)i(the)f(QuickDra)o(w)f(Of)n(fscreen)g(APIs.)50 4671 y Fg(Carbon.Qt)446 b Fq(Interf)o(ace)19 b(to)i(the)f(QuickT)m(ime)f (toolbox.)50 4771 y Fg(Carbon.Res)396 b Fq(Interf)o(ace)19 b(to)i(the)f(Resource)g(Manager)e(and)i(Handles.)50 4871 y Fg(Carbon.Scrap)296 b Fq(Interf)o(ace)19 b(to)i(the)f(Carbon)f(Scrap) h(Manager)-5 b(.)50 4970 y Fg(Carbon.Snd)396 b Fq(Interf)o(ace)19 b(to)i(the)f(Sound)f(Manager)-5 b(.)50 5070 y Fg(Carbon.TE)446 b Fq(Interf)o(ace)19 b(to)i(T)-6 b(e)o(xtEdit.)50 5170 y Fg(Carbon.Win)396 b Fq(Interf)o(ace)19 b(to)i(the)f(W)m(indo)n(w)f (Manager)-5 b(.)50 5269 y Fg(ColorPicker)346 b Fq(Interf)o(ace)19 b(to)i(the)f(standard)f(color)g(selection)h(dialog.)p 0 5549 3901 4 v 3808 5649 a Fl(27)p eop end %%Page: 28 34 TeXDict begin 28 33 bop 0 86 a Fi(4.1)121 b Ff(Carbon.AE)31 b Fi(\227)h(Apple)i(Ev)m(ents)0 369 y(4.2)121 b Ff(Carbon.AH)31 b Fi(\227)h(Apple)i(Help)0 652 y(4.3)121 b Ff(Carbon.App)30 b Fi(\227)j(Appear)o(ance)j(Manager)0 934 y(4.4)121 b Ff(Carbon.CF)31 b Fi(\227)h(Core)j(F)l(oundation)0 1167 y Fq(The)29 b Fm(CFBase)p Fq(,)i Fm(CFArray)p Fq(,)f Fm(CFData)p Fq(,)h Fm(CFDictionary)p Fq(,)e Fm(CFString)g Fq(and)f Fm(CFURL)h Fq(objects)g(are)g(supported,)g(some)g(only)0 1267 y(partially)-5 b(.)p 0 5549 3901 4 v 0 5649 a Fl(28)2426 b(Chapter)24 b(4.)51 b(MacOS)23 b(T)-10 b(oolbo)n(x)23 b(Modules)p eop end %%Page: 29 35 TeXDict begin 29 34 bop 0 88 a Fi(4.5)121 b Ff(Carbon.CG)31 b Fi(\227)h(Core)j(Gr)o(aphics)0 371 y(4.6)121 b Ff(Carbon.CarbonEvt)29 b Fi(\227)j(Carbon)k(Ev)m(ent)e(Manager)0 653 y(4.7)121 b Ff(Carbon.Cm)31 b Fi(\227)h(Component)37 b(Manager)0 936 y(4.8)121 b Ff(Carbon.Ctl)30 b Fi(\227)j(Control)i(Manager)0 1219 y(4.9)121 b Ff(Carbon.Dlg)30 b Fi(\227)j(Dialog)h(Manager)0 1501 y(4.10)121 b Ff(Carbon.Evt)31 b Fi(\227)i(Ev)m(ent)g(Manager)0 1784 y(4.11)121 b Ff(Carbon.Fm)31 b Fi(\227)i(F)l(ont)i(Manager)0 2066 y(4.12)121 b Ff(Carbon.Folder)30 b Fi(\227)j(F)l(older)h(Manager)0 2349 y(4.13)121 b Ff(Carbon.Help)30 b Fi(\227)j(Help)h(Manager)0 2632 y(4.14)121 b Ff(Carbon.List)30 b Fi(\227)j(List)h(Manager)0 2914 y(4.15)121 b Ff(Carbon.Menu)30 b Fi(\227)j(Men)o(u)h(Manager)0 3197 y(4.16)121 b Ff(Carbon.Mlte)30 b Fi(\227)j(MultiLingual)h(T)-14 b(e)l(xt)34 b(Editor)0 3479 y(4.17)121 b Ff(Carbon.Qd)31 b Fi(\227)i(Quic)n(kDr)o(a)n(w)0 3762 y(4.18)121 b Ff(Carbon.Qdoffs)30 b Fi(\227)j(Quic)n(kDr)o(a)n(w)f(Offscreen)0 4045 y(4.19)121 b Ff(Carbon.Qt)31 b Fi(\227)i(Quic)n(kTime)0 4327 y(4.20)121 b Ff(Carbon.Res)31 b Fi(\227)i(Resource)h(Manager)h(and)g(Handles)0 4610 y(4.21)121 b Ff(Carbon.Scrap)30 b Fi(\227)j(Scr)o(ap)g(Manager)0 4892 y(4.22)121 b Ff(Carbon.Snd)31 b Fi(\227)i(Sound)h(Manager)0 5175 y(4.23)121 b Ff(Carbon.TE)31 b Fi(\227)i(T)-14 b(e)l(xtEdit)0 5458 y(4.24)121 b Ff(Carbon.Win)31 b Fi(\227)i(Windo)n(w)h(Manager)0 5740 y(4.25)121 b Ff(ColorPicker)30 b Fi(\227)j(Color)h(selection)g (dialog)0 5973 y Fq(The)20 b Fm(ColorPicker)f Fq(module)f(pro)o(vides)h (access)i(to)f(the)g(standard)f(color)h(pick)o(er)f(dialog.)p 0 5549 3901 4 v 0 5649 a Fl(4.5.)52 b Fm(Carbon.CG)22 b Fl(\227)h(Core)g(Gr)o(aphics)2505 b(29)p eop end %%Page: 30 36 TeXDict begin 30 35 bop 0 83 a Fg(GetColor)p Fm(\()p Fn(pr)l(ompt,)18 b(r)m(gb)p Fm(\))208 183 y Fq(Sho)n(w)j(a)h(standard)e (color)h(selection)g(dialog)g(and)g(allo)n(w)h(the)f(user)h(to)f (select)i(a)f(color)-5 b(.)28 b(The)22 b(user)f(is)i(gi)n(v)o(en)d (instruction)g(by)i(the)208 282 y Fn(pr)l(ompt)e Fq(string,)e(and)h (the)g(def)o(ault)f(color)g(is)i(set)f(to)g Fn(r)m(gb)p Fq(.)25 b Fn(r)m(gb)18 b Fq(must)h(be)g(a)h(tuple)e(gi)n(ving)g(the)h (red,)f(green,)g(and)g(blue)h(components)208 382 y(of)24 b(the)g(color)-5 b(.)37 b Fm(GetColor\(\))23 b Fq(returns)h(a)h(tuple)f (gi)n(ving)f(the)h(user')-5 b(s)25 b(selected)f(color)g(and)g(a)g (\003ag)h(indicating)e(whether)g(the)o(y)208 482 y(accepted)c(the)h (selection)g(of)g(cancelled.)p 0 5549 3901 4 v 0 5649 a Fl(30)2426 b(Chapter)24 b(4.)51 b(MacOS)23 b(T)-10 b(oolbo)n(x)23 b(Modules)p eop end %%Page: 31 37 TeXDict begin 31 36 bop 0 83 3901 9 v 3503 230 a Fl(CHAPTER)3634 427 y Fk(FIVE)p 0 515 V 1604 978 a Fw(Undocumented)57 b(Modules)0 1457 y Fq(The)19 b(modules)g(in)h(this)g(chapter)e(are)i (poorly)e(documented)f(\(if)j(at)g(all\).)25 b(If)19 b(you)g(wish)h(to)g(contrib)n(ute)e(documentation)f(of)i(an)o(y)g(of)g (these)0 1556 y(modules,)g(please)h(get)g(in)h(touch)e(with)h Fr(docs@p)n(ython.org)p Fq(.)50 1700 y Fg(applesingle)197 b Fq(Rudimentary)18 b(decoder)h(for)g(AppleSingle)g(format)g(\002les.) 50 1799 y Fg(buildtools)247 b Fq(Helper)20 b(module)e(for)i (BuildApplet,)f(BuildApplication)f(and)i(macfreeze.)50 1899 y Fg(cfmfile)397 b Fq(Code)20 b(Fragment)f(Resource)h(module.)50 1998 y Fg(icopen)447 b Fq(Internet)19 b(Con\002g)h(replacement)e(for)i Fm(open\(\))p Fq(.)50 2098 y Fg(macerrors)297 b Fq(Constant)20 b(de\002nitions)f(for)h(man)o(y)f(Mac)h(OS)h(error)e(codes.)50 2198 y Fg(macresource)197 b Fq(Locate)20 b(script)g(resources.)50 2297 y Fg(Nav)597 b Fq(Interf)o(ace)19 b(to)h(Na)n(vigation)f (Services.)50 2397 y Fg(PixMapWrapper)97 b Fq(Wrapper)19 b(for)h(PixMap)f(objects.)50 2497 y Fg(videoreader)197 b Fq(Read)20 b(QuickT)m(ime)f(mo)o(vies)h(frame)f(by)h(frame)f(for)h (further)e(processing.)50 2596 y Fg(W)697 b Fq(W)m(idgets)20 b(for)g(the)g(Mac,)g(b)n(uilt)g(on)g(top)g(of)g Fm(FrameWork)p Fq(.)0 2900 y Fi(5.1)121 b Ff(applesingle)30 b Fi(\227)j(AppleSingle)h (decoder)0 3183 y(5.2)121 b Ff(buildtools)30 b Fi(\227)j(Helper)h (module)h(f)l(or)f(BuildApplet)g(and)g(F)-5 b(r)r(iends)0 3416 y Fo(Depr)o(ecated)19 b(since)i(r)o(elease)f(2.4.)0 3743 y Fi(5.3)121 b Ff(cfmfile)31 b Fi(\227)i(Code)i(F)-5 b(r)o(agment)34 b(Resource)h(module)0 3976 y Fm(cfmfile)24 b Fq(is)h(a)g(module)e(that)h(understands)e(Code)j(Fragments)e(and)h (the)g(accompan)o(ying)d(\223cfr)o(g\224)i(resources.)36 b(It)25 b(can)f(parse)g(them)0 4076 y(and)c(mer)o(ge)e(them,)i(and)g (is)h(used)f(by)f(BuildApplication)g(to)h(combine)f(all)i(plugin)d (modules)i(to)g(a)h(single)f(e)o(x)o(ecutable.)0 4223 y Fo(Depr)o(ecated)f(since)i(r)o(elease)f(2.4.)0 4550 y Fi(5.4)121 b Ff(icopen)31 b Fi(\227)i(Inter)s(net)j(Con\002g)e (replacement)h(f)l(or)g Ff(open\(\))0 4783 y Fq(Importing)15 b Fm(icopen)j Fq(will)g(replace)f(the)h(b)n(uiltin)g Fm(open\(\))f Fq(with)h(a)g(v)o(ersion)f(that)h(uses)g(Internet)e (Con\002g)i(to)g(set)g(\002le)h(type)e(and)h(creator)0 4882 y(for)i(ne)n(w)g(\002les.)p 0 5549 3901 4 v 3808 5649 a Fl(31)p eop end %%Page: 32 38 TeXDict begin 32 37 bop 0 88 a Fi(5.5)121 b Ff(macerrors)31 b Fi(\227)h(Mac)h(OS)g(Errors)0 321 y Fm(macerrors)19 b Fq(contains)h(constant)f(de\002nitions)g(for)h(man)o(y)f(Mac)h(OS)h (error)e(codes.)0 648 y Fi(5.6)121 b Ff(macresource)30 b Fi(\227)j(Locate)i(scr)r(ipt)e(resources)0 881 y Fm(macresource)20 b Fq(helps)h(scripts)h(\002nding)e(their)i(resources,)e(such)i(as)g (dialogs)f(and)g(menus,)g(without)f(requiring)g(special)h(case)h(code)0 981 y(for)e(when)f(the)h(script)h(is)g(run)e(under)g(MacPython,)f(as)j (a)g(MacPython)d(applet)i(or)g(under)f(OSX)i(Python.)0 1308 y Fi(5.7)121 b Ff(Nav)32 b Fi(\227)h(Na)n(vSer)t(vices)f(calls)0 1541 y Fq(A)21 b(lo)n(w-le)n(v)o(el)e(interf)o(ace)g(to)h(Na)n (vigation)f(Services.)0 1868 y Fi(5.8)121 b Ff(PixMapWrapper)29 b Fi(\227)k(Wr)o(apper)i(f)l(or)f(PixMap)f(objects)0 2101 y Fm(PixMapWrapper)21 b Fq(wraps)h(a)i(PixMap)e(object)g(with)h(a) g(Python)f(object)g(that)h(allo)n(ws)g(access)g(to)g(the)g(\002elds)g (by)f(name.)32 b(It)23 b(also)g(has)0 2201 y(methods)c(to)h(con)m(v)o (ert)f(to)h(and)g(from)f Fm(PIL)h Fq(images.)0 2528 y Fi(5.9)121 b Ff(videoreader)30 b Fi(\227)j(Read)i(Quic)n(kTime)d(mo)n (vies)0 2761 y Fm(videoreader)15 b Fq(reads)h(and)f(decodes)h(QuickT)m (ime)f(mo)o(vies)g(and)h(passes)h(a)f(stream)g(of)g(images)g(to)h(your) e(program.)21 b(It)c(also)f(pro)o(vides)0 2861 y(some)k(support)f(for)g (audio)h(tracks.)0 3188 y Fi(5.10)121 b Ff(W)33 b Fi(\227)g(Widgets)h (b)n(uilt)f(on)h Ff(FrameWork)0 3421 y Fq(The)20 b Fm(W)g Fq(widgets)g(are)h(used)f(e)o(xtensi)n(v)o(ely)e(in)i(the)g Fo(IDE)p Fq(.)p 0 5549 3901 4 v 0 5649 a Fl(32)2446 b(Chapter)23 b(5.)52 b(Undocumented)24 b(Modules)p eop end %%Page: 33 39 TeXDict begin 33 38 bop 0 83 3901 9 v 3480 230 a Fl(APPENDIX)3814 427 y Fk(A)p 0 515 V 2080 978 a Fw(Histor)6 b(y)58 b(and)f(License)0 1506 y Fi(A.1)120 b(Histor)t(y)33 b(of)h(the)g(softw)n(are)0 1739 y Fq(Python)39 b(w)o(as)i(created)f(in)g(the)h(early)e(1990s)h(by) g(Guido)f(v)n(an)h(Rossum)g(at)h(Stichting)f(Mathematisch)f(Centrum)g (\(CWI,)i(see)0 1839 y Fr(http://www)l(.cwi.nl/)l Fq(\))30 b(in)g(the)g(Netherlands)e(as)j(a)f(successor)g(of)f(a)i(language)d (called)i(ABC.)g(Guido)f(remains)h(Python')-5 b(s)29 b(principal)0 1939 y(author)m(,)18 b(although)h(it)i(includes)e(man)o (y)g(contrib)n(utions)f(from)h(others.)0 2085 y(In)36 b(1995,)j(Guido)c(continued)f(his)j(w)o(ork)e(on)h(Python)f(at)i(the)f (Corporation)e(for)i(National)g(Research)g(Initiati)n(v)o(es)f(\(CNRI,) i(see)0 2185 y Fr(http://www)l(.cnr)q(i.reston.v)n(a.us/)-6 b Fq(\))21 b(in)f(Reston,)g(V)-5 b(ir)o(ginia)19 b(where)h(he)g (released)g(se)n(v)o(eral)f(v)o(ersions)g(of)h(the)g(softw)o(are.)0 2332 y(In)h(May)h(2000,)e(Guido)h(and)g(the)h(Python)e(core)h(de)n(v)o (elopment)e(team)j(mo)o(v)o(ed)d(to)j(BeOpen.com)e(to)i(form)e(the)i (BeOpen)f(PythonLabs)0 2432 y(team.)49 b(In)27 b(October)g(of)h(the)g (same)h(year)m(,)g(the)f(PythonLabs)e(team)i(mo)o(v)o(ed)e(to)i (Digital)h(Creations)f(\(no)n(w)f(Zope)g(Corporation;)j(see)0 2531 y Fr(http://www)l(.z)o(ope)o(.com/)l Fq(\).)g(In)21 b(2001,)g(the)h(Python)f(Softw)o(are)g(F)o(oundation)f(\(PSF)-7 b(,)22 b(see)h Fr(http://www)l(.p)n(ython.org/)o(psf/)-6 b Fq(\))22 b(w)o(as)h(formed,)d(a)0 2631 y(non-pro\002t)h(or)o (ganization)f(created)i(speci\002cally)h(to)g(o)n(wn)g(Python-related)d (Intellectual)j(Property)-5 b(.)32 b(Zope)22 b(Corporation)f(is)j(a)g (spon-)0 2730 y(soring)19 b(member)g(of)h(the)g(PSF)-7 b(.)0 2877 y(All)26 b(Python)d(releases)j(are)e(Open)h(Source)f(\(see)h Fr(http://www)l(.opensource)o(.o)o(rg/)19 b Fq(for)24 b(the)h(Open)g(Source)f(De\002nition\).)38 b(Historically)-5 b(,)0 2977 y(most,)20 b(b)n(ut)g(not)g(all,)h(Python)e(releases)h(ha)n (v)o(e)g(also)g(been)g(GPL-compatible;)e(the)i(table)g(belo)n(w)g (summarizes)f(the)h(v)n(arious)g(releases.)p 0 5549 3901 4 v 3808 5649 a Fl(33)p eop end %%Page: 34 40 TeXDict begin 34 39 bop 670 70 a Fo(Release)p 1074 100 4 100 v 188 w(Deri)o(v)o(ed)20 b(fr)o(om)p 1648 100 V 195 w(Y)-9 b(ear)p 2107 100 V 291 w(Owner)p 2643 100 V 195 w(GPL)21 b(compatible?)p 531 103 2838 4 v 581 173 a Fq(0.9.0)e(thru)g(1.2)p 1074 203 4 100 v 285 w(n/a)p 1648 203 V 285 w(1991-1995)p 2107 203 V 233 w(CWI)p 2643 203 V 494 w(yes)581 272 y(1.3)g(thru)h(1.5.2)p 1074 302 V 283 w(1.2)p 1648 302 V 283 w(1995-1999)p 2107 302 V 214 w(CNRI)p 2643 302 V 476 w(yes)752 372 y(1.6)p 1074 402 V 423 w(1.5.2)p 1648 402 V 348 w(2000)p 2107 402 V 313 w(CNRI)p 2643 402 V 490 w(no)752 472 y(2.0)p 1074 501 V 454 w(1.6)p 1648 501 V 380 w(2000)p 2107 501 V 195 w(BeOpen.com)p 2643 501 V 368 w(no)720 571 y(1.6.1)p 1074 601 V 423 w(1.6)p 1648 601 V 380 w(2001)p 2107 601 V 313 w(CNRI)p 2643 601 V 490 w(no)752 671 y(2.1)p 1074 701 V 347 w(2.0+1.6.1)p 1648 701 V 272 w(2001)p 2107 701 V 343 w(PSF)p 2643 701 V 520 w(no)720 770 y(2.0.1)p 1074 800 V 316 w(2.0+1.6.1)p 1648 800 V 272 w(2001)p 2107 800 V 343 w(PSF)p 2643 800 V 506 w(yes)720 870 y(2.1.1)p 1074 900 V 316 w(2.1+2.0.1)p 1648 900 V 272 w(2001)p 2107 900 V 343 w(PSF)p 2643 900 V 506 w(yes)752 970 y(2.2)p 1074 1000 V 423 w(2.1.1)p 1648 1000 V 348 w(2001)p 2107 1000 V 343 w(PSF)p 2643 1000 V 506 w(yes)720 1069 y(2.1.2)p 1074 1099 V 392 w(2.1.1)p 1648 1099 V 348 w(2002)p 2107 1099 V 343 w(PSF)p 2643 1099 V 506 w(yes)720 1169 y(2.1.3)p 1074 1199 V 392 w(2.1.2)p 1648 1199 V 348 w(2002)p 2107 1199 V 343 w(PSF)p 2643 1199 V 506 w(yes)720 1269 y(2.2.1)p 1074 1298 V 423 w(2.2)p 1648 1298 V 380 w(2002)p 2107 1298 V 343 w(PSF)p 2643 1298 V 506 w(yes)720 1368 y(2.2.2)p 1074 1398 V 392 w(2.2.1)p 1648 1398 V 348 w(2002)p 2107 1398 V 343 w(PSF)p 2643 1398 V 506 w(yes)720 1468 y(2.2.3)p 1074 1498 V 392 w(2.2.2)p 1648 1498 V 251 w(2002-2003)p 2107 1498 V 244 w(PSF)p 2643 1498 V 506 w(yes)752 1567 y(2.3)p 1074 1597 V 423 w(2.2.2)p 1648 1597 V 251 w(2002-2003)p 2107 1597 V 244 w(PSF)p 2643 1597 V 506 w(yes)720 1667 y(2.3.1)p 1074 1697 V 423 w(2.3)p 1648 1697 V 283 w(2002-2003)p 2107 1697 V 244 w(PSF)p 2643 1697 V 506 w(yes)720 1767 y(2.3.2)p 1074 1797 V 392 w(2.3.1)p 1648 1797 V 348 w(2003)p 2107 1797 V 343 w(PSF)p 2643 1797 V 506 w(yes)720 1866 y(2.3.3)p 1074 1896 V 392 w(2.3.2)p 1648 1896 V 348 w(2003)p 2107 1896 V 343 w(PSF)p 2643 1896 V 506 w(yes)720 1966 y(2.3.4)p 1074 1996 V 392 w(2.3.3)p 1648 1996 V 348 w(2004)p 2107 1996 V 343 w(PSF)p 2643 1996 V 506 w(yes)720 2066 y(2.3.5)p 1074 2095 V 392 w(2.3.4)p 1648 2095 V 348 w(2005)p 2107 2095 V 343 w(PSF)p 2643 2095 V 506 w(yes)752 2165 y(2.4)p 1074 2195 V 454 w(2.3)p 1648 2195 V 380 w(2004)p 2107 2195 V 343 w(PSF)p 2643 2195 V 506 w(yes)720 2265 y(2.4.1)p 1074 2295 V 423 w(2.4)p 1648 2295 V 380 w(2005)p 2107 2295 V 343 w(PSF)p 2643 2295 V 506 w(yes)720 2364 y(2.4.2)p 1074 2394 V 392 w(2.4.1)p 1648 2394 V 348 w(2005)p 2107 2394 V 343 w(PSF)p 2643 2394 V 506 w(yes)720 2464 y(2.4.3)p 1074 2494 V 392 w(2.4.2)p 1648 2494 V 348 w(2006)p 2107 2494 V 343 w(PSF)p 2643 2494 V 506 w(yes)720 2564 y(2.4.4)p 1074 2594 V 392 w(2.4.3)p 1648 2594 V 348 w(2006)p 2107 2594 V 343 w(PSF)p 2643 2594 V 506 w(yes)752 2663 y(2.5)p 1074 2693 V 454 w(2.4)p 1648 2693 V 380 w(2006)p 2107 2693 V 343 w(PSF)p 2643 2693 V 506 w(yes)720 2763 y(2.5.1)p 1074 2793 V 423 w(2.5)p 1648 2793 V 380 w(2007)p 2107 2793 V 343 w(PSF)p 2643 2793 V 506 w(yes)720 2863 y(2.5.2)p 1074 2892 V 392 w(2.5.1)p 1648 2892 V 348 w(2008)p 2107 2892 V 343 w(PSF)p 2643 2892 V 506 w(yes)0 3088 y Fo(Note:)35 b Fq(GPL-compatible)24 b(doesn')o(t)g(mean)g(that)i(we')l (re)f(distrib)n(uting)f(Python)h(under)f(the)h(GPL.)h(All)g(Python)f (licenses,)i(unlik)o(e)e(the)0 3187 y(GPL,)e(let)g(you)f(distrib)n(ute) h(a)g(modi\002ed)f(v)o(ersion)f(without)h(making)g(your)f(changes)h (open)g(source.)32 b(The)22 b(GPL-compatible)f(licenses)0 3287 y(mak)o(e)f(it)h(possible)f(to)g(combine)f(Python)g(with)h(other)f (softw)o(are)h(that)g(is)i(released)d(under)g(the)h(GPL;)h(the)f (others)g(don')o(t.)0 3434 y(Thanks)f(to)i(the)f(man)o(y)f(outside)g(v) n(olunteers)g(who)h(ha)n(v)o(e)g(w)o(ork)o(ed)f(under)f(Guido')-5 b(s)20 b(direction)f(to)h(mak)o(e)g(these)g(releases)h(possible.)0 3761 y Fi(A.2)120 b(T)-14 b(er)s(ms)33 b(and)h(conditions)h(f)l(or)f (accessing)g(or)f(otherwise)i(using)f(Python)1024 3947 y Fo(PSF)20 b(LICENSE)j(A)-5 b(GREEMENT)22 b(FOR)e(PYTHON)g(2.5.3)104 4094 y Fq(1.)41 b(This)22 b(LICENSE)g(A)m(GREEMENT)f(is)j(between)d (the)h(Python)f(Softw)o(are)h(F)o(oundation)e(\(\223PSF\224\),)i(and)f (the)i(Indi)n(vidual)c(or)j(Or)n(-)208 4193 y(ganization)g (\(\223Licensee\224\))h(accessing)h(and)g(otherwise)f(using)h(Python)f (2.5.3)g(softw)o(are)h(in)h(source)e(or)h(binary)f(form)h(and)g(its)208 4293 y(associated)c(documentation.)104 4459 y(2.)41 b(Subject)28 b(to)g(the)h(terms)f(and)g(conditions)f(of)h(this)h(License)f (Agreement,)h(PSF)g(hereby)e(grants)h(Licensee)g(a)h(none)o(xclusi)n(v) o(e,)208 4559 y(ro)o(yalty-free,)e(w)o(orld-wide)g(license)h(to)g (reproduce,)f(analyze,)i(test,)i(perform)26 b(and/or)h(display)g (publicly)-5 b(,)28 b(prepare)f(deri)n(v)n(a-)208 4658 y(ti)n(v)o(e)g(w)o(orks,)h(distrib)n(ute,)h(and)e(otherwise)g(use)h (Python)e(2.5.3)g(alone)h(or)g(in)h(an)o(y)e(deri)n(v)n(ati)n(v)o(e)g (v)o(ersion,)i(pro)o(vided,)e(ho)n(we)n(v)o(er)m(,)208 4758 y(that)e(PSF')-5 b(s)26 b(License)e(Agreement)f(and)h(PSF')-5 b(s)25 b(notice)f(of)g(cop)o(yright,)f(i.e.,)j(\223Cop)o(yright)2871 4755 y(c)2848 4758 y Fp(\015)f Fq(2001-2008)c(Python)i(Softw)o(are)208 4857 y(F)o(oundation;)i(All)h(Rights)g(Reserv)o(ed\224)e(are)i (retained)e(in)h(Python)f(2.5.3)g(alone)h(or)g(in)h(an)o(y)e(deri)n(v)n (ati)n(v)o(e)g(v)o(ersion)g(prepared)f(by)208 4957 y(Licensee.)104 5123 y(3.)41 b(In)16 b(the)h(e)n(v)o(ent)f(Licensee)h(prepares)e(a)j (deri)n(v)n(ati)n(v)o(e)d(w)o(ork)h(that)h(is)h(based)e(on)h(or)g (incorporates)d(Python)i(2.5.3)g(or)g(an)o(y)h(part)f(thereof,)208 5223 y(and)25 b(w)o(ants)h(to)f(mak)o(e)g(the)h(deri)n(v)n(ati)n(v)o(e) d(w)o(ork)i(a)n(v)n(ailable)g(to)h(others)f(as)h(pro)o(vided)d(herein,) j(then)f(Licensee)g(hereby)f(agrees)h(to)208 5322 y(include)19 b(in)h(an)o(y)f(such)h(w)o(ork)g(a)h(brief)e(summary)g(of)h(the)g (changes)f(made)h(to)g(Python)f(2.5.3.)p 0 5549 3901 4 v 0 5649 a Fl(34)2583 b(Appendix)24 b(A.)47 b(Histor)r(y)22 b(and)i(License)p eop end %%Page: 35 41 TeXDict begin 35 40 bop 104 83 a Fq(4.)41 b(PSF)30 b(is)g(making)e (Python)h(2.5.3)f(a)n(v)n(ailable)h(to)g(Licensee)g(on)g(an)g(\223)-7 b(AS)31 b(IS\224)e(basis.)53 b(PSF)31 b(MAKES)e(NO)h(REPRESENT)-8 b(A-)208 183 y(TIONS)25 b(OR)h(W)-10 b(ARRANTIES,)26 b(EXPRESS)g(OR)g(IMPLIED.)f(BY)h(W)-10 b(A)h(Y)26 b(OF)g(EXAMPLE,)f(B)o (UT)h(NO)m(T)f(LIMIT)-8 b(A)f(TION,)208 282 y(PSF)26 b(MAKES)f(NO)h(AND)g(DISCLAIMS)f(ANY)h(REPRESENT)-8 b(A)f(TION)25 b(OR)h(W)-10 b(ARRANTY)27 b(OF)f(MERCHANT)-8 b(ABIL-)208 382 y(ITY)17 b(OR)h(FITNESS)f(FOR)i(ANY)e(P)-8 b(AR)j(TICULAR)19 b(PURPOSE)f(OR)g(THA)-9 b(T)17 b(THE)g(USE)h(OF)g(PYTHON)f(2.5.3)f (WILL)i(NO)m(T)208 482 y(INFRINGE)i(ANY)g(THIRD)h(P)-8 b(AR)j(TY)21 b(RIGHTS.)104 648 y(5.)41 b(PSF)29 b(SHALL)g(NO)m(T)g(BE)g (LIABLE)g(T)o(O)f(LICENSEE)g(OR)i(ANY)f(O)m(THER)g(USERS)h(OF)f(PYTHON) g(2.5.3)e(FOR)j(ANY)208 747 y(INCIDENT)-8 b(AL,)18 b(SPECIAL,)h(OR)h (CONSEQ)o(UENTIAL)f(D)m(AMA)m(GES)f(OR)i(LOSS)g(AS)g(A)g(RESUL)-8 b(T)19 b(OF)h(MODIFYING,)208 847 y(DISTRIB)o(UTING,)j(OR)h(O)m(THER)-5 b(WISE)24 b(USING)g(PYTHON)g(2.5.3,)f(OR)h(ANY)g(DERIV)-11 b(A)i(TIVE)23 b(THEREOF)-7 b(,)24 b(EVEN)f(IF)208 946 y(AD)m(VISED)c(OF)i(THE)f(POSSIBILITY)g(THEREOF)-7 b(.)104 1112 y(6.)41 b(This)20 b(License)g(Agreement)e(will)j(automatically)e (terminate)g(upon)g(a)i(material)f(breach)f(of)h(its)h(terms)f(and)g (conditions.)104 1279 y(7.)41 b(Nothing)23 b(in)i(this)g(License)g (Agreement)e(shall)i(be)g(deemed)e(to)i(create)g(an)o(y)f(relationship) f(of)i(agenc)o(y)-5 b(,)23 b(partnership,)h(or)h(joint)208 1378 y(v)o(enture)20 b(between)h(PSF)h(and)g(Licensee.)29 b(This)22 b(License)f(Agreement)g(does)g(not)h(grant)f(permission)f(to) i(use)g(PSF)h(trademarks)208 1478 y(or)c(trade)h(name)g(in)g(a)h (trademark)d(sense)j(to)f(endorse)f(or)h(promote)e(products)h(or)h (services)g(of)g(Licensee,)g(or)f(an)o(y)h(third)f(party)-5 b(.)104 1644 y(8.)41 b(By)18 b(cop)o(ying,)e(installing)h(or)h (otherwise)f(using)g(Python)g(2.5.3,)g(Licensee)g(agrees)g(to)h(be)g (bound)e(by)h(the)h(terms)g(and)f(conditions)208 1743 y(of)i(this)i(License)f(Agreement.)846 1926 y Fo(BEOPEN.COM)h(LICENSE)h (A)-5 b(GREEMENT)23 b(FOR)d(PYTHON)g(2.0)579 2026 y(BEOPEN)h(PYTHON)f (OPEN)g(SOURCE)h(LICENSE)h(A)-5 b(GREEMENT)23 b(VERSION)e(1)104 2256 y Fq(1.)41 b(This)20 b(LICENSE)g(A)m(GREEMENT)f(is)i(between)f (BeOpen.com)e(\(\223BeOpen\224\),)h(ha)n(ving)g(an)h(of)n(\002ce)g(at)g (160)g(Saratoga)e(A)-6 b(v)o(enue,)208 2355 y(Santa)29 b(Clara,)i(CA)f(95051,)f(and)f(the)h(Indi)n(vidual)e(or)i(Or)o (ganization)d(\(\223Licensee\224\))h(accessing)i(and)f(otherwise)h (using)f(this)208 2455 y(softw)o(are)19 b(in)i(source)e(or)h(binary)f (form)g(and)h(its)h(associated)f(documentation)d(\(\223the)j(Softw)o (are\224\).)104 2621 y(2.)41 b(Subject)18 b(to)g(the)h(terms)g(and)f (conditions)f(of)h(this)h(BeOpen)f(Python)f(License)i(Agreement,)e (BeOpen)h(hereby)f(grants)h(Licensee)208 2721 y(a)25 b(non-e)o(xclusi)n(v)o(e,)e(ro)o(yalty-free,)h(w)o(orld-wide)f(license) j(to)f(reproduce,)f(analyze,)h(test,)i(perform)c(and/or)h(display)g (publicly)-5 b(,)208 2820 y(prepare)16 b(deri)n(v)n(ati)n(v)o(e)f(w)o (orks,)j(distrib)n(ute,)f(and)g(otherwise)g(use)h(the)g(Softw)o(are)f (alone)g(or)g(in)h(an)o(y)f(deri)n(v)n(ati)n(v)o(e)f(v)o(ersion,)g(pro) o(vided,)208 2920 y(ho)n(we)n(v)o(er)m(,)f(that)i(the)g(BeOpen)g (Python)f(License)i(is)g(retained)e(in)h(the)h(Softw)o(are,)f(alone)f (or)h(in)h(an)o(y)e(deri)n(v)n(ati)n(v)o(e)g(v)o(ersion)g(prepared)208 3019 y(by)j(Licensee.)104 3185 y(3.)41 b(BeOpen)25 b(is)j(making)c(the) j(Softw)o(are)e(a)n(v)n(ailable)h(to)g(Licensee)g(on)g(an)g(\223)-7 b(AS)27 b(IS\224)g(basis.)43 b(BEOPEN)27 b(MAKES)f(NO)h(REPRE-)208 3285 y(SENT)-8 b(A)f(TIONS)27 b(OR)i(W)-10 b(ARRANTIES,)29 b(EXPRESS)g(OR)g(IMPLIED.)f(BY)h(W)-10 b(A)h(Y)29 b(OF)g(EXAMPLE,)e(B)o (UT)i(NO)m(T)g(LIMI-)208 3385 y(T)-8 b(A)f(TION,)20 b(BEOPEN)h(MAKES)f (NO)i(AND)f(DISCLAIMS)f(ANY)h(REPRESENT)-8 b(A)f(TION)21 b(OR)g(W)-10 b(ARRANTY)22 b(OF)f(MER-)208 3484 y(CHANT)-8 b(ABILITY)21 b(OR)i(FITNESS)e(FOR)i(ANY)f(P)-8 b(AR)j(TICULAR)23 b(PURPOSE)g(OR)f(THA)-9 b(T)21 b(THE)h(USE)g(OF)g(THE)g(SOFT)-8 b(-)208 3584 y(W)e(ARE)21 b(WILL)f(NO)m(T)g(INFRINGE)g(ANY)h(THIRD)f(P) -8 b(AR)j(TY)21 b(RIGHTS.)104 3750 y(4.)41 b(BEOPEN)24 b(SHALL)f(NO)m(T)h(BE)g(LIABLE)g(T)o(O)f(LICENSEE)g(OR)i(ANY)f(O)m (THER)f(USERS)i(OF)f(THE)g(SOFTW)-10 b(ARE)25 b(FOR)208 3850 y(ANY)c(INCIDENT)-8 b(AL,)20 b(SPECIAL,)h(OR)h(CONSEQ)o(UENTIAL)e (D)m(AMA)m(GES)h(OR)h(LOSS)f(AS)h(A)f(RESUL)-8 b(T)22 b(OF)g(USING,)208 3949 y(MODIFYING)j(OR)i(DISTRIB)o(UTING)f(THE)h (SOFTW)-10 b(ARE,)27 b(OR)g(ANY)f(DERIV)-11 b(A)i(TIVE)25 b(THEREOF)-7 b(,)27 b(EVEN)f(IF)g(AD-)208 4049 y(VISED)20 b(OF)h(THE)f(POSSIBILITY)g(THEREOF)-7 b(.)104 4215 y(5.)41 b(This)20 b(License)g(Agreement)e(will)j(automatically)e(terminate)g (upon)g(a)i(material)f(breach)f(of)h(its)h(terms)f(and)g(conditions.) 104 4381 y(6.)41 b(This)27 b(License)f(Agreement)g(shall)h(be)g(go)o(v) o(erned)d(by)j(and)f(interpreted)f(in)j(all)f(respects)g(by)g(the)g(la) o(w)g(of)g(the)g(State)g(of)g(Cali-)208 4481 y(fornia,)22 b(e)o(xcluding)e(con\003ict)j(of)f(la)o(w)i(pro)o(visions.)31 b(Nothing)21 b(in)j(this)f(License)g(Agreement)e(shall)i(be)g(deemed)f (to)h(create)f(an)o(y)208 4580 y(relationship)i(of)h(agenc)o(y)-5 b(,)25 b(partnership,)g(or)g(joint)h(v)o(enture)e(between)h(BeOpen)g (and)g(Licensee.)41 b(This)26 b(License)f(Agreement)208 4680 y(does)18 b(not)h(grant)f(permission)f(to)i(use)h(BeOpen)e (trademarks)f(or)i(trade)f(names)h(in)g(a)g(trademark)e(sense)i(to)g (endorse)f(or)g(promote)208 4779 y(products)k(or)h(services)g(of)h (Licensee,)f(or)h(an)o(y)e(third)h(party)-5 b(.)34 b(As)24 b(an)g(e)o(xception,)e(the)i(\223BeOpen)f(Python\224)f(logos)h(a)n(v)n (ailable)g(at)208 4879 y(http://www)-5 b(.p)o(ythonlabs.com/logo)o (s.htm)o(l)15 b(may)20 b(be)g(used)g(according)e(to)i(the)h (permissions)e(granted)g(on)h(that)g(web)g(page.)104 5045 y(7.)41 b(By)19 b(cop)o(ying,)e(installing)h(or)g(otherwise)g (using)h(the)f(softw)o(are,)h(Licensee)f(agrees)g(to)h(be)f(bound)f(by) i(the)f(terms)h(and)f(conditions)208 5145 y(of)h(this)i(License)f (Agreement.)992 5327 y Fo(CNRI)h(LICENSE)h(A)-5 b(GREEMENT)22 b(FOR)e(PYTHON)g(1.6.1)p 0 5549 3901 4 v 0 5649 a Fl(A.2.)52 b(T)-10 b(er)r(ms)23 b(and)g(conditions)h(f)n(or)f(accessing)f(or)h (otherwise)g(using)g(Python)1336 b(35)p eop end %%Page: 36 42 TeXDict begin 36 41 bop 104 83 a Fq(1.)41 b(This)25 b(LICENSE)g(A)m (GREEMENT)f(is)i(between)e(the)h(Corporation)e(for)h(National)h (Research)g(Initiati)n(v)o(es,)g(ha)n(ving)f(an)h(of)n(\002ce)208 183 y(at)j(1895)f(Preston)h(White)h(Dri)n(v)o(e,)g(Reston,)h(V)-11 b(A)29 b(20191)d(\(\223CNRI\224\),)i(and)f(the)i(Indi)n(vidual)d(or)i (Or)o(ganization)d(\(\223Licensee\224\))208 282 y(accessing)18 b(and)g(otherwise)g(using)g(Python)f(1.6.1)h(softw)o(are)g(in)h(source) e(or)i(binary)e(form)h(and)g(its)h(associated)g(documentation.)104 443 y(2.)41 b(Subject)24 b(to)g(the)h(terms)f(and)g(conditions)f(of)h (this)h(License)g(Agreement,)e(CNRI)j(hereby)d(grants)h(Licensee)g(a)h (none)o(xclusi)n(v)o(e,)208 542 y(ro)o(yalty-free,)18 b(w)o(orld-wide)i(license)h(to)g(reproduce,)d(analyze,)j(test,)g (perform)e(and/or)h(display)h(publicly)-5 b(,)19 b(prepare)g(deri)n(v)n (ati)n(v)o(e)208 642 y(w)o(orks,)28 b(distrib)n(ute,)g(and)f(otherwise) f(use)i(Python)e(1.6.1)f(alone)i(or)g(in)g(an)o(y)f(deri)n(v)n(ati)n(v) o(e)g(v)o(ersion,)h(pro)o(vided,)f(ho)n(we)n(v)o(er)m(,)g(that)208 741 y(CNRI')-5 b(s)30 b(License)f(Agreement)f(and)g(CNRI')-5 b(s)31 b(notice)e(of)g(cop)o(yright,)g(i.e.,)i(\223Cop)o(yright)2893 738 y(c)2870 741 y Fp(\015)f Fq(1995-2001)25 b(Corporation)i(for)208 841 y(National)k(Research)h(Initiati)n(v)o(es;)37 b(All)32 b(Rights)g(Reserv)o(ed\224)f(are)h(retained)f(in)h(Python)e(1.6.1)h (alone)g(or)g(in)h(an)o(y)f(deri)n(v)n(ati)n(v)o(e)208 941 y(v)o(ersion)22 b(prepared)g(by)h(Licensee.)35 b(Alternately)-5 b(,)23 b(in)h(lieu)g(of)f(CNRI')-5 b(s)25 b(License)f(Agreement,)e (Licensee)i(may)f(substitute)h(the)208 1040 y(follo)n(wing)j(te)o(xt)i (\(omitting)e(the)i(quotes\):)42 b(\223Python)27 b(1.6.1)h(is)h(made)g (a)n(v)n(ailable)f(subject)h(to)g(the)g(terms)g(and)f(conditions)f(in) 208 1140 y(CNRI')-5 b(s)24 b(License)f(Agreement.)33 b(This)24 b(Agreement)d(together)h(with)i(Python)e(1.6.1)g(may)h(be)g (located)g(on)g(the)g(Internet)f(using)208 1240 y(the)27 b(follo)n(wing)f(unique,)h(persistent)g(identi\002er)g(\(kno)n(wn)f(as) i(a)f(handle\):)39 b(1895.22/1013.)j(This)27 b(Agreement)f(may)h(also)h (be)208 1339 y(obtained)18 b(from)h(a)i(proxy)d(serv)o(er)i(on)g(the)g (Internet)f(using)g(the)i(follo)n(wing)d(URL:)j Fr(http://hdl.handle)o (.)o(ne)o(t/18)o(95)o(.2)o(2/1)o(01)o(3)-6 b Fq(.)g(\224)104 1499 y(3.)41 b(In)16 b(the)h(e)n(v)o(ent)f(Licensee)h(prepares)e(a)j (deri)n(v)n(ati)n(v)o(e)d(w)o(ork)h(that)h(is)h(based)e(on)h(or)g (incorporates)d(Python)i(1.6.1)g(or)g(an)o(y)h(part)f(thereof,)208 1599 y(and)25 b(w)o(ants)h(to)f(mak)o(e)g(the)h(deri)n(v)n(ati)n(v)o(e) d(w)o(ork)i(a)n(v)n(ailable)g(to)h(others)f(as)h(pro)o(vided)d(herein,) j(then)f(Licensee)g(hereby)f(agrees)h(to)208 1699 y(include)19 b(in)h(an)o(y)f(such)h(w)o(ork)g(a)h(brief)e(summary)g(of)h(the)g (changes)f(made)h(to)g(Python)f(1.6.1.)104 1859 y(4.)41 b(CNRI)23 b(is)h(making)d(Python)h(1.6.1)f(a)n(v)n(ailable)h(to)h (Licensee)g(on)f(an)h(\223)-7 b(AS)23 b(IS\224)g(basis.)34 b(CNRI)23 b(MAKES)g(NO)g(REPRESENT)-8 b(A-)208 1959 y(TIONS)25 b(OR)h(W)-10 b(ARRANTIES,)26 b(EXPRESS)g(OR)g(IMPLIED.)f(BY)h(W)-10 b(A)h(Y)26 b(OF)g(EXAMPLE,)f(B)o(UT)h(NO)m(T)f(LIMIT)-8 b(A)f(TION,)208 2058 y(CNRI)20 b(MAKES)f(NO)h(AND)g(DISCLAIMS)f(ANY)h (REPRESENT)-8 b(A)f(TION)19 b(OR)h(W)-10 b(ARRANTY)21 b(OF)f(MERCHANT)-8 b(ABIL-)208 2158 y(ITY)17 b(OR)h(FITNESS)f(FOR)i (ANY)e(P)-8 b(AR)j(TICULAR)19 b(PURPOSE)f(OR)g(THA)-9 b(T)17 b(THE)g(USE)h(OF)g(PYTHON)f(1.6.1)f(WILL)i(NO)m(T)208 2257 y(INFRINGE)i(ANY)g(THIRD)h(P)-8 b(AR)j(TY)21 b(RIGHTS.)104 2418 y(5.)41 b(CNRI)25 b(SHALL)g(NO)m(T)g(BE)g(LIABLE)g(T)o(O)f (LICENSEE)g(OR)i(ANY)f(O)m(THER)g(USERS)h(OF)f(PYTHON)g(1.6.1)e(FOR)j (ANY)208 2517 y(INCIDENT)-8 b(AL,)18 b(SPECIAL,)h(OR)h(CONSEQ)o (UENTIAL)f(D)m(AMA)m(GES)f(OR)i(LOSS)g(AS)g(A)g(RESUL)-8 b(T)19 b(OF)h(MODIFYING,)208 2617 y(DISTRIB)o(UTING,)j(OR)h(O)m(THER)-5 b(WISE)24 b(USING)g(PYTHON)g(1.6.1,)f(OR)h(ANY)g(DERIV)-11 b(A)i(TIVE)23 b(THEREOF)-7 b(,)24 b(EVEN)f(IF)208 2717 y(AD)m(VISED)c(OF)i(THE)f(POSSIBILITY)g(THEREOF)-7 b(.)104 2877 y(6.)41 b(This)20 b(License)g(Agreement)e(will)j(automatically)e (terminate)g(upon)g(a)i(material)f(breach)f(of)h(its)h(terms)f(and)g (conditions.)104 3037 y(7.)41 b(This)16 b(License)f(Agreement)f(shall)j (be)e(go)o(v)o(erned)e(by)j(the)f(federal)g(intellectual)h(property)d (la)o(w)j(of)g(the)g(United)f(States,)i(including)208 3137 y(without)28 b(limitation)g(the)g(federal)g(cop)o(yright)f(la)o(w) -5 b(,)30 b(and,)g(to)f(the)g(e)o(xtent)e(such)i(U.S.)g(federal)e(la)o (w)i(does)g(not)f(apply)-5 b(,)29 b(by)g(the)208 3236 y(la)o(w)f(of)h(the)f(Commonwealth)f(of)h(V)-5 b(ir)o(ginia,)30 b(e)o(xcluding)c(V)-5 b(ir)o(ginia')g(s)28 b(con\003ict)g(of)g(la)o(w)h (pro)o(visions.)49 b(Notwithstanding)27 b(the)208 3336 y(fore)o(going,)c(with)i(re)o(gard)f(to)h(deri)n(v)n(ati)n(v)o(e)e(w)o (orks)i(based)g(on)g(Python)f(1.6.1)g(that)h(incorporate)e (non-separable)g(material)h(that)208 3435 y(w)o(as)29 b(pre)n(viously)d(distrib)n(uted)i(under)f(the)h(GNU)h(General)f (Public)g(License)h(\(GPL\),)f(the)g(la)o(w)h(of)f(the)g(Commonwealth)f (of)208 3535 y(V)-5 b(ir)o(ginia)19 b(shall)j(go)o(v)o(ern)c(this)k (License)e(Agreement)g(only)g(as)h(to)g(issues)h(arising)f(under)e(or)i (with)g(respect)g(to)g(P)o(aragraphs)e(4,)i(5,)208 3635 y(and)d(7)i(of)f(this)h(License)f(Agreement.)k(Nothing)18 b(in)h(this)h(License)f(Agreement)f(shall)i(be)f(deemed)f(to)h(create)g (an)o(y)g(relationship)208 3734 y(of)24 b(agenc)o(y)-5 b(,)24 b(partnership,)g(or)g(joint)h(v)o(enture)e(between)h(CNRI)h(and) f(Licensee.)39 b(This)25 b(License)f(Agreement)f(does)i(not)f(grant)208 3834 y(permission)29 b(to)i(use)g(CNRI)g(trademarks)e(or)h(trade)g (name)g(in)h(a)g(trademark)e(sense)i(to)f(endorse)g(or)g(promote)f (products)g(or)208 3934 y(services)20 b(of)g(Licensee,)f(or)h(an)o(y)g (third)f(party)-5 b(.)104 4094 y(8.)41 b(By)17 b(clicking)f(on)g(the)h (\223)-7 b(A)m(CCEPT\224)18 b(b)n(utton)e(where)g(indicated,)g(or)h(by) f(cop)o(ying,)g(installing)g(or)h(otherwise)f(using)g(Python)g(1.6.1,) 208 4193 y(Licensee)j(agrees)h(to)h(be)f(bound)e(by)i(the)g(terms)g (and)g(conditions)e(of)i(this)h(License)f(Agreement.)1793 4362 y(A)m(CCEPT)722 4461 y Fo(CWI)h(LICENSE)h(A)-5 b(GREEMENT)23 b(FOR)d(PYTHON)g(0.9.0)e(THR)n(OUGH)h(1.2)0 4608 y Fq(Cop)o(yright)380 4605 y(c)357 4608 y Fp(\015)h Fq(1991)f(-)i(1995,)d(Stichting)i (Mathematisch)f(Centrum)g(Amsterdam,)g(The)h(Netherlands.)k(All)d (rights)e(reserv)o(ed.)0 4755 y(Permission)g(to)h(use,)g(cop)o(y)-5 b(,)19 b(modify)-5 b(,)17 b(and)i(distrib)n(ute)h(this)g(softw)o(are)f (and)h(its)g(documentation)d(for)i(an)o(y)g(purpose)g(and)g(without)g (fee)h(is)0 4855 y(hereby)i(granted,)g(pro)o(vided)f(that)i(the)h(abo)o (v)o(e)d(cop)o(yright)h(notice)g(appear)h(in)g(all)h(copies)f(and)g (that)g(both)g(that)g(cop)o(yright)e(notice)i(and)0 4954 y(this)f(permission)f(notice)g(appear)f(in)i(supporting)d (documentation,)g(and)i(that)h(the)f(name)g(of)h(Stichting)f (Mathematisch)f(Centrum)h(or)0 5054 y(CWI)26 b(not)f(be)h(used)f(in)g (adv)o(ertising)f(or)h(publicity)f(pertaining)g(to)h(distrib)n(ution)g (of)g(the)g(softw)o(are)g(without)g(speci\002c,)h(written)g(prior)0 5154 y(permission.)0 5300 y(STICHTING)18 b(MA)-9 b(THEMA)g(TISCH)18 b(CENTR)m(UM)g(DISCLAIMS)h(ALL)f(W)-10 b(ARRANTIES)20 b(WITH)f(REGARD)g(T)o(O)f(THIS)h(SOFT)-8 b(-)0 5400 y(W)e(ARE,)23 b(INCLUDING)e(ALL)h(IMPLIED)f(W)-10 b(ARRANTIES)23 b(OF)g(MERCHANT)-8 b(ABILITY)21 b(AND)i(FITNESS,)e(IN)i(NO)f(EVENT)p 0 5549 3901 4 v 0 5649 a Fl(36)2583 b(Appendix)24 b(A.)47 b(Histor)r(y)22 b(and)i(License)p eop end %%Page: 37 43 TeXDict begin 37 42 bop 0 83 a Fq(SHALL)30 b(STICHTING)g(MA)-9 b(THEMA)g(TISCH)29 b(CENTR)m(UM)h(BE)g(LIABLE)g(FOR)h(ANY)f(SPECIAL,)g (INDIRECT)g(OR)h(CON-)0 183 y(SEQ)o(UENTIAL)e(D)m(AMA)m(GES)h(OR)h(ANY) f(D)m(AMA)m(GES)f(WHA)-9 b(TSOEVER)31 b(RESUL)-8 b(TING)30 b(FR)m(OM)g(LOSS)h(OF)g(USE,)f(D)m(A)-9 b(T)h(A)0 282 y(OR)25 b(PR)m(OFITS,)f(WHETHER)h(IN)f(AN)h(A)m(CTION)f(OF)h(CONTRA)m (CT)-6 b(,)24 b(NEGLIGENCE)g(OR)h(O)m(THER)f(T)o(OR)-5 b(TIOUS)24 b(A)m(CTION,)0 382 y(ARISING)c(OUT)h(OF)g(OR)g(IN)f (CONNECTION)g(WITH)h(THE)f(USE)h(OR)g(PERFORMANCE)g(OF)g(THIS)f(SOFTW) -10 b(ARE.)0 709 y Fi(A.3)120 b(Licenses)34 b(and)h(Ac)n(kno)n (wledgements)g(f)l(or)f(Incor)t(por)o(ated)i(Softw)n(are)0 942 y Fq(This)18 b(section)f(is)h(an)g(incomplete,)e(b)n(ut)h(gro)n (wing)f(list)i(of)g(licenses)f(and)g(ackno)n(wledgements)e(for)h (third-party)f(softw)o(are)i(incorporated)0 1042 y(in)j(the)h(Python)e (distrib)n(ution.)0 1327 y Fh(A.3.1)100 b(Mersenne)30 b(T)-12 b(wister)0 1530 y Fq(The)15 b Fm(_random)f Fq(module)g (includes)h(code)f(based)h(on)g(a)g(do)n(wnload)f(from)g Fr(http://www)l(.math.k)o(eio)m(.ac.j)o(p/)g(matumoto/MT2002/emt19937)o (ar)l(.h)o(tml)-6 b Fq(.)0 1629 y(The)20 b(follo)n(wing)e(are)j(the)f (v)o(erbatim)e(comments)h(from)h(the)g(original)f(code:)p 0 5549 3901 4 v 0 5649 a Fl(A.3.)52 b(Licenses)23 b(and)h(Ac)n(kno)o (wledgements)g(f)n(or)e(Incor)r(por)o(ated)i(Softw)o(are)1422 b(37)p eop end %%Page: 38 44 TeXDict begin 38 43 bop 236 174 a Fa(A)45 b(C-program)e(for)i(MT19937,) e(with)h(initialization)f(improved)g(2002/1/26.)236 266 y(Coded)h(by)h(Takuji)f(Nishimura)f(and)h(Makoto)g(Matsumoto.)236 448 y(Before)g(using,)g(initialize)f(the)h(state)g(by)h(using)f (init_genrand\(seed\))236 540 y(or)h(init_by_array\(init_key,)c (key_length\).)236 722 y(Copyright)j(\(C\))g(1997)g(-)h(2002,)f(Makoto) g(Matsumoto)f(and)h(Takuji)g(Nishimura,)236 814 y(All)h(rights)e (reserved.)236 996 y(Redistribution)g(and)h(use)g(in)h(source)f(and)g (binary)g(forms,)g(with)g(or)g(without)236 1088 y(modification,)f(are)h (permitted)g(provided)f(that)h(the)g(following)g(conditions)236 1179 y(are)h(met:)281 1362 y(1.)g(Redistributions)d(of)i(source)g(code) g(must)g(retain)g(the)h(above)f(copyright)416 1453 y(notice,)f(this)h (list)h(of)f(conditions)f(and)h(the)h(following)e(disclaimer.)281 1636 y(2.)i(Redistributions)d(in)i(binary)g(form)g(must)g(reproduce)g (the)g(above)g(copyright)416 1727 y(notice,)f(this)h(list)h(of)f (conditions)f(and)h(the)h(following)e(disclaimer)g(in)i(the)416 1818 y(documentation)d(and/or)i(other)g(materials)f(provided)h(with)g (the)g(distribution.)281 2001 y(3.)h(The)f(names)g(of)g(its)h (contributors)e(may)h(not)g(be)h(used)f(to)g(endorse)g(or)g(promote)416 2092 y(products)f(derived)h(from)g(this)g(software)f(without)h (specific)g(prior)g(written)416 2183 y(permission.)236 2366 y(THIS)g(SOFTWARE)g(IS)g(PROVIDED)g(BY)g(THE)h(COPYRIGHT)e (HOLDERS)h(AND)g(CONTRIBUTORS)236 2457 y("AS)h(IS")f(AND)g(ANY)h (EXPRESS)e(OR)i(IMPLIED)e(WARRANTIES,)g(INCLUDING,)g(BUT)i(NOT)236 2549 y(LIMITED)f(TO,)g(THE)h(IMPLIED)e(WARRANTIES)g(OF)i (MERCHANTABILITY)d(AND)i(FITNESS)g(FOR)236 2640 y(A)h(PARTICULAR)e (PURPOSE)h(ARE)g(DISCLAIMED.)88 b(IN)44 b(NO)h(EVENT)f(SHALL)g(THE)g (COPYRIGHT)f(OWNER)h(OR)236 2731 y(CONTRIBUTORS)f(BE)i(LIABLE)e(FOR)i (ANY)f(DIRECT,)g(INDIRECT,)f(INCIDENTAL,)g(SPECIAL,)236 2823 y(EXEMPLARY,)g(OR)i(CONSEQUENTIAL)e(DAMAGES)g(\(INCLUDING,)g(BUT)h (NOT)h(LIMITED)e(TO,)236 2914 y(PROCUREMENT)g(OF)i(SUBSTITUTE)e(GOODS)h (OR)g(SERVICES;)g(LOSS)g(OF)g(USE,)g(DATA,)g(OR)236 3005 y(PROFITS;)g(OR)g(BUSINESS)g(INTERRUPTION\))e(HOWEVER)i(CAUSED)g(AND)g (ON)h(ANY)f(THEORY)g(OF)236 3097 y(LIABILITY,)f(WHETHER)h(IN)h (CONTRACT,)e(STRICT)h(LIABILITY,)f(OR)h(TORT)g(\(INCLUDING)236 3188 y(NEGLIGENCE)f(OR)i(OTHERWISE\))e(ARISING)h(IN)g(ANY)g(WAY)h(OUT)f (OF)h(THE)f(USE)g(OF)h(THIS)236 3279 y(SOFTWARE,)f(EVEN)g(IF)g(ADVISED) g(OF)g(THE)h(POSSIBILITY)e(OF)h(SUCH)g(DAMAGE.)236 3553 y(Any)h(feedback)e(is)i(very)f(welcome.)236 3645 y (http://www.math.keio.ac.jp/matumoto/emt.)o(html)236 3736 y(email:)g(matumoto@math.keio.ac.jp)0 4161 y Fh(A.3.2)100 b(Soc)n(k)n(ets)0 4364 y Fq(The)23 b Fm(socket)g Fq(module)e(uses)j (the)g(functions,)e Fm(getaddrinfo)p Fq(,)g(and)h Fm(getnameinfo)p Fq(,)f(which)h(are)g(coded)f(in)i(separate)e(source)0 4463 y(\002les)f(from)e(the)i(WIDE)f(Project,)g Fr(http://www)l(.wide)o (.ad.j)o(p/a)o(bo)o(ut/)o(ind)o(e)m(x.html)-6 b Fq(.)p 0 5549 3901 4 v 0 5649 a Fl(38)2583 b(Appendix)24 b(A.)47 b(Histor)r(y)22 b(and)i(License)p eop end %%Page: 39 45 TeXDict begin 39 44 bop 236 83 a Fa(Copyright)44 b(\(C\))g(1995,)g (1996,)g(1997,)g(and)g(1998)g(WIDE)g(Project.)236 174 y(All)h(rights)e(reserved.)236 357 y(Redistribution)g(and)h(use)g(in)h (source)f(and)g(binary)g(forms,)g(with)g(or)g(without)236 448 y(modification,)f(are)h(permitted)g(provided)f(that)h(the)g (following)g(conditions)236 540 y(are)h(met:)236 631 y(1.)g(Redistributions)d(of)j(source)e(code)i(must)f(retain)f(the)i (above)f(copyright)371 722 y(notice,)f(this)i(list)f(of)g(conditions)f (and)i(the)f(following)f(disclaimer.)236 814 y(2.)i(Redistributions)d (in)j(binary)e(form)i(must)f(reproduce)f(the)h(above)g(copyright)371 905 y(notice,)f(this)i(list)f(of)g(conditions)f(and)i(the)f(following)f (disclaimer)g(in)i(the)371 996 y(documentation)d(and/or)i(other)g (materials)f(provided)h(with)g(the)g(distribution.)236 1088 y(3.)h(Neither)e(the)i(name)f(of)g(the)h(project)e(nor)i(the)f (names)g(of)g(its)h(contributors)371 1179 y(may)f(be)h(used)f(to)g (endorse)g(or)g(promote)g(products)f(derived)h(from)g(this)g(software) 371 1270 y(without)f(specific)h(prior)g(written)g(permission.)236 1453 y(THIS)g(SOFTWARE)g(IS)g(PROVIDED)g(BY)g(THE)h(PROJECT)e(AND)i (CONTRIBUTORS)d(``AS)j(IS'')f(AND)236 1544 y(GAI_ANY)g(EXPRESS)g(OR)g (IMPLIED)g(WARRANTIES,)f(INCLUDING,)g(BUT)h(NOT)g(LIMITED)g(TO,)g(THE) 236 1636 y(IMPLIED)g(WARRANTIES)f(OF)i(MERCHANTABILITY)d(AND)i(FITNESS) g(FOR)g(A)h(PARTICULAR)e(PURPOSE)236 1727 y(ARE)i(DISCLAIMED.)87 b(IN)45 b(NO)f(EVENT)g(SHALL)g(THE)h(PROJECT)e(OR)i(CONTRIBUTORS)e(BE)h (LIABLE)236 1818 y(FOR)h(GAI_ANY)e(DIRECT,)h(INDIRECT,)f(INCIDENTAL,)g (SPECIAL,)h(EXEMPLARY,)f(OR)h(CONSEQUENTIAL)236 1910 y(DAMAGES)g(\(INCLUDING,)f(BUT)h(NOT)h(LIMITED)e(TO,)h(PROCUREMENT)f (OF)i(SUBSTITUTE)e(GOODS)236 2001 y(OR)i(SERVICES;)e(LOSS)h(OF)h(USE,)f (DATA,)g(OR)g(PROFITS;)g(OR)g(BUSINESS)g(INTERRUPTION\))236 2092 y(HOWEVER)g(CAUSED)g(AND)g(ON)h(GAI_ANY)e(THEORY)h(OF)g (LIABILITY,)g(WHETHER)f(IN)i(CONTRACT,)e(STRICT)236 2183 y(LIABILITY,)g(OR)i(TORT)f(\(INCLUDING)f(NEGLIGENCE)g(OR)i(OTHERWISE\)) e(ARISING)h(IN)g(GAI_ANY)g(WAY)236 2275 y(OUT)h(OF)f(THE)g(USE)h(OF)f (THIS)g(SOFTWARE,)g(EVEN)g(IF)g(ADVISED)g(OF)g(THE)h(POSSIBILITY)e(OF) 236 2366 y(SUCH)h(DAMAGE.)0 2789 y Fh(A.3.3)100 b(Floating)29 b(point)g(e)m(xception)g(control)0 2992 y Fq(The)20 b(source)f(for)h (the)g Fm(fpectl)g Fq(module)f(includes)g(the)h(follo)n(wing)f(notice:) p 0 5549 3901 4 v 0 5649 a Fl(A.3.)52 b(Licenses)23 b(and)h(Ac)n(kno)o (wledgements)g(f)n(or)e(Incor)r(por)o(ated)i(Softw)o(are)1422 b(39)p eop end %%Page: 40 46 TeXDict begin 40 45 bop 460 174 a Fa (-----------------------------------------)o(------)o(------)o(------)o (------)o(----)416 266 y(/)1031 b(Copyright)43 b(\(c\))h(1996.)1210 b(\\)371 357 y(|)448 b(The)44 b(Regents)g(of)g(the)h(University)e(of)h (California.)761 b(|)371 448 y(|)1076 b(All)44 b(rights)g(reserved.) 1209 b(|)371 540 y(|)3183 b(|)371 631 y(|)134 b(Permission)43 b(to)i(use,)f(copy,)g(modify,)f(and)i(distribute)e(this)h(software)g (for)134 b(|)371 722 y(|)g(any)44 b(purpose)g(without)g(fee)g(is)h (hereby)e(granted,)h(provided)f(that)h(this)h(en-)134 b(|)371 814 y(|)g(tire)44 b(notice)g(is)h(included)e(in)i(all)f(copies) g(of)g(any)g(software)g(which)g(is)g(or)135 b(|)371 905 y(|)f(includes)88 b(a)i(copy)f(or)g(modification)f(of)h(this)44 b(software)g(and)g(in)h(all)134 b(|)371 996 y(|)g(copies)44 b(of)g(the)h(supporting)e(documentation)f(for)j(such)f(software.)492 b(|)371 1088 y(|)3183 b(|)371 1179 y(|)134 b(This)89 b(work)44 b(was)h(produced)e(at)i(the)f(University)f(of)h(California,)f (Lawrence)134 b(|)371 1270 y(|)g(Livermore)43 b(National)h(Laboratory)f (under)89 b(contract)f(no.)h(W-7405-ENG-48)133 b(|)371 1362 y(|)h(between)89 b(the)g(U.S.)g(Department)f(of)h(Energy)44 b(and)g(The)g(Regents)g(of)h(the)134 b(|)371 1453 y(|)g(University)43 b(of)i(California)e(for)h(the)g(operation)g(of)g(UC)h(LLNL.)627 b(|)371 1544 y(|)3183 b(|)371 1636 y(|)1345 b(DISCLAIMER)1388 b(|)371 1727 y(|)3183 b(|)371 1818 y(|)134 b(This)89 b(software)44 b(was)g(prepared)f(as)i(an)f(account)g(of)g(work)h (sponsored)e(by)h(an)135 b(|)371 1910 y(|)f(agency)44 b(of)g(the)h(United)f(States)f(Government.)g(Neither)h(the)g(United)g (States)134 b(|)371 2001 y(|)g(Government)88 b(nor)44 b(the)h(University)e(of)h(California)f(nor)i(any)f(of)h(their)f(em-)134 b(|)371 2092 y(|)g(ployees,)44 b(makes)g(any)g(warranty,)f(express)h (or)g(implied,)g(or)89 b(assumes)g(any)134 b(|)371 2183 y(|)g(liability)88 b(or)i(responsibility)d(for)44 b(the)g(accuracy,)g (completeness,)e(or)135 b(|)371 2275 y(|)f(usefulness)43 b(of)i(any)f(information,)88 b(apparatus,)g(product,)g(or)h(process)134 b(|)371 2366 y(|)g(disclosed,)f(or)89 b(represents)f(that)h(its)g(use)g (would)g(not)g(infringe)134 b(|)371 2457 y(|)g(privately-owned)42 b(rights.)i(Reference)f(herein)h(to)h(any)f(specific)88 b(commer-)134 b(|)371 2549 y(|)g(cial)89 b(products,)f(process,)h(or)g (service)f(by)45 b(trade)f(name,)g(trademark,)133 b(|)371 2640 y(|)h(manufacturer,)43 b(or)h(otherwise,)f(does)h(not)90 b(necessarily)d(constitute)h(or)135 b(|)371 2731 y(|)f(imply)89 b(its)44 b(endorsement,)f(recommendation,)f(or)j(favoring)e(by)i(the)f (United)134 b(|)371 2823 y(|)g(States)44 b(Government)f(or)i(the)f (University)f(of)h(California.)f(The)i(views)89 b(and)134 b(|)371 2914 y(|)g(opinions)88 b(of)45 b(authors)f(expressed)f(herein)h (do)g(not)g(necessarily)f(state)h(or)135 b(|)371 3005 y(|)f(reflect)44 b(those)g(of)g(the)h(United)e(States)h(Government)f (or)90 b(the)f(University)133 b(|)371 3097 y(|)h(of)89 b(California,)f(and)45 b(shall)f(not)g(be)g(used)g(for)h(advertising)e (or)h(product)134 b(|)416 3188 y(\\)89 b(endorsement)43 b(purposes.)2061 b(/)460 3279 y (-----------------------------------------)o(------)o(------)o(------)o (------)o(----)0 3703 y Fh(A.3.4)100 b(MD5)28 b(message)h(digest)g (algor)q(ithm)0 3906 y Fq(The)20 b(source)f(code)h(for)f(the)i Fm(md5)f Fq(module)f(contains)g(the)h(follo)n(wing)f(notice:)p 0 5549 3901 4 v 0 5649 a Fl(40)2583 b(Appendix)24 b(A.)47 b(Histor)r(y)22 b(and)i(License)p eop end %%Page: 41 47 TeXDict begin 41 46 bop 326 174 a Fa(Copyright)43 b(\(C\))i(1999,)f (2002)g(Aladdin)f(Enterprises.)88 b(All)44 b(rights)g(reserved.)326 357 y(This)g(software)g(is)g(provided)g('as-is',)f(without)h(any)g (express)g(or)g(implied)326 448 y(warranty.)88 b(In)45 b(no)f(event)g(will)g(the)h(authors)e(be)i(held)f(liable)g(for)g(any)g (damages)326 540 y(arising)g(from)g(the)g(use)g(of)h(this)f(software.) 326 722 y(Permission)f(is)i(granted)e(to)i(anyone)f(to)g(use)g(this)g (software)g(for)g(any)h(purpose,)326 814 y(including)e(commercial)g (applications,)g(and)h(to)h(alter)f(it)g(and)h(redistribute)d(it)326 905 y(freely,)i(subject)f(to)i(the)f(following)f(restrictions:)326 1088 y(1.)h(The)h(origin)f(of)g(this)g(software)g(must)g(not)g(be)h (misrepresented;)d(you)i(must)g(not)460 1179 y(claim)g(that)h(you)f (wrote)g(the)g(original)g(software.)f(If)h(you)h(use)f(this)g(software) 460 1270 y(in)h(a)g(product,)e(an)i(acknowledgment)d(in)i(the)h (product)e(documentation)g(would)h(be)460 1362 y(appreciated)f(but)i (is)f(not)h(required.)326 1453 y(2.)f(Altered)g(source)g(versions)f (must)i(be)f(plainly)g(marked)f(as)i(such,)f(and)g(must)g(not)h(be)460 1544 y(misrepresented)e(as)h(being)g(the)h(original)e(software.)326 1636 y(3.)h(This)h(notice)e(may)i(not)f(be)h(removed)e(or)i(altered)e (from)h(any)h(source)f(distribution.)326 1818 y(L.)g(Peter)g(Deutsch) 326 1910 y(ghost@aladdin.com)326 2092 y(Independent)f(implementation)f (of)j(MD5)f(\(RFC)g(1321\).)326 2275 y(This)g(code)g(implements)f(the)i (MD5)f(Algorithm)f(defined)h(in)g(RFC)h(1321,)f(whose)326 2366 y(text)g(is)h(available)e(at)236 2457 y (http://www.ietf.org/rfc/rfc1321.txt)326 2549 y(The)h(code)g(is)h (derived)f(from)g(the)g(text)g(of)h(the)f(RFC,)g(including)f(the)i (test)f(suite)326 2640 y(\(section)f(A.5\))i(but)f(excluding)f(the)i (rest)f(of)g(Appendix)g(A.)89 b(It)44 b(does)h(not)f(include)326 2731 y(any)g(code)g(or)h(documentation)e(that)h(is)g(identified)f(in)i (the)f(RFC)g(as)h(being)326 2823 y(copyrighted.)326 3005 y(The)f(original)g(and)g(principal)f(author)h(of)h(md5.h)f(is)g(L.)h (Peter)f(Deutsch)326 3097 y(.)86 b(Other)44 b(authors)g(are)g(noted)g(in)h(the)f(change)g(history)326 3188 y(that)g(follows)g(\(in)g(reverse)g(chronological)e(order\):)326 3371 y(2002-04-13)h(lpd)h(Removed)g(support)g(for)g(non-ANSI)f (compilers;)h(removed)236 3462 y(references)f(to)i(Ghostscript;)e (clarified)g(derivation)g(from)h(RFC)h(1321;)236 3553 y(now)g(handles)e(byte)h(order)g(either)g(statically)f(or)i (dynamically.)326 3645 y(1999-11-04)e(lpd)h(Edited)g(comments)g (slightly)f(for)h(automatic)g(TOC)g(extraction.)326 3736 y(1999-10-18)f(lpd)h(Fixed)g(typo)h(in)f(header)g(comment)f(\(ansi2knr) h(rather)g(than)g(md5\);)236 3827 y(added)g(conditionalization)e(for)i (C++)h(compilation)e(from)h(Martin)236 3919 y(Purschke)g (.)326 4010 y(1999-05-03)f(lpd)h(Original)g(version.) 0 4433 y Fh(A.3.5)100 b(Asynchronous)30 b(soc)n(k)n(et)e(ser)s(vices)0 4636 y Fq(The)20 b Fm(asynchat)f Fq(and)h Fm(asyncore)f Fq(modules)g(contain)g(the)i(follo)n(wing)d(notice:)p 0 5549 3901 4 v 0 5649 a Fl(A.3.)52 b(Licenses)23 b(and)h(Ac)n(kno)o (wledgements)g(f)n(or)e(Incor)r(por)o(ated)i(Softw)o(are)1422 b(41)p eop end %%Page: 42 48 TeXDict begin 42 47 bop 281 174 a Fa(Copyright)43 b(1996)i(by)f(Sam)g (Rushing)1357 357 y(All)g(Rights)g(Reserved)281 540 y(Permission)f(to)i (use,)f(copy,)g(modify,)g(and)g(distribute)f(this)h(software)g(and)281 631 y(its)g(documentation)f(for)h(any)h(purpose)e(and)i(without)e(fee)i (is)f(hereby)281 722 y(granted,)g(provided)f(that)h(the)h(above)f (copyright)f(notice)h(appear)f(in)i(all)281 814 y(copies)f(and)g(that)g (both)h(that)f(copyright)f(notice)h(and)g(this)g(permission)281 905 y(notice)g(appear)g(in)g(supporting)f(documentation,)g(and)h(that)g (the)h(name)f(of)g(Sam)281 996 y(Rushing)g(not)g(be)h(used)f(in)g (advertising)f(or)i(publicity)e(pertaining)g(to)281 1088 y(distribution)g(of)h(the)h(software)e(without)h(specific,)f(written)h (prior)281 1179 y(permission.)281 1362 y(SAM)g(RUSHING)g(DISCLAIMS)f (ALL)i(WARRANTIES)e(WITH)h(REGARD)g(TO)g(THIS)g(SOFTWARE,)281 1453 y(INCLUDING)f(ALL)i(IMPLIED)e(WARRANTIES)h(OF)g(MERCHANTABILITY)e (AND)j(FITNESS,)e(IN)281 1544 y(NO)i(EVENT)f(SHALL)g(SAM)g(RUSHING)g (BE)g(LIABLE)g(FOR)g(ANY)g(SPECIAL,)g(INDIRECT)f(OR)281 1636 y(CONSEQUENTIAL)g(DAMAGES)g(OR)i(ANY)f(DAMAGES)g(WHATSOEVER)f (RESULTING)g(FROM)h(LOSS)281 1727 y(OF)h(USE,)f(DATA)g(OR)g(PROFITS,)g (WHETHER)g(IN)g(AN)g(ACTION)g(OF)h(CONTRACT,)281 1818 y(NEGLIGENCE)e(OR)i(OTHER)f(TORTIOUS)f(ACTION,)h(ARISING)f(OUT)i(OF)f (OR)h(IN)281 1910 y(CONNECTION)e(WITH)h(THE)h(USE)f(OR)h(PERFORMANCE)d (OF)j(THIS)f(SOFTWARE.)0 2334 y Fh(A.3.6)100 b(Cookie)29 b(management)0 2537 y Fq(The)20 b Fm(Cookie)f Fq(module)g(contains)h (the)g(follo)n(wing)f(notice:)281 2775 y Fa(Copyright)43 b(2000)i(by)f(Timothy)g(O'Malley)f()954 2958 y(All)h(Rights)g(Reserved)281 3141 y(Permission)f(to)i(use,)f (copy,)g(modify,)g(and)g(distribute)f(this)h(software)281 3232 y(and)g(its)h(documentation)d(for)j(any)f(purpose)g(and)g(without) g(fee)g(is)g(hereby)281 3323 y(granted,)g(provided)f(that)h(the)h (above)f(copyright)f(notice)h(appear)f(in)i(all)281 3415 y(copies)f(and)g(that)g(both)h(that)f(copyright)f(notice)h(and)g(this)g (permission)281 3506 y(notice)g(appear)g(in)g(supporting)f (documentation,)g(and)h(that)g(the)h(name)f(of)281 3597 y(Timothy)g(O'Malley)88 b(not)44 b(be)h(used)f(in)h(advertising)d(or)j (publicity)281 3689 y(pertaining)e(to)i(distribution)e(of)h(the)g (software)g(without)f(specific,)h(written)281 3780 y(prior)g (permission.)281 3963 y(Timothy)g(O'Malley)f(DISCLAIMS)h(ALL)g (WARRANTIES)f(WITH)h(REGARD)g(TO)g(THIS)281 4054 y(SOFTWARE,)f (INCLUDING)h(ALL)g(IMPLIED)g(WARRANTIES)f(OF)h(MERCHANTABILITY)281 4145 y(AND)g(FITNESS,)g(IN)g(NO)h(EVENT)f(SHALL)g(Timothy)f(O'Malley)h (BE)g(LIABLE)g(FOR)281 4237 y(ANY)g(SPECIAL,)g(INDIRECT)f(OR)i (CONSEQUENTIAL)d(DAMAGES)i(OR)h(ANY)f(DAMAGES)281 4328 y(WHATSOEVER)f(RESULTING)h(FROM)g(LOSS)g(OF)g(USE,)g(DATA)h(OR)f (PROFITS,)281 4419 y(WHETHER)g(IN)g(AN)h(ACTION)f(OF)g(CONTRACT,)f (NEGLIGENCE)g(OR)i(OTHER)f(TORTIOUS)281 4511 y(ACTION,)g(ARISING)f(OUT) i(OF)f(OR)h(IN)f(CONNECTION)f(WITH)h(THE)h(USE)f(OR)281 4602 y(PERFORMANCE)f(OF)i(THIS)f(SOFTWARE.)0 5026 y Fh(A.3.7)100 b(Pro\002ling)0 5229 y Fq(The)20 b Fm(profile)f Fq(and)h Fm(pstats)g Fq(modules)f(contain)g(the)h(follo)n(wing)f(notice:)p 0 5549 3901 4 v 0 5649 a Fl(42)2583 b(Appendix)24 b(A.)47 b(Histor)r(y)22 b(and)i(License)p eop end %%Page: 43 49 TeXDict begin 43 48 bop 281 174 a Fa(Copyright)43 b(1994,)h(by)h (InfoSeek)e(Corporation,)g(all)h(rights)g(reserved.)281 266 y(Written)g(by)g(James)g(Roskind)281 448 y(Permission)f(to)i(use,)f (copy,)g(modify,)g(and)g(distribute)f(this)h(Python)g(software)281 540 y(and)g(its)h(associated)e(documentation)g(for)h(any)g(purpose)g (\(subject)f(to)i(the)281 631 y(restriction)e(in)i(the)f(following)f (sentence\))g(without)h(fee)g(is)h(hereby)f(granted,)281 722 y(provided)g(that)g(the)g(above)g(copyright)f(notice)h(appears)g (in)g(all)h(copies,)e(and)281 814 y(that)h(both)g(that)h(copyright)e (notice)h(and)g(this)g(permission)f(notice)h(appear)g(in)281 905 y(supporting)f(documentation,)g(and)h(that)g(the)g(name)h(of)f (InfoSeek)g(not)g(be)g(used)h(in)281 996 y(advertising)e(or)i (publicity)e(pertaining)g(to)h(distribution)f(of)i(the)f(software)281 1088 y(without)g(specific,)f(written)h(prior)g(permission.)87 b(This)45 b(permission)e(is)281 1179 y(explicitly)g(restricted)g(to)i (the)f(copying)g(and)g(modification)f(of)h(the)h(software)281 1270 y(to)g(remain)e(in)i(Python,)f(compiled)f(Python,)h(or)g(other)g (languages)f(\(such)h(as)h(C\))281 1362 y(wherein)f(the)g(modified)g (or)g(derived)g(code)g(is)g(exclusively)f(imported)h(into)g(a)281 1453 y(Python)g(module.)281 1636 y(INFOSEEK)g(CORPORATION)f(DISCLAIMS)g (ALL)h(WARRANTIES)f(WITH)h(REGARD)g(TO)h(THIS)281 1727 y(SOFTWARE,)e(INCLUDING)h(ALL)g(IMPLIED)g(WARRANTIES)f(OF)h (MERCHANTABILITY)f(AND)281 1818 y(FITNESS.)h(IN)g(NO)h(EVENT)f(SHALL)g (INFOSEEK)f(CORPORATION)g(BE)h(LIABLE)g(FOR)h(ANY)281 1910 y(SPECIAL,)f(INDIRECT)f(OR)i(CONSEQUENTIAL)d(DAMAGES)i(OR)g(ANY)h (DAMAGES)e(WHATSOEVER)281 2001 y(RESULTING)g(FROM)i(LOSS)f(OF)g(USE,)g (DATA)h(OR)f(PROFITS,)f(WHETHER)h(IN)h(AN)f(ACTION)g(OF)281 2092 y(CONTRACT,)f(NEGLIGENCE)h(OR)g(OTHER)g(TORTIOUS)f(ACTION,)h (ARISING)g(OUT)g(OF)h(OR)f(IN)281 2183 y(CONNECTION)f(WITH)h(THE)h(USE) f(OR)h(PERFORMANCE)d(OF)j(THIS)f(SOFTWARE.)0 2607 y Fh(A.3.8)100 b(Ex)m(ecution)29 b(tr)o(acing)0 2810 y Fq(The)20 b Fm(trace)g Fq(module)e(contains)i(the)g(follo)n(wing)f(notice:)p 0 5549 3901 4 v 0 5649 a Fl(A.3.)52 b(Licenses)23 b(and)h(Ac)n(kno)o (wledgements)g(f)n(or)e(Incor)r(por)o(ated)i(Softw)o(are)1422 b(43)p eop end %%Page: 44 50 TeXDict begin 44 49 bop 281 174 a Fa(portions)44 b(copyright)f(2001,)h (Autonomous)f(Zones)h(Industries,)f(Inc.,)h(all)g(rights...)281 266 y(err...)89 b(reserved)43 b(and)i(offered)e(to)i(the)f(public)g (under)g(the)g(terms)g(of)h(the)281 357 y(Python)f(2.2)g(license.)281 448 y(Author:)g(Zooko)g(O'Whielacronx)281 540 y(http://zooko.com/)281 631 y(mailto:zooko@zooko.com)281 814 y(Copyright)f(2000,)h(Mojam)g (Media,)g(Inc.,)g(all)g(rights)g(reserved.)281 905 y(Author:)g(Skip)g (Montanaro)281 1088 y(Copyright)f(1999,)h(Bioreason,)g(Inc.,)g(all)g (rights)g(reserved.)281 1179 y(Author:)g(Andrew)g(Dalke)281 1362 y(Copyright)f(1995-1997,)h(Automatrix,)f(Inc.,)g(all)i(rights)f (reserved.)281 1453 y(Author:)g(Skip)g(Montanaro)281 1636 y(Copyright)f(1991-1995,)h(Stichting)f(Mathematisch)g(Centrum,)g (all)h(rights)g(reserved.)281 1910 y(Permission)f(to)i(use,)f(copy,)g (modify,)g(and)g(distribute)f(this)h(Python)g(software)f(and)281 2001 y(its)h(associated)g(documentation)e(for)j(any)f(purpose)f (without)h(fee)g(is)h(hereby)281 2092 y(granted,)f(provided)f(that)h (the)h(above)f(copyright)f(notice)h(appears)f(in)i(all)f(copies,)281 2183 y(and)g(that)h(both)f(that)g(copyright)f(notice)h(and)g(this)g (permission)g(notice)f(appear)h(in)281 2275 y(supporting)f (documentation,)g(and)h(that)g(the)g(name)h(of)f(neither)g(Automatrix,) 281 2366 y(Bioreason)f(or)i(Mojam)f(Media)g(be)g(used)h(in)f (advertising)f(or)h(publicity)g(pertaining)f(to)281 2457 y(distribution)g(of)h(the)h(software)e(without)h(specific,)f(written)h (prior)g(permission.)0 2882 y Fh(A.3.9)100 b(UUencode)30 b(and)e(UUdecode)i(functions)0 3084 y Fq(The)20 b Fm(uu)g Fq(module)f(contains)h(the)g(follo)n(wing)e(notice:)p 0 5549 3901 4 v 0 5649 a Fl(44)2583 b(Appendix)24 b(A.)47 b(Histor)r(y)22 b(and)i(License)p eop end %%Page: 45 51 TeXDict begin 45 50 bop 281 174 a Fa(Copyright)43 b(1994)i(by)f(Lance)g (Ellinghouse)281 266 y(Cathedral)f(City,)h(California)g(Republic,)f (United)h(States)f(of)i(America.)1312 357 y(All)g(Rights)e(Reserved)281 448 y(Permission)g(to)i(use,)f(copy,)g(modify,)g(and)g(distribute)f (this)h(software)g(and)g(its)281 540 y(documentation)f(for)h(any)g (purpose)g(and)g(without)g(fee)g(is)h(hereby)f(granted,)281 631 y(provided)g(that)g(the)g(above)g(copyright)f(notice)h(appear)g(in) g(all)h(copies)f(and)g(that)281 722 y(both)g(that)g(copyright)g(notice) g(and)g(this)g(permission)f(notice)h(appear)g(in)281 814 y(supporting)f(documentation,)g(and)h(that)g(the)g(name)h(of)f (Lance)g(Ellinghouse)281 905 y(not)g(be)h(used)f(in)h(advertising)e(or) h(publicity)f(pertaining)g(to)i(distribution)281 996 y(of)g(the)f(software)f(without)h(specific,)f(written)h(prior)g (permission.)281 1088 y(LANCE)g(ELLINGHOUSE)f(DISCLAIMS)g(ALL)i (WARRANTIES)e(WITH)h(REGARD)g(TO)281 1179 y(THIS)g(SOFTWARE,)g (INCLUDING)f(ALL)h(IMPLIED)g(WARRANTIES)f(OF)h(MERCHANTABILITY)f(AND) 281 1270 y(FITNESS,)h(IN)g(NO)h(EVENT)f(SHALL)g(LANCE)g(ELLINGHOUSE)e (CENTRUM)i(BE)h(LIABLE)281 1362 y(FOR)f(ANY)h(SPECIAL,)e(INDIRECT)h(OR) g(CONSEQUENTIAL)f(DAMAGES)g(OR)i(ANY)f(DAMAGES)281 1453 y(WHATSOEVER)f(RESULTING)h(FROM)g(LOSS)g(OF)g(USE,)g(DATA)h(OR)f (PROFITS,)g(WHETHER)f(IN)i(AN)281 1544 y(ACTION)f(OF)g(CONTRACT,)g (NEGLIGENCE)f(OR)h(OTHER)g(TORTIOUS)g(ACTION,)f(ARISING)h(OUT)281 1636 y(OF)h(OR)f(IN)h(CONNECTION)e(WITH)h(THE)g(USE)h(OR)f(PERFORMANCE) f(OF)h(THIS)h(SOFTWARE.)281 1818 y(Modified)f(by)g(Jack)g(Jansen,)g (CWI,)g(July)g(1995:)281 1910 y(-)h(Use)f(binascii)g(module)f(to)i(do)f (the)h(actual)e(line-by-line)g(conversion)371 2001 y(between)g(ascii)h (and)h(binary.)e(This)i(results)e(in)i(a)f(1000-fold)g(speedup.)f(The)h (C)371 2092 y(version)f(is)i(still)f(5)h(times)f(faster,)f(though.)281 2183 y(-)i(Arguments)e(more)h(compliant)g(with)g(python)f(standard)0 2608 y Fh(A.3.10)101 b(XML)28 b(Remote)h(Procedure)h(Calls)0 2811 y Fq(The)20 b Fm(xmlrpclib)f Fq(module)g(contains)g(the)h(follo)n (wing)f(notice:)p 0 5549 3901 4 v 0 5649 a Fl(A.3.)52 b(Licenses)23 b(and)h(Ac)n(kno)o(wledgements)g(f)n(or)e(Incor)r(por)o (ated)i(Softw)o(are)1422 b(45)p eop end %%Page: 46 52 TeXDict begin 46 51 bop 460 174 a Fa(The)45 b(XML-RPC)e(client)h (interface)g(is)281 357 y(Copyright)f(\(c\))i(1999-2002)e(by)i(Secret)e (Labs)h(AB)281 448 y(Copyright)f(\(c\))i(1999-2002)e(by)i(Fredrik)e (Lundh)281 631 y(By)i(obtaining,)e(using,)h(and/or)f(copying)h(this)g (software)g(and/or)f(its)281 722 y(associated)g(documentation,)g(you)h (agree)g(that)g(you)g(have)h(read,)f(understood,)281 814 y(and)g(will)h(comply)e(with)i(the)f(following)f(terms)h(and)g (conditions:)281 996 y(Permission)f(to)i(use,)f(copy,)g(modify,)g(and)g (distribute)f(this)h(software)g(and)281 1088 y(its)g(associated)g (documentation)e(for)j(any)f(purpose)f(and)i(without)e(fee)i(is)281 1179 y(hereby)f(granted,)f(provided)h(that)g(the)g(above)g(copyright)g (notice)f(appears)h(in)281 1270 y(all)g(copies,)g(and)g(that)h(both)f (that)g(copyright)f(notice)h(and)g(this)g(permission)281 1362 y(notice)g(appear)g(in)g(supporting)f(documentation,)g(and)h(that) g(the)h(name)f(of)281 1453 y(Secret)g(Labs)g(AB)h(or)f(the)g(author)g (not)h(be)f(used)g(in)h(advertising)e(or)h(publicity)281 1544 y(pertaining)f(to)i(distribution)e(of)h(the)g(software)g(without)f (specific,)h(written)281 1636 y(prior)g(permission.)281 1818 y(SECRET)g(LABS)g(AB)h(AND)f(THE)g(AUTHOR)g(DISCLAIMS)f(ALL)i (WARRANTIES)e(WITH)h(REGARD)281 1910 y(TO)h(THIS)f(SOFTWARE,)f (INCLUDING)g(ALL)i(IMPLIED)e(WARRANTIES)g(OF)i(MERCHANT-)281 2001 y(ABILITY)f(AND)g(FITNESS.)88 b(IN)45 b(NO)f(EVENT)g(SHALL)g (SECRET)g(LABS)g(AB)h(OR)f(THE)h(AUTHOR)281 2092 y(BE)g(LIABLE)e(FOR)i (ANY)f(SPECIAL,)g(INDIRECT)f(OR)h(CONSEQUENTIAL)f(DAMAGES)h(OR)g(ANY) 281 2183 y(DAMAGES)g(WHATSOEVER)f(RESULTING)g(FROM)h(LOSS)g(OF)h(USE,)f (DATA)g(OR)h(PROFITS,)281 2275 y(WHETHER)f(IN)g(AN)h(ACTION)f(OF)g (CONTRACT,)f(NEGLIGENCE)g(OR)i(OTHER)f(TORTIOUS)281 2366 y(ACTION,)g(ARISING)f(OUT)i(OF)f(OR)h(IN)f(CONNECTION)f(WITH)h(THE)h (USE)f(OR)h(PERFORMANCE)281 2457 y(OF)g(THIS)f(SOFTWARE.)p 0 5549 3901 4 v 0 5649 a Fl(46)2583 b(Appendix)24 b(A.)47 b(Histor)r(y)22 b(and)i(License)p eop end %%Page: 47 53 TeXDict begin 47 52 bop 2328 567 a Fw(MODULE)57 b(INDEX)0 1321 y Fi(A)0 1445 y Fm(aepack)p Fq(,)19 b(22)0 1544 y Fm(aetools)p Fq(,)g(21)0 1644 y Fm(aetypes)p Fq(,)g(23)0 1743 y Fm(applesingle)p Fq(,)f(31)0 1843 y Fm(autoGIL)p Fq(,)h(17)0 2026 y Fi(B)0 2149 y Fm(buildtools)p Fq(,)g(31)0 2340 y Fi(C)0 2463 y Fm(Carbon.AE)p Fq(,)g(28)0 2563 y Fm(Carbon.AH)p Fq(,)g(28)0 2663 y Fm(Carbon.App)p Fq(,)g(28)0 2762 y Fm(Carbon.CarbonEvt)p Fq(,)f(29)0 2862 y Fm(Carbon.CF)p Fq(,)h(28)0 2961 y Fm(Carbon.CG)p Fq(,)g(29)0 3061 y Fm(Carbon.Cm)p Fq(,)g(29)0 3161 y Fm(Carbon.Ctl)p Fq(,)g(29)0 3260 y Fm(Carbon.Dlg)p Fq(,)g(29)0 3360 y Fm(Carbon.Evt)p Fq(,)g(29)0 3460 y Fm(Carbon.Fm)p Fq(,)g(29)0 3559 y Fm(Carbon.Folder)p Fq(,)f(29)0 3659 y Fm(Carbon.Help)p Fq(,)g(29)0 3758 y Fm(Carbon.List)p Fq(,)g(29)0 3858 y Fm(Carbon.Menu)p Fq(,)g(29)0 3958 y Fm(Carbon.Mlte)p Fq(,)g(29)0 4057 y Fm(Carbon.Qd)p Fq(,)h(29)0 4157 y Fm(Carbon.Qdoffs)p Fq(,)f(29)0 4257 y Fm(Carbon.Qt)p Fq(,)h(29)0 4356 y Fm(Carbon.Res)p Fq(,)g(29)0 4456 y Fm(Carbon.Scrap)p Fq(,)f(29)0 4555 y Fm(Carbon.Snd)p Fq(,)h(29)0 4655 y Fm(Carbon.TE)p Fq(,)g(29)0 4755 y Fm(Carbon.Win)p Fq(,)g(29)0 4854 y Fm(cfmfile)p Fq(,)g(31)0 4954 y Fm(ColorPicker)p Fq(,)f(29)0 5137 y Fi(E)0 5260 y Fm(EasyDialogs)p Fq(,)g(11)1992 1321 y Fi(F)1992 1445 y Fm(findertools)p Fq(,)g(11)1992 1544 y Fm(FrameWork)p Fq(,)g(13)1992 1735 y Fi(G)1992 1859 y Fm(gensuitemodule)p Fq(,)f(20)1992 2041 y Fi(I)1992 2164 y Fm(ic)p Fq(,)j(8)1992 2264 y Fm(icopen)p Fq(,)f(31)1992 2447 y Fi(M)1992 2570 y Fm(macerrors)p Fq(,)f(32)1992 2670 y Fm(macfs)p Fq(,)h(5)1992 2769 y Fm(MacOS)p Fq(,)g(9)1992 2869 y Fm(macostools)p Fq(,)f(10)1992 2968 y Fm(macpath)p Fq(,)h(5)1992 3068 y Fm(macresource)p Fq(,)f(32)1992 3168 y Fm(MiniAEFrame)p Fq(,)g(24)1992 3350 y Fi(N)1992 3474 y Fm(Nav)p Fq(,)h(32)1992 3656 y Fi(P)1992 3780 y Fm(PixMapWrapper)p Fq(,)f(32)1992 3962 y Fi(V)1992 4085 y Fm(videoreader)p Fq(,)g(32)1992 4268 y Fi(W)1992 4391 y Fm(W)p Fq(,)i(32)p 0 5549 3901 4 v 3808 5649 a Fl(47)p eop end %%Page: 48 54 TeXDict begin 48 53 bop 0 5549 3901 4 v 0 5649 a Fl(48)p eop end %%Page: 49 55 TeXDict begin 49 54 bop 3269 564 a Fw(INDEX)0 1317 y Fi(Symbols)0 1440 y Fm(_quit\(\))19 b Fq(\(Application)g(method\),)f (15)0 1540 y Fm(_start\(\))h Fq(\(T)-7 b(alkT)g(o)20 b(method\),)e(21)0 1732 y Fi(A)0 1855 y Fm(aepack)i Fq(\(standard)e (module\),)h Fo(22)0 1955 y Fm(AEServer)g Fq(\(class)i(in)f (MiniAEFrame\),)f(24)0 2054 y Fm(AEText)h Fq(\(class)g(in)h(aetypes\),) e(23)0 2154 y Fm(aetools)g Fq(\(standard)g(module\),)f Fo(21)0 2254 y Fm(aetypes)h Fq(\(standard)g(module\),)f Fo(23)0 2353 y Fq(Alias)j(Manager)m(,)d(Macintosh,)h(5)0 2453 y(AppleEv)o(ents,)f(11,)i(24)0 2553 y Fm(applesingle)f Fq(\(standard)f(module\),)h Fo(31)0 2652 y Fm(Application\(\))f Fq(\(in)i(module)f(FrameW)-7 b(ork\),)19 b(14)0 2752 y Fm(as_pathname\(\))f Fq(\(FSSpec)i(method\),)f(7)0 2851 y Fm(as_tuple\(\))g Fq(\(FSSpec)h(method\),)e(7)0 2951 y Fm(AskFileForOpen\(\))g Fq(\(in)i(module)f(EasyDialogs\),)f(12)0 3051 y Fm(AskFileForSave\(\))g Fq(\(in)i(module)f(EasyDialogs\),)f(12)0 3150 y Fm(AskFolder\(\))h Fq(\(in)h(module)f(EasyDialogs\),)f(13)0 3250 y Fm(AskPassword\(\))g Fq(\(in)i(module)f(EasyDialogs\),)g(12)0 3350 y Fm(AskString\(\))g Fq(\(in)h(module)f(EasyDialogs\),)f(11)0 3449 y Fm(AskYesNoCancel\(\))g Fq(\(in)i(module)f(EasyDialogs\),)f(12)0 3549 y Fm(asyncevents\(\))g Fq(\(Application)h(method\),)f(15)0 3648 y Fm(autoGIL)h Fq(\(e)o(xtension)g(module\),)f Fo(17)0 3748 y Fm(AutoGILError)h Fq(\(e)o(xception)e(in)k(autoGIL\),)d(17)0 3944 y Fi(B)0 4067 y Fm(Boolean)h Fq(\(class)i(in)g(aetypes\),)e(23)0 4167 y Fm(BUFSIZ)h Fq(\(data)f(in)i(macostools\),)d(11)0 4266 y Fm(buildtools)h Fq(\(standard)g(module\),)f Fo(31)0 4460 y Fi(C)0 4584 y Fm(callback\(\))h Fq(\(AEServ)o(er)f(method\),)h (24)0 4683 y Fm(Carbon.AE)g Fq(\(standard)g(module\),)f Fo(28)0 4783 y Fm(Carbon.AH)h Fq(\(standard)g(module\),)f Fo(28)0 4883 y Fm(Carbon.App)h Fq(\(standard)g(module\),)f Fo(28)0 4982 y Fm(Carbon.CarbonEvt)g Fq(\(standard)g(module\),)h Fo(29)0 5082 y Fm(Carbon.CF)g Fq(\(standard)g(module\),)f Fo(28)0 5181 y Fm(Carbon.CG)h Fq(\(standard)g(module\),)f Fo(29)0 5281 y Fm(Carbon.Cm)h Fq(\(standard)g(module\),)f Fo(29)0 5381 y Fm(Carbon.Ctl)h Fq(\(standard)g(module\),)f Fo(29)1992 1312 y Fm(Carbon.Dlg)g Fq(\(standard)h(module\),)f Fo(29)1992 1411 y Fm(Carbon.Evt)g Fq(\(standard)h(module\),)f Fo(29)1992 1511 y Fm(Carbon.Fm)h Fq(\(standard)f(module\),)g Fo(29)1992 1610 y Fm(Carbon.Folder)g Fq(\(standard)h(module\),)f Fo(29)1992 1710 y Fm(Carbon.Help)g Fq(\(standard)h(module\),)f Fo(29)1992 1810 y Fm(Carbon.List)g Fq(\(standard)h(module\),)f Fo(29)1992 1909 y Fm(Carbon.Menu)g Fq(\(standard)h(module\),)f Fo(29)1992 2009 y Fm(Carbon.Mlte)g Fq(\(standard)h(module\),)f Fo(29)1992 2109 y Fm(Carbon.Qd)h Fq(\(b)n(uilt-in)g(module\),)f Fo(29)1992 2208 y Fm(Carbon.Qdoffs)g Fq(\(b)n(uilt-in)h(module\),)f Fo(29)1992 2308 y Fm(Carbon.Qt)h Fq(\(standard)f(module\),)g Fo(29)1992 2407 y Fm(Carbon.Res)g Fq(\(standard)h(module\),)f Fo(29)1992 2507 y Fm(Carbon.Scrap)g Fq(\(standard)h(module\),)f Fo(29)1992 2607 y Fm(Carbon.Snd)g Fq(\(standard)h(module\),)f Fo(29)1992 2706 y Fm(Carbon.TE)h Fq(\(standard)f(module\),)g Fo(29)1992 2806 y Fm(Carbon.Win)g Fq(\(standard)h(module\),)f Fo(29)1992 2906 y Fm(cfmfile)h Fq(\(standard)g(module\),)f Fo(31)1992 3005 y Fm(close\(\))h Fq(\(W)m(indo)n(w)g(method\),)f(16) 1992 3105 y Fm(ColorPicker)g Fq(\(e)o(xtension)h(module\),)f Fo(29)1992 3204 y Fm(Comparison)g Fq(\(class)j(in)g(aetypes\),)e(24) 1992 3304 y Fm(ComponentItem)f Fq(\(class)j(in)f(aetypes\),)f(24)1992 3404 y Fm(copy\(\))2158 3503 y Fq(in)h(module)f(\002ndertools,)f(11) 2158 3603 y(in)i(module)f(macostools,)g(10)1992 3703 y Fm(copytree\(\))f Fq(\(in)i(module)f(macostools\),)g(10)1992 3802 y Fm(Creator)g Fq(\(FInfo)g(attrib)n(ute\),)g(8)1992 3902 y Fm(curval)g Fq(\(ProgressBar)g(attrib)n(ute\),)h(13)1992 4098 y Fi(D)1992 4221 y Fm(data)2158 4320 y Fq(Alias)h(attrib)n(ute,)e (7)2158 4420 y(FSSpec)h(attrib)n(ute,)g(7)1992 4520 y Fm(DebugStr\(\))e Fq(\(in)i(module)f(MacOS\),)h(10)1992 4619 y Fm(DialogWindow\(\))e Fq(\(in)i(module)e(FrameW)-7 b(ork\),)19 b(14)1992 4719 y Fm(do_activate\(\))2178 4819 y Fq(method,)g(16)2158 4918 y(ScrolledW)m(indo)n(w)f(method,)g(16) 1992 5018 y Fm(do_char\(\))h Fq(\(Application)f(method\),)g(15)1992 5117 y Fm(do_contentclick\(\))f Fq(\(W)m(indo)n(w)i(method\),)f(16)1992 5217 y Fm(do_controlhit\(\))2158 5317 y Fq(ControlsW)m(indo)n(w)g (method,)g(16)p 0 5549 3901 4 v 3808 5649 a Fl(49)p eop end %%Page: 50 56 TeXDict begin 50 55 bop 166 83 a Fq(ScrolledW)m(indo)n(w)18 b(method,)h(17)0 183 y Fm(do_dialogevent\(\))f Fq(\(Application)g (method\),)g(15)0 282 y Fm(do_itemhit\(\))h Fq(\(DialogW)m(indo)n(w)e (method\),)i(17)0 382 y Fm(do_postresize\(\))166 482 y Fq(ScrolledW)m(indo)n(w)f(method,)h(16)166 581 y(W)m(indo)n(w)g (method,)g(16)0 681 y Fm(do_update\(\))g Fq(\(W)m(indo)n(w)g(method\),) f(16)0 873 y Fi(E)0 996 y Fm(EasyDialogs)h Fq(\(standard)f(module\),)h Fo(11)0 1096 y Fm(Enum)h Fq(\(class)h(in)f(aetypes\),)f(23)0 1196 y Fm(enumsubst\(\))g Fq(\(in)h(module)f(aetools\),)g(21)0 1295 y(en)m(vironment)e(v)n(ariables)166 1395 y(PYTHONP)-8 b(A)f(TH,)20 b(2)0 1495 y Fm(Error)g Fq(\(e)o(xception)e(in)i(MacOS\),) g(9)0 1594 y Fm(error)g Fq(\(e)o(xception)e(in)i(ic\),)g(8)0 1790 y Fi(F)0 1913 y Fm(FindApplication\(\))e Fq(\(in)i(module)e (macfs\),)i(6)0 2013 y Fm(findertools)f Fq(\(standard)f(module\),)h Fo(11)0 2112 y Fm(FindFolder\(\))g Fq(\(in)h(module)e(macfs\),)i(6)0 2212 y Fm(FInfo\(\))f Fq(\(in)h(module)f(macfs\),)h(6)0 2312 y Fm(Flags)g Fq(\(FInfo)f(attrib)n(ute\),)g(8)0 2411 y Fm(Fldr)h Fq(\(FInfo)f(attrib)n(ute\),)g(8)0 2511 y Fm(FrameWork)g Fq(\(standard)g(module\),)f Fo(13)p Fq(,)i(24)0 2611 y Fm(FSSpec\(\))f Fq(\(in)h(module)f(macfs\),)g(5)0 2805 y Fi(G)0 2928 y Fm(gensuitemodule)f Fq(\(standard)h(module\),)f Fo(20)0 3028 y Fm(getabouttext\(\))g Fq(\(Application)h(method\),)f(15) 0 3127 y Fm(GetArgv\(\))h Fq(\(in)h(module)f(EasyDialogs\),)g(12)0 3227 y Fm(GetColor\(\))g Fq(\(in)h(module)f(ColorPick)o(er\),)f(30)0 3326 y Fm(GetCreatorAndType\(\))f Fq(\(in)j(module)f(MacOS\),)h(10)0 3426 y Fm(GetCreatorType\(\))e Fq(\(FSSpec)i(method\),)e(7)0 3526 y Fm(GetDates\(\))h Fq(\(FSSpec)h(method\),)e(7)0 3625 y Fm(GetDirectory\(\))g Fq(\(in)i(module)f(macfs\),)g(6)0 3725 y Fm(GetErrorString\(\))f Fq(\(in)i(module)f(MacOS\),)g(10)0 3825 y Fm(GetFInfo\(\))g Fq(\(FSSpec)h(method\),)e(7)0 3924 y Fm(GetInfo\(\))h Fq(\(Alias)i(method\),)d(7)0 4024 y Fm(getscrollbarvalues\(\))324 b Fq(\(ScrolledW)m(indo)n(w)332 4123 y(method\),)18 b(16)0 4223 y Fm(GetTicks\(\))h Fq(\(in)h(module)f (MacOS\),)g(10)0 4416 y Fi(I)0 4539 y Fm(IC)h Fq(\(class)h(in)g(ic\),)f (8)0 4638 y Fm(ic)g Fq(\(b)n(uilt-in)g(module\),)e Fo(8)0 4738 y Fm(icglue)i Fq(\(b)n(uilt-in)f(module\),)f(8)0 4838 y Fm(icopen)i Fq(\(standard)e(module\),)h Fo(31)0 4937 y Fm(idle\(\))h Fq(\(Application)e(method\),)g(15)0 5037 y Fm(inc\(\))i Fq(\(ProgressBar)f(method\),)f(13)0 5137 y Fm(InsertionLoc)h Fq(\(class)h(in)h(aetypes\),)e(23)0 5236 y Fm(installaehandler\(\))e Fq(\(AEServ)o(er)i(method\),)f(24)0 5336 y Fm(installAutoGIL\(\))g Fq(\(in)i(module)f(autoGIL\),)f(17)1992 83 y Fm(IntlText)h Fq(\(class)i(in)f(aetypes\),)f(23)1992 183 y Fm(IntlWritingCode)e Fq(\(class)k(in)g(aetypes\),)e(23)1992 282 y Fm(is_scriptable\(\))e Fq(\(in)j(module)f(gensuitemodule\),)e(20) 1992 478 y Fi(K)1992 601 y Fm(keysubst\(\))h Fq(\(in)i(module)f (aetools\),)h(21)1992 701 y Fm(Keyword)f Fq(\(class)i(in)f(aetypes\),)f (23)1992 896 y Fi(L)1992 1020 y Fm(label\(\))g Fq(\(ProgressBar)g (method\),)f(13)1992 1119 y Fm(launch\(\))h Fq(\(in)h(module)f (\002ndertools\),)f(11)1992 1219 y Fm(launchurl\(\))2158 1319 y Fq(IC)i(method,)f(9)2158 1418 y(in)h(module)f(ic,)h(8)1992 1518 y Fm(linkmodel)f Fq(\(data)g(in)i(MacOS\),)e(9)1992 1618 y Fm(Location)g Fq(\(FInfo)g(attrib)n(ute\),)g(8)1992 1717 y Fm(Logical)g Fq(\(class)i(in)f(aetypes\),)f(24)1992 1913 y Fi(M)1992 2036 y Fm(macerrors)g Fq(\(standard)f(module\),)g(10,) i Fo(32)1992 2136 y Fm(macfs)f Fq(\(standard)g(module\),)f Fo(5)1992 2235 y Fq(Macintosh)h(Alias)i(Manager)m(,)d(5)1992 2335 y Fm(MacOS)h Fq(\(b)n(uilt-in)h(module\),)e Fo(9)1992 2435 y Fm(macostools)g Fq(\(standard)h(module\),)f Fo(10)1992 2534 y Fm(macpath)h Fq(\(standard)g(module\),)f Fo(5)1992 2634 y Fm(macresource)g Fq(\(standard)h(module\),)f Fo(32)1992 2733 y Fm(mainloop\(\))g Fq(\(Application)h(method\),)f(15)1992 2833 y Fm(makeusermenus\(\))f Fq(\(Application)i(method\),)f(15)1992 2933 y Fm(mapfile\(\))2158 3032 y Fq(IC)i(method,)f(9)2158 3132 y(in)h(module)f(ic,)h(8)1992 3232 y Fm(maptypecreator\(\))2158 3331 y Fq(IC)g(method,)f(9)2158 3431 y(in)h(module)f(ic,)h(8)1992 3530 y Fm(maxval)f Fq(\(ProgressBar)g(attrib)n(ute\),)h(13)1992 3630 y Fm(Menu\(\))f Fq(\(in)h(module)f(FrameW)-7 b(ork\),)19 b(14)1992 3730 y Fm(MenuBar\(\))g Fq(\(in)h(module)e(FrameW)-7 b(ork\),)19 b(14)1992 3829 y Fm(MenuItem\(\))f Fq(\(in)i(module)f (FrameW)-7 b(ork\),)19 b(14)1992 3929 y Fm(Message\(\))g Fq(\(in)h(module)e(EasyDialogs\),)h(11)1992 4029 y Fm(MiniAEFrame)f Fq(\(standard)h(module\),)f Fo(24)1992 4128 y Fm(MiniApplication)f Fq(\(class)k(in)g(MiniAEFrame\),)d(24)1992 4228 y Fm(mkalias\(\))h Fq(\(in)h(module)e(macostools\),)h(10)1992 4327 y Fm(move\(\))g Fq(\(in)h(module)f(\002ndertools\),)f(11)1992 4520 y Fi(N)1992 4643 y Fm(Nav)i Fq(\(standard)e(module\),)h Fo(32)1992 4743 y Fq(Na)n(vigation)f(Services,)i(12)1992 4842 y Fm(NewAlias\(\))e Fq(\(FSSpec)j(method\),)d(7)1992 4942 y Fm(NewAliasMinimal\(\))f Fq(\(FSSpec)j(method\),)e(7)1992 5042 y Fm(NewAliasMinimalFromFullPath\(\))55 b Fq(\(in)61 b(module)2324 5141 y(macfs\),)19 b(6)1992 5241 y Fm(NProperty)g Fq(\(class)h(in)h(aetypes\),)e(24)p 0 5549 3901 4 v 0 5649 a Fl(50)3607 b(Inde)n(x)p eop end %%Page: 51 57 TeXDict begin 51 56 bop 0 88 a Fi(O)0 211 y Fm(ObjectSpecifier)18 b Fq(\(class)j(in)f(aetypes\),)f(24)0 311 y Fm(open\(\))166 411 y Fq(DialogW)m(indo)n(w)f(method,)h(17)166 510 y(W)m(indo)n(w)g (method,)g(15)0 610 y(Open)h(Scripting)f(Architecture,)f(24)0 709 y Fm(openrf\(\))h Fq(\(in)h(module)f(MacOS\),)h(10)0 809 y Fm(Ordinal)f Fq(\(class)i(in)g(aetypes\),)e(23)0 1005 y Fi(P)0 1128 y Fm(pack\(\))h Fq(\(in)g(module)e(aepack\),)h(22)0 1228 y Fm(packevent\(\))g Fq(\(in)h(module)f(aetools\),)g(21)0 1327 y Fm(parseurl\(\))166 1427 y Fq(IC)i(method,)d(9)166 1527 y(in)i(module)f(ic,)i(8)0 1626 y Fm(PixMapWrapper)d Fq(\(standard)h(module\),)f Fo(32)0 1726 y Fm(Print\(\))h Fq(\(in)h(module)f(\002ndertools\),)g(11)0 1825 y Fm(processfile\(\))f Fq(\(in)i(module)f(gensuitemodule\),)e(20)0 1925 y Fm (processfile_fromresource\(\))37 b Fq(\(in)j(module)g(gen-)332 2025 y(suitemodule\),)18 b(21)0 2124 y Fm(ProgressBar\(\))g Fq(\(in)i(module)f(EasyDialogs\),)g(12)0 2224 y Fm(PromptGetFile\(\))f Fq(\(in)i(module)f(macfs\),)g(6)0 2324 y(PYTHONP)-8 b(A)f(TH,)20 b(2)0 2515 y Fi(Q)0 2638 y Fm(QDPoint)f Fq(\(class)i(in)g(aetypes\),)e (23)0 2738 y Fm(QDRectangle)g Fq(\(class)h(in)h(aetypes\),)e(23)0 2933 y Fi(R)0 3056 y Fm(Range)h Fq(\(class)h(in)f(aetypes\),)f(23)0 3156 y Fm(RawAlias\(\))g Fq(\(in)h(module)f(macfs\),)g(6)0 3256 y Fm(RawFSSpec\(\))g Fq(\(in)h(module)f(macfs\),)g(6)0 3355 y Fm(Resolve\(\))g Fq(\(Alias)i(method\),)d(7)0 3455 y Fm(ResolveAliasFile\(\))f Fq(\(in)j(module)f(macfs\),)h(6)0 3555 y Fm(restart\(\))f Fq(\(in)h(module)f(\002ndertools\),)f(11)0 3654 y Fm(RGBColor)h Fq(\(class)i(in)f(aetypes\),)g(23)0 3754 y Fm(runtimemodel)f Fq(\(data)g(in)i(MacOS\),)e(9)0 3948 y Fi(S)0 4071 y Fm(scalebarvalues\(\))f Fq(\(ScrolledW)m(indo)n(w) f(method\),)i(16)0 4171 y Fm(scrollbar_callback\(\))324 b Fq(\(ScrolledW)m(indo)n(w)332 4271 y(method\),)18 b(16)0 4370 y Fm(scrollbars\(\))h Fq(\(ScrolledW)m(indo)n(w)e(method\),)h(16)0 4470 y Fm(send\(\))i Fq(\(T)-7 b(alkT)g(o)19 b(method\),)f(21)0 4569 y Fm(Separator\(\))h Fq(\(in)h(module)f(FrameW)-7 b(ork\),)18 b(14)0 4669 y Fm(set\(\))i Fq(\(ProgressBar)f(method\),)f (13)0 4769 y Fm(setarrowcursor\(\))g Fq(\(in)i(module)f(FrameW)-7 b(ork\),)18 b(14)0 4868 y Fm(SetCreatorAndType\(\))f Fq(\(in)j(module)f(MacOS\),)h(10)0 4968 y Fm(SetCreatorType\(\))e Fq(\(FSSpec)i(method\),)e(7)0 5068 y Fm(SetDates\(\))h Fq(\(FSSpec)h(method\),)e(7)0 5167 y Fm(SetFInfo\(\))h Fq(\(FSSpec)h(method\),)e(7)0 5267 y Fm(SetFolder\(\))h Fq(\(in)h(module)f(macfs\),)g(6)0 5366 y Fm(settypecreator\(\))2158 83 y Fq(IC)h(method,)f(9)2158 183 y(in)h(module)f(ic,)h(8)1992 282 y Fm(setwatchcursor\(\))d Fq(\(in)j(module)f(FrameW)-7 b(ork\),)19 b(14)1992 382 y Fm(shutdown\(\))f Fq(\(in)i(module)f (\002ndertools\),)g(11)1992 482 y Fm(sleep\(\))g Fq(\(in)h(module)f (\002ndertools\),)f(11)1992 581 y(Standard)g(File,)j(5)1992 681 y Fm(StandardGetFile\(\))c Fq(\(in)j(module)f(macfs\),)g(6)1992 780 y Fm(StandardPutFile\(\))e Fq(\(in)j(module)f(macfs\),)g(6)1992 880 y Fm(StyledText)f Fq(\(class)j(in)g(aetypes\),)e(23)1992 980 y Fm(SubMenu\(\))g Fq(\(in)h(module)e(FrameW)-7 b(ork\),)19 b(14)1992 1079 y Fm(SysBeep\(\))g Fq(\(in)h(module)e(MacOS\),)i(10)1992 1272 y Fi(T)1992 1395 y Fm(TalkTo)f Fq(\(class)i(in)f(aetools\),)g(21) 1992 1495 y Fm(title\(\))f Fq(\(ProgressBar)g(method\),)f(13)1992 1594 y Fm(touched\(\))h Fq(\(in)h(module)e(macostools\),)h(10)1992 1694 y Fm(Type)2158 1793 y Fq(class)i(in)f(aetypes,)g(23)2158 1893 y(FInfo)f(attrib)n(ute,)g(8)1992 2076 y Fi(U)1992 2199 y Fm(Unknown)g Fq(\(class)i(in)f(aetypes\),)f(23)1992 2299 y Fm(unpack\(\))g Fq(\(in)h(module)f(aepack\),)f(22)1992 2398 y Fm(unpackevent\(\))g Fq(\(in)i(module)f(aetools\),)g(21)1992 2498 y Fm(Update\(\))g Fq(\(Alias)h(method\),)f(7)1992 2598 y Fm(updatescrollbars\(\))61 b Fq(\(ScrolledW)m(indo)n(w)h (method\),)2324 2697 y(16)1992 2880 y Fi(V)1992 3003 y Fm(videoreader)18 b Fq(\(standard)h(module\),)f Fo(32)1992 3195 y Fi(W)1992 3319 y Fm(W)i Fq(\(standard)f(module\),)f Fo(32)1992 3418 y Fm(Window\(\))h Fq(\(in)h(module)f(FrameW)-7 b(ork\),)18 b(14)1992 3518 y Fm(windowbounds\(\))g Fq(\(in)i(module)e (FrameW)-7 b(ork\),)19 b(14)1992 3618 y Fm(WMAvailable\(\))f Fq(\(in)i(module)f(MacOS\),)g(10)p 0 5549 3901 4 v 0 5649 a Fl(Inde)n(x)3607 b(51)p eop end %%Trailer userdict /end-hook known{end-hook}if %%EOF .