From 4710c53dcad1ebf3755f3efb9e80ac24bd72a9b2 Mon Sep 17 00:00:00 2001 From: darylm503 Date: Mon, 16 Apr 2012 22:12:42 +0000 Subject: [PATCH] AppPkg/Applications/Python: Add Python 2.7.2 sources since the release of Python 2.7.3 made them unavailable from the python.org web site. These files are a subset of the python-2.7.2.tgz distribution from python.org. Changed files from PyMod-2.7.2 have been copied into the corresponding directories of this tree, replacing the original files in the distribution. Signed-off-by: daryl.mcdaniel@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13197 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Python/Python-2.7.2/Demo/README | 40 + .../Python/Python-2.7.2/Demo/cgi/README | 11 + .../Python/Python-2.7.2/Demo/cgi/cgi0.sh | 8 + .../Python/Python-2.7.2/Demo/cgi/cgi1.py | 14 + .../Python/Python-2.7.2/Demo/cgi/cgi2.py | 22 + .../Python/Python-2.7.2/Demo/cgi/cgi3.py | 10 + .../Python/Python-2.7.2/Demo/cgi/wiki.py | 123 + .../Python-2.7.2/Demo/classes/Complex.py | 320 + .../Python/Python-2.7.2/Demo/classes/Dates.py | 227 + .../Python/Python-2.7.2/Demo/classes/Dbm.py | 66 + .../Python/Python-2.7.2/Demo/classes/README | 12 + .../Python/Python-2.7.2/Demo/classes/Range.py | 93 + .../Python/Python-2.7.2/Demo/classes/Rev.py | 95 + .../Python/Python-2.7.2/Demo/classes/Vec.py | 68 + .../Python-2.7.2/Demo/classes/bitvec.py | 333 + .../Python-2.7.2/Demo/comparisons/README | 60 + .../Python-2.7.2/Demo/comparisons/patterns | 4 + .../Demo/comparisons/regextest.py | 47 + .../Demo/comparisons/sortingtest.py | 45 + .../Demo/comparisons/systemtest.py | 74 + .../Python/Python-2.7.2/Demo/md5test/README | 10 + .../Python/Python-2.7.2/Demo/md5test/foo | 1 + .../Python-2.7.2/Demo/md5test/md5driver.py | 123 + .../Python-2.7.2/Demo/metaclasses/Eiffel.py | 113 + .../Python-2.7.2/Demo/metaclasses/Enum.py | 169 + .../Python-2.7.2/Demo/metaclasses/Meta.py | 118 + .../Python-2.7.2/Demo/metaclasses/Simple.py | 45 + .../Python-2.7.2/Demo/metaclasses/Synch.py | 256 + .../Python-2.7.2/Demo/metaclasses/Trace.py | 144 + .../Python-2.7.2/Demo/metaclasses/index.html | 605 + .../Demo/metaclasses/meta-vladimir.txt | 256 + .../Demo/newmetaclasses/Eiffel.py | 141 + .../Python-2.7.2/Demo/newmetaclasses/Enum.py | 177 + .../Python/Python-2.7.2/Demo/parser/FILES | 6 + .../Python/Python-2.7.2/Demo/parser/README | 32 + .../Python-2.7.2/Demo/parser/docstring.py | 2 + .../Python-2.7.2/Demo/parser/example.py | 190 + .../Python/Python-2.7.2/Demo/parser/simple.py | 1 + .../Python/Python-2.7.2/Demo/parser/source.py | 27 + .../Python-2.7.2/Demo/parser/test_parser.py | 48 + .../Python-2.7.2/Demo/parser/test_unparse.py | 213 + .../Python-2.7.2/Demo/parser/unparse.py | 606 + .../Python/Python-2.7.2/Demo/pdist/FSProxy.py | 301 + .../Python-2.7.2/Demo/pdist/RCSProxy.py | 198 + .../Python/Python-2.7.2/Demo/pdist/README | 121 + .../Python/Python-2.7.2/Demo/pdist/client.py | 157 + .../Python/Python-2.7.2/Demo/pdist/cmdfw.py | 144 + .../Python/Python-2.7.2/Demo/pdist/cmptree.py | 208 + .../Python/Python-2.7.2/Demo/pdist/cvslib.py | 364 + .../Python/Python-2.7.2/Demo/pdist/cvslock.py | 280 + .../Python/Python-2.7.2/Demo/pdist/mac.py | 19 + .../Python-2.7.2/Demo/pdist/makechangelog.py | 109 + .../Python/Python-2.7.2/Demo/pdist/rcsbump | 33 + .../Python-2.7.2/Demo/pdist/rcsclient.py | 71 + .../Python/Python-2.7.2/Demo/pdist/rcslib.py | 334 + .../Python/Python-2.7.2/Demo/pdist/rcvs | 8 + .../Python/Python-2.7.2/Demo/pdist/rcvs.py | 477 + .../Python/Python-2.7.2/Demo/pdist/rrcs | 8 + .../Python/Python-2.7.2/Demo/pdist/rrcs.py | 160 + .../Python-2.7.2/Demo/pdist/security.py | 33 + .../Python/Python-2.7.2/Demo/pdist/server.py | 145 + .../Python/Python-2.7.2/Demo/pdist/sumtree.py | 24 + .../Python/Python-2.7.2/Demo/scripts/README | 22 + .../Python/Python-2.7.2/Demo/scripts/beer.py | 20 + .../Python/Python-2.7.2/Demo/scripts/eqfix.py | 198 + .../Python/Python-2.7.2/Demo/scripts/fact.py | 49 + .../Python-2.7.2/Demo/scripts/find-uname.py | 40 + .../Python/Python-2.7.2/Demo/scripts/from.py | 35 + .../Python-2.7.2/Demo/scripts/lpwatch.py | 102 + .../Python-2.7.2/Demo/scripts/makedir.py | 21 + .../Python-2.7.2/Demo/scripts/markov.py | 121 + .../Python-2.7.2/Demo/scripts/mboxconvert.py | 124 + .../Python/Python-2.7.2/Demo/scripts/morse.py | 138 + .../Python-2.7.2/Demo/scripts/newslist.doc | 59 + .../Python-2.7.2/Demo/scripts/newslist.py | 362 + .../Python/Python-2.7.2/Demo/scripts/pi.py | 33 + .../Python/Python-2.7.2/Demo/scripts/pp.py | 129 + .../Python-2.7.2/Demo/scripts/primes.py | 30 + .../Python-2.7.2/Demo/scripts/queens.py | 85 + .../Python-2.7.2/Demo/scripts/script.py | 42 + .../Python-2.7.2/Demo/scripts/unbirthday.py | 104 + .../Python-2.7.2/Demo/scripts/update.py | 92 + .../Python/Python-2.7.2/Demo/sockets/README | 14 + .../Python-2.7.2/Demo/sockets/broadcast.py | 15 + .../Python-2.7.2/Demo/sockets/echosvr.py | 31 + .../Python-2.7.2/Demo/sockets/finger.py | 58 + .../Python/Python-2.7.2/Demo/sockets/ftp.py | 146 + .../Python-2.7.2/Demo/sockets/gopher.py | 347 + .../Python/Python-2.7.2/Demo/sockets/mcast.py | 80 + .../Python/Python-2.7.2/Demo/sockets/radio.py | 14 + .../Python-2.7.2/Demo/sockets/rpython.py | 35 + .../Python-2.7.2/Demo/sockets/rpythond.py | 52 + .../Python-2.7.2/Demo/sockets/telnet.py | 109 + .../Python-2.7.2/Demo/sockets/throughput.py | 93 + .../Python-2.7.2/Demo/sockets/udpecho.py | 63 + .../Python-2.7.2/Demo/sockets/unicast.py | 14 + .../Python-2.7.2/Demo/sockets/unixclient.py | 12 + .../Python-2.7.2/Demo/sockets/unixserver.py | 24 + .../Python-2.7.2/Demo/xml/elem_count.py | 42 + .../Python/Python-2.7.2/Demo/xml/roundtrip.py | 46 + .../Python/Python-2.7.2/Demo/xml/rss2html.py | 97 + .../Python/Python-2.7.2/Demo/zlib/minigzip.py | 133 + .../Python/Python-2.7.2/Demo/zlib/zlibdemo.py | 48 + .../Python/Python-2.7.2/Grammar/Grammar | 142 + .../Python/Python-2.7.2/Include/Python-ast.h | 535 + .../Python/Python-2.7.2/Include/Python.h | 178 + .../Python/Python-2.7.2/Include/abstract.h | 1396 ++ .../Python/Python-2.7.2/Include/asdl.h | 45 + .../Python/Python-2.7.2/Include/ast.h | 13 + .../Python/Python-2.7.2/Include/bitset.h | 32 + .../Python/Python-2.7.2/Include/boolobject.h | 36 + .../Python-2.7.2/Include/bufferobject.h | 33 + .../Python-2.7.2/Include/bytearrayobject.h | 57 + .../Python-2.7.2/Include/bytes_methods.h | 75 + .../Python/Python-2.7.2/Include/bytesobject.h | 27 + .../Python/Python-2.7.2/Include/cStringIO.h | 73 + .../Python/Python-2.7.2/Include/cellobject.h | 28 + .../Python/Python-2.7.2/Include/ceval.h | 153 + .../Python/Python-2.7.2/Include/classobject.h | 83 + .../Python/Python-2.7.2/Include/cobject.h | 89 + .../Python/Python-2.7.2/Include/code.h | 107 + .../Python/Python-2.7.2/Include/codecs.h | 167 + .../Python/Python-2.7.2/Include/compile.h | 40 + .../Python-2.7.2/Include/complexobject.h | 66 + .../Python/Python-2.7.2/Include/datetime.h | 239 + .../Python/Python-2.7.2/Include/descrobject.h | 94 + .../Python/Python-2.7.2/Include/dictobject.h | 156 + .../Python/Python-2.7.2/Include/dtoa.h | 15 + .../Python/Python-2.7.2/Include/enumobject.h | 17 + .../Python/Python-2.7.2/Include/errcode.h | 36 + .../Python/Python-2.7.2/Include/eval.h | 25 + .../Python/Python-2.7.2/Include/fileobject.h | 102 + .../Python/Python-2.7.2/Include/floatobject.h | 140 + .../Python/Python-2.7.2/Include/frameobject.h | 89 + .../Python/Python-2.7.2/Include/funcobject.h | 76 + .../Python/Python-2.7.2/Include/genobject.h | 40 + .../Python/Python-2.7.2/Include/graminit.h | 87 + .../Python/Python-2.7.2/Include/grammar.h | 93 + .../Python/Python-2.7.2/Include/import.h | 71 + .../Python/Python-2.7.2/Include/intobject.h | 80 + .../Python/Python-2.7.2/Include/intrcheck.h | 15 + .../Python/Python-2.7.2/Include/iterobject.h | 23 + .../Python/Python-2.7.2/Include/listobject.h | 68 + .../Python/Python-2.7.2/Include/longintrepr.h | 103 + .../Python/Python-2.7.2/Include/longobject.h | 134 + .../Python/Python-2.7.2/Include/marshal.h | 25 + .../Python-2.7.2/Include/memoryobject.h | 74 + .../Python/Python-2.7.2/Include/metagrammar.h | 18 + .../Python-2.7.2/Include/methodobject.h | 93 + .../Python/Python-2.7.2/Include/modsupport.h | 134 + .../Python-2.7.2/Include/moduleobject.h | 24 + .../Python/Python-2.7.2/Include/node.h | 40 + .../Python/Python-2.7.2/Include/object.h | 986 + .../Python/Python-2.7.2/Include/objimpl.h | 354 + .../Python/Python-2.7.2/Include/opcode.h | 162 + .../Python/Python-2.7.2/Include/osdefs.h | 71 + .../Python/Python-2.7.2/Include/parsetok.h | 64 + .../Python/Python-2.7.2/Include/patchlevel.h | 43 + .../Python/Python-2.7.2/Include/pgen.h | 18 + .../Python/Python-2.7.2/Include/pgenheaders.h | 42 + .../Python/Python-2.7.2/Include/py_curses.h | 176 + .../Python/Python-2.7.2/Include/pyarena.h | 62 + .../Python/Python-2.7.2/Include/pycapsule.h | 56 + .../Python/Python-2.7.2/Include/pyctype.h | 31 + .../Python/Python-2.7.2/Include/pydebug.h | 40 + .../Python/Python-2.7.2/Include/pyerrors.h | 328 + .../Python/Python-2.7.2/Include/pyexpat.h | 48 + .../Python/Python-2.7.2/Include/pyfpe.h | 176 + .../Python/Python-2.7.2/Include/pygetopt.h | 17 + .../Python/Python-2.7.2/Include/pymacconfig.h | 102 + .../Python-2.7.2/Include/pymactoolbox.h | 217 + .../Python/Python-2.7.2/Include/pymath.h | 192 + .../Python/Python-2.7.2/Include/pymem.h | 122 + .../Python/Python-2.7.2/Include/pyport.h | 918 + .../Python/Python-2.7.2/Include/pystate.h | 198 + .../Python/Python-2.7.2/Include/pystrcmp.h | 23 + .../Python/Python-2.7.2/Include/pystrtod.h | 45 + .../Python/Python-2.7.2/Include/pythonrun.h | 178 + .../Python/Python-2.7.2/Include/pythread.h | 41 + .../Python/Python-2.7.2/Include/rangeobject.h | 28 + .../Python/Python-2.7.2/Include/setobject.h | 99 + .../Python/Python-2.7.2/Include/sliceobject.h | 44 + .../Python-2.7.2/Include/stringobject.h | 210 + .../Python-2.7.2/Include/structmember.h | 99 + .../Python/Python-2.7.2/Include/structseq.h | 41 + .../Python/Python-2.7.2/Include/symtable.h | 98 + .../Python/Python-2.7.2/Include/sysmodule.h | 32 + .../Python/Python-2.7.2/Include/timefuncs.h | 23 + .../Python/Python-2.7.2/Include/token.h | 85 + .../Python/Python-2.7.2/Include/traceback.h | 31 + .../Python/Python-2.7.2/Include/tupleobject.h | 61 + .../Python/Python-2.7.2/Include/ucnhash.h | 33 + .../Python-2.7.2/Include/unicodeobject.h | 1413 ++ .../Python/Python-2.7.2/Include/warnings.h | 23 + .../Python-2.7.2/Include/weakrefobject.h | 75 + .../Applications/Python/Python-2.7.2/LICENSE | 279 + .../Python/Python-2.7.2/Lib/BaseHTTPServer.py | 606 + .../Python/Python-2.7.2/Lib/Bastion.py | 180 + .../Python/Python-2.7.2/Lib/CGIHTTPServer.py | 374 + .../Python/Python-2.7.2/Lib/ConfigParser.py | 745 + .../Python/Python-2.7.2/Lib/Cookie.py | 761 + .../Python-2.7.2/Lib/DocXMLRPCServer.py | 279 + .../Python/Python-2.7.2/Lib/HTMLParser.py | 393 + .../Python/Python-2.7.2/Lib/MimeWriter.py | 186 + .../Python/Python-2.7.2/Lib/Queue.py | 244 + .../Python-2.7.2/Lib/SimpleHTTPServer.py | 220 + .../Python-2.7.2/Lib/SimpleXMLRPCServer.py | 704 + .../Python/Python-2.7.2/Lib/SocketServer.py | 716 + .../Python/Python-2.7.2/Lib/StringIO.py | 324 + .../Python/Python-2.7.2/Lib/UserDict.py | 180 + .../Python/Python-2.7.2/Lib/UserList.py | 88 + .../Python/Python-2.7.2/Lib/UserString.py | 228 + .../Python/Python-2.7.2/Lib/_LWPCookieJar.py | 170 + .../Python-2.7.2/Lib/_MozillaCookieJar.py | 149 + .../Python/Python-2.7.2/Lib/__future__.py | 128 + .../Python/Python-2.7.2/Lib/__phello__.foo.py | 1 + .../Python/Python-2.7.2/Lib/_abcoll.py | 601 + .../Python/Python-2.7.2/Lib/_pyio.py | 2006 ++ .../Python/Python-2.7.2/Lib/_strptime.py | 454 + .../Python/Python-2.7.2/Lib/_weakrefset.py | 216 + .../Python/Python-2.7.2/Lib/abc.py | 185 + .../Python/Python-2.7.2/Lib/aifc.py | 957 + .../Python/Python-2.7.2/Lib/antigravity.py | 4 + .../Python/Python-2.7.2/Lib/anydbm.py | 85 + .../Python/Python-2.7.2/Lib/argparse.py | 2347 +++ .../Python/Python-2.7.2/Lib/ast.py | 311 + .../Python/Python-2.7.2/Lib/asynchat.py | 314 + .../Python/Python-2.7.2/Lib/asyncore.py | 655 + .../Python/Python-2.7.2/Lib/atexit.py | 65 + .../Python/Python-2.7.2/Lib/base64.py | 360 + .../Python/Python-2.7.2/Lib/bdb.py | 632 + .../Python/Python-2.7.2/Lib/binhex.py | 508 + .../Python/Python-2.7.2/Lib/bisect.py | 92 + .../Python/Python-2.7.2/Lib/cProfile.py | 199 + .../Python/Python-2.7.2/Lib/calendar.py | 708 + .../Python/Python-2.7.2/Lib/cgi.py | 1051 + .../Python/Python-2.7.2/Lib/cgitb.py | 318 + .../Python/Python-2.7.2/Lib/chunk.py | 167 + .../Python/Python-2.7.2/Lib/cmd.py | 401 + .../Python/Python-2.7.2/Lib/code.py | 310 + .../Python/Python-2.7.2/Lib/codecs.py | 1098 + .../Python/Python-2.7.2/Lib/codeop.py | 168 + .../Python/Python-2.7.2/Lib/collections.py | 667 + .../Python/Python-2.7.2/Lib/colorsys.py | 156 + .../Python/Python-2.7.2/Lib/commands.py | 90 + .../Python/Python-2.7.2/Lib/compileall.py | 214 + .../Python-2.7.2/Lib/compiler/__init__.py | 31 + .../Python/Python-2.7.2/Lib/compiler/ast.py | 1419 ++ .../Python-2.7.2/Lib/compiler/consts.py | 23 + .../Python-2.7.2/Lib/compiler/future.py | 74 + .../Python/Python-2.7.2/Lib/compiler/misc.py | 73 + .../Python-2.7.2/Lib/compiler/pyassem.py | 763 + .../Python-2.7.2/Lib/compiler/pycodegen.py | 1555 ++ .../Python-2.7.2/Lib/compiler/symbols.py | 462 + .../Python-2.7.2/Lib/compiler/syntax.py | 46 + .../Python-2.7.2/Lib/compiler/transformer.py | 1535 ++ .../Python-2.7.2/Lib/compiler/visitor.py | 113 + .../Python/Python-2.7.2/Lib/contextlib.py | 154 + .../Python/Python-2.7.2/Lib/cookielib.py | 1794 ++ .../Python/Python-2.7.2/Lib/copy.py | 433 + .../Python/Python-2.7.2/Lib/copy_reg.py | 201 + .../Python/Python-2.7.2/Lib/csv.py | 451 + .../Python/Python-2.7.2/Lib/dbhash.py | 18 + .../Python/Python-2.7.2/Lib/decimal.py | 6149 ++++++ .../Python/Python-2.7.2/Lib/difflib.py | 2059 ++ .../Python/Python-2.7.2/Lib/dircache.py | 41 + .../Python/Python-2.7.2/Lib/dis.py | 224 + .../Python/Python-2.7.2/Lib/distutils/README | 13 + .../Python-2.7.2/Lib/distutils/__init__.py | 19 + .../Lib/distutils/archive_util.py | 243 + .../Lib/distutils/bcppcompiler.py | 394 + .../Python-2.7.2/Lib/distutils/ccompiler.py | 1145 + .../Python/Python-2.7.2/Lib/distutils/cmd.py | 457 + .../Lib/distutils/command/__init__.py | 33 + .../Lib/distutils/command/bdist.py | 146 + .../Lib/distutils/command/bdist_dumb.py | 132 + .../Lib/distutils/command/bdist_msi.py | 738 + .../Lib/distutils/command/bdist_rpm.py | 575 + .../Lib/distutils/command/bdist_wininst.py | 364 + .../Lib/distutils/command/build.py | 147 + .../Lib/distutils/command/build_clib.py | 209 + .../Lib/distutils/command/build_ext.py | 769 + .../Lib/distutils/command/build_py.py | 393 + .../Lib/distutils/command/build_scripts.py | 131 + .../Lib/distutils/command/check.py | 143 + .../Lib/distutils/command/clean.py | 80 + .../Lib/distutils/command/command_template | 45 + .../Lib/distutils/command/config.py | 357 + .../Lib/distutils/command/install.py | 672 + .../Lib/distutils/command/install_data.py | 81 + .../Lib/distutils/command/install_egg_info.py | 78 + .../Lib/distutils/command/install_headers.py | 51 + .../Lib/distutils/command/install_lib.py | 219 + .../Lib/distutils/command/install_scripts.py | 64 + .../Lib/distutils/command/register.py | 307 + .../Lib/distutils/command/sdist.py | 464 + .../Lib/distutils/command/upload.py | 194 + .../Lib/distutils/command/wininst-6.0.exe | Bin 0 -> 61440 bytes .../Lib/distutils/command/wininst-7.1.exe | Bin 0 -> 65536 bytes .../Lib/distutils/command/wininst-8.0.exe | Bin 0 -> 61440 bytes .../distutils/command/wininst-9.0-amd64.exe | Bin 0 -> 223744 bytes .../Lib/distutils/command/wininst-9.0.exe | Bin 0 -> 196096 bytes .../Python-2.7.2/Lib/distutils/config.py | 121 + .../Python/Python-2.7.2/Lib/distutils/core.py | 242 + .../Lib/distutils/cygwinccompiler.py | 449 + .../Python-2.7.2/Lib/distutils/debug.py | 7 + .../Python-2.7.2/Lib/distutils/dep_util.py | 88 + .../Python-2.7.2/Lib/distutils/dir_util.py | 212 + .../Python/Python-2.7.2/Lib/distutils/dist.py | 1248 ++ .../Lib/distutils/emxccompiler.py | 319 + .../Python-2.7.2/Lib/distutils/errors.py | 88 + .../Python-2.7.2/Lib/distutils/extension.py | 255 + .../Lib/distutils/fancy_getopt.py | 484 + .../Python-2.7.2/Lib/distutils/file_util.py | 231 + .../Python-2.7.2/Lib/distutils/filelist.py | 336 + .../Python/Python-2.7.2/Lib/distutils/log.py | 71 + .../Lib/distutils/msvc9compiler.py | 764 + .../Lib/distutils/msvccompiler.py | 659 + .../Python-2.7.2/Lib/distutils/spawn.py | 173 + .../Python-2.7.2/Lib/distutils/sysconfig.py | 571 + .../Lib/distutils/tests/Setup.sample | 67 + .../Lib/distutils/tests/__init__.py | 36 + .../distutils/tests/setuptools_build_ext.py | 287 + .../distutils/tests/setuptools_extension.py | 51 + .../Lib/distutils/tests/support.py | 133 + .../Lib/distutils/tests/test_archive_util.py | 284 + .../Lib/distutils/tests/test_bdist.py | 45 + .../Lib/distutils/tests/test_bdist_dumb.py | 105 + .../Lib/distutils/tests/test_bdist_msi.py | 25 + .../Lib/distutils/tests/test_bdist_rpm.py | 127 + .../Lib/distutils/tests/test_bdist_wininst.py | 32 + .../Lib/distutils/tests/test_build.py | 55 + .../Lib/distutils/tests/test_build_clib.py | 145 + .../Lib/distutils/tests/test_build_ext.py | 491 + .../Lib/distutils/tests/test_build_py.py | 122 + .../Lib/distutils/tests/test_build_scripts.py | 112 + .../Lib/distutils/tests/test_ccompiler.py | 81 + .../Lib/distutils/tests/test_check.py | 99 + .../Lib/distutils/tests/test_clean.py | 51 + .../Lib/distutils/tests/test_cmd.py | 127 + .../Lib/distutils/tests/test_config.py | 123 + .../Lib/distutils/tests/test_config_cmd.py | 90 + .../Lib/distutils/tests/test_core.py | 108 + .../Lib/distutils/tests/test_dep_util.py | 81 + .../Lib/distutils/tests/test_dir_util.py | 116 + .../Lib/distutils/tests/test_dist.py | 436 + .../Lib/distutils/tests/test_file_util.py | 81 + .../Lib/distutils/tests/test_filelist.py | 85 + .../Lib/distutils/tests/test_install.py | 57 + .../Lib/distutils/tests/test_install_data.py | 77 + .../distutils/tests/test_install_headers.py | 41 + .../Lib/distutils/tests/test_install_lib.py | 107 + .../distutils/tests/test_install_scripts.py | 82 + .../Lib/distutils/tests/test_msvc9compiler.py | 141 + .../Lib/distutils/tests/test_register.py | 261 + .../Lib/distutils/tests/test_sdist.py | 429 + .../Lib/distutils/tests/test_spawn.py | 60 + .../Lib/distutils/tests/test_sysconfig.py | 82 + .../Lib/distutils/tests/test_text_file.py | 107 + .../Lib/distutils/tests/test_unixccompiler.py | 130 + .../Lib/distutils/tests/test_upload.py | 131 + .../Lib/distutils/tests/test_util.py | 25 + .../Lib/distutils/tests/test_version.py | 71 + .../distutils/tests/test_versionpredicate.py | 13 + .../Python-2.7.2/Lib/distutils/text_file.py | 304 + .../Lib/distutils/unixccompiler.py | 346 + .../Python/Python-2.7.2/Lib/distutils/util.py | 567 + .../Python-2.7.2/Lib/distutils/version.py | 299 + .../Lib/distutils/versionpredicate.py | 164 + .../Python/Python-2.7.2/Lib/doctest.py | 2731 +++ .../Python/Python-2.7.2/Lib/dumbdbm.py | 250 + .../Python/Python-2.7.2/Lib/dummy_thread.py | 145 + .../Python-2.7.2/Lib/dummy_threading.py | 78 + .../Python/Python-2.7.2/Lib/email/__init__.py | 123 + .../Python-2.7.2/Lib/email/_parseaddr.py | 497 + .../Python-2.7.2/Lib/email/base64mime.py | 183 + .../Python/Python-2.7.2/Lib/email/charset.py | 397 + .../Python/Python-2.7.2/Lib/email/encoders.py | 82 + .../Python/Python-2.7.2/Lib/email/errors.py | 57 + .../Python-2.7.2/Lib/email/feedparser.py | 484 + .../Python-2.7.2/Lib/email/generator.py | 364 + .../Python/Python-2.7.2/Lib/email/header.py | 514 + .../Python-2.7.2/Lib/email/iterators.py | 73 + .../Python/Python-2.7.2/Lib/email/message.py | 797 + .../Python-2.7.2/Lib/email/mime/__init__.py | 0 .../Lib/email/mime/application.py | 36 + .../Python-2.7.2/Lib/email/mime/audio.py | 73 + .../Python-2.7.2/Lib/email/mime/base.py | 26 + .../Python-2.7.2/Lib/email/mime/image.py | 46 + .../Python-2.7.2/Lib/email/mime/message.py | 34 + .../Python-2.7.2/Lib/email/mime/multipart.py | 47 + .../Lib/email/mime/nonmultipart.py | 22 + .../Python-2.7.2/Lib/email/mime/text.py | 30 + .../Python/Python-2.7.2/Lib/email/parser.py | 91 + .../Python-2.7.2/Lib/email/quoprimime.py | 336 + .../Python-2.7.2/Lib/email/test/__init__.py | 0 .../Lib/email/test/data/PyBanner048.gif | Bin 0 -> 954 bytes .../Lib/email/test/data/audiotest.au | Bin 0 -> 28144 bytes .../Lib/email/test/data/msg_01.txt | 19 + .../Lib/email/test/data/msg_02.txt | 135 + .../Lib/email/test/data/msg_03.txt | 16 + .../Lib/email/test/data/msg_04.txt | 37 + .../Lib/email/test/data/msg_05.txt | 28 + .../Lib/email/test/data/msg_06.txt | 33 + .../Lib/email/test/data/msg_07.txt | 83 + .../Lib/email/test/data/msg_08.txt | 24 + .../Lib/email/test/data/msg_09.txt | 24 + .../Lib/email/test/data/msg_10.txt | 39 + .../Lib/email/test/data/msg_11.txt | 7 + .../Lib/email/test/data/msg_12.txt | 36 + .../Lib/email/test/data/msg_12a.txt | 38 + .../Lib/email/test/data/msg_13.txt | 94 + .../Lib/email/test/data/msg_14.txt | 23 + .../Lib/email/test/data/msg_15.txt | 52 + .../Lib/email/test/data/msg_16.txt | 123 + .../Lib/email/test/data/msg_17.txt | 12 + .../Lib/email/test/data/msg_18.txt | 6 + .../Lib/email/test/data/msg_19.txt | 43 + .../Lib/email/test/data/msg_20.txt | 22 + .../Lib/email/test/data/msg_21.txt | 20 + .../Lib/email/test/data/msg_22.txt | 46 + .../Lib/email/test/data/msg_23.txt | 8 + .../Lib/email/test/data/msg_24.txt | 10 + .../Lib/email/test/data/msg_25.txt | 117 + .../Lib/email/test/data/msg_26.txt | 45 + .../Lib/email/test/data/msg_27.txt | 15 + .../Lib/email/test/data/msg_28.txt | 25 + .../Lib/email/test/data/msg_29.txt | 22 + .../Lib/email/test/data/msg_30.txt | 23 + .../Lib/email/test/data/msg_31.txt | 15 + .../Lib/email/test/data/msg_32.txt | 14 + .../Lib/email/test/data/msg_33.txt | 29 + .../Lib/email/test/data/msg_34.txt | 19 + .../Lib/email/test/data/msg_35.txt | 4 + .../Lib/email/test/data/msg_36.txt | 40 + .../Lib/email/test/data/msg_37.txt | 22 + .../Lib/email/test/data/msg_38.txt | 101 + .../Lib/email/test/data/msg_39.txt | 83 + .../Lib/email/test/data/msg_40.txt | 10 + .../Lib/email/test/data/msg_41.txt | 8 + .../Lib/email/test/data/msg_42.txt | 20 + .../Lib/email/test/data/msg_43.txt | 217 + .../Lib/email/test/data/msg_44.txt | 33 + .../Lib/email/test/data/msg_45.txt | 33 + .../Lib/email/test/data/msg_46.txt | 23 + .../Python-2.7.2/Lib/email/test/test_email.py | 3529 ++++ .../Lib/email/test/test_email_codecs.py | 77 + .../email/test/test_email_codecs_renamed.py | 77 + .../Lib/email/test/test_email_renamed.py | 3297 +++ .../Lib/email/test/test_email_torture.py | 136 + .../Python/Python-2.7.2/Lib/email/utils.py | 324 + .../Python-2.7.2/Lib/encodings/__init__.py | 157 + .../Python-2.7.2/Lib/encodings/aliases.py | 527 + .../Python-2.7.2/Lib/encodings/ascii.py | 50 + .../Lib/encodings/base64_codec.py | 79 + .../Python/Python-2.7.2/Lib/encodings/big5.py | 39 + .../Python-2.7.2/Lib/encodings/big5hkscs.py | 39 + .../Python-2.7.2/Lib/encodings/bz2_codec.py | 102 + .../Python-2.7.2/Lib/encodings/charmap.py | 69 + .../Python-2.7.2/Lib/encodings/cp037.py | 307 + .../Python-2.7.2/Lib/encodings/cp1006.py | 307 + .../Python-2.7.2/Lib/encodings/cp1026.py | 307 + .../Python-2.7.2/Lib/encodings/cp1140.py | 307 + .../Python-2.7.2/Lib/encodings/cp1250.py | 307 + .../Python-2.7.2/Lib/encodings/cp1251.py | 307 + .../Python-2.7.2/Lib/encodings/cp1252.py | 307 + .../Python-2.7.2/Lib/encodings/cp1253.py | 307 + .../Python-2.7.2/Lib/encodings/cp1254.py | 307 + .../Python-2.7.2/Lib/encodings/cp1255.py | 307 + .../Python-2.7.2/Lib/encodings/cp1256.py | 307 + .../Python-2.7.2/Lib/encodings/cp1257.py | 307 + .../Python-2.7.2/Lib/encodings/cp1258.py | 307 + .../Python-2.7.2/Lib/encodings/cp424.py | 307 + .../Python-2.7.2/Lib/encodings/cp437.py | 698 + .../Python-2.7.2/Lib/encodings/cp500.py | 307 + .../Python-2.7.2/Lib/encodings/cp720.py | 309 + .../Python-2.7.2/Lib/encodings/cp737.py | 698 + .../Python-2.7.2/Lib/encodings/cp775.py | 697 + .../Python-2.7.2/Lib/encodings/cp850.py | 698 + .../Python-2.7.2/Lib/encodings/cp852.py | 698 + .../Python-2.7.2/Lib/encodings/cp855.py | 698 + .../Python-2.7.2/Lib/encodings/cp856.py | 307 + .../Python-2.7.2/Lib/encodings/cp857.py | 694 + .../Python-2.7.2/Lib/encodings/cp858.py | 698 + .../Python-2.7.2/Lib/encodings/cp860.py | 698 + .../Python-2.7.2/Lib/encodings/cp861.py | 698 + .../Python-2.7.2/Lib/encodings/cp862.py | 698 + .../Python-2.7.2/Lib/encodings/cp863.py | 698 + .../Python-2.7.2/Lib/encodings/cp864.py | 690 + .../Python-2.7.2/Lib/encodings/cp865.py | 698 + .../Python-2.7.2/Lib/encodings/cp866.py | 698 + .../Python-2.7.2/Lib/encodings/cp869.py | 689 + .../Python-2.7.2/Lib/encodings/cp874.py | 307 + .../Python-2.7.2/Lib/encodings/cp875.py | 307 + .../Python-2.7.2/Lib/encodings/cp932.py | 39 + .../Python-2.7.2/Lib/encodings/cp949.py | 39 + .../Python-2.7.2/Lib/encodings/cp950.py | 39 + .../Lib/encodings/euc_jis_2004.py | 39 + .../Lib/encodings/euc_jisx0213.py | 39 + .../Python-2.7.2/Lib/encodings/euc_jp.py | 39 + .../Python-2.7.2/Lib/encodings/euc_kr.py | 39 + .../Python-2.7.2/Lib/encodings/gb18030.py | 39 + .../Python-2.7.2/Lib/encodings/gb2312.py | 39 + .../Python/Python-2.7.2/Lib/encodings/gbk.py | 39 + .../Python-2.7.2/Lib/encodings/hex_codec.py | 79 + .../Python-2.7.2/Lib/encodings/hp_roman8.py | 152 + .../Python/Python-2.7.2/Lib/encodings/hz.py | 39 + .../Python/Python-2.7.2/Lib/encodings/idna.py | 288 + .../Python-2.7.2/Lib/encodings/iso2022_jp.py | 39 + .../Lib/encodings/iso2022_jp_1.py | 39 + .../Lib/encodings/iso2022_jp_2.py | 39 + .../Lib/encodings/iso2022_jp_2004.py | 39 + .../Lib/encodings/iso2022_jp_3.py | 39 + .../Lib/encodings/iso2022_jp_ext.py | 39 + .../Python-2.7.2/Lib/encodings/iso2022_kr.py | 39 + .../Python-2.7.2/Lib/encodings/iso8859_1.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_10.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_11.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_13.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_14.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_15.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_16.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_2.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_3.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_4.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_5.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_6.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_7.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_8.py | 307 + .../Python-2.7.2/Lib/encodings/iso8859_9.py | 307 + .../Python-2.7.2/Lib/encodings/johab.py | 39 + .../Python-2.7.2/Lib/encodings/koi8_r.py | 307 + .../Python-2.7.2/Lib/encodings/koi8_u.py | 307 + .../Python-2.7.2/Lib/encodings/latin_1.py | 50 + .../Python-2.7.2/Lib/encodings/mac_arabic.py | 698 + .../Lib/encodings/mac_centeuro.py | 307 + .../Lib/encodings/mac_croatian.py | 307 + .../Lib/encodings/mac_cyrillic.py | 307 + .../Python-2.7.2/Lib/encodings/mac_farsi.py | 307 + .../Python-2.7.2/Lib/encodings/mac_greek.py | 307 + .../Python-2.7.2/Lib/encodings/mac_iceland.py | 307 + .../Python-2.7.2/Lib/encodings/mac_latin2.py | 183 + .../Python-2.7.2/Lib/encodings/mac_roman.py | 307 + .../Lib/encodings/mac_romanian.py | 307 + .../Python-2.7.2/Lib/encodings/mac_turkish.py | 307 + .../Python/Python-2.7.2/Lib/encodings/mbcs.py | 47 + .../Python-2.7.2/Lib/encodings/palmos.py | 83 + .../Python-2.7.2/Lib/encodings/ptcp154.py | 175 + .../Python-2.7.2/Lib/encodings/punycode.py | 238 + .../Lib/encodings/quopri_codec.py | 75 + .../Lib/encodings/raw_unicode_escape.py | 45 + .../Python-2.7.2/Lib/encodings/rot_13.py | 118 + .../Python-2.7.2/Lib/encodings/shift_jis.py | 39 + .../Lib/encodings/shift_jis_2004.py | 39 + .../Lib/encodings/shift_jisx0213.py | 39 + .../Lib/encodings/string_escape.py | 38 + .../Python-2.7.2/Lib/encodings/tis_620.py | 307 + .../Python-2.7.2/Lib/encodings/undefined.py | 49 + .../Lib/encodings/unicode_escape.py | 45 + .../Lib/encodings/unicode_internal.py | 45 + .../Python-2.7.2/Lib/encodings/utf_16.py | 126 + .../Python-2.7.2/Lib/encodings/utf_16_be.py | 42 + .../Python-2.7.2/Lib/encodings/utf_16_le.py | 42 + .../Python-2.7.2/Lib/encodings/utf_32.py | 150 + .../Python-2.7.2/Lib/encodings/utf_32_be.py | 37 + .../Python-2.7.2/Lib/encodings/utf_32_le.py | 37 + .../Python-2.7.2/Lib/encodings/utf_7.py | 38 + .../Python-2.7.2/Lib/encodings/utf_8.py | 42 + .../Python-2.7.2/Lib/encodings/utf_8_sig.py | 117 + .../Python-2.7.2/Lib/encodings/uu_codec.py | 129 + .../Python-2.7.2/Lib/encodings/zlib_codec.py | 102 + .../Python/Python-2.7.2/Lib/filecmp.py | 295 + .../Python/Python-2.7.2/Lib/fileinput.py | 413 + .../Python/Python-2.7.2/Lib/fnmatch.py | 116 + .../Python/Python-2.7.2/Lib/formatter.py | 445 + .../Python/Python-2.7.2/Lib/fpformat.py | 145 + .../Python/Python-2.7.2/Lib/fractions.py | 605 + .../Python/Python-2.7.2/Lib/ftplib.py | 1036 + .../Python/Python-2.7.2/Lib/functools.py | 100 + .../Python/Python-2.7.2/Lib/genericpath.py | 105 + .../Python/Python-2.7.2/Lib/getopt.py | 210 + .../Python/Python-2.7.2/Lib/getpass.py | 179 + .../Python/Python-2.7.2/Lib/gettext.py | 591 + .../Python/Python-2.7.2/Lib/glob.py | 78 + .../Python/Python-2.7.2/Lib/gzip.py | 509 + .../Python/Python-2.7.2/Lib/hashlib.py | 146 + .../Python/Python-2.7.2/Lib/heapq.py | 442 + .../Python/Python-2.7.2/Lib/hmac.py | 133 + .../Python-2.7.2/Lib/hotshot/__init__.py | 78 + .../Python/Python-2.7.2/Lib/hotshot/log.py | 194 + .../Python/Python-2.7.2/Lib/hotshot/stats.py | 93 + .../Python/Python-2.7.2/Lib/hotshot/stones.py | 30 + .../Python/Python-2.7.2/Lib/htmlentitydefs.py | 273 + .../Python/Python-2.7.2/Lib/htmllib.py | 491 + .../Python/Python-2.7.2/Lib/httplib.py | 1392 ++ .../Python/Python-2.7.2/Lib/ihooks.py | 554 + .../Python/Python-2.7.2/Lib/imaplib.py | 1518 ++ .../Python/Python-2.7.2/Lib/imghdr.py | 161 + .../Python-2.7.2/Lib/importlib/__init__.py | 38 + .../Python/Python-2.7.2/Lib/imputil.py | 725 + .../Python/Python-2.7.2/Lib/inspect.py | 1056 + .../Python/Python-2.7.2/Lib/io.py | 98 + .../Python/Python-2.7.2/Lib/json/__init__.py | 339 + .../Python/Python-2.7.2/Lib/json/decoder.py | 385 + .../Python/Python-2.7.2/Lib/json/encoder.py | 442 + .../Python/Python-2.7.2/Lib/json/scanner.py | 67 + .../Python-2.7.2/Lib/json/tests/__init__.py | 73 + .../Lib/json/tests/test_check_circular.py | 34 + .../Lib/json/tests/test_decode.py | 50 + .../Lib/json/tests/test_default.py | 12 + .../Python-2.7.2/Lib/json/tests/test_dump.py | 23 + .../tests/test_encode_basestring_ascii.py | 41 + .../Python-2.7.2/Lib/json/tests/test_fail.py | 87 + .../Python-2.7.2/Lib/json/tests/test_float.py | 22 + .../Lib/json/tests/test_indent.py | 60 + .../Python-2.7.2/Lib/json/tests/test_pass1.py | 79 + .../Python-2.7.2/Lib/json/tests/test_pass2.py | 18 + .../Python-2.7.2/Lib/json/tests/test_pass3.py | 24 + .../Lib/json/tests/test_recursion.py | 108 + .../Lib/json/tests/test_scanstring.py | 109 + .../Lib/json/tests/test_separators.py | 44 + .../Lib/json/tests/test_speedups.py | 23 + .../Lib/json/tests/test_unicode.py | 85 + .../Python/Python-2.7.2/Lib/json/tool.py | 37 + .../Python/Python-2.7.2/Lib/keyword.py | 93 + .../Python-2.7.2/Lib/lib2to3/Grammar.txt | 158 + .../Lib/lib2to3/PatternGrammar.txt | 28 + .../Python-2.7.2/Lib/lib2to3/__init__.py | 1 + .../Python-2.7.2/Lib/lib2to3/__main__.py | 4 + .../Python-2.7.2/Lib/lib2to3/btm_matcher.py | 168 + .../Python-2.7.2/Lib/lib2to3/btm_utils.py | 283 + .../Python-2.7.2/Lib/lib2to3/fixer_base.py | 189 + .../Python-2.7.2/Lib/lib2to3/fixer_util.py | 432 + .../Lib/lib2to3/fixes/__init__.py | 1 + .../Lib/lib2to3/fixes/fix_apply.py | 59 + .../Lib/lib2to3/fixes/fix_basestring.py | 14 + .../Lib/lib2to3/fixes/fix_buffer.py | 22 + .../Lib/lib2to3/fixes/fix_callable.py | 37 + .../Lib/lib2to3/fixes/fix_dict.py | 107 + .../Lib/lib2to3/fixes/fix_except.py | 93 + .../Lib/lib2to3/fixes/fix_exec.py | 40 + .../Lib/lib2to3/fixes/fix_execfile.py | 52 + .../Lib/lib2to3/fixes/fix_exitfunc.py | 72 + .../Lib/lib2to3/fixes/fix_filter.py | 76 + .../Lib/lib2to3/fixes/fix_funcattrs.py | 21 + .../Lib/lib2to3/fixes/fix_future.py | 22 + .../Lib/lib2to3/fixes/fix_getcwdu.py | 19 + .../Lib/lib2to3/fixes/fix_has_key.py | 110 + .../Lib/lib2to3/fixes/fix_idioms.py | 152 + .../Lib/lib2to3/fixes/fix_import.py | 99 + .../Lib/lib2to3/fixes/fix_imports.py | 145 + .../Lib/lib2to3/fixes/fix_imports2.py | 16 + .../Lib/lib2to3/fixes/fix_input.py | 26 + .../Lib/lib2to3/fixes/fix_intern.py | 46 + .../Lib/lib2to3/fixes/fix_isinstance.py | 52 + .../Lib/lib2to3/fixes/fix_itertools.py | 43 + .../lib2to3/fixes/fix_itertools_imports.py | 57 + .../Lib/lib2to3/fixes/fix_long.py | 19 + .../Python-2.7.2/Lib/lib2to3/fixes/fix_map.py | 91 + .../Lib/lib2to3/fixes/fix_metaclass.py | 228 + .../Lib/lib2to3/fixes/fix_methodattrs.py | 24 + .../Python-2.7.2/Lib/lib2to3/fixes/fix_ne.py | 23 + .../Lib/lib2to3/fixes/fix_next.py | 103 + .../Lib/lib2to3/fixes/fix_nonzero.py | 21 + .../Lib/lib2to3/fixes/fix_numliterals.py | 28 + .../Lib/lib2to3/fixes/fix_operator.py | 96 + .../Lib/lib2to3/fixes/fix_paren.py | 44 + .../Lib/lib2to3/fixes/fix_print.py | 87 + .../Lib/lib2to3/fixes/fix_raise.py | 90 + .../Lib/lib2to3/fixes/fix_raw_input.py | 17 + .../Lib/lib2to3/fixes/fix_reduce.py | 35 + .../Lib/lib2to3/fixes/fix_renames.py | 70 + .../Lib/lib2to3/fixes/fix_repr.py | 23 + .../Lib/lib2to3/fixes/fix_set_literal.py | 53 + .../Lib/lib2to3/fixes/fix_standarderror.py | 18 + .../Lib/lib2to3/fixes/fix_sys_exc.py | 30 + .../Lib/lib2to3/fixes/fix_throw.py | 56 + .../Lib/lib2to3/fixes/fix_tuple_params.py | 175 + .../Lib/lib2to3/fixes/fix_types.py | 62 + .../Lib/lib2to3/fixes/fix_unicode.py | 25 + .../Lib/lib2to3/fixes/fix_urllib.py | 197 + .../Lib/lib2to3/fixes/fix_ws_comma.py | 39 + .../Lib/lib2to3/fixes/fix_xrange.py | 73 + .../Lib/lib2to3/fixes/fix_xreadlines.py | 25 + .../Python-2.7.2/Lib/lib2to3/fixes/fix_zip.py | 35 + .../Python/Python-2.7.2/Lib/lib2to3/main.py | 182 + .../Python-2.7.2/Lib/lib2to3/patcomp.py | 205 + .../Lib/lib2to3/pgen2/__init__.py | 4 + .../Python-2.7.2/Lib/lib2to3/pgen2/conv.py | 257 + .../Python-2.7.2/Lib/lib2to3/pgen2/driver.py | 140 + .../Python-2.7.2/Lib/lib2to3/pgen2/grammar.py | 184 + .../Lib/lib2to3/pgen2/literals.py | 60 + .../Python-2.7.2/Lib/lib2to3/pgen2/parse.py | 201 + .../Python-2.7.2/Lib/lib2to3/pgen2/pgen.py | 386 + .../Python-2.7.2/Lib/lib2to3/pgen2/token.py | 82 + .../Lib/lib2to3/pgen2/tokenize.py | 500 + .../Python/Python-2.7.2/Lib/lib2to3/pygram.py | 40 + .../Python/Python-2.7.2/Lib/lib2to3/pytree.py | 887 + .../Python-2.7.2/Lib/lib2to3/refactor.py | 741 + .../Lib/lib2to3/tests/__init__.py | 24 + .../Lib/lib2to3/tests/data/README | 6 + .../Lib/lib2to3/tests/data/bom.py | 2 + .../Lib/lib2to3/tests/data/crlf.py | 3 + .../lib2to3/tests/data/different_encoding.py | 6 + .../lib2to3/tests/data/fixers/bad_order.py | 5 + .../tests/data/fixers/myfixes/__init__.py | 0 .../tests/data/fixers/myfixes/fix_explicit.py | 6 + .../tests/data/fixers/myfixes/fix_first.py | 6 + .../tests/data/fixers/myfixes/fix_last.py | 7 + .../tests/data/fixers/myfixes/fix_parrot.py | 13 + .../tests/data/fixers/myfixes/fix_preorder.py | 6 + .../lib2to3/tests/data/fixers/no_fixer_cls.py | 1 + .../tests/data/fixers/parrot_example.py | 2 + .../lib2to3/tests/data/infinite_recursion.py | 2669 +++ .../lib2to3/tests/data/py2_test_grammar.py | 974 + .../lib2to3/tests/data/py3_test_grammar.py | 923 + .../Lib/lib2to3/tests/pytree_idempotency.py | 92 + .../Python-2.7.2/Lib/lib2to3/tests/support.py | 54 + .../Lib/lib2to3/tests/test_all_fixers.py | 23 + .../Lib/lib2to3/tests/test_fixers.py | 4529 ++++ .../Lib/lib2to3/tests/test_main.py | 41 + .../Lib/lib2to3/tests/test_parser.py | 227 + .../Lib/lib2to3/tests/test_pytree.py | 494 + .../Lib/lib2to3/tests/test_refactor.py | 281 + .../Lib/lib2to3/tests/test_util.py | 594 + .../Python/Python-2.7.2/Lib/linecache.py | 135 + .../Python/Python-2.7.2/Lib/locale.py | 1867 ++ .../Python-2.7.2/Lib/logging/__init__.py | 1707 ++ .../Python/Python-2.7.2/Lib/logging/config.py | 905 + .../Python-2.7.2/Lib/logging/handlers.py | 1158 ++ .../Python/Python-2.7.2/Lib/mailbox.py | 2171 ++ .../Python/Python-2.7.2/Lib/mailcap.py | 255 + .../Python/Python-2.7.2/Lib/markupbase.py | 392 + .../Python/Python-2.7.2/Lib/md5.py | 14 + .../Python/Python-2.7.2/Lib/mhlib.py | 1005 + .../Python/Python-2.7.2/Lib/mimetools.py | 250 + .../Python/Python-2.7.2/Lib/mimetypes.py | 591 + .../Python/Python-2.7.2/Lib/mimify.py | 468 + .../Python/Python-2.7.2/Lib/modulefinder.py | 671 + .../Python/Python-2.7.2/Lib/multifile.py | 162 + .../Python/Python-2.7.2/Lib/mutex.py | 55 + .../Python/Python-2.7.2/Lib/netrc.py | 122 + .../Python/Python-2.7.2/Lib/new.py | 17 + .../Python/Python-2.7.2/Lib/nntplib.py | 627 + .../Python/Python-2.7.2/Lib/ntpath.py | 523 + .../Python/Python-2.7.2/Lib/nturl2path.py | 66 + .../Python/Python-2.7.2/Lib/numbers.py | 391 + .../Python/Python-2.7.2/Lib/opcode.py | 192 + .../Python/Python-2.7.2/Lib/optparse.py | 1703 ++ .../Python/Python-2.7.2/Lib/os.py | 759 + .../Python/Python-2.7.2/Lib/pdb.doc | 202 + .../Python/Python-2.7.2/Lib/pdb.py | 1338 ++ .../Python/Python-2.7.2/Lib/pickle.py | 1391 ++ .../Python/Python-2.7.2/Lib/pickletools.py | 2274 ++ .../Python/Python-2.7.2/Lib/pipes.py | 280 + .../Python/Python-2.7.2/Lib/pkgutil.py | 583 + .../Python/Python-2.7.2/Lib/platform.py | 1614 ++ .../Python/Python-2.7.2/Lib/plistlib.py | 474 + .../Python/Python-2.7.2/Lib/popen2.py | 201 + .../Python/Python-2.7.2/Lib/poplib.py | 417 + .../Python/Python-2.7.2/Lib/posixfile.py | 237 + .../Python/Python-2.7.2/Lib/posixpath.py | 415 + .../Python/Python-2.7.2/Lib/pprint.py | 350 + .../Python/Python-2.7.2/Lib/profile.py | 619 + .../Python/Python-2.7.2/Lib/pstats.py | 713 + .../Python/Python-2.7.2/Lib/pty.py | 174 + .../Python/Python-2.7.2/Lib/py_compile.py | 170 + .../Python/Python-2.7.2/Lib/pyclbr.py | 342 + .../Python/Python-2.7.2/Lib/pydoc.py | 2337 +++ .../Python-2.7.2/Lib/pydoc_data/__init__.py | 0 .../Python-2.7.2/Lib/pydoc_data/topics.py | 83 + .../Python/Python-2.7.2/Lib/quopri.py | 237 + .../Python/Python-2.7.2/Lib/random.py | 908 + .../Python/Python-2.7.2/Lib/re.py | 326 + .../Python/Python-2.7.2/Lib/repr.py | 132 + .../Python/Python-2.7.2/Lib/rexec.py | 588 + .../Python/Python-2.7.2/Lib/rfc822.py | 1011 + .../Python/Python-2.7.2/Lib/rlcompleter.py | 170 + .../Python/Python-2.7.2/Lib/robotparser.py | 222 + .../Python/Python-2.7.2/Lib/runpy.py | 278 + .../Python/Python-2.7.2/Lib/sched.py | 134 + .../Python/Python-2.7.2/Lib/sets.py | 557 + .../Python/Python-2.7.2/Lib/sgmllib.py | 553 + .../Python/Python-2.7.2/Lib/sha.py | 15 + .../Python/Python-2.7.2/Lib/shelve.py | 239 + .../Python/Python-2.7.2/Lib/shlex.py | 292 + .../Python/Python-2.7.2/Lib/shutil.py | 552 + .../Python-2.7.2/Lib/site-packages/README | 2 + .../Python/Python-2.7.2/Lib/site.py | 615 + .../Python/Python-2.7.2/Lib/smtpd.py | 555 + .../Python/Python-2.7.2/Lib/smtplib.py | 848 + .../Python/Python-2.7.2/Lib/sndhdr.py | 228 + .../Python/Python-2.7.2/Lib/socket.py | 573 + .../Python/Python-2.7.2/Lib/sre.py | 13 + .../Python/Python-2.7.2/Lib/sre_compile.py | 524 + .../Python/Python-2.7.2/Lib/sre_constants.py | 261 + .../Python/Python-2.7.2/Lib/sre_parse.py | 790 + .../Python/Python-2.7.2/Lib/ssl.py | 464 + .../Python/Python-2.7.2/Lib/stat.py | 94 + .../Python/Python-2.7.2/Lib/statvfs.py | 18 + .../Python/Python-2.7.2/Lib/string.py | 642 + .../Python/Python-2.7.2/Lib/stringold.py | 432 + .../Python/Python-2.7.2/Lib/stringprep.py | 272 + .../Python/Python-2.7.2/Lib/struct.py | 3 + .../Python/Python-2.7.2/Lib/symbol.py | 114 + .../Python/Python-2.7.2/Lib/symtable.py | 242 + .../Python/Python-2.7.2/Lib/sysconfig.py | 687 + .../Python/Python-2.7.2/Lib/tabnanny.py | 329 + .../Python/Python-2.7.2/Lib/tarfile.py | 2594 +++ .../Python/Python-2.7.2/Lib/telnetlib.py | 657 + .../Python/Python-2.7.2/Lib/tempfile.py | 606 + .../Python/Python-2.7.2/Lib/test/185test.db | Bin 0 -> 16384 bytes .../Lib/test/Sine-1000Hz-300ms.aif | Bin 0 -> 61696 bytes .../Python/Python-2.7.2/Lib/test/__init__.py | 1 + .../Python/Python-2.7.2/Lib/test/audiotest.au | Bin 0 -> 28144 bytes .../Python/Python-2.7.2/Lib/test/autotest.py | 6 + .../Python-2.7.2/Lib/test/bad_coding.py | 1 + .../Python-2.7.2/Lib/test/bad_coding2.py | 2 + .../Python/Python-2.7.2/Lib/test/badcert.pem | 36 + .../Python/Python-2.7.2/Lib/test/badkey.pem | 40 + .../Lib/test/badsyntax_future3.py | 10 + .../Lib/test/badsyntax_future4.py | 10 + .../Lib/test/badsyntax_future5.py | 12 + .../Lib/test/badsyntax_future6.py | 10 + .../Lib/test/badsyntax_future7.py | 11 + .../Lib/test/badsyntax_future8.py | 10 + .../Lib/test/badsyntax_future9.py | 10 + .../Lib/test/badsyntax_nocaret.py | 2 + .../Python-2.7.2/Lib/test/buffer_tests.py | 206 + .../Python/Python-2.7.2/Lib/test/cfgparser.1 | 2 + .../Python-2.7.2/Lib/test/check_soundcard.vbs | 13 + .../Lib/test/cjkencodings/big5-utf8.txt | 9 + .../Lib/test/cjkencodings/big5.txt | 9 + .../Lib/test/cjkencodings/big5hkscs-utf8.txt | 2 + .../Lib/test/cjkencodings/big5hkscs.txt | 2 + .../Lib/test/cjkencodings/cp949-utf8.txt | 9 + .../Lib/test/cjkencodings/cp949.txt | 9 + .../test/cjkencodings/euc_jisx0213-utf8.txt | 8 + .../Lib/test/cjkencodings/euc_jisx0213.txt | 8 + .../Lib/test/cjkencodings/euc_jp-utf8.txt | 7 + .../Lib/test/cjkencodings/euc_jp.txt | 7 + .../Lib/test/cjkencodings/euc_kr-utf8.txt | 7 + .../Lib/test/cjkencodings/euc_kr.txt | 7 + .../Lib/test/cjkencodings/gb18030-utf8.txt | 15 + .../Lib/test/cjkencodings/gb18030.txt | 15 + .../Lib/test/cjkencodings/gb2312-utf8.txt | 6 + .../Lib/test/cjkencodings/gb2312.txt | 6 + .../Lib/test/cjkencodings/gbk-utf8.txt | 14 + .../Lib/test/cjkencodings/gbk.txt | 14 + .../Lib/test/cjkencodings/hz-utf8.txt | 2 + .../Python-2.7.2/Lib/test/cjkencodings/hz.txt | 2 + .../Lib/test/cjkencodings/johab-utf8.txt | 9 + .../Lib/test/cjkencodings/johab.txt | 9 + .../Lib/test/cjkencodings/shift_jis-utf8.txt | 7 + .../Lib/test/cjkencodings/shift_jis.txt | 7 + .../test/cjkencodings/shift_jisx0213-utf8.txt | 8 + .../Lib/test/cjkencodings/shift_jisx0213.txt | 8 + .../Python-2.7.2/Lib/test/cmath_testcases.txt | 2365 +++ .../Python-2.7.2/Lib/test/crashers/README | 16 + .../Lib/test/crashers/bogus_code_obj.py | 19 + .../Lib/test/crashers/borrowed_ref_1.py | 29 + .../Lib/test/crashers/borrowed_ref_2.py | 38 + .../Lib/test/crashers/compiler_recursion.py | 5 + .../Lib/test/crashers/gc_has_finalizer.py | 36 + .../Lib/test/crashers/gc_inspection.py | 32 + .../Lib/test/crashers/infinite_loop_re.py | 16 + .../Lib/test/crashers/loosing_mro_ref.py | 35 + .../test/crashers/mutation_inside_cyclegc.py | 31 + .../Lib/test/crashers/nasty_eq_vs_dict.py | 47 + .../test/crashers/recursion_limit_too_high.py | 16 + .../Lib/test/crashers/recursive_call.py | 15 + .../Python-2.7.2/Lib/test/curses_tests.py | 46 + .../Python/Python-2.7.2/Lib/test/data/README | 2 + .../Lib/test/decimaltestdata/abs.decTest | 161 + .../Lib/test/decimaltestdata/add.decTest | 2716 +++ .../Lib/test/decimaltestdata/and.decTest | 338 + .../Lib/test/decimaltestdata/base.decTest | 1411 ++ .../Lib/test/decimaltestdata/clamp.decTest | 211 + .../Lib/test/decimaltestdata/class.decTest | 131 + .../Lib/test/decimaltestdata/compare.decTest | 758 + .../test/decimaltestdata/comparetotal.decTest | 798 + .../decimaltestdata/comparetotmag.decTest | 790 + .../Lib/test/decimaltestdata/copy.decTest | 86 + .../Lib/test/decimaltestdata/copyabs.decTest | 86 + .../test/decimaltestdata/copynegate.decTest | 86 + .../Lib/test/decimaltestdata/copysign.decTest | 177 + .../Lib/test/decimaltestdata/ddAbs.decTest | 126 + .../Lib/test/decimaltestdata/ddAdd.decTest | 1328 ++ .../Lib/test/decimaltestdata/ddAnd.decTest | 347 + .../Lib/test/decimaltestdata/ddBase.decTest | 1104 + .../test/decimaltestdata/ddCanonical.decTest | 357 + .../Lib/test/decimaltestdata/ddClass.decTest | 76 + .../test/decimaltestdata/ddCompare.decTest | 744 + .../test/decimaltestdata/ddCompareSig.decTest | 647 + .../decimaltestdata/ddCompareTotal.decTest | 706 + .../decimaltestdata/ddCompareTotalMag.decTest | 706 + .../Lib/test/decimaltestdata/ddCopy.decTest | 88 + .../test/decimaltestdata/ddCopyAbs.decTest | 88 + .../test/decimaltestdata/ddCopyNegate.decTest | 88 + .../test/decimaltestdata/ddCopySign.decTest | 175 + .../Lib/test/decimaltestdata/ddDivide.decTest | 863 + .../test/decimaltestdata/ddDivideInt.decTest | 449 + .../Lib/test/decimaltestdata/ddEncode.decTest | 495 + .../Lib/test/decimaltestdata/ddFMA.decTest | 1698 ++ .../Lib/test/decimaltestdata/ddInvert.decTest | 202 + .../Lib/test/decimaltestdata/ddLogB.decTest | 159 + .../Lib/test/decimaltestdata/ddMax.decTest | 322 + .../Lib/test/decimaltestdata/ddMaxMag.decTest | 304 + .../Lib/test/decimaltestdata/ddMin.decTest | 309 + .../Lib/test/decimaltestdata/ddMinMag.decTest | 293 + .../Lib/test/decimaltestdata/ddMinus.decTest | 88 + .../test/decimaltestdata/ddMultiply.decTest | 553 + .../test/decimaltestdata/ddNextMinus.decTest | 126 + .../test/decimaltestdata/ddNextPlus.decTest | 124 + .../test/decimaltestdata/ddNextToward.decTest | 374 + .../Lib/test/decimaltestdata/ddOr.decTest | 292 + .../Lib/test/decimaltestdata/ddPlus.decTest | 88 + .../test/decimaltestdata/ddQuantize.decTest | 833 + .../Lib/test/decimaltestdata/ddReduce.decTest | 182 + .../test/decimaltestdata/ddRemainder.decTest | 600 + .../decimaltestdata/ddRemainderNear.decTest | 629 + .../Lib/test/decimaltestdata/ddRotate.decTest | 262 + .../decimaltestdata/ddSameQuantum.decTest | 389 + .../Lib/test/decimaltestdata/ddScaleB.decTest | 243 + .../Lib/test/decimaltestdata/ddShift.decTest | 262 + .../test/decimaltestdata/ddSubtract.decTest | 629 + .../test/decimaltestdata/ddToIntegral.decTest | 257 + .../Lib/test/decimaltestdata/ddXor.decTest | 337 + .../test/decimaltestdata/decDouble.decTest | 65 + .../Lib/test/decimaltestdata/decQuad.decTest | 65 + .../test/decimaltestdata/decSingle.decTest | 25 + .../Lib/test/decimaltestdata/divide.decTest | 854 + .../test/decimaltestdata/divideint.decTest | 486 + .../Lib/test/decimaltestdata/dqAbs.decTest | 126 + .../Lib/test/decimaltestdata/dqAdd.decTest | 1215 ++ .../Lib/test/decimaltestdata/dqAnd.decTest | 420 + .../Lib/test/decimaltestdata/dqBase.decTest | 1081 + .../test/decimaltestdata/dqCanonical.decTest | 372 + .../Lib/test/decimaltestdata/dqClass.decTest | 77 + .../test/decimaltestdata/dqCompare.decTest | 753 + .../test/decimaltestdata/dqCompareSig.decTest | 647 + .../decimaltestdata/dqCompareTotal.decTest | 706 + .../decimaltestdata/dqCompareTotalMag.decTest | 706 + .../Lib/test/decimaltestdata/dqCopy.decTest | 88 + .../test/decimaltestdata/dqCopyAbs.decTest | 88 + .../test/decimaltestdata/dqCopyNegate.decTest | 88 + .../test/decimaltestdata/dqCopySign.decTest | 175 + .../Lib/test/decimaltestdata/dqDivide.decTest | 808 + .../test/decimaltestdata/dqDivideInt.decTest | 453 + .../Lib/test/decimaltestdata/dqEncode.decTest | 477 + .../Lib/test/decimaltestdata/dqFMA.decTest | 1786 ++ .../Lib/test/decimaltestdata/dqInvert.decTest | 245 + .../Lib/test/decimaltestdata/dqLogB.decTest | 160 + .../Lib/test/decimaltestdata/dqMax.decTest | 322 + .../Lib/test/decimaltestdata/dqMaxMag.decTest | 304 + .../Lib/test/decimaltestdata/dqMin.decTest | 309 + .../Lib/test/decimaltestdata/dqMinMag.decTest | 293 + .../Lib/test/decimaltestdata/dqMinus.decTest | 88 + .../test/decimaltestdata/dqMultiply.decTest | 589 + .../test/decimaltestdata/dqNextMinus.decTest | 126 + .../test/decimaltestdata/dqNextPlus.decTest | 124 + .../test/decimaltestdata/dqNextToward.decTest | 375 + .../Lib/test/decimaltestdata/dqOr.decTest | 401 + .../Lib/test/decimaltestdata/dqPlus.decTest | 88 + .../test/decimaltestdata/dqQuantize.decTest | 836 + .../Lib/test/decimaltestdata/dqReduce.decTest | 183 + .../test/decimaltestdata/dqRemainder.decTest | 597 + .../decimaltestdata/dqRemainderNear.decTest | 631 + .../Lib/test/decimaltestdata/dqRotate.decTest | 298 + .../decimaltestdata/dqSameQuantum.decTest | 389 + .../Lib/test/decimaltestdata/dqScaleB.decTest | 260 + .../Lib/test/decimaltestdata/dqShift.decTest | 298 + .../test/decimaltestdata/dqSubtract.decTest | 635 + .../test/decimaltestdata/dqToIntegral.decTest | 257 + .../Lib/test/decimaltestdata/dqXor.decTest | 410 + .../Lib/test/decimaltestdata/dsBase.decTest | 1062 + .../Lib/test/decimaltestdata/dsEncode.decTest | 372 + .../Lib/test/decimaltestdata/exp.decTest | 674 + .../Lib/test/decimaltestdata/extra.decTest | 2817 +++ .../Lib/test/decimaltestdata/fma.decTest | 3426 +++ .../Lib/test/decimaltestdata/inexact.decTest | 215 + .../Lib/test/decimaltestdata/invert.decTest | 176 + .../Lib/test/decimaltestdata/ln.decTest | 611 + .../Lib/test/decimaltestdata/log10.decTest | 551 + .../Lib/test/decimaltestdata/logb.decTest | 188 + .../Lib/test/decimaltestdata/max.decTest | 424 + .../Lib/test/decimaltestdata/maxmag.decTest | 404 + .../Lib/test/decimaltestdata/min.decTest | 407 + .../Lib/test/decimaltestdata/minmag.decTest | 390 + .../Lib/test/decimaltestdata/minus.decTest | 182 + .../Lib/test/decimaltestdata/multiply.decTest | 731 + .../test/decimaltestdata/nextminus.decTest | 148 + .../Lib/test/decimaltestdata/nextplus.decTest | 150 + .../test/decimaltestdata/nexttoward.decTest | 426 + .../Lib/test/decimaltestdata/or.decTest | 334 + .../Lib/test/decimaltestdata/plus.decTest | 195 + .../Lib/test/decimaltestdata/power.decTest | 1624 ++ .../test/decimaltestdata/powersqrt.decTest | 2970 +++ .../Lib/test/decimaltestdata/quantize.decTest | 948 + .../decimaltestdata/randomBound32.decTest | 2443 +++ .../Lib/test/decimaltestdata/randoms.decTest | 4030 ++++ .../Lib/test/decimaltestdata/reduce.decTest | 234 + .../test/decimaltestdata/remainder.decTest | 640 + .../decimaltestdata/remainderNear.decTest | 572 + .../Lib/test/decimaltestdata/rescale.decTest | 764 + .../Lib/test/decimaltestdata/rotate.decTest | 247 + .../Lib/test/decimaltestdata/rounding.decTest | 1303 ++ .../test/decimaltestdata/samequantum.decTest | 389 + .../Lib/test/decimaltestdata/scaleb.decTest | 209 + .../Lib/test/decimaltestdata/shift.decTest | 250 + .../test/decimaltestdata/squareroot.decTest | 3834 ++++ .../Lib/test/decimaltestdata/subtract.decTest | 873 + .../Lib/test/decimaltestdata/testall.decTest | 87 + .../test/decimaltestdata/tointegral.decTest | 241 + .../test/decimaltestdata/tointegralx.decTest | 255 + .../Lib/test/decimaltestdata/xor.decTest | 335 + .../Python-2.7.2/Lib/test/doctest_aliases.py | 13 + .../Python-2.7.2/Lib/test/double_const.py | 30 + .../Python/Python-2.7.2/Lib/test/empty.vbs | 1 + .../Lib/test/exception_hierarchy.txt | 50 + .../Python-2.7.2/Lib/test/floating_points.txt | 1028 + .../Python/Python-2.7.2/Lib/test/fork_wait.py | 79 + .../Lib/test/formatfloat_testcases.txt | 380 + .../Python-2.7.2/Lib/test/gdb_sample.py | 12 + .../Python/Python-2.7.2/Lib/test/greyrgb.uue | 1547 ++ .../Lib/test/https_svn_python_org_root.pem | 41 + .../Python/Python-2.7.2/Lib/test/ieee754.txt | 185 + .../Python-2.7.2/Lib/test/infinite_reload.py | 8 + .../Python-2.7.2/Lib/test/inspect_fodder.py | 56 + .../Python-2.7.2/Lib/test/inspect_fodder2.py | 99 + .../Python/Python-2.7.2/Lib/test/keycert.pem | 32 + .../Python-2.7.2/Lib/test/leakers/README.txt | 32 + .../Python-2.7.2/Lib/test/leakers/__init__.py | 0 .../Lib/test/leakers/test_ctypes.py | 16 + .../Lib/test/leakers/test_dictself.py | 12 + .../Lib/test/leakers/test_gestalt.py | 14 + .../Lib/test/leakers/test_selftype.py | 13 + .../Python-2.7.2/Lib/test/list_tests.py | 534 + .../Python-2.7.2/Lib/test/lock_tests.py | 546 + .../Python-2.7.2/Lib/test/mapping_tests.py | 682 + .../Python-2.7.2/Lib/test/math_testcases.txt | 447 + .../Python/Python-2.7.2/Lib/test/nullcert.pem | 0 .../Python-2.7.2/Lib/test/outstanding_bugs.py | 22 + .../Python-2.7.2/Lib/test/pickletester.py | 1259 ++ .../Python/Python-2.7.2/Lib/test/profilee.py | 115 + .../Python-2.7.2/Lib/test/pyclbr_input.py | 33 + .../Python/Python-2.7.2/Lib/test/pydoc_mod.py | 27 + .../Python-2.7.2/Lib/test/pydocfodder.py | 216 + .../Python/Python-2.7.2/Lib/test/pystone.py | 270 + .../Python-2.7.2/Lib/test/randv2_32.pck | 633 + .../Python-2.7.2/Lib/test/randv2_64.pck | 633 + .../Python/Python-2.7.2/Lib/test/randv3.pck | 633 + .../Python/Python-2.7.2/Lib/test/re_tests.py | 674 + .../Python-2.7.2/Lib/test/regex_tests.py | 287 + .../Python/Python-2.7.2/Lib/test/regrtest.py | 1536 ++ .../Python/Python-2.7.2/Lib/test/relimport.py | 1 + .../Python/Python-2.7.2/Lib/test/reperf.py | 23 + .../Python-2.7.2/Lib/test/sample_doctest.py | 76 + .../Python-2.7.2/Lib/test/script_helper.py | 164 + .../Python/Python-2.7.2/Lib/test/seq_tests.py | 392 + .../Python-2.7.2/Lib/test/sgml_input.html | 212 + .../Python/Python-2.7.2/Lib/test/sha256.pem | 129 + .../Python/Python-2.7.2/Lib/test/sortperf.py | 169 + .../Python/Python-2.7.2/Lib/test/ssl_cert.pem | 14 + .../Python/Python-2.7.2/Lib/test/ssl_key.pem | 9 + .../Python-2.7.2/Lib/test/string_tests.py | 1333 ++ .../test/subprocessdata/sigchild_ignore.py | 6 + .../Lib/test/svn_python_org_https_cert.pem | 31 + .../Python-2.7.2/Lib/test/test_MimeWriter.py | 292 + .../Lib/test/test_SimpleHTTPServer.py | 41 + .../Python-2.7.2/Lib/test/test_StringIO.py | 150 + .../Python-2.7.2/Lib/test/test___all__.py | 123 + .../Python-2.7.2/Lib/test/test___future__.py | 66 + .../Python-2.7.2/Lib/test/test__locale.py | 137 + .../Python/Python-2.7.2/Lib/test/test_abc.py | 233 + .../Lib/test/test_abstract_numbers.py | 52 + .../Python-2.7.2/Lib/test/test_aepack.py | 90 + .../Python/Python-2.7.2/Lib/test/test_aifc.py | 115 + .../Python/Python-2.7.2/Lib/test/test_al.py | 25 + .../Python-2.7.2/Lib/test/test_anydbm.py | 97 + .../Python-2.7.2/Lib/test/test_applesingle.py | 71 + .../Python-2.7.2/Lib/test/test_argparse.py | 4646 +++++ .../Python-2.7.2/Lib/test/test_array.py | 1095 + .../Lib/test/test_ascii_formatd.py | 58 + .../Python/Python-2.7.2/Lib/test/test_ast.py | 382 + .../Python-2.7.2/Lib/test/test_asynchat.py | 273 + .../Python-2.7.2/Lib/test/test_asyncore.py | 722 + .../Python-2.7.2/Lib/test/test_atexit.py | 82 + .../Python-2.7.2/Lib/test/test_audioop.py | 206 + .../Python-2.7.2/Lib/test/test_augassign.py | 331 + .../Python-2.7.2/Lib/test/test_base64.py | 190 + .../Python-2.7.2/Lib/test/test_bastion.py | 3 + .../Lib/test/test_bigaddrspace.py | 46 + .../Python-2.7.2/Lib/test/test_bigmem.py | 1073 + .../Python-2.7.2/Lib/test/test_binascii.py | 236 + .../Python-2.7.2/Lib/test/test_binhex.py | 49 + .../Python-2.7.2/Lib/test/test_binop.py | 331 + .../Python-2.7.2/Lib/test/test_bisect.py | 317 + .../Python/Python-2.7.2/Lib/test/test_bool.py | 371 + .../Python-2.7.2/Lib/test/test_bsddb.py | 357 + .../Python-2.7.2/Lib/test/test_bsddb185.py | 43 + .../Python-2.7.2/Lib/test/test_bsddb3.py | 81 + .../Python-2.7.2/Lib/test/test_buffer.py | 31 + .../Python-2.7.2/Lib/test/test_bufio.py | 79 + .../Python-2.7.2/Lib/test/test_builtin.py | 1708 ++ .../Python-2.7.2/Lib/test/test_bytes.py | 1119 + .../Python/Python-2.7.2/Lib/test/test_bz2.py | 422 + .../Python-2.7.2/Lib/test/test_calendar.py | 457 + .../Python/Python-2.7.2/Lib/test/test_call.py | 134 + .../Python/Python-2.7.2/Lib/test/test_capi.py | 140 + .../Python/Python-2.7.2/Lib/test/test_cd.py | 30 + .../Python-2.7.2/Lib/test/test_cfgparser.py | 598 + .../Python/Python-2.7.2/Lib/test/test_cgi.py | 386 + .../Lib/test/test_charmapcodec.py | 56 + .../Python/Python-2.7.2/Lib/test/test_cl.py | 82 + .../Python-2.7.2/Lib/test/test_class.py | 626 + .../Python-2.7.2/Lib/test/test_cmath.py | 474 + .../Python/Python-2.7.2/Lib/test/test_cmd.py | 217 + .../Python-2.7.2/Lib/test/test_cmd_line.py | 95 + .../Lib/test/test_cmd_line_script.py | 213 + .../Python/Python-2.7.2/Lib/test/test_code.py | 147 + .../Lib/test/test_codeccallbacks.py | 804 + .../Lib/test/test_codecencodings_cn.py | 86 + .../Lib/test/test_codecencodings_hk.py | 27 + .../Lib/test/test_codecencodings_jp.py | 105 + .../Lib/test/test_codecencodings_kr.py | 69 + .../Lib/test/test_codecencodings_tw.py | 27 + .../Lib/test/test_codecmaps_cn.py | 33 + .../Lib/test/test_codecmaps_hk.py | 21 + .../Lib/test/test_codecmaps_jp.py | 67 + .../Lib/test/test_codecmaps_kr.py | 44 + .../Lib/test/test_codecmaps_tw.py | 31 + .../Python-2.7.2/Lib/test/test_codecs.py | 1614 ++ .../Python-2.7.2/Lib/test/test_codeop.py | 304 + .../Python-2.7.2/Lib/test/test_coding.py | 37 + .../Python-2.7.2/Lib/test/test_coercion.py | 348 + .../Python-2.7.2/Lib/test/test_collections.py | 1042 + .../Python-2.7.2/Lib/test/test_colorsys.py | 76 + .../Python-2.7.2/Lib/test/test_commands.py | 74 + .../Python-2.7.2/Lib/test/test_compare.py | 58 + .../Python-2.7.2/Lib/test/test_compile.py | 498 + .../Python-2.7.2/Lib/test/test_compileall.py | 80 + .../Python-2.7.2/Lib/test/test_compiler.py | 317 + .../Python-2.7.2/Lib/test/test_complex.py | 651 + .../Lib/test/test_complex_args.py | 118 + .../Python-2.7.2/Lib/test/test_contains.py | 111 + .../Python-2.7.2/Lib/test/test_contextlib.py | 326 + .../Python-2.7.2/Lib/test/test_cookie.py | 98 + .../Python-2.7.2/Lib/test/test_cookielib.py | 1762 ++ .../Python/Python-2.7.2/Lib/test/test_copy.py | 712 + .../Python-2.7.2/Lib/test/test_copy_reg.py | 121 + .../Python-2.7.2/Lib/test/test_cpickle.py | 139 + .../Python-2.7.2/Lib/test/test_cprofile.py | 127 + .../Python-2.7.2/Lib/test/test_crypt.py | 17 + .../Python/Python-2.7.2/Lib/test/test_csv.py | 1055 + .../Python-2.7.2/Lib/test/test_ctypes.py | 15 + .../Python-2.7.2/Lib/test/test_curses.py | 290 + .../Python-2.7.2/Lib/test/test_datetime.py | 3367 +++ .../Python/Python-2.7.2/Lib/test/test_dbm.py | 42 + .../Python-2.7.2/Lib/test/test_decimal.py | 2339 +++ .../Python-2.7.2/Lib/test/test_decorators.py | 309 + .../Python-2.7.2/Lib/test/test_defaultdict.py | 179 + .../Python-2.7.2/Lib/test/test_deque.py | 787 + .../Python-2.7.2/Lib/test/test_descr.py | 4659 +++++ .../Python-2.7.2/Lib/test/test_descrtut.py | 497 + .../Python/Python-2.7.2/Lib/test/test_dict.py | 676 + .../Python-2.7.2/Lib/test/test_dictcomps.py | 54 + .../Python-2.7.2/Lib/test/test_dictviews.py | 154 + .../Python-2.7.2/Lib/test/test_difflib.py | 272 + .../Lib/test/test_difflib_expect.html | 526 + .../Python-2.7.2/Lib/test/test_dircache.py | 77 + .../Python/Python-2.7.2/Lib/test/test_dis.py | 150 + .../Python-2.7.2/Lib/test/test_distutils.py | 18 + .../Python/Python-2.7.2/Lib/test/test_dl.py | 39 + .../Python-2.7.2/Lib/test/test_doctest.py | 2615 +++ .../Python-2.7.2/Lib/test/test_doctest.txt | 17 + .../Python-2.7.2/Lib/test/test_doctest2.py | 124 + .../Python-2.7.2/Lib/test/test_doctest2.txt | 14 + .../Python-2.7.2/Lib/test/test_doctest3.txt | 5 + .../Python-2.7.2/Lib/test/test_doctest4.txt | 17 + .../Python-2.7.2/Lib/test/test_docxmlrpc.py | 201 + .../Python-2.7.2/Lib/test/test_dumbdbm.py | 179 + .../Lib/test/test_dummy_thread.py | 182 + .../Lib/test/test_dummy_threading.py | 63 + .../Python-2.7.2/Lib/test/test_email.py | 12 + .../Lib/test/test_email_codecs.py | 15 + .../Lib/test/test_email_renamed.py | 12 + .../Python-2.7.2/Lib/test/test_enumerate.py | 255 + .../Python/Python-2.7.2/Lib/test/test_eof.py | 32 + .../Python-2.7.2/Lib/test/test_epoll.py | 221 + .../Python-2.7.2/Lib/test/test_errno.py | 40 + .../Lib/test/test_exception_variations.py | 180 + .../Python-2.7.2/Lib/test/test_exceptions.py | 620 + .../Python-2.7.2/Lib/test/test_extcall.py | 319 + .../Python-2.7.2/Lib/test/test_fcntl.py | 108 + .../Python/Python-2.7.2/Lib/test/test_file.py | 347 + .../Python-2.7.2/Lib/test/test_file2k.py | 680 + .../Python-2.7.2/Lib/test/test_filecmp.py | 134 + .../Python-2.7.2/Lib/test/test_fileinput.py | 225 + .../Python-2.7.2/Lib/test/test_fileio.py | 434 + .../Python-2.7.2/Lib/test/test_float.py | 1396 ++ .../Python-2.7.2/Lib/test/test_fnmatch.py | 72 + .../Python-2.7.2/Lib/test/test_fork1.py | 71 + .../Python-2.7.2/Lib/test/test_format.py | 297 + .../Python-2.7.2/Lib/test/test_fpformat.py | 76 + .../Python-2.7.2/Lib/test/test_fractions.py | 587 + .../Python-2.7.2/Lib/test/test_frozen.py | 47 + .../Python-2.7.2/Lib/test/test_ftplib.py | 778 + .../Python-2.7.2/Lib/test/test_funcattrs.py | 353 + .../Python-2.7.2/Lib/test/test_functools.py | 478 + .../Python-2.7.2/Lib/test/test_future.py | 119 + .../Python-2.7.2/Lib/test/test_future1.py | 11 + .../Python-2.7.2/Lib/test/test_future2.py | 10 + .../Python-2.7.2/Lib/test/test_future3.py | 30 + .../Python-2.7.2/Lib/test/test_future4.py | 47 + .../Python-2.7.2/Lib/test/test_future5.py | 21 + .../Lib/test/test_future_builtins.py | 38 + .../Python/Python-2.7.2/Lib/test/test_gc.py | 639 + .../Python/Python-2.7.2/Lib/test/test_gdb.py | 702 + .../Python/Python-2.7.2/Lib/test/test_gdbm.py | 82 + .../Python-2.7.2/Lib/test/test_generators.py | 1906 ++ .../Python-2.7.2/Lib/test/test_genericpath.py | 256 + .../Python-2.7.2/Lib/test/test_genexps.py | 282 + .../Python-2.7.2/Lib/test/test_getargs.py | 31 + .../Python-2.7.2/Lib/test/test_getargs2.py | 335 + .../Python-2.7.2/Lib/test/test_getopt.py | 187 + .../Python-2.7.2/Lib/test/test_gettext.py | 467 + .../Python/Python-2.7.2/Lib/test/test_gl.py | 155 + .../Python/Python-2.7.2/Lib/test/test_glob.py | 114 + .../Python-2.7.2/Lib/test/test_global.py | 52 + .../Python-2.7.2/Lib/test/test_grammar.py | 999 + .../Python/Python-2.7.2/Lib/test/test_grp.py | 97 + .../Python/Python-2.7.2/Lib/test/test_gzip.py | 281 + .../Python/Python-2.7.2/Lib/test/test_hash.py | 144 + .../Python-2.7.2/Lib/test/test_hashlib.py | 361 + .../Python-2.7.2/Lib/test/test_heapq.py | 393 + .../Python/Python-2.7.2/Lib/test/test_hmac.py | 314 + .../Python-2.7.2/Lib/test/test_hotshot.py | 158 + .../Python-2.7.2/Lib/test/test_htmllib.py | 69 + .../Python-2.7.2/Lib/test/test_htmlparser.py | 351 + .../Python-2.7.2/Lib/test/test_httplib.py | 447 + .../Python-2.7.2/Lib/test/test_httpservers.py | 529 + .../Python-2.7.2/Lib/test/test_imageop.py | 211 + .../Python-2.7.2/Lib/test/test_imaplib.py | 240 + .../Python-2.7.2/Lib/test/test_imgfile.py | 119 + .../Python/Python-2.7.2/Lib/test/test_imp.py | 81 + .../Python-2.7.2/Lib/test/test_import.py | 460 + .../Python-2.7.2/Lib/test/test_importhooks.py | 255 + .../Python-2.7.2/Lib/test/test_importlib.py | 176 + .../Python-2.7.2/Lib/test/test_index.py | 323 + .../Python-2.7.2/Lib/test/test_inspect.py | 752 + .../Python/Python-2.7.2/Lib/test/test_int.py | 406 + .../Python-2.7.2/Lib/test/test_int_literal.py | 188 + .../Python/Python-2.7.2/Lib/test/test_io.py | 2782 +++ .../Python-2.7.2/Lib/test/test_ioctl.py | 93 + .../Python-2.7.2/Lib/test/test_isinstance.py | 277 + .../Python/Python-2.7.2/Lib/test/test_iter.py | 917 + .../Python-2.7.2/Lib/test/test_iterlen.py | 257 + .../Python-2.7.2/Lib/test/test_itertools.py | 1650 ++ .../Python/Python-2.7.2/Lib/test/test_json.py | 17 + .../Python-2.7.2/Lib/test/test_kqueue.py | 196 + .../Python-2.7.2/Lib/test/test_largefile.py | 200 + .../Python-2.7.2/Lib/test/test_lib2to3.py | 21 + .../Python-2.7.2/Lib/test/test_linecache.py | 131 + .../Lib/test/test_linuxaudiodev.py | 99 + .../Python/Python-2.7.2/Lib/test/test_list.py | 78 + .../Python-2.7.2/Lib/test/test_locale.py | 420 + .../Python-2.7.2/Lib/test/test_logging.py | 1886 ++ .../Python/Python-2.7.2/Lib/test/test_long.py | 914 + .../Python-2.7.2/Lib/test/test_long_future.py | 221 + .../Python-2.7.2/Lib/test/test_longexp.py | 14 + .../Python-2.7.2/Lib/test/test_macos.py | 98 + .../Python-2.7.2/Lib/test/test_macostools.py | 88 + .../Python-2.7.2/Lib/test/test_macpath.py | 57 + .../Python-2.7.2/Lib/test/test_mailbox.py | 1970 ++ .../Python-2.7.2/Lib/test/test_marshal.py | 283 + .../Python/Python-2.7.2/Lib/test/test_math.py | 1030 + .../Python/Python-2.7.2/Lib/test/test_md5.py | 61 + .../Python-2.7.2/Lib/test/test_memoryio.py | 707 + .../Python-2.7.2/Lib/test/test_memoryview.py | 361 + .../Python-2.7.2/Lib/test/test_mhlib.py | 348 + .../Python-2.7.2/Lib/test/test_mimetools.py | 53 + .../Python-2.7.2/Lib/test/test_mimetypes.py | 94 + .../Python-2.7.2/Lib/test/test_minidom.py | 1477 ++ .../Python/Python-2.7.2/Lib/test/test_mmap.py | 704 + .../Python-2.7.2/Lib/test/test_module.py | 85 + .../Lib/test/test_modulefinder.py | 286 + .../Python-2.7.2/Lib/test/test_msilib.py | 46 + .../Lib/test/test_multibytecodec.py | 274 + .../Lib/test/test_multibytecodec_support.py | 338 + .../Python-2.7.2/Lib/test/test_multifile.py | 67 + .../Lib/test/test_multiprocessing.py | 2110 ++ .../Python-2.7.2/Lib/test/test_mutants.py | 292 + .../Python-2.7.2/Lib/test/test_mutex.py | 35 + .../Python-2.7.2/Lib/test/test_netrc.py | 110 + .../Python/Python-2.7.2/Lib/test/test_new.py | 163 + .../Python/Python-2.7.2/Lib/test/test_nis.py | 44 + .../Lib/test/test_normalization.py | 102 + .../Python-2.7.2/Lib/test/test_ntpath.py | 203 + .../Python-2.7.2/Lib/test/test_old_mailbox.py | 152 + .../Python-2.7.2/Lib/test/test_opcodes.py | 121 + .../Python-2.7.2/Lib/test/test_openpty.py | 23 + .../Python-2.7.2/Lib/test/test_operator.py | 532 + .../Python-2.7.2/Lib/test/test_optparse.py | 1619 ++ .../Python/Python-2.7.2/Lib/test/test_os.py | 824 + .../Python-2.7.2/Lib/test/test_ossaudiodev.py | 174 + .../Python-2.7.2/Lib/test/test_parser.py | 596 + .../Python/Python-2.7.2/Lib/test/test_pdb.py | 287 + .../Python-2.7.2/Lib/test/test_peepholer.py | 243 + .../Python-2.7.2/Lib/test/test_pep247.py | 74 + .../Python-2.7.2/Lib/test/test_pep263.py | 48 + .../Python-2.7.2/Lib/test/test_pep277.py | 210 + .../Python-2.7.2/Lib/test/test_pep292.py | 193 + .../Python-2.7.2/Lib/test/test_pep352.py | 239 + .../Python-2.7.2/Lib/test/test_pickle.py | 80 + .../Python-2.7.2/Lib/test/test_pickletools.py | 24 + .../Python-2.7.2/Lib/test/test_pipes.py | 204 + .../Python/Python-2.7.2/Lib/test/test_pkg.py | 292 + .../Python-2.7.2/Lib/test/test_pkgimport.py | 83 + .../Python-2.7.2/Lib/test/test_pkgutil.py | 130 + .../Python-2.7.2/Lib/test/test_platform.py | 254 + .../Python-2.7.2/Lib/test/test_plistlib.py | 192 + .../Python/Python-2.7.2/Lib/test/test_poll.py | 157 + .../Python-2.7.2/Lib/test/test_popen.py | 52 + .../Python-2.7.2/Lib/test/test_popen2.py | 130 + .../Python-2.7.2/Lib/test/test_poplib.py | 343 + .../Python-2.7.2/Lib/test/test_posix.py | 429 + .../Python-2.7.2/Lib/test/test_posixpath.py | 348 + .../Python/Python-2.7.2/Lib/test/test_pow.py | 129 + .../Python-2.7.2/Lib/test/test_pprint.py | 432 + .../Python-2.7.2/Lib/test/test_print.py | 141 + .../Python-2.7.2/Lib/test/test_profile.py | 186 + .../Python-2.7.2/Lib/test/test_property.py | 231 + .../Python-2.7.2/Lib/test/test_pstats.py | 32 + .../Python/Python-2.7.2/Lib/test/test_pty.py | 200 + .../Python/Python-2.7.2/Lib/test/test_pwd.py | 100 + .../Python-2.7.2/Lib/test/test_py3kwarn.py | 426 + .../Python-2.7.2/Lib/test/test_pyclbr.py | 197 + .../Python-2.7.2/Lib/test/test_pydoc.py | 367 + .../Python-2.7.2/Lib/test/test_pyexpat.py | 604 + .../Python-2.7.2/Lib/test/test_queue.py | 322 + .../Python-2.7.2/Lib/test/test_quopri.py | 201 + .../Python-2.7.2/Lib/test/test_random.py | 572 + .../Python/Python-2.7.2/Lib/test/test_re.py | 889 + .../Python-2.7.2/Lib/test/test_readline.py | 43 + .../Python/Python-2.7.2/Lib/test/test_repr.py | 327 + .../Python-2.7.2/Lib/test/test_resource.py | 110 + .../Python-2.7.2/Lib/test/test_rfc822.py | 257 + .../Python-2.7.2/Lib/test/test_richcmp.py | 338 + .../Python-2.7.2/Lib/test/test_rlcompleter.py | 73 + .../Python-2.7.2/Lib/test/test_robotparser.py | 261 + .../Python-2.7.2/Lib/test/test_runpy.py | 402 + .../Python/Python-2.7.2/Lib/test/test_sax.py | 753 + .../Python-2.7.2/Lib/test/test_scope.py | 664 + .../Lib/test/test_scriptpackages.py | 51 + .../Python-2.7.2/Lib/test/test_select.py | 58 + .../Python/Python-2.7.2/Lib/test/test_set.py | 1781 ++ .../Python-2.7.2/Lib/test/test_setcomps.py | 151 + .../Python/Python-2.7.2/Lib/test/test_sets.py | 862 + .../Python-2.7.2/Lib/test/test_sgmllib.py | 439 + .../Python/Python-2.7.2/Lib/test/test_sha.py | 56 + .../Python-2.7.2/Lib/test/test_shelve.py | 163 + .../Python-2.7.2/Lib/test/test_shlex.py | 191 + .../Python-2.7.2/Lib/test/test_shutil.py | 831 + .../Python-2.7.2/Lib/test/test_signal.py | 493 + .../Python/Python-2.7.2/Lib/test/test_site.py | 392 + .../Python-2.7.2/Lib/test/test_slice.py | 134 + .../Python-2.7.2/Lib/test/test_smtplib.py | 518 + .../Python-2.7.2/Lib/test/test_smtpnet.py | 31 + .../Python-2.7.2/Lib/test/test_socket.py | 1618 ++ .../Lib/test/test_socketserver.py | 284 + .../Python-2.7.2/Lib/test/test_softspace.py | 23 + .../Python/Python-2.7.2/Lib/test/test_sort.py | 292 + .../Python-2.7.2/Lib/test/test_sqlite.py | 16 + .../Python/Python-2.7.2/Lib/test/test_ssl.py | 1360 ++ .../Python-2.7.2/Lib/test/test_startfile.py | 45 + .../Python/Python-2.7.2/Lib/test/test_str.py | 434 + .../Python-2.7.2/Lib/test/test_strftime.py | 185 + .../Python-2.7.2/Lib/test/test_string.py | 217 + .../Python-2.7.2/Lib/test/test_stringprep.py | 96 + .../Python-2.7.2/Lib/test/test_strop.py | 153 + .../Python-2.7.2/Lib/test/test_strptime.py | 562 + .../Python-2.7.2/Lib/test/test_strtod.py | 399 + .../Python-2.7.2/Lib/test/test_struct.py | 551 + .../Lib/test/test_structmembers.py | 108 + .../Python-2.7.2/Lib/test/test_structseq.py | 120 + .../Python-2.7.2/Lib/test/test_subprocess.py | 1053 + .../Python-2.7.2/Lib/test/test_sunaudiodev.py | 33 + .../Python-2.7.2/Lib/test/test_sundry.py | 96 + .../Python-2.7.2/Lib/test/test_support.py | 1233 ++ .../Python-2.7.2/Lib/test/test_symtable.py | 184 + .../Python-2.7.2/Lib/test/test_syntax.py | 572 + .../Python/Python-2.7.2/Lib/test/test_sys.py | 794 + .../Lib/test/test_sys_setprofile.py | 386 + .../Lib/test/test_sys_settrace.py | 789 + .../Python-2.7.2/Lib/test/test_sysconfig.py | 316 + .../Python-2.7.2/Lib/test/test_tarfile.py | 1637 ++ .../Python/Python-2.7.2/Lib/test/test_tcl.py | 160 + .../Python-2.7.2/Lib/test/test_telnetlib.py | 372 + .../Python-2.7.2/Lib/test/test_tempfile.py | 856 + .../Python-2.7.2/Lib/test/test_textwrap.py | 610 + .../Python-2.7.2/Lib/test/test_thread.py | 242 + .../Lib/test/test_threaded_import.py | 76 + .../Lib/test/test_threadedtempfile.py | 78 + .../Python-2.7.2/Lib/test/test_threading.py | 734 + .../Lib/test/test_threading_local.py | 234 + .../Lib/test/test_threadsignals.py | 85 + .../Python/Python-2.7.2/Lib/test/test_time.py | 250 + .../Python-2.7.2/Lib/test/test_timeout.py | 202 + .../Python/Python-2.7.2/Lib/test/test_tk.py | 35 + .../Python-2.7.2/Lib/test/test_tokenize.py | 596 + .../Python-2.7.2/Lib/test/test_trace.py | 341 + .../Python-2.7.2/Lib/test/test_traceback.py | 204 + .../Python-2.7.2/Lib/test/test_transformer.py | 38 + .../Python-2.7.2/Lib/test/test_ttk_guionly.py | 40 + .../Lib/test/test_ttk_textonly.py | 19 + .../Python-2.7.2/Lib/test/test_tuple.py | 161 + .../Python-2.7.2/Lib/test/test_typechecks.py | 93 + .../Python-2.7.2/Lib/test/test_types.py | 756 + .../Python/Python-2.7.2/Lib/test/test_ucn.py | 144 + .../Python-2.7.2/Lib/test/test_unary.py | 59 + .../Lib/test/test_undocumented_details.py | 39 + .../Python-2.7.2/Lib/test/test_unicode.py | 1404 ++ .../Lib/test/test_unicode_file.py | 200 + .../Python-2.7.2/Lib/test/test_unicodedata.py | 317 + .../Python-2.7.2/Lib/test/test_unittest.py | 12 + .../Lib/test/test_univnewlines.py | 135 + .../Lib/test/test_univnewlines2k.py | 130 + .../Python-2.7.2/Lib/test/test_unpack.py | 130 + .../Python-2.7.2/Lib/test/test_urllib.py | 786 + .../Python-2.7.2/Lib/test/test_urllib2.py | 1327 ++ .../Lib/test/test_urllib2_localnet.py | 539 + .../Python-2.7.2/Lib/test/test_urllib2net.py | 319 + .../Python-2.7.2/Lib/test/test_urllibnet.py | 205 + .../Python-2.7.2/Lib/test/test_urlparse.py | 513 + .../Python-2.7.2/Lib/test/test_userdict.py | 350 + .../Python-2.7.2/Lib/test/test_userlist.py | 61 + .../Python-2.7.2/Lib/test/test_userstring.py | 147 + .../Python/Python-2.7.2/Lib/test/test_uu.py | 201 + .../Python/Python-2.7.2/Lib/test/test_uuid.py | 482 + .../Python-2.7.2/Lib/test/test_wait3.py | 39 + .../Python-2.7.2/Lib/test/test_wait4.py | 32 + .../Python-2.7.2/Lib/test/test_warnings.py | 749 + .../Python/Python-2.7.2/Lib/test/test_wave.py | 45 + .../Python-2.7.2/Lib/test/test_weakref.py | 1256 ++ .../Python-2.7.2/Lib/test/test_weakset.py | 377 + .../Python-2.7.2/Lib/test/test_whichdb.py | 68 + .../Python-2.7.2/Lib/test/test_winreg.py | 416 + .../Python-2.7.2/Lib/test/test_winsound.py | 255 + .../Python/Python-2.7.2/Lib/test/test_with.py | 750 + .../Python-2.7.2/Lib/test/test_wsgiref.py | 630 + .../Python-2.7.2/Lib/test/test_xdrlib.py | 58 + .../Python-2.7.2/Lib/test/test_xml_etree.py | 1886 ++ .../Python-2.7.2/Lib/test/test_xml_etree_c.py | 55 + .../Python-2.7.2/Lib/test/test_xmllib.py | 48 + .../Python-2.7.2/Lib/test/test_xmlrpc.py | 1018 + .../Python-2.7.2/Lib/test/test_xpickle.py | 260 + .../Python-2.7.2/Lib/test/test_xrange.py | 143 + .../Python-2.7.2/Lib/test/test_zipfile.py | 1362 ++ .../Python-2.7.2/Lib/test/test_zipfile64.py | 124 + .../Python-2.7.2/Lib/test/test_zipimport.py | 472 + .../Lib/test/test_zipimport_support.py | 238 + .../Python/Python-2.7.2/Lib/test/test_zlib.py | 572 + .../Python/Python-2.7.2/Lib/test/testall.py | 10 + .../Python/Python-2.7.2/Lib/test/testcodec.py | 48 + .../Python/Python-2.7.2/Lib/test/testimg.uue | 1170 ++ .../Python/Python-2.7.2/Lib/test/testimgr.uue | 1170 ++ .../Python/Python-2.7.2/Lib/test/testrgb.uue | 971 + .../Python/Python-2.7.2/Lib/test/testtar.tar | Bin 0 -> 281088 bytes .../Python-2.7.2/Lib/test/tf_inherit_check.py | 25 + .../Lib/test/threaded_import_hangers.py | 42 + .../Python-2.7.2/Lib/test/time_hashlib.py | 87 + .../Python-2.7.2/Lib/test/tokenize_tests.txt | 178 + .../Lib/test/tracedmodules/__init__.py | 4 + .../Lib/test/tracedmodules/testmod.py | 9 + .../Python-2.7.2/Lib/test/warning_tests.py | 9 + .../Lib/test/win_console_handler.py | 49 + .../Python-2.7.2/Lib/test/wrongcert.pem | 32 + .../Lib/test/xmltestdata/simple-ns.xml | 7 + .../Lib/test/xmltestdata/simple.xml | 6 + .../Lib/test/xmltestdata/test.xml | 115 + .../Lib/test/xmltestdata/test.xml.out | 115 + .../Python/Python-2.7.2/Lib/test/xmltests.py | 21 + .../Python/Python-2.7.2/Lib/test/zipdir.zip | Bin 0 -> 374 bytes .../Python/Python-2.7.2/Lib/textwrap.py | 417 + .../Python/Python-2.7.2/Lib/this.py | 28 + .../Python/Python-2.7.2/Lib/timeit.py | 328 + .../Python/Python-2.7.2/Lib/toaiff.py | 110 + .../Python/Python-2.7.2/Lib/token.py | 142 + .../Python/Python-2.7.2/Lib/tokenize.py | 424 + .../Python/Python-2.7.2/Lib/trace.py | 827 + .../Python/Python-2.7.2/Lib/traceback.py | 319 + .../Python/Python-2.7.2/Lib/tty.py | 36 + .../Python/Python-2.7.2/Lib/types.py | 84 + .../Python-2.7.2/Lib/unittest/__init__.py | 69 + .../Python-2.7.2/Lib/unittest/__main__.py | 12 + .../Python/Python-2.7.2/Lib/unittest/case.py | 1070 + .../Python-2.7.2/Lib/unittest/loader.py | 314 + .../Python/Python-2.7.2/Lib/unittest/main.py | 233 + .../Python-2.7.2/Lib/unittest/result.py | 193 + .../Python-2.7.2/Lib/unittest/runner.py | 196 + .../Python-2.7.2/Lib/unittest/signals.py | 57 + .../Python/Python-2.7.2/Lib/unittest/suite.py | 303 + .../Lib/unittest/test/__init__.py | 21 + .../Python-2.7.2/Lib/unittest/test/dummy.py | 1 + .../Python-2.7.2/Lib/unittest/test/support.py | 119 + .../Lib/unittest/test/test_assertions.py | 286 + .../Lib/unittest/test/test_break.py | 252 + .../Lib/unittest/test/test_case.py | 1109 + .../Lib/unittest/test/test_discovery.py | 362 + .../unittest/test/test_functiontestcase.py | 148 + .../Lib/unittest/test/test_loader.py | 1286 ++ .../Lib/unittest/test/test_program.py | 255 + .../Lib/unittest/test/test_result.py | 567 + .../Lib/unittest/test/test_runner.py | 253 + .../Lib/unittest/test/test_setups.py | 508 + .../Lib/unittest/test/test_skipping.py | 138 + .../Lib/unittest/test/test_suite.py | 367 + .../Python/Python-2.7.2/Lib/unittest/util.py | 156 + .../Python/Python-2.7.2/Lib/urllib.py | 1646 ++ .../Python/Python-2.7.2/Lib/urllib2.py | 1448 ++ .../Python/Python-2.7.2/Lib/urlparse.py | 397 + .../Python/Python-2.7.2/Lib/user.py | 48 + .../Python/Python-2.7.2/Lib/uu.py | 196 + .../Python/Python-2.7.2/Lib/uuid.py | 560 + .../Python/Python-2.7.2/Lib/warnings.py | 400 + .../Python/Python-2.7.2/Lib/wave.py | 504 + .../Python/Python-2.7.2/Lib/weakref.py | 379 + .../Python/Python-2.7.2/Lib/webbrowser.py | 673 + .../Python/Python-2.7.2/Lib/whichdb.py | 117 + .../Python/Python-2.7.2/Lib/wsgiref.egg-info | 8 + .../Python-2.7.2/Lib/wsgiref/__init__.py | 23 + .../Python-2.7.2/Lib/wsgiref/handlers.py | 448 + .../Python-2.7.2/Lib/wsgiref/headers.py | 169 + .../Python-2.7.2/Lib/wsgiref/simple_server.py | 155 + .../Python/Python-2.7.2/Lib/wsgiref/util.py | 165 + .../Python-2.7.2/Lib/wsgiref/validate.py | 432 + .../Python/Python-2.7.2/Lib/xdrlib.py | 231 + .../Python/Python-2.7.2/Lib/xml/__init__.py | 41 + .../Python-2.7.2/Lib/xml/dom/NodeFilter.py | 27 + .../Python-2.7.2/Lib/xml/dom/__init__.py | 139 + .../Python/Python-2.7.2/Lib/xml/dom/domreg.py | 99 + .../Python-2.7.2/Lib/xml/dom/expatbuilder.py | 983 + .../Python-2.7.2/Lib/xml/dom/minicompat.py | 110 + .../Python-2.7.2/Lib/xml/dom/minidom.py | 1937 ++ .../Python-2.7.2/Lib/xml/dom/pulldom.py | 351 + .../Python-2.7.2/Lib/xml/dom/xmlbuilder.py | 386 + .../Lib/xml/etree/ElementInclude.py | 143 + .../Python-2.7.2/Lib/xml/etree/ElementPath.py | 303 + .../Python-2.7.2/Lib/xml/etree/ElementTree.py | 1649 ++ .../Python-2.7.2/Lib/xml/etree/__init__.py | 33 + .../Lib/xml/etree/cElementTree.py | 3 + .../Python-2.7.2/Lib/xml/parsers/__init__.py | 8 + .../Python-2.7.2/Lib/xml/parsers/expat.py | 4 + .../Python-2.7.2/Lib/xml/sax/__init__.py | 108 + .../Python-2.7.2/Lib/xml/sax/_exceptions.py | 131 + .../Python-2.7.2/Lib/xml/sax/expatreader.py | 414 + .../Python-2.7.2/Lib/xml/sax/handler.py | 342 + .../Python-2.7.2/Lib/xml/sax/saxutils.py | 308 + .../Python-2.7.2/Lib/xml/sax/xmlreader.py | 381 + .../Python/Python-2.7.2/Lib/xmllib.py | 930 + .../Python/Python-2.7.2/Lib/xmlrpclib.py | 1636 ++ .../Python/Python-2.7.2/Lib/zipfile.py | 1437 ++ .../Python-2.7.2/Modules/_bisectmodule.c | 241 + .../Python-2.7.2/Modules/_codecsmodule.c | 1116 + .../Python-2.7.2/Modules/_collectionsmodule.c | 1634 ++ .../Python/Python-2.7.2/Modules/_csv.c | 1611 ++ .../Python-2.7.2/Modules/_elementtree.c | 3079 +++ .../Python-2.7.2/Modules/_functoolsmodule.c | 402 + .../Python-2.7.2/Modules/_hashopenssl.c | 597 + .../Python-2.7.2/Modules/_heapqmodule.c | 697 + .../Python/Python-2.7.2/Modules/_hotshot.c | 1643 ++ .../Python-2.7.2/Modules/_io/_iomodule.c | 768 + .../Python-2.7.2/Modules/_io/_iomodule.h | 165 + .../Python-2.7.2/Modules/_io/bufferedio.c | 2389 +++ .../Python/Python-2.7.2/Modules/_io/bytesio.c | 887 + .../Python/Python-2.7.2/Modules/_io/fileio.c | 1095 + .../Python/Python-2.7.2/Modules/_io/iobase.c | 893 + .../Python-2.7.2/Modules/_io/stringio.c | 882 + .../Python/Python-2.7.2/Modules/_io/textio.c | 2617 +++ .../Python/Python-2.7.2/Modules/_json.c | 2421 +++ .../Python-2.7.2/Modules/_localemodule.c | 758 + .../Python/Python-2.7.2/Modules/_lsprof.c | 892 + .../Python/Python-2.7.2/Modules/_math.c | 232 + .../Python/Python-2.7.2/Modules/_math.h | 45 + .../Python-2.7.2/Modules/_randommodule.c | 580 + .../Python-2.7.2/Modules/_sqlite/cache.c | 375 + .../Python-2.7.2/Modules/_sqlite/cache.h | 73 + .../Python-2.7.2/Modules/_sqlite/connection.c | 1664 ++ .../Python-2.7.2/Modules/_sqlite/connection.h | 138 + .../Python-2.7.2/Modules/_sqlite/cursor.c | 1126 + .../Python-2.7.2/Modules/_sqlite/cursor.h | 74 + .../Modules/_sqlite/microprotocols.c | 142 + .../Modules/_sqlite/microprotocols.h | 55 + .../Python-2.7.2/Modules/_sqlite/module.c | 457 + .../Python-2.7.2/Modules/_sqlite/module.h | 58 + .../Modules/_sqlite/prepare_protocol.c | 84 + .../Modules/_sqlite/prepare_protocol.h | 41 + .../Python/Python-2.7.2/Modules/_sqlite/row.c | 256 + .../Python/Python-2.7.2/Modules/_sqlite/row.h | 39 + .../Modules/_sqlite/sqlitecompat.h | 63 + .../Python-2.7.2/Modules/_sqlite/statement.c | 543 + .../Python-2.7.2/Modules/_sqlite/statement.h | 59 + .../Python-2.7.2/Modules/_sqlite/util.c | 106 + .../Python-2.7.2/Modules/_sqlite/util.h | 38 + .../Python/Python-2.7.2/Modules/_sre.c | 3921 ++++ .../Python/Python-2.7.2/Modules/_ssl.c | 1751 ++ .../Python/Python-2.7.2/Modules/_struct.c | 2048 ++ .../Python-2.7.2/Modules/_testcapimodule.c | 1897 ++ .../Python/Python-2.7.2/Modules/_weakref.c | 112 + .../Python/Python-2.7.2/Modules/addrinfo.h | 178 + .../Python/Python-2.7.2/Modules/arraymodule.c | 2246 ++ .../Python/Python-2.7.2/Modules/binascii.c | 1531 ++ .../Python/Python-2.7.2/Modules/bz2module.c | 2344 +++ .../Python/Python-2.7.2/Modules/cPickle.c | 6023 ++++++ .../Python/Python-2.7.2/Modules/cStringIO.c | 752 + .../Python-2.7.2/Modules/cjkcodecs/README | 79 + .../Modules/cjkcodecs/_codecs_cn.c | 444 + .../Modules/cjkcodecs/_codecs_hk.c | 183 + .../Modules/cjkcodecs/_codecs_iso2022.c | 1131 + .../Modules/cjkcodecs/_codecs_jp.c | 731 + .../Modules/cjkcodecs/_codecs_kr.c | 452 + .../Modules/cjkcodecs/_codecs_tw.c | 132 + .../Modules/cjkcodecs/alg_jisx0201.h | 24 + .../Modules/cjkcodecs/cjkcodecs.h | 398 + .../Modules/cjkcodecs/emu_jisx0213_2000.h | 43 + .../Modules/cjkcodecs/mappings_cn.h | 4103 ++++ .../Modules/cjkcodecs/mappings_hk.h | 2378 +++ .../cjkcodecs/mappings_jisx0213_pair.h | 59 + .../Modules/cjkcodecs/mappings_jp.h | 4765 +++++ .../Modules/cjkcodecs/mappings_kr.h | 3251 +++ .../Modules/cjkcodecs/mappings_tw.h | 2633 +++ .../Modules/cjkcodecs/multibytecodec.c | 1829 ++ .../Modules/cjkcodecs/multibytecodec.h | 141 + .../Python/Python-2.7.2/Modules/cmathmodule.c | 1210 ++ .../Python/Python-2.7.2/Modules/cryptmodule.c | 49 + .../Python-2.7.2/Modules/datetimemodule.c | 5117 +++++ .../Python/Python-2.7.2/Modules/errnomodule.c | 845 + .../Python/Python-2.7.2/Modules/expat/COPYING | 21 + .../Python-2.7.2/Modules/expat/amigaconfig.h | 96 + .../Python/Python-2.7.2/Modules/expat/ascii.h | 85 + .../Python-2.7.2/Modules/expat/asciitab.h | 36 + .../Python/Python-2.7.2/Modules/expat/expat.h | 1013 + .../Python-2.7.2/Modules/expat/expat_config.h | 19 + .../Modules/expat/expat_external.h | 119 + .../Python-2.7.2/Modules/expat/iasciitab.h | 37 + .../Python-2.7.2/Modules/expat/internal.h | 73 + .../Python-2.7.2/Modules/expat/latin1tab.h | 36 + .../Python-2.7.2/Modules/expat/macconfig.h | 53 + .../Python-2.7.2/Modules/expat/nametab.h | 150 + .../Python-2.7.2/Modules/expat/pyexpatns.h | 124 + .../Python-2.7.2/Modules/expat/utf8tab.h | 37 + .../Python-2.7.2/Modules/expat/winconfig.h | 30 + .../Python-2.7.2/Modules/expat/xmlparse.c | 6271 ++++++ .../Python-2.7.2/Modules/expat/xmlrole.c | 1330 ++ .../Python-2.7.2/Modules/expat/xmlrole.h | 114 + .../Python-2.7.2/Modules/expat/xmltok.c | 1639 ++ .../Python-2.7.2/Modules/expat/xmltok.h | 316 + .../Python-2.7.2/Modules/expat/xmltok_impl.c | 1779 ++ .../Python-2.7.2/Modules/expat/xmltok_impl.h | 46 + .../Python-2.7.2/Modules/expat/xmltok_ns.c | 106 + .../Python/Python-2.7.2/Modules/fcntlmodule.c | 620 + .../Python/Python-2.7.2/Modules/flmodule.c | 2144 ++ .../Python/Python-2.7.2/Modules/fmmodule.c | 269 + .../Python-2.7.2/Modules/fpectlmodule.c | 303 + .../Python-2.7.2/Modules/fpetestmodule.c | 186 + .../Python-2.7.2/Modules/future_builtins.c | 105 + .../Python-2.7.2/Modules/gc_weakref.txt | 219 + .../Python/Python-2.7.2/Modules/gcmodule.c | 1516 ++ .../Python/Python-2.7.2/Modules/getaddrinfo.c | 638 + .../Python-2.7.2/Modules/getbuildinfo.c | 85 + .../Python/Python-2.7.2/Modules/getnameinfo.c | 214 + .../Python/Python-2.7.2/Modules/getpath.c | 698 + .../Python/Python-2.7.2/Modules/imageop.c | 794 + .../Python-2.7.2/Modules/itertoolsmodule.c | 4097 ++++ .../Python/Python-2.7.2/Modules/main.c | 663 + .../Python/Python-2.7.2/Modules/mathmodule.c | 1624 ++ .../Python/Python-2.7.2/Modules/md5.c | 394 + .../Python/Python-2.7.2/Modules/md5.h | 91 + .../Python/Python-2.7.2/Modules/md5module.c | 315 + .../Python/Python-2.7.2/Modules/operator.c | 802 + .../Python-2.7.2/Modules/parsermodule.c | 3464 ++++ .../Python/Python-2.7.2/Modules/posixmodule.c | 9396 +++++++++ .../Python/Python-2.7.2/Modules/puremodule.c | 992 + .../Python/Python-2.7.2/Modules/pwdmodule.c | 200 + .../Python/Python-2.7.2/Modules/pyexpat.c | 2123 ++ .../Python/Python-2.7.2/Modules/python.c | 24 + .../Python/Python-2.7.2/Modules/readline.c | 1144 + .../Python/Python-2.7.2/Modules/resource.c | 329 + .../Python-2.7.2/Modules/rotatingtree.c | 121 + .../Python-2.7.2/Modules/rotatingtree.h | 27 + .../Python-2.7.2/Modules/selectmodule.c | 1912 ++ .../Python-2.7.2/Modules/sha256module.c | 706 + .../Python-2.7.2/Modules/sha512module.c | 774 + .../Python/Python-2.7.2/Modules/shamodule.c | 597 + .../Python-2.7.2/Modules/signalmodule.c | 986 + .../Python-2.7.2/Modules/socketmodule.c | 5454 +++++ .../Python-2.7.2/Modules/socketmodule.h | 250 + .../Python/Python-2.7.2/Modules/sre.h | 94 + .../Python-2.7.2/Modules/sre_constants.h | 86 + .../Python/Python-2.7.2/Modules/stropmodule.c | 1270 ++ .../Python-2.7.2/Modules/symtablemodule.c | 83 + .../Python-2.7.2/Modules/testcapi_long.h | 182 + .../Python-2.7.2/Modules/threadmodule.c | 931 + .../Python/Python-2.7.2/Modules/timemodule.c | 1054 + .../Python/Python-2.7.2/Modules/timing.h | 64 + .../Python-2.7.2/Modules/timingmodule.c | 62 + .../Python/Python-2.7.2/Modules/unicodedata.c | 1280 ++ .../Python-2.7.2/Modules/unicodedata_db.h | 6202 ++++++ .../Python-2.7.2/Modules/unicodename_db.h | 17259 ++++++++++++++++ .../Python/Python-2.7.2/Modules/xxmodule.c | 379 + .../Python/Python-2.7.2/Modules/xxsubtype.c | 297 + .../Python/Python-2.7.2/Modules/yuv.h | 99 + .../Python/Python-2.7.2/Modules/yuvconvert.c | 118 + .../Python/Python-2.7.2/Modules/zipimport.c | 1229 ++ .../Python-2.7.2/Modules/zlib/ChangeLog | 855 + .../Python/Python-2.7.2/Modules/zlib/FAQ | 339 + .../Python/Python-2.7.2/Modules/zlib/INDEX | 51 + .../Python/Python-2.7.2/Modules/zlib/Makefile | 154 + .../Python-2.7.2/Modules/zlib/Makefile.in | 154 + .../Python/Python-2.7.2/Modules/zlib/README | 125 + .../Python-2.7.2/Modules/zlib/adler32.c | 149 + .../Python-2.7.2/Modules/zlib/algorithm.txt | 209 + .../Python-2.7.2/Modules/zlib/compress.c | 79 + .../Python-2.7.2/Modules/zlib/configure | 459 + .../Python/Python-2.7.2/Modules/zlib/crc32.c | 423 + .../Python/Python-2.7.2/Modules/zlib/crc32.h | 441 + .../Python-2.7.2/Modules/zlib/deflate.c | 1736 ++ .../Python-2.7.2/Modules/zlib/deflate.h | 331 + .../Python-2.7.2/Modules/zlib/example.c | 565 + .../Python/Python-2.7.2/Modules/zlib/gzio.c | 1026 + .../Python-2.7.2/Modules/zlib/infback.c | 623 + .../Python-2.7.2/Modules/zlib/inffast.c | 318 + .../Python-2.7.2/Modules/zlib/inffast.h | 11 + .../Python-2.7.2/Modules/zlib/inffixed.h | 94 + .../Python-2.7.2/Modules/zlib/inflate.c | 1368 ++ .../Python-2.7.2/Modules/zlib/inflate.h | 115 + .../Python-2.7.2/Modules/zlib/inftrees.c | 329 + .../Python-2.7.2/Modules/zlib/inftrees.h | 55 + .../Python-2.7.2/Modules/zlib/make_vms.com | 461 + .../Python-2.7.2/Modules/zlib/minigzip.c | 322 + .../Python/Python-2.7.2/Modules/zlib/trees.c | 1219 ++ .../Python/Python-2.7.2/Modules/zlib/trees.h | 128 + .../Python-2.7.2/Modules/zlib/uncompr.c | 61 + .../Python/Python-2.7.2/Modules/zlib/zconf.h | 332 + .../Python-2.7.2/Modules/zlib/zconf.in.h | 332 + .../Python/Python-2.7.2/Modules/zlib/zlib.3 | 159 + .../Python/Python-2.7.2/Modules/zlib/zlib.h | 1357 ++ .../Python/Python-2.7.2/Modules/zlib/zutil.c | 318 + .../Python/Python-2.7.2/Modules/zlib/zutil.h | 277 + .../Python/Python-2.7.2/Modules/zlibmodule.c | 1058 + .../Python/Python-2.7.2/Objects/abstract.c | 3113 +++ .../Python/Python-2.7.2/Objects/boolobject.c | 202 + .../Python-2.7.2/Objects/bufferobject.c | 857 + .../Python-2.7.2/Objects/bytearrayobject.c | 3044 +++ .../Python-2.7.2/Objects/bytes_methods.c | 398 + .../Python/Python-2.7.2/Objects/capsule.c | 324 + .../Python/Python-2.7.2/Objects/cellobject.c | 145 + .../Python/Python-2.7.2/Objects/classobject.c | 2672 +++ .../Python/Python-2.7.2/Objects/cobject.c | 172 + .../Python/Python-2.7.2/Objects/codeobject.c | 581 + .../Python-2.7.2/Objects/complexobject.c | 1353 ++ .../Python/Python-2.7.2/Objects/descrobject.c | 1385 ++ .../Python/Python-2.7.2/Objects/dictnotes.txt | 270 + .../Python/Python-2.7.2/Objects/dictobject.c | 3210 +++ .../Python/Python-2.7.2/Objects/enumobject.c | 381 + .../Python/Python-2.7.2/Objects/exceptions.c | 2215 ++ .../Python/Python-2.7.2/Objects/fileobject.c | 2822 +++ .../Python/Python-2.7.2/Objects/floatobject.c | 2693 +++ .../Python/Python-2.7.2/Objects/frameobject.c | 982 + .../Python/Python-2.7.2/Objects/funcobject.c | 897 + .../Python/Python-2.7.2/Objects/genobject.c | 414 + .../Python/Python-2.7.2/Objects/intobject.c | 1550 ++ .../Python/Python-2.7.2/Objects/iterobject.c | 230 + .../Python/Python-2.7.2/Objects/listobject.c | 3044 +++ .../Python/Python-2.7.2/Objects/listsort.txt | 677 + .../Python-2.7.2/Objects/lnotab_notes.txt | 124 + .../Python/Python-2.7.2/Objects/longobject.c | 4381 ++++ .../Python-2.7.2/Objects/memoryobject.c | 842 + .../Python-2.7.2/Objects/methodobject.c | 427 + .../Python-2.7.2/Objects/moduleobject.c | 260 + .../Python/Python-2.7.2/Objects/object.c | 2455 +++ .../Python/Python-2.7.2/Objects/obmalloc.c | 1888 ++ .../Python/Python-2.7.2/Objects/rangeobject.c | 322 + .../Python/Python-2.7.2/Objects/setobject.c | 2518 +++ .../Python/Python-2.7.2/Objects/sliceobject.c | 361 + .../Python-2.7.2/Objects/stringlib/README.txt | 40 + .../Python-2.7.2/Objects/stringlib/count.h | 30 + .../Python-2.7.2/Objects/stringlib/ctype.h | 109 + .../Objects/stringlib/fastsearch.h | 160 + .../Python-2.7.2/Objects/stringlib/find.h | 175 + .../Objects/stringlib/formatter.h | 1531 ++ .../Objects/stringlib/localeutil.h | 227 + .../Objects/stringlib/partition.h | 110 + .../Python-2.7.2/Objects/stringlib/split.h | 394 + .../Objects/stringlib/string_format.h | 1364 ++ .../Objects/stringlib/stringdefs.h | 33 + .../Objects/stringlib/transmogrify.h | 264 + .../Objects/stringlib/unicodedefs.h | 37 + .../Python-2.7.2/Objects/stringobject.c | 4824 +++++ .../Python/Python-2.7.2/Objects/structseq.c | 539 + .../Python/Python-2.7.2/Objects/tupleobject.c | 1052 + .../Python/Python-2.7.2/Objects/typeobject.c | 6712 ++++++ .../Python-2.7.2/Objects/unicodectype.c | 215 + .../Python-2.7.2/Objects/unicodeobject.c | 8888 ++++++++ .../Python-2.7.2/Objects/unicodetype_db.h | 3337 +++ .../Python-2.7.2/Objects/weakrefobject.c | 973 + .../Python/Python-2.7.2/Parser/Python.asdl | 115 + .../Python/Python-2.7.2/Parser/acceler.c | 125 + .../Python/Python-2.7.2/Parser/asdl.py | 413 + .../Python/Python-2.7.2/Parser/asdl_c.py | 1220 ++ .../Python/Python-2.7.2/Parser/bitset.c | 66 + .../Python/Python-2.7.2/Parser/firstsets.c | 113 + .../Python/Python-2.7.2/Parser/grammar.c | 254 + .../Python/Python-2.7.2/Parser/grammar1.c | 57 + .../Python/Python-2.7.2/Parser/intrcheck.c | 178 + .../Python/Python-2.7.2/Parser/listnode.c | 66 + .../Python/Python-2.7.2/Parser/metagrammar.c | 159 + .../Python/Python-2.7.2/Parser/myreadline.c | 221 + .../Python/Python-2.7.2/Parser/node.c | 138 + .../Python/Python-2.7.2/Parser/parser.c | 436 + .../Python/Python-2.7.2/Parser/parser.h | 42 + .../Python/Python-2.7.2/Parser/parsetok.c | 283 + .../Python/Python-2.7.2/Parser/pgen.c | 708 + .../Python/Python-2.7.2/Parser/pgenmain.c | 173 + .../Python/Python-2.7.2/Parser/printgrammar.c | 117 + .../Python/Python-2.7.2/Parser/spark.py | 839 + .../Python/Python-2.7.2/Parser/tokenizer.c | 1726 ++ .../Python/Python-2.7.2/Parser/tokenizer.h | 70 + .../Python-2.7.2/Parser/tokenizer_pgen.c | 2 + .../Python/Python-2.7.2/Python/Python-ast.c | 6763 ++++++ .../Python/Python-2.7.2/Python/_warnings.c | 909 + .../Python/Python-2.7.2/Python/asdl.c | 64 + .../Python/Python-2.7.2/Python/ast.c | 3558 ++++ .../Python/Python-2.7.2/Python/atof.c | 50 + .../Python/Python-2.7.2/Python/bltinmodule.c | 3043 +++ .../Python/Python-2.7.2/Python/ceval.c | 4895 +++++ .../Python/Python-2.7.2/Python/codecs.c | 872 + .../Python/Python-2.7.2/Python/compile.c | 3979 ++++ .../Python/Python-2.7.2/Python/dtoa.c | 2918 +++ .../Python/Python-2.7.2/Python/dup2.c | 31 + .../Python/Python-2.7.2/Python/dynload_aix.c | 183 + .../Python-2.7.2/Python/dynload_atheos.c | 47 + .../Python/Python-2.7.2/Python/dynload_beos.c | 254 + .../Python/Python-2.7.2/Python/dynload_dl.c | 26 + .../Python/Python-2.7.2/Python/dynload_hpux.c | 58 + .../Python/Python-2.7.2/Python/dynload_next.c | 114 + .../Python/Python-2.7.2/Python/dynload_os2.c | 46 + .../Python-2.7.2/Python/dynload_shlib.c | 143 + .../Python/Python-2.7.2/Python/dynload_stub.c | 11 + .../Python/Python-2.7.2/Python/dynload_win.c | 274 + .../Python/Python-2.7.2/Python/errors.c | 805 + .../Python-2.7.2/Python/formatter_string.c | 17 + .../Python-2.7.2/Python/formatter_unicode.c | 18 + .../Python/Python-2.7.2/Python/frozen.c | 38 + .../Python/Python-2.7.2/Python/frozenmain.c | 68 + .../Python/Python-2.7.2/Python/future.c | 142 + .../Python/Python-2.7.2/Python/getargs.c | 1907 ++ .../Python/Python-2.7.2/Python/getcompiler.c | 28 + .../Python/Python-2.7.2/Python/getcopyright.c | 36 + .../Python/Python-2.7.2/Python/getcwd.c | 82 + .../Python/Python-2.7.2/Python/getopt.c | 126 + .../Python/Python-2.7.2/Python/getplatform.c | 12 + .../Python/Python-2.7.2/Python/getversion.c | 15 + .../Python/Python-2.7.2/Python/graminit.c | 2177 ++ .../Python/Python-2.7.2/Python/import.c | 3398 +++ .../Python/Python-2.7.2/Python/importdl.c | 78 + .../Python/Python-2.7.2/Python/importdl.h | 53 + .../Python-2.7.2/Python/mactoolboxglue.c | 474 + .../Python/Python-2.7.2/Python/marshal.c | 1422 ++ .../Python/Python-2.7.2/Python/modsupport.c | 644 + .../Python/Python-2.7.2/Python/mysnprintf.c | 105 + .../Python/Python-2.7.2/Python/mystrtoul.c | 285 + .../Python/Python-2.7.2/Python/peephole.c | 680 + .../Python/Python-2.7.2/Python/pyarena.c | 220 + .../Python/Python-2.7.2/Python/pyctype.c | 214 + .../Python/Python-2.7.2/Python/pyfpe.c | 23 + .../Python/Python-2.7.2/Python/pymath.c | 79 + .../Python/Python-2.7.2/Python/pystate.c | 680 + .../Python/Python-2.7.2/Python/pystrcmp.c | 26 + .../Python/Python-2.7.2/Python/pystrtod.c | 1249 ++ .../Python/Python-2.7.2/Python/pythonrun.c | 2004 ++ .../Python/Python-2.7.2/Python/sigcheck.c | 19 + .../Python/Python-2.7.2/Python/strdup.c | 14 + .../Python/Python-2.7.2/Python/strtod.c | 159 + .../Python/Python-2.7.2/Python/structmember.c | 363 + .../Python/Python-2.7.2/Python/symtable.c | 1554 ++ .../Python/Python-2.7.2/Python/sysmodule.c | 1779 ++ .../Python/Python-2.7.2/Python/thread.c | 421 + .../Python-2.7.2/Python/thread_atheos.h | 259 + .../Python/Python-2.7.2/Python/thread_beos.h | 248 + .../Python-2.7.2/Python/thread_cthread.h | 112 + .../Python-2.7.2/Python/thread_foobar.h | 75 + .../Python/Python-2.7.2/Python/thread_lwp.h | 113 + .../Python/Python-2.7.2/Python/thread_nt.h | 359 + .../Python/Python-2.7.2/Python/thread_os2.h | 267 + .../Python/Python-2.7.2/Python/thread_pth.h | 178 + .../Python-2.7.2/Python/thread_pthread.h | 505 + .../Python/Python-2.7.2/Python/thread_sgi.h | 259 + .../Python-2.7.2/Python/thread_solaris.h | 130 + .../Python/Python-2.7.2/Python/thread_wince.h | 136 + .../Python/Python-2.7.2/Python/traceback.c | 283 + .../Applications/Python/Python-2.7.2/README | 1229 ++ .../Python/Python-2.7.2/Tools/README | 41 + .../Python/Python-2.7.2/Tools/bgen/README | 9 + .../Python-2.7.2/Tools/bgen/bgen/bgen.py | 12 + .../Tools/bgen/bgen/bgenBuffer.py | 301 + .../Tools/bgen/bgen/bgenGenerator.py | 302 + .../Tools/bgen/bgen/bgenGeneratorGroup.py | 40 + .../Tools/bgen/bgen/bgenHeapBuffer.py | 145 + .../Tools/bgen/bgen/bgenModule.py | 94 + .../Tools/bgen/bgen/bgenObjectDefinition.py | 512 + .../Tools/bgen/bgen/bgenOutput.py | 219 + .../Tools/bgen/bgen/bgenStackBuffer.py | 62 + .../Tools/bgen/bgen/bgenStringBuffer.py | 67 + .../Python-2.7.2/Tools/bgen/bgen/bgenType.py | 328 + .../Tools/bgen/bgen/bgenVariable.py | 112 + .../Tools/bgen/bgen/macsupport.py | 197 + .../Python-2.7.2/Tools/bgen/bgen/scantools.py | 849 + .../Tools/buildbot/README.tcltk-AMD64 | 36 + .../Tools/buildbot/build-amd64.bat | 6 + .../Python-2.7.2/Tools/buildbot/build.bat | 7 + .../Python-2.7.2/Tools/buildbot/buildmsi.bat | 20 + .../Tools/buildbot/clean-amd64.bat | 10 + .../Python-2.7.2/Tools/buildbot/clean.bat | 10 + .../Tools/buildbot/external-amd64.bat | 20 + .../Tools/buildbot/external-common.bat | 45 + .../Python-2.7.2/Tools/buildbot/external.bat | 21 + .../Tools/buildbot/test-amd64.bat | 3 + .../Python-2.7.2/Tools/buildbot/test.bat | 3 + .../Python-2.7.2/Tools/ccbench/ccbench.py | 609 + .../Python/Python-2.7.2/Tools/compiler/ACKS | 8 + .../Python/Python-2.7.2/Tools/compiler/README | 18 + .../Python-2.7.2/Tools/compiler/ast.txt | 104 + .../Python-2.7.2/Tools/compiler/astgen.py | 294 + .../Python-2.7.2/Tools/compiler/compile.py | 51 + .../Python-2.7.2/Tools/compiler/demo.py | 38 + .../Python-2.7.2/Tools/compiler/dumppyc.py | 46 + .../Python-2.7.2/Tools/compiler/regrtest.py | 78 + .../Python-2.7.2/Tools/compiler/stacktest.py | 43 + .../Python/Python-2.7.2/Tools/faqwiz/README | 114 + .../Python-2.7.2/Tools/faqwiz/faqconf.py | 577 + .../Python-2.7.2/Tools/faqwiz/faqcust.py | 1 + .../Python/Python-2.7.2/Tools/faqwiz/faqw.py | 33 + .../Python-2.7.2/Tools/faqwiz/faqwiz.py | 841 + .../Python-2.7.2/Tools/faqwiz/move-faqwiz.sh | 55 + .../Python-2.7.2/Tools/framer/README.txt | 8 + .../Python/Python-2.7.2/Tools/framer/TODO.txt | 6 + .../Python-2.7.2/Tools/framer/example.py | 126 + .../Tools/framer/framer/__init__.py | 6 + .../Python-2.7.2/Tools/framer/framer/bases.py | 220 + .../Tools/framer/framer/function.py | 173 + .../Tools/framer/framer/member.py | 73 + .../Python-2.7.2/Tools/framer/framer/slots.py | 64 + .../Tools/framer/framer/struct.py | 52 + .../Tools/framer/framer/structparse.py | 46 + .../Tools/framer/framer/template.py | 102 + .../Python-2.7.2/Tools/framer/framer/util.py | 35 + .../Python/Python-2.7.2/Tools/freeze/README | 296 + .../Python-2.7.2/Tools/freeze/bkfile.py | 47 + .../Tools/freeze/checkextensions.py | 90 + .../Tools/freeze/checkextensions_win32.py | 188 + .../Tools/freeze/extensions_win32.ini | 171 + .../Python-2.7.2/Tools/freeze/freeze.py | 497 + .../Python/Python-2.7.2/Tools/freeze/hello.py | 1 + .../Python-2.7.2/Tools/freeze/makeconfig.py | 60 + .../Python-2.7.2/Tools/freeze/makefreeze.py | 90 + .../Python-2.7.2/Tools/freeze/makemakefile.py | 29 + .../Python-2.7.2/Tools/freeze/parsesetup.py | 112 + .../Python-2.7.2/Tools/freeze/win32.html | 119 + .../Tools/freeze/winmakemakefile.py | 147 + .../Python-2.7.2/Tools/gdb/libpython.py | 1447 ++ .../Tools/i18n/makelocalealias.py | 73 + .../Python/Python-2.7.2/Tools/i18n/msgfmt.py | 226 + .../Python-2.7.2/Tools/i18n/pygettext.py | 669 + .../Python-2.7.2/Tools/iobench/iobench.py | 539 + .../Python/Python-2.7.2/Tools/msi/README.txt | 25 + .../Python-2.7.2/Tools/msi/crtlicense.txt | 44 + .../Python/Python-2.7.2/Tools/msi/msi.py | 1398 ++ .../Python/Python-2.7.2/Tools/msi/msilib.py | 692 + .../Python-2.7.2/Tools/msi/msisupport.c | 93 + .../Python-2.7.2/Tools/msi/msisupport.mak | 9 + .../Python/Python-2.7.2/Tools/msi/schema.py | 1007 + .../Python/Python-2.7.2/Tools/msi/sequence.py | 126 + .../Python/Python-2.7.2/Tools/msi/uisample.py | 1400 ++ .../Python/Python-2.7.2/Tools/msi/uuids.py | 58 + .../Python-2.7.2/Tools/pybench/Arithmetic.py | 777 + .../Python-2.7.2/Tools/pybench/Calls.py | 560 + .../Python-2.7.2/Tools/pybench/CommandLine.py | 634 + .../Python-2.7.2/Tools/pybench/Constructs.py | 564 + .../Python/Python-2.7.2/Tools/pybench/Dict.py | 504 + .../Python-2.7.2/Tools/pybench/Exceptions.py | 699 + .../Python-2.7.2/Tools/pybench/Imports.py | 138 + .../Python-2.7.2/Tools/pybench/Instances.py | 66 + .../Python/Python-2.7.2/Tools/pybench/LICENSE | 25 + .../Python-2.7.2/Tools/pybench/Lists.py | 350 + .../Python-2.7.2/Tools/pybench/Lookups.py | 945 + .../Tools/pybench/NewInstances.py | 75 + .../Python-2.7.2/Tools/pybench/Numbers.py | 784 + .../Python/Python-2.7.2/Tools/pybench/README | 368 + .../Python-2.7.2/Tools/pybench/Setup.py | 43 + .../Python-2.7.2/Tools/pybench/Strings.py | 562 + .../Python-2.7.2/Tools/pybench/Tuples.py | 360 + .../Python-2.7.2/Tools/pybench/Unicode.py | 542 + .../Python/Python-2.7.2/Tools/pybench/With.py | 190 + .../Python-2.7.2/Tools/pybench/clockres.py | 43 + .../Tools/pybench/package/__init__.py | 0 .../Tools/pybench/package/submodule.py | 0 .../Python-2.7.2/Tools/pybench/pybench.py | 961 + .../Python-2.7.2/Tools/pybench/systimes.py | 211 + .../Python/Python-2.7.2/Tools/scripts/2to3 | 5 + .../Python/Python-2.7.2/Tools/scripts/README | 69 + .../Python-2.7.2/Tools/scripts/analyze_dxp.py | 129 + .../Python-2.7.2/Tools/scripts/byext.py | 131 + .../Python-2.7.2/Tools/scripts/byteyears.py | 61 + .../Python-2.7.2/Tools/scripts/checkappend.py | 167 + .../Python-2.7.2/Tools/scripts/checkpyc.py | 66 + .../Python-2.7.2/Tools/scripts/classfix.py | 190 + .../Python-2.7.2/Tools/scripts/cleanfuture.py | 276 + .../Python-2.7.2/Tools/scripts/combinerefs.py | 127 + .../Python-2.7.2/Tools/scripts/copytime.py | 26 + .../Python/Python-2.7.2/Tools/scripts/crlf.py | 23 + .../Python-2.7.2/Tools/scripts/cvsfiles.py | 72 + .../Python-2.7.2/Tools/scripts/db2pickle.py | 135 + .../Python/Python-2.7.2/Tools/scripts/diff.py | 49 + .../Python-2.7.2/Tools/scripts/dutree.doc | 54 + .../Python-2.7.2/Tools/scripts/dutree.py | 60 + .../Python-2.7.2/Tools/scripts/eptags.py | 56 + .../Tools/scripts/find_recursionlimit.py | 117 + .../Python-2.7.2/Tools/scripts/finddiv.py | 89 + .../Python-2.7.2/Tools/scripts/findlinksto.py | 43 + .../Tools/scripts/findnocoding.py | 104 + .../Python-2.7.2/Tools/scripts/fixcid.py | 314 + .../Python-2.7.2/Tools/scripts/fixdiv.py | 380 + .../Python-2.7.2/Tools/scripts/fixheader.py | 49 + .../Python-2.7.2/Tools/scripts/fixnotice.py | 113 + .../Python-2.7.2/Tools/scripts/fixps.py | 33 + .../Python-2.7.2/Tools/scripts/ftpmirror.py | 400 + .../Python-2.7.2/Tools/scripts/google.py | 23 + .../Python-2.7.2/Tools/scripts/gprof2html.py | 79 + .../Python/Python-2.7.2/Tools/scripts/h2py.py | 175 + .../Python-2.7.2/Tools/scripts/hotshotmain.py | 55 + .../Python/Python-2.7.2/Tools/scripts/idle | 5 + .../Python-2.7.2/Tools/scripts/ifdef.py | 112 + .../Python/Python-2.7.2/Tools/scripts/lfcr.py | 24 + .../Python-2.7.2/Tools/scripts/linktree.py | 80 + .../Python/Python-2.7.2/Tools/scripts/lll.py | 28 + .../Python-2.7.2/Tools/scripts/logmerge.py | 185 + .../Tools/scripts/mailerdaemon.py | 237 + .../Python-2.7.2/Tools/scripts/md5sum.py | 90 + .../Python-2.7.2/Tools/scripts/methfix.py | 171 + .../Python-2.7.2/Tools/scripts/mkreal.py | 66 + .../Python-2.7.2/Tools/scripts/ndiff.py | 133 + .../Python-2.7.2/Tools/scripts/nm2def.py | 103 + .../Python-2.7.2/Tools/scripts/objgraph.py | 215 + .../Tools/scripts/parseentities.py | 64 + .../Python-2.7.2/Tools/scripts/patchcheck.py | 158 + .../Python-2.7.2/Tools/scripts/pathfix.py | 149 + .../Python-2.7.2/Tools/scripts/pdeps.py | 167 + .../Python-2.7.2/Tools/scripts/pickle2db.py | 147 + .../Python-2.7.2/Tools/scripts/pindent.py | 542 + .../Python-2.7.2/Tools/scripts/ptags.py | 53 + .../Python/Python-2.7.2/Tools/scripts/pydoc | 5 + .../Python-2.7.2/Tools/scripts/pydocgui.pyw | 7 + .../Python-2.7.2/Tools/scripts/pysource.py | 130 + .../Python-2.7.2/Tools/scripts/redemo.py | 171 + .../Tools/scripts/reindent-rst.py | 14 + .../Python-2.7.2/Tools/scripts/reindent.py | 304 + .../Python-2.7.2/Tools/scripts/rgrep.py | 64 + .../Python-2.7.2/Tools/scripts/serve.py | 35 + .../Python-2.7.2/Tools/scripts/setup.py | 20 + .../Python/Python-2.7.2/Tools/scripts/suff.py | 30 + .../Python-2.7.2/Tools/scripts/svneol.py | 91 + .../Python-2.7.2/Tools/scripts/texcheck.py | 233 + .../Python-2.7.2/Tools/scripts/texi2html.py | 2078 ++ .../Python-2.7.2/Tools/scripts/treesync.py | 205 + .../Python-2.7.2/Tools/scripts/untabify.py | 52 + .../Python-2.7.2/Tools/scripts/which.py | 60 + .../Tools/scripts/win_add2path.py | 57 + .../Python/Python-2.7.2/Tools/scripts/xxci.py | 116 + .../Tools/ssl/get-remote-certificate.py | 79 + .../Python-2.7.2/Tools/unicode/Makefile | 84 + .../Tools/unicode/comparecodecs.py | 53 + .../Tools/unicode/gencjkcodecs.py | 68 + .../Python-2.7.2/Tools/unicode/gencodec.py | 423 + .../Python-2.7.2/Tools/unicode/genwincodec.py | 61 + .../Tools/unicode/genwincodecs.bat | 7 + .../Python-2.7.2/Tools/unicode/listcodecs.py | 41 + .../Tools/unicode/makeunicodedata.py | 1135 + .../Tools/unicode/mkstringprep.py | 425 + .../Tools/unicode/python-mappings/CP1140.TXT | 291 + .../Tools/unicode/python-mappings/KOI8-U.TXT | 298 + .../Tools/unicode/python-mappings/TIS-620.TXT | 284 + .../Python-2.7.2/Tools/versioncheck/README | 41 + .../Tools/versioncheck/_checkversion.py | 16 + .../Tools/versioncheck/checkversions.py | 52 + .../Tools/versioncheck/pyversioncheck.py | 98 + .../Python-2.7.2/Tools/webchecker/README | 23 + .../Python-2.7.2/Tools/webchecker/tktools.py | 366 + .../Python-2.7.2/Tools/webchecker/wcgui.py | 456 + .../Python-2.7.2/Tools/webchecker/wcmac.py | 7 + .../Tools/webchecker/webchecker.py | 892 + .../Tools/webchecker/websucker.py | 123 + .../Python-2.7.2/Tools/webchecker/wsgui.py | 240 + .../Python/Python-2.7.2/Tools/world/README | 85 + .../Python/Python-2.7.2/Tools/world/world | 551 + 2106 files changed, 871583 insertions(+) create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi0.sh create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/wiki.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Complex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dates.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dbm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Range.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Rev.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Vec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/patterns create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/regextest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/sortingtest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/systemtest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/foo create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/md5driver.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Eiffel.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Enum.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Meta.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Simple.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Synch.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Trace.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/index.html create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/meta-vladimir.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Eiffel.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Enum.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/FILES create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/docstring.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/example.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/simple.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/source.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_parser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_unparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/parser/unparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/FSProxy.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/RCSProxy.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/client.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmdfw.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmptree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslock.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/mac.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/makechangelog.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsbump create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsclient.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcslib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcvs create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcvs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rrcs create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rrcs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/security.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/server.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/beer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/eqfix.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/fact.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/find-uname.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/from.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/lpwatch.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/makedir.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/markov.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/mboxconvert.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/morse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.doc create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/primes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/queens.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/script.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/unbirthday.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/update.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/broadcast.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/echosvr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/finger.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/ftp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/gopher.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/mcast.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/radio.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpython.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpythond.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/telnet.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/throughput.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/udpecho.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unicast.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixserver.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/xml/elem_count.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/xml/roundtrip.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/xml/rss2html.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/zlib/minigzip.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Demo/zlib/zlibdemo.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Grammar/Grammar create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/Python-ast.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/Python.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/abstract.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/asdl.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/ast.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/bitset.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/boolobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/bufferobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/bytearrayobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/bytes_methods.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/bytesobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/cStringIO.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/cellobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/ceval.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/classobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/cobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/code.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/codecs.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/compile.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/complexobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/datetime.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/descrobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/dictobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/dtoa.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/enumobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/errcode.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/eval.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/fileobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/floatobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/frameobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/funcobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/genobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/graminit.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/grammar.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/import.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/intobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/intrcheck.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/iterobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/listobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/longintrepr.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/longobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/marshal.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/memoryobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/metagrammar.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/methodobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/modsupport.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/moduleobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/node.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/object.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/objimpl.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/opcode.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/osdefs.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/parsetok.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/patchlevel.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pgen.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pgenheaders.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/py_curses.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pyarena.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pycapsule.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pyctype.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pydebug.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pyerrors.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pyexpat.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pyfpe.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pygetopt.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pymacconfig.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pymactoolbox.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pymath.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pymem.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pyport.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pystate.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pystrcmp.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pystrtod.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pythonrun.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/pythread.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/rangeobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/setobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/sliceobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/stringobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/structmember.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/structseq.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/symtable.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/sysmodule.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/timefuncs.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/token.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/traceback.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/tupleobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/ucnhash.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/unicodeobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/warnings.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Include/weakrefobject.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/LICENSE create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/BaseHTTPServer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/Bastion.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/CGIHTTPServer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/ConfigParser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/Cookie.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/DocXMLRPCServer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/HTMLParser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/MimeWriter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/Queue.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/SimpleHTTPServer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/SimpleXMLRPCServer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/SocketServer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/StringIO.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/UserDict.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/UserList.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/UserString.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/_LWPCookieJar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/_MozillaCookieJar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/__future__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/__phello__.foo.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/_abcoll.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/_pyio.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/_strptime.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/_weakrefset.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/abc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/aifc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/antigravity.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/anydbm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/argparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/ast.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/asynchat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/asyncore.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/atexit.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/base64.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/bdb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/binhex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/bisect.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/cProfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/calendar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/cgi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/cgitb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/chunk.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/cmd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/code.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/codecs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/codeop.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/collections.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/colorsys.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/commands.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compileall.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/ast.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/consts.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/future.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/misc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/pyassem.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/pycodegen.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/symbols.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/syntax.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/transformer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/compiler/visitor.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/contextlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/cookielib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/copy.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/copy_reg.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/csv.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/dbhash.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/decimal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/difflib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/dircache.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/dis.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/archive_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/bcppcompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/ccompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/cmd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/bdist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/bdist_dumb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/bdist_msi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/bdist_rpm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/bdist_wininst.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/build.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/build_clib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/build_ext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/build_py.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/build_scripts.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/check.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/clean.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/command_template create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/config.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/install.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/install_data.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/install_egg_info.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/install_headers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/install_lib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/install_scripts.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/register.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/sdist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/upload.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/wininst-6.0.exe create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/wininst-7.1.exe create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/wininst-8.0.exe create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/wininst-9.0-amd64.exe create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/command/wininst-9.0.exe create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/config.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/core.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/cygwinccompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/debug.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/dep_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/dir_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/dist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/emxccompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/errors.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/extension.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/fancy_getopt.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/file_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/filelist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/log.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/msvc9compiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/msvccompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/spawn.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/sysconfig.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/Setup.sample create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/setuptools_build_ext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/setuptools_extension.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/support.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_archive_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_bdist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_bdist_dumb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_bdist_msi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_bdist_rpm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_bdist_wininst.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_build.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_build_clib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_build_ext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_build_py.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_build_scripts.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_ccompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_check.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_clean.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_cmd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_config.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_config_cmd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_core.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_dep_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_dir_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_dist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_file_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_filelist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_install.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_install_data.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_install_headers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_install_lib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_install_scripts.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_msvc9compiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_register.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_sdist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_spawn.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_sysconfig.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_text_file.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_unixccompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_upload.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_version.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_versionpredicate.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/text_file.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/unixccompiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/version.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/versionpredicate.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/doctest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/dumbdbm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/dummy_thread.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/dummy_threading.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/_parseaddr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/base64mime.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/charset.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/encoders.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/errors.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/feedparser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/generator.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/header.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/iterators.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/message.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/application.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/audio.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/base.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/image.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/message.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/multipart.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/nonmultipart.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/mime/text.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/parser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/quoprimime.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/PyBanner048.gif create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/audiotest.au create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_01.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_02.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_03.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_04.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_05.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_06.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_07.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_08.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_09.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_10.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_11.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_12.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_12a.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_13.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_14.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_15.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_16.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_17.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_18.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_19.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_20.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_21.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_22.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_23.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_24.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_25.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_26.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_27.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_28.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_29.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_30.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_31.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_32.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_33.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_34.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_35.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_36.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_37.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_38.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_39.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_40.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_41.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_42.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_43.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_44.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_45.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/data/msg_46.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/test_email.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/test_email_codecs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/test_email_codecs_renamed.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/test_email_renamed.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/test/test_email_torture.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/email/utils.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/aliases.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/ascii.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/base64_codec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/big5hkscs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/bz2_codec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/charmap.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp037.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1006.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1026.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1140.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1250.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1251.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1252.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1253.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1254.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1255.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1256.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1257.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp1258.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp424.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp437.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp500.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp720.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp737.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp775.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp850.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp852.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp855.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp856.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp857.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp858.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp860.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp861.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp862.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp863.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp864.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp865.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp866.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp869.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp874.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp875.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp932.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp949.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/cp950.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jis_2004.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jisx0213.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_jp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/euc_kr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb18030.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gb2312.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/gbk.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hex_codec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hp_roman8.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/hz.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/idna.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_2004.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_jp_ext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso2022_kr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_10.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_11.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_13.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_14.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_15.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_16.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_4.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_5.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_6.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_7.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_8.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/iso8859_9.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/johab.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/koi8_r.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/koi8_u.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/latin_1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_arabic.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_centeuro.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_croatian.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_cyrillic.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_farsi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_greek.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_iceland.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_latin2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_roman.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_romanian.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mac_turkish.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/mbcs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/palmos.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/ptcp154.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/punycode.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/quopri_codec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/raw_unicode_escape.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/rot_13.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jis_2004.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/shift_jisx0213.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/string_escape.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/tis_620.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/undefined.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/unicode_escape.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/unicode_internal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_be.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_16_le.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_be.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_32_le.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_7.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_8.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/utf_8_sig.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/uu_codec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/zlib_codec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/filecmp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/fileinput.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/fnmatch.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/formatter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/fpformat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/fractions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/ftplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/functools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/genericpath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/getopt.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/getpass.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/gettext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/glob.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/gzip.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/hashlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/heapq.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/hmac.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/hotshot/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/hotshot/log.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/hotshot/stats.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/hotshot/stones.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/htmlentitydefs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/htmllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/httplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/ihooks.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/imaplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/imghdr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/importlib/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/imputil.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/inspect.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/io.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/decoder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/encoder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/scanner.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_check_circular.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_decode.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_default.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_dump.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_encode_basestring_ascii.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_fail.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_float.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_indent.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_pass1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_pass2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_pass3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_recursion.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_scanstring.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_separators.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_speedups.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/test_unicode.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/json/tool.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/keyword.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/Grammar.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/PatternGrammar.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/__main__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/btm_matcher.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/btm_utils.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixer_base.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixer_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_apply.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_basestring.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_buffer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_callable.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_dict.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_except.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_exec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_execfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_exitfunc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_filter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_funcattrs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_future.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_getcwdu.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_has_key.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_idioms.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_import.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_imports.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_imports2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_input.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_intern.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_isinstance.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_itertools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_itertools_imports.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_long.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_map.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_metaclass.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_methodattrs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_ne.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_next.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_nonzero.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_numliterals.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_operator.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_paren.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_print.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_raise.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_raw_input.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_reduce.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_renames.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_repr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_set_literal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_standarderror.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_sys_exc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_throw.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_tuple_params.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_types.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_unicode.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_urllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_ws_comma.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_xrange.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_xreadlines.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_zip.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/main.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/patcomp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/conv.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/driver.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/grammar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/literals.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/parse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/pgen.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/token.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pgen2/tokenize.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pygram.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/pytree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/refactor.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/bom.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/crlf.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/different_encoding.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/bad_order.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_explicit.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_first.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_preorder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/parrot_example.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/infinite_recursion.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/py2_test_grammar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/py3_test_grammar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/pytree_idempotency.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/support.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/test_all_fixers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/test_fixers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/test_main.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/test_parser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/test_pytree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/test_refactor.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/test_util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/linecache.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/locale.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/logging/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/logging/config.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/logging/handlers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/mailbox.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/mailcap.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/markupbase.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/md5.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/mhlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/mimetools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/mimetypes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/mimify.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/modulefinder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/multifile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/mutex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/netrc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/new.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/nntplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/ntpath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/nturl2path.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/numbers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/opcode.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/optparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/os.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pdb.doc create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pdb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pickle.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pickletools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pipes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pkgutil.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/platform.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/plistlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/popen2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/poplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/posixfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/posixpath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pprint.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/profile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pstats.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pty.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/py_compile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pyclbr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc_data/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/pydoc_data/topics.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/quopri.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/random.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/re.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/repr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/rexec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/rfc822.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/rlcompleter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/robotparser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/runpy.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sched.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sets.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sgmllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sha.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/shelve.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/shlex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/shutil.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/site-packages/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/site.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/smtpd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/smtplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sndhdr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/socket.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sre.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sre_compile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sre_constants.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sre_parse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/ssl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/stat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/statvfs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/string.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/stringold.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/stringprep.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/struct.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/symbol.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/symtable.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/sysconfig.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/tabnanny.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/tarfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/telnetlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/tempfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/185test.db create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/Sine-1000Hz-300ms.aif create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/audiotest.au create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/autotest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/bad_coding.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/bad_coding2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badcert.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badkey.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_future3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_future4.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_future5.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_future6.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_future7.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_future8.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_future9.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/badsyntax_nocaret.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/buffer_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cfgparser.1 create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/check_soundcard.vbs create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/big5-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/big5.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/big5hkscs-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/big5hkscs.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/cp949-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/cp949.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/euc_jisx0213-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/euc_jisx0213.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/euc_jp-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/euc_jp.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/euc_kr-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/euc_kr.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/gb18030-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/gb18030.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/gb2312-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/gb2312.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/gbk-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/gbk.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/hz-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/hz.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/johab-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/johab.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/shift_jis-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/shift_jis.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/shift_jisx0213-utf8.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cjkencodings/shift_jisx0213.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/cmath_testcases.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/bogus_code_obj.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/borrowed_ref_1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/borrowed_ref_2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/compiler_recursion.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/gc_has_finalizer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/gc_inspection.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/infinite_loop_re.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/loosing_mro_ref.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/mutation_inside_cyclegc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/nasty_eq_vs_dict.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/recursion_limit_too_high.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/recursive_call.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/curses_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/data/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/abs.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/add.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/and.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/base.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/clamp.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/class.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/compare.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/comparetotal.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/comparetotmag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/copy.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/copyabs.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/copynegate.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/copysign.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddAbs.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddAdd.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddAnd.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddBase.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCanonical.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddClass.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCompare.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCompareSig.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCompareTotal.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCompareTotalMag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCopy.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCopyAbs.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCopyNegate.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddCopySign.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddDivide.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddDivideInt.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddEncode.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddFMA.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddInvert.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddLogB.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddMax.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddMaxMag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddMin.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddMinMag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddMinus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddMultiply.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddNextMinus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddNextPlus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddNextToward.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddOr.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddPlus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddQuantize.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddReduce.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddRemainder.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddRemainderNear.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddRotate.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddSameQuantum.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddScaleB.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddShift.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddSubtract.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddToIntegral.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ddXor.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/decDouble.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/decQuad.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/decSingle.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/divide.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/divideint.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqAbs.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqAdd.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqAnd.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqBase.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCanonical.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqClass.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCompare.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCompareSig.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCompareTotal.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCompareTotalMag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCopy.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCopyAbs.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCopyNegate.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqCopySign.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqDivide.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqDivideInt.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqEncode.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqFMA.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqInvert.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqLogB.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqMax.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqMaxMag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqMin.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqMinMag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqMinus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqMultiply.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqNextMinus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqNextPlus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqNextToward.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqOr.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqPlus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqQuantize.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqReduce.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqRemainder.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqRemainderNear.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqRotate.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqSameQuantum.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqScaleB.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqShift.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqSubtract.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqToIntegral.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dqXor.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dsBase.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/dsEncode.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/exp.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/extra.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/fma.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/inexact.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/invert.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/ln.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/log10.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/logb.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/max.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/maxmag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/min.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/minmag.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/minus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/multiply.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/nextminus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/nextplus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/nexttoward.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/or.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/plus.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/power.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/powersqrt.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/quantize.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/randomBound32.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/randoms.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/reduce.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/remainder.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/remainderNear.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/rescale.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/rotate.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/rounding.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/samequantum.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/scaleb.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/shift.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/squareroot.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/subtract.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/testall.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/tointegral.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/tointegralx.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/decimaltestdata/xor.decTest create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/doctest_aliases.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/double_const.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/empty.vbs create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/exception_hierarchy.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/floating_points.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/fork_wait.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/formatfloat_testcases.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/gdb_sample.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/greyrgb.uue create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/https_svn_python_org_root.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/ieee754.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/infinite_reload.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/inspect_fodder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/inspect_fodder2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/keycert.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/README.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_ctypes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_dictself.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_gestalt.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/leakers/test_selftype.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/list_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/lock_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/mapping_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/math_testcases.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/nullcert.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/outstanding_bugs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/pickletester.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/profilee.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/pyclbr_input.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/pydoc_mod.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/pydocfodder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/pystone.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/randv2_32.pck create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/randv2_64.pck create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/randv3.pck create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/re_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/regex_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/regrtest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/relimport.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/reperf.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/sample_doctest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/script_helper.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/seq_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/sgml_input.html create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/sha256.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/sortperf.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/ssl_cert.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/ssl_key.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/string_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/subprocessdata/sigchild_ignore.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/svn_python_org_https_cert.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_MimeWriter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_SimpleHTTPServer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_StringIO.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test___all__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test___future__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test__locale.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_abc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_abstract_numbers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_aepack.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_aifc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_al.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_anydbm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_applesingle.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_argparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_array.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ascii_formatd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ast.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_asynchat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_asyncore.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_atexit.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_audioop.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_augassign.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_base64.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bastion.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bigaddrspace.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bigmem.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_binascii.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_binhex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_binop.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bisect.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bool.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb185.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_buffer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bufio.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_builtin.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bytes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bz2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_calendar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_call.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_capi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cfgparser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cgi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_charmapcodec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_class.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cmath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cmd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cmd_line.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cmd_line_script.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_code.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codeccallbacks.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecencodings_cn.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecencodings_hk.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecencodings_jp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecencodings_kr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecencodings_tw.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecmaps_cn.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecmaps_hk.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecmaps_jp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecmaps_kr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecmaps_tw.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codecs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_codeop.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_coding.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_coercion.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_collections.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_colorsys.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_commands.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_compare.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_compile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_compileall.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_compiler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_complex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_complex_args.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_contains.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_contextlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cookie.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cookielib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_copy.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_copy_reg.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cpickle.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_cprofile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_crypt.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_csv.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ctypes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_curses.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_datetime.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dbm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_decimal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_decorators.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_defaultdict.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_deque.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_descr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_descrtut.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dict.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dictcomps.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dictviews.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_difflib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_difflib_expect.html create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dircache.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dis.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_distutils.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_doctest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_doctest.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_doctest2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_doctest2.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_doctest3.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_doctest4.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_docxmlrpc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dumbdbm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dummy_thread.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dummy_threading.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_email.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_email_codecs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_email_renamed.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_enumerate.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_eof.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_epoll.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_errno.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_exception_variations.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_exceptions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_extcall.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_fcntl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_file.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_file2k.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_filecmp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_fileinput.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_fileio.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_float.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_fnmatch.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_fork1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_format.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_fpformat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_fractions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_frozen.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ftplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_funcattrs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_functools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future1.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future4.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future5.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_future_builtins.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_gc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_gdb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_gdbm.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_generators.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_genericpath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_genexps.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_getargs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_getargs2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_getopt.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_gettext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_gl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_glob.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_global.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_grammar.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_grp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_gzip.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_hash.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_hashlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_heapq.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_hmac.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_hotshot.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_htmllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_htmlparser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_httplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_httpservers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_imageop.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_imaplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_imgfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_imp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_import.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_importhooks.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_importlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_index.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_inspect.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_int.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_int_literal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_io.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ioctl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_isinstance.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_iter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_iterlen.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_itertools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_json.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_kqueue.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_largefile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_lib2to3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_linecache.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_linuxaudiodev.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_list.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_locale.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_logging.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_long.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_long_future.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_longexp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_macos.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_macostools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_macpath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_mailbox.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_marshal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_math.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_md5.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_memoryio.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_memoryview.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_mhlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_mimetools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_mimetypes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_minidom.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_mmap.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_module.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_modulefinder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_msilib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_multibytecodec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_multibytecodec_support.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_multifile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_multiprocessing.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_mutants.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_mutex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_netrc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_new.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_nis.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_normalization.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ntpath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_old_mailbox.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_opcodes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_openpty.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_operator.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_optparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_os.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ossaudiodev.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_parser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pdb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_peepholer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pep247.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pep263.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pep277.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pep292.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pep352.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickle.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickletools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pipes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pkg.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pkgimport.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pkgutil.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_platform.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_plistlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_poll.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_popen.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_popen2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_poplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_posix.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_posixpath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pow.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pprint.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_print.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_profile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_property.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pstats.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pty.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pwd.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_py3kwarn.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pyclbr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pydoc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pyexpat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_queue.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_quopri.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_random.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_re.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_readline.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_repr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_resource.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_rfc822.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_richcmp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_rlcompleter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_robotparser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_runpy.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sax.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_scope.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_scriptpackages.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_select.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_set.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_setcomps.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sets.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sgmllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sha.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_shelve.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_shlex.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_shutil.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_signal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_site.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_slice.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_smtplib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_smtpnet.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_socket.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_socketserver.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_softspace.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sort.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sqlite.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ssl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_startfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_str.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_strftime.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_string.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_stringprep.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_strop.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_strptime.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_strtod.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_struct.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_structmembers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_structseq.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_subprocess.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sunaudiodev.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sundry.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_support.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_symtable.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_syntax.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sys.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sys_setprofile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sys_settrace.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_sysconfig.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_tarfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_tcl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_telnetlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_tempfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_textwrap.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_thread.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_threaded_import.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_threadedtempfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_threading.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_threading_local.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_threadsignals.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_time.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_timeout.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_tk.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_tokenize.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_trace.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_traceback.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_transformer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ttk_guionly.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ttk_textonly.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_tuple.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_typechecks.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_types.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_ucn.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_unary.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_undocumented_details.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_unicode.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_unicode_file.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_unicodedata.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_unittest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_univnewlines.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_univnewlines2k.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_unpack.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_urllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_urllib2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_urllib2_localnet.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_urllib2net.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_urllibnet.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_urlparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_userdict.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_userlist.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_userstring.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_uu.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_uuid.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_wait3.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_wait4.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_warnings.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_wave.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_weakref.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_weakset.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_whichdb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_winreg.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_winsound.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_with.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_wsgiref.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_xdrlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_xml_etree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_xml_etree_c.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_xmllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_xmlrpc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_xpickle.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_xrange.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_zipfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_zipfile64.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_zipimport.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_zipimport_support.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_zlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/testall.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/testcodec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/testimg.uue create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/testimgr.uue create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/testrgb.uue create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/testtar.tar create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/tf_inherit_check.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/threaded_import_hangers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/time_hashlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/tokenize_tests.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/tracedmodules/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/tracedmodules/testmod.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/warning_tests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/win_console_handler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/wrongcert.pem create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/xmltestdata/simple-ns.xml create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/xmltestdata/simple.xml create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/xmltestdata/test.xml create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/xmltestdata/test.xml.out create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/xmltests.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/test/zipdir.zip create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/textwrap.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/this.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/timeit.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/toaiff.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/token.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/tokenize.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/trace.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/traceback.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/tty.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/types.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/__main__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/case.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/loader.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/main.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/result.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/runner.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/signals.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/suite.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/dummy.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/support.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_assertions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_break.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_case.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_discovery.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_functiontestcase.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_loader.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_program.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_result.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_runner.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_setups.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_skipping.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/test_suite.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/urllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/urllib2.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/urlparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/user.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/uu.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/uuid.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/warnings.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wave.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/weakref.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/webbrowser.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/whichdb.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref.egg-info create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/handlers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/headers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/simple_server.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/wsgiref/validate.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xdrlib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/NodeFilter.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/domreg.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/expatbuilder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/minicompat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/minidom.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/pulldom.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/dom/xmlbuilder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/etree/ElementInclude.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/etree/ElementPath.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/etree/ElementTree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/etree/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/etree/cElementTree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/parsers/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/parsers/expat.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/sax/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/sax/_exceptions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/sax/expatreader.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/sax/handler.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/sax/saxutils.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xml/sax/xmlreader.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xmllib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/xmlrpclib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/zipfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_bisectmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_codecsmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_collectionsmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_csv.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_elementtree.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_functoolsmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_hashopenssl.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_heapqmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_hotshot.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/_iomodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/_iomodule.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/bufferedio.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/bytesio.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/fileio.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/iobase.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/stringio.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_io/textio.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_json.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_localemodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_lsprof.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_math.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_math.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_randommodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/cache.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/cache.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/connection.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/connection.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/cursor.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/cursor.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/microprotocols.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/microprotocols.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/module.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/module.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/prepare_protocol.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/prepare_protocol.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/row.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/row.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/sqlitecompat.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/statement.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/statement.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/util.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sqlite/util.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_sre.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_ssl.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_struct.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_testcapimodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/_weakref.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/addrinfo.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/arraymodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/binascii.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/bz2module.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cPickle.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cStringIO.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/_codecs_cn.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/_codecs_hk.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/_codecs_iso2022.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/_codecs_jp.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/_codecs_kr.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/_codecs_tw.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/alg_jisx0201.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/cjkcodecs.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/emu_jisx0213_2000.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/mappings_cn.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/mappings_hk.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/mappings_jisx0213_pair.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/mappings_jp.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/mappings_kr.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/mappings_tw.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/multibytecodec.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cjkcodecs/multibytecodec.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cmathmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/cryptmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/datetimemodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/errnomodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/COPYING create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/amigaconfig.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/ascii.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/asciitab.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/expat.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/expat_config.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/expat_external.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/iasciitab.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/internal.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/latin1tab.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/macconfig.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/nametab.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/pyexpatns.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/utf8tab.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/winconfig.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlparse.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlrole.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlrole.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmltok.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmltok.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmltok_impl.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmltok_impl.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmltok_ns.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/fcntlmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/flmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/fmmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/fpectlmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/fpetestmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/future_builtins.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/gc_weakref.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/gcmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/getaddrinfo.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/getbuildinfo.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/getnameinfo.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/getpath.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/imageop.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/itertoolsmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/main.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/mathmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/md5.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/md5.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/md5module.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/operator.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/parsermodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/posixmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/puremodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/pwdmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/pyexpat.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/python.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/readline.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/resource.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/rotatingtree.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/rotatingtree.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/selectmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/sha256module.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/sha512module.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/shamodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/signalmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/socketmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/socketmodule.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/sre.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/sre_constants.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/stropmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/symtablemodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/testcapi_long.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/threadmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/timemodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/timing.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/timingmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/unicodedata.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/unicodedata_db.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/unicodename_db.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/xxmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/xxsubtype.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/yuv.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/yuvconvert.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zipimport.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/ChangeLog create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/FAQ create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/INDEX create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/Makefile create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/Makefile.in create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/adler32.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/algorithm.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/compress.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/configure create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/crc32.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/crc32.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/deflate.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/deflate.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/example.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/gzio.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/infback.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/inffast.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/inffast.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/inffixed.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/inflate.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/inflate.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/inftrees.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/inftrees.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/make_vms.com create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/minigzip.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/trees.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/trees.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/uncompr.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/zconf.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/zconf.in.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/zlib.3 create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/zlib.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/zutil.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlib/zutil.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Modules/zlibmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/abstract.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/boolobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/bufferobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/bytearrayobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/bytes_methods.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/capsule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/cellobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/classobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/cobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/codeobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/complexobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/descrobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/dictnotes.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/dictobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/enumobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/exceptions.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/fileobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/floatobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/frameobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/funcobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/genobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/intobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/iterobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/listobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/listsort.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/lnotab_notes.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/longobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/memoryobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/methodobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/moduleobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/object.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/obmalloc.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/rangeobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/setobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/sliceobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/README.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/count.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/ctype.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/fastsearch.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/find.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/formatter.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/localeutil.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/partition.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/split.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/string_format.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/stringdefs.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/transmogrify.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringlib/unicodedefs.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/stringobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/structseq.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/tupleobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/typeobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/unicodectype.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/unicodeobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/unicodetype_db.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Objects/weakrefobject.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/Python.asdl create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/acceler.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/asdl.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/asdl_c.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/bitset.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/firstsets.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/grammar.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/grammar1.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/intrcheck.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/listnode.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/metagrammar.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/myreadline.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/node.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/parser.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/parser.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/parsetok.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/pgen.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/pgenmain.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/printgrammar.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/spark.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/tokenizer.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/tokenizer.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Parser/tokenizer_pgen.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/Python-ast.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/_warnings.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/asdl.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/ast.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/atof.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/bltinmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/ceval.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/codecs.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/compile.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dtoa.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dup2.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_aix.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_atheos.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_beos.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_dl.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_hpux.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_next.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_os2.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_shlib.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_stub.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/dynload_win.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/errors.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/formatter_string.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/formatter_unicode.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/frozen.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/frozenmain.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/future.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/getargs.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/getcompiler.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/getcopyright.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/getcwd.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/getopt.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/getplatform.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/getversion.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/graminit.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/import.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/importdl.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/importdl.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/mactoolboxglue.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/marshal.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/modsupport.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/mysnprintf.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/mystrtoul.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/peephole.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pyarena.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pyctype.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pyfpe.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pymath.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pystate.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pystrcmp.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pystrtod.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/pythonrun.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/sigcheck.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/strdup.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/strtod.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/structmember.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/symtable.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/sysmodule.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_atheos.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_beos.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_cthread.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_foobar.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_lwp.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_nt.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_os2.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_pth.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_pthread.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_sgi.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_solaris.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/thread_wince.h create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Python/traceback.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgen.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenBuffer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenGenerator.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenGeneratorGroup.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenHeapBuffer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenModule.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenObjectDefinition.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenOutput.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenStackBuffer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenStringBuffer.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenType.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/bgenVariable.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/macsupport.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/bgen/bgen/scantools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/README.tcltk-AMD64 create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/build-amd64.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/build.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/buildmsi.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/clean-amd64.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/clean.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/external-amd64.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/external-common.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/external.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/test-amd64.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/buildbot/test.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/ccbench/ccbench.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/ACKS create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/ast.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/astgen.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/compile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/demo.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/dumppyc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/regrtest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/compiler/stacktest.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/faqconf.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/faqcust.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/faqw.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/faqwiz.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/faqwiz/move-faqwiz.sh create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/README.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/TODO.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/example.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/bases.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/function.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/member.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/slots.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/struct.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/structparse.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/template.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/framer/framer/util.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/bkfile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/checkextensions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/checkextensions_win32.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/extensions_win32.ini create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/freeze.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/hello.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/makeconfig.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/makefreeze.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/makemakefile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/parsesetup.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/win32.html create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/freeze/winmakemakefile.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/gdb/libpython.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/makelocalealias.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/msgfmt.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/iobench/iobench.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/README.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/crtlicense.txt create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/msi.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/msilib.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/msisupport.c create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/msisupport.mak create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/schema.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/sequence.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/uisample.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/msi/uuids.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Arithmetic.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Calls.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/CommandLine.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Constructs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Dict.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Exceptions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Imports.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Instances.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/LICENSE create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Lists.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Lookups.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/NewInstances.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Numbers.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Setup.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Strings.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Tuples.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/Unicode.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/With.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/clockres.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/package/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/package/submodule.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/pybench.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/pybench/systimes.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/2to3 create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/analyze_dxp.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/byext.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/byteyears.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/checkappend.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/checkpyc.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/classfix.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/cleanfuture.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/combinerefs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/copytime.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/crlf.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/cvsfiles.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/db2pickle.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/diff.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/dutree.doc create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/dutree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/eptags.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/find_recursionlimit.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/finddiv.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/findlinksto.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/findnocoding.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/fixcid.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/fixdiv.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/fixheader.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/fixnotice.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/fixps.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ftpmirror.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/google.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/gprof2html.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/h2py.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/hotshotmain.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/idle create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ifdef.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/lfcr.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/linktree.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/lll.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/logmerge.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/mailerdaemon.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/md5sum.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/methfix.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/mkreal.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ndiff.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/nm2def.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/objgraph.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/parseentities.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/patchcheck.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pathfix.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pdeps.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pickle2db.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pindent.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ptags.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pydoc create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pydocgui.pyw create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/pysource.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/redemo.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/reindent-rst.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/reindent.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/rgrep.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/serve.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/setup.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/suff.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/svneol.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/texcheck.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/texi2html.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/treesync.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/untabify.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/which.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/win_add2path.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/xxci.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/ssl/get-remote-certificate.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/Makefile create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/comparecodecs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/gencjkcodecs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/gencodec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/genwincodec.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/genwincodecs.bat create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/listcodecs.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/makeunicodedata.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/mkstringprep.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/python-mappings/CP1140.TXT create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/python-mappings/KOI8-U.TXT create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/unicode/python-mappings/TIS-620.TXT create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/versioncheck/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/versioncheck/_checkversion.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/versioncheck/checkversions.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/versioncheck/pyversioncheck.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/tktools.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/wcgui.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/wcmac.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/webchecker.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/websucker.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/webchecker/wsgui.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/world/README create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Tools/world/world diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/README new file mode 100644 index 0000000000..ce362eeb6e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/README @@ -0,0 +1,40 @@ +This directory contains various demonstrations of what you can do with +Python. They were all written by me except where explicitly stated +otherwise -- in general, demos contributed by others ends up in the +../Contrib directory, unless I think they're of utmost general +importance (like Matt Conway's Tk demos). + +A fair number of utilities that are useful when while developing +Python code can be found in the ../Tools directory -- some of these +can also be considered good examples of how to write Python code. + +Finally, in order to save disk space and net bandwidth, not all +subdirectories listed here are distributed. They are listed just +in case I change my mind about them. + + +cgi CGI examples (see also ../Tools/faqwiz/.) + +classes Some examples of how to use classes. + +comparisons A set of responses to a really old language-comparison + challenge. + +md5test Test program for the optional md5 module. + +metaclasses The code from the 1.5 metaclasses paper on the web. + +parser Example using the parser module. + +pdist Old, unfinished code messing with CVS, RCS and remote + files. + +scripts Some useful Python scripts that I put in my bin + directory. No optional built-in modules needed. + +sockets Examples for the new built-in module 'socket'. + +xml Some XML demos. + +zlib Some demos for the zlib module (see also the standard + library module gzip.py). diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/README new file mode 100644 index 0000000000..90d6c9bbe5 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/README @@ -0,0 +1,11 @@ +CGI Examples +------------ + +Here are some example CGI programs. For a larger example, see +../../Tools/faqwiz/. + +cgi0.sh -- A shell script to test your server is configured for CGI +cgi1.py -- A Python script to test your server is configured for CGI +cgi2.py -- A Python script showing how to parse a form +cgi3.py -- A Python script for driving an arbitrary CGI application +wiki.py -- Sample CGI application: a minimal Wiki implementation diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi0.sh b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi0.sh new file mode 100644 index 0000000000..ee353755a7 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi0.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +# If you can't get this to work, your web server isn't set up right + +echo Content-type: text/plain +echo +echo Hello world +echo This is cgi0.sh diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi1.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi1.py new file mode 100644 index 0000000000..3a0c604e23 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi1.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +"""CGI test 1 - check server setup.""" + +# Until you get this to work, your web server isn't set up right or +# your Python isn't set up right. + +# If cgi0.sh works but cgi1.py doesn't, check the #! line and the file +# permissions. The docs for the cgi.py module have debugging tips. + +print "Content-type: text/html" +print +print "

Hello world

" +print "

This is cgi1.py" diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi2.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi2.py new file mode 100644 index 0000000000..1ed9f5501b --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi2.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +"""CGI test 2 - basic use of cgi module.""" + +import cgitb; cgitb.enable() + +import cgi + +def main(): + form = cgi.FieldStorage() + print "Content-type: text/html" + print + if not form: + print "

No Form Keys

" + else: + print "

Form Keys

" + for key in form.keys(): + value = form[key].value + print "

", cgi.escape(key), ":", cgi.escape(value) + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi3.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi3.py new file mode 100644 index 0000000000..224fc83fef --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/cgi3.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +"""CGI test 3 (persistent data).""" + +import cgitb; cgitb.enable() + +from wiki import main + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/wiki.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/wiki.py new file mode 100644 index 0000000000..990c2e6721 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/cgi/wiki.py @@ -0,0 +1,123 @@ +"""Wiki main program. Imported and run by cgi3.py.""" + +import os, re, cgi, sys, tempfile +escape = cgi.escape + +def main(): + form = cgi.FieldStorage() + print "Content-type: text/html" + print + cmd = form.getvalue("cmd", "view") + page = form.getvalue("page", "FrontPage") + wiki = WikiPage(page) + method = getattr(wiki, 'cmd_' + cmd, None) or wiki.cmd_view + method(form) + +class WikiPage: + + homedir = tempfile.gettempdir() + scripturl = os.path.basename(sys.argv[0]) + + def __init__(self, name): + if not self.iswikiword(name): + raise ValueError, "page name is not a wiki word" + self.name = name + self.load() + + def cmd_view(self, form): + print "

", escape(self.splitwikiword(self.name)), "

" + print "

" + for line in self.data.splitlines(): + line = line.rstrip() + if not line: + print "

" + else: + print self.formatline(line) + print "


" + print "

", self.mklink("edit", self.name, "Edit this page") + ";" + print self.mklink("view", "FrontPage", "go to front page") + "." + + def formatline(self, line): + words = [] + for word in re.split('(\W+)', line): + if self.iswikiword(word): + if os.path.isfile(self.mkfile(word)): + word = self.mklink("view", word, word) + else: + word = self.mklink("new", word, word + "*") + else: + word = escape(word) + words.append(word) + return "".join(words) + + def cmd_edit(self, form, label="Change"): + print "

", label, self.name, "

" + print '
' % self.scripturl + s = '' + print s % self.data + print '' + print '' % self.name + print '
' + print '' % label + print "
" + + def cmd_create(self, form): + self.data = form.getvalue("text", "").strip() + error = self.store() + if error: + print "

I'm sorry. That didn't work

" + print "

An error occurred while attempting to write the file:" + print "

", escape(error) + else: + # Use a redirect directive, to avoid "reload page" problems + print "" + s = '' + print s % (self.scripturl + "?cmd=view&page=" + self.name) + print "" + print "

OK

" + print "

If nothing happens, please click here:", + print self.mklink("view", self.name, self.name) + + def cmd_new(self, form): + self.cmd_edit(form, label="Create") + + def iswikiword(self, word): + return re.match("[A-Z][a-z]+([A-Z][a-z]*)+", word) + + def splitwikiword(self, word): + chars = [] + for c in word: + if chars and c.isupper(): + chars.append(' ') + chars.append(c) + return "".join(chars) + + def mkfile(self, name=None): + if name is None: + name = self.name + return os.path.join(self.homedir, name + ".txt") + + def mklink(self, cmd, page, text): + link = self.scripturl + "?cmd=" + cmd + "&page=" + page + return '%s' % (link, text) + + def load(self): + try: + f = open(self.mkfile()) + data = f.read().strip() + f.close() + except IOError: + data = "" + self.data = data + + def store(self): + data = self.data + try: + f = open(self.mkfile(), "w") + f.write(data) + if data and not data.endswith('\n'): + f.write('\n') + f.close() + return "" + except IOError, err: + return "IOError: %s" % str(err) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Complex.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Complex.py new file mode 100644 index 0000000000..9d631b8739 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Complex.py @@ -0,0 +1,320 @@ +# Complex numbers +# --------------- + +# [Now that Python has a complex data type built-in, this is not very +# useful, but it's still a nice example class] + +# This module represents complex numbers as instances of the class Complex. +# A Complex instance z has two data attribues, z.re (the real part) and z.im +# (the imaginary part). In fact, z.re and z.im can have any value -- all +# arithmetic operators work regardless of the type of z.re and z.im (as long +# as they support numerical operations). +# +# The following functions exist (Complex is actually a class): +# Complex([re [,im]) -> creates a complex number from a real and an imaginary part +# IsComplex(z) -> true iff z is a complex number (== has .re and .im attributes) +# ToComplex(z) -> a complex number equal to z; z itself if IsComplex(z) is true +# if z is a tuple(re, im) it will also be converted +# PolarToComplex([r [,phi [,fullcircle]]]) -> +# the complex number z for which r == z.radius() and phi == z.angle(fullcircle) +# (r and phi default to 0) +# exp(z) -> returns the complex exponential of z. Equivalent to pow(math.e,z). +# +# Complex numbers have the following methods: +# z.abs() -> absolute value of z +# z.radius() == z.abs() +# z.angle([fullcircle]) -> angle from positive X axis; fullcircle gives units +# z.phi([fullcircle]) == z.angle(fullcircle) +# +# These standard functions and unary operators accept complex arguments: +# abs(z) +# -z +# +z +# not z +# repr(z) == `z` +# str(z) +# hash(z) -> a combination of hash(z.re) and hash(z.im) such that if z.im is zero +# the result equals hash(z.re) +# Note that hex(z) and oct(z) are not defined. +# +# These conversions accept complex arguments only if their imaginary part is zero: +# int(z) +# long(z) +# float(z) +# +# The following operators accept two complex numbers, or one complex number +# and one real number (int, long or float): +# z1 + z2 +# z1 - z2 +# z1 * z2 +# z1 / z2 +# pow(z1, z2) +# cmp(z1, z2) +# Note that z1 % z2 and divmod(z1, z2) are not defined, +# nor are shift and mask operations. +# +# The standard module math does not support complex numbers. +# The cmath modules should be used instead. +# +# Idea: +# add a class Polar(r, phi) and mixed-mode arithmetic which +# chooses the most appropriate type for the result: +# Complex for +,-,cmp +# Polar for *,/,pow + +import math +import sys + +twopi = math.pi*2.0 +halfpi = math.pi/2.0 + +def IsComplex(obj): + return hasattr(obj, 're') and hasattr(obj, 'im') + +def ToComplex(obj): + if IsComplex(obj): + return obj + elif isinstance(obj, tuple): + return Complex(*obj) + else: + return Complex(obj) + +def PolarToComplex(r = 0, phi = 0, fullcircle = twopi): + phi = phi * (twopi / fullcircle) + return Complex(math.cos(phi)*r, math.sin(phi)*r) + +def Re(obj): + if IsComplex(obj): + return obj.re + return obj + +def Im(obj): + if IsComplex(obj): + return obj.im + return 0 + +class Complex: + + def __init__(self, re=0, im=0): + _re = 0 + _im = 0 + if IsComplex(re): + _re = re.re + _im = re.im + else: + _re = re + if IsComplex(im): + _re = _re - im.im + _im = _im + im.re + else: + _im = _im + im + # this class is immutable, so setting self.re directly is + # not possible. + self.__dict__['re'] = _re + self.__dict__['im'] = _im + + def __setattr__(self, name, value): + raise TypeError, 'Complex numbers are immutable' + + def __hash__(self): + if not self.im: + return hash(self.re) + return hash((self.re, self.im)) + + def __repr__(self): + if not self.im: + return 'Complex(%r)' % (self.re,) + else: + return 'Complex(%r, %r)' % (self.re, self.im) + + def __str__(self): + if not self.im: + return repr(self.re) + else: + return 'Complex(%r, %r)' % (self.re, self.im) + + def __neg__(self): + return Complex(-self.re, -self.im) + + def __pos__(self): + return self + + def __abs__(self): + return math.hypot(self.re, self.im) + + def __int__(self): + if self.im: + raise ValueError, "can't convert Complex with nonzero im to int" + return int(self.re) + + def __long__(self): + if self.im: + raise ValueError, "can't convert Complex with nonzero im to long" + return long(self.re) + + def __float__(self): + if self.im: + raise ValueError, "can't convert Complex with nonzero im to float" + return float(self.re) + + def __cmp__(self, other): + other = ToComplex(other) + return cmp((self.re, self.im), (other.re, other.im)) + + def __rcmp__(self, other): + other = ToComplex(other) + return cmp(other, self) + + def __nonzero__(self): + return not (self.re == self.im == 0) + + abs = radius = __abs__ + + def angle(self, fullcircle = twopi): + return (fullcircle/twopi) * ((halfpi - math.atan2(self.re, self.im)) % twopi) + + phi = angle + + def __add__(self, other): + other = ToComplex(other) + return Complex(self.re + other.re, self.im + other.im) + + __radd__ = __add__ + + def __sub__(self, other): + other = ToComplex(other) + return Complex(self.re - other.re, self.im - other.im) + + def __rsub__(self, other): + other = ToComplex(other) + return other - self + + def __mul__(self, other): + other = ToComplex(other) + return Complex(self.re*other.re - self.im*other.im, + self.re*other.im + self.im*other.re) + + __rmul__ = __mul__ + + def __div__(self, other): + other = ToComplex(other) + d = float(other.re*other.re + other.im*other.im) + if not d: raise ZeroDivisionError, 'Complex division' + return Complex((self.re*other.re + self.im*other.im) / d, + (self.im*other.re - self.re*other.im) / d) + + def __rdiv__(self, other): + other = ToComplex(other) + return other / self + + def __pow__(self, n, z=None): + if z is not None: + raise TypeError, 'Complex does not support ternary pow()' + if IsComplex(n): + if n.im: + if self.im: raise TypeError, 'Complex to the Complex power' + else: return exp(math.log(self.re)*n) + n = n.re + r = pow(self.abs(), n) + phi = n*self.angle() + return Complex(math.cos(phi)*r, math.sin(phi)*r) + + def __rpow__(self, base): + base = ToComplex(base) + return pow(base, self) + +def exp(z): + r = math.exp(z.re) + return Complex(math.cos(z.im)*r,math.sin(z.im)*r) + + +def checkop(expr, a, b, value, fuzz = 1e-6): + print ' ', a, 'and', b, + try: + result = eval(expr) + except: + result = sys.exc_type + print '->', result + if isinstance(result, str) or isinstance(value, str): + ok = (result == value) + else: + ok = abs(result - value) <= fuzz + if not ok: + print '!!\t!!\t!! should be', value, 'diff', abs(result - value) + +def test(): + print 'test constructors' + constructor_test = ( + # "expect" is an array [re,im] "got" the Complex. + ( (0,0), Complex() ), + ( (0,0), Complex() ), + ( (1,0), Complex(1) ), + ( (0,1), Complex(0,1) ), + ( (1,2), Complex(Complex(1,2)) ), + ( (1,3), Complex(Complex(1,2),1) ), + ( (0,0), Complex(0,Complex(0,0)) ), + ( (3,4), Complex(3,Complex(4)) ), + ( (-1,3), Complex(1,Complex(3,2)) ), + ( (-7,6), Complex(Complex(1,2),Complex(4,8)) ) ) + cnt = [0,0] + for t in constructor_test: + cnt[0] += 1 + if ((t[0][0]!=t[1].re)or(t[0][1]!=t[1].im)): + print " expected", t[0], "got", t[1] + cnt[1] += 1 + print " ", cnt[1], "of", cnt[0], "tests failed" + # test operators + testsuite = { + 'a+b': [ + (1, 10, 11), + (1, Complex(0,10), Complex(1,10)), + (Complex(0,10), 1, Complex(1,10)), + (Complex(0,10), Complex(1), Complex(1,10)), + (Complex(1), Complex(0,10), Complex(1,10)), + ], + 'a-b': [ + (1, 10, -9), + (1, Complex(0,10), Complex(1,-10)), + (Complex(0,10), 1, Complex(-1,10)), + (Complex(0,10), Complex(1), Complex(-1,10)), + (Complex(1), Complex(0,10), Complex(1,-10)), + ], + 'a*b': [ + (1, 10, 10), + (1, Complex(0,10), Complex(0, 10)), + (Complex(0,10), 1, Complex(0,10)), + (Complex(0,10), Complex(1), Complex(0,10)), + (Complex(1), Complex(0,10), Complex(0,10)), + ], + 'a/b': [ + (1., 10, 0.1), + (1, Complex(0,10), Complex(0, -0.1)), + (Complex(0, 10), 1, Complex(0, 10)), + (Complex(0, 10), Complex(1), Complex(0, 10)), + (Complex(1), Complex(0,10), Complex(0, -0.1)), + ], + 'pow(a,b)': [ + (1, 10, 1), + (1, Complex(0,10), 1), + (Complex(0,10), 1, Complex(0,10)), + (Complex(0,10), Complex(1), Complex(0,10)), + (Complex(1), Complex(0,10), 1), + (2, Complex(4,0), 16), + ], + 'cmp(a,b)': [ + (1, 10, -1), + (1, Complex(0,10), 1), + (Complex(0,10), 1, -1), + (Complex(0,10), Complex(1), -1), + (Complex(1), Complex(0,10), 1), + ], + } + for expr in sorted(testsuite): + print expr + ':' + t = (expr,) + for item in testsuite[expr]: + checkop(*(t+item)) + + +if __name__ == '__main__': + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dates.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dates.py new file mode 100644 index 0000000000..9c13f4c11d --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dates.py @@ -0,0 +1,227 @@ +# Class Date supplies date objects that support date arithmetic. +# +# Date(month,day,year) returns a Date object. An instance prints as, +# e.g., 'Mon 16 Aug 1993'. +# +# Addition, subtraction, comparison operators, min, max, and sorting +# all work as expected for date objects: int+date or date+int returns +# the date `int' days from `date'; date+date raises an exception; +# date-int returns the date `int' days before `date'; date2-date1 returns +# an integer, the number of days from date1 to date2; int-date raises an +# exception; date1 < date2 is true iff date1 occurs before date2 (& +# similarly for other comparisons); min(date1,date2) is the earlier of +# the two dates and max(date1,date2) the later; and date objects can be +# used as dictionary keys. +# +# Date objects support one visible method, date.weekday(). This returns +# the day of the week the date falls on, as a string. +# +# Date objects also have 4 read-only data attributes: +# .month in 1..12 +# .day in 1..31 +# .year int or long int +# .ord the ordinal of the date relative to an arbitrary staring point +# +# The Dates module also supplies function today(), which returns the +# current date as a date object. +# +# Those entranced by calendar trivia will be disappointed, as no attempt +# has been made to accommodate the Julian (etc) system. On the other +# hand, at least this package knows that 2000 is a leap year but 2100 +# isn't, and works fine for years with a hundred decimal digits . + +# Tim Peters tim@ksr.com +# not speaking for Kendall Square Research Corp + +# Adapted to Python 1.1 (where some hacks to overcome coercion are unnecessary) +# by Guido van Rossum + +# Note that as of Python 2.3, a datetime module is included in the stardard +# library. + +# vi:set tabsize=8: + +_MONTH_NAMES = [ 'January', 'February', 'March', 'April', 'May', + 'June', 'July', 'August', 'September', 'October', + 'November', 'December' ] + +_DAY_NAMES = [ 'Friday', 'Saturday', 'Sunday', 'Monday', + 'Tuesday', 'Wednesday', 'Thursday' ] + +_DAYS_IN_MONTH = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ] + +_DAYS_BEFORE_MONTH = [] +dbm = 0 +for dim in _DAYS_IN_MONTH: + _DAYS_BEFORE_MONTH.append(dbm) + dbm = dbm + dim +del dbm, dim + +_INT_TYPES = type(1), type(1L) + +def _is_leap(year): # 1 if leap year, else 0 + if year % 4 != 0: return 0 + if year % 400 == 0: return 1 + return year % 100 != 0 + +def _days_in_year(year): # number of days in year + return 365 + _is_leap(year) + +def _days_before_year(year): # number of days before year + return year*365L + (year+3)//4 - (year+99)//100 + (year+399)//400 + +def _days_in_month(month, year): # number of days in month of year + if month == 2 and _is_leap(year): return 29 + return _DAYS_IN_MONTH[month-1] + +def _days_before_month(month, year): # number of days in year before month + return _DAYS_BEFORE_MONTH[month-1] + (month > 2 and _is_leap(year)) + +def _date2num(date): # compute ordinal of date.month,day,year + return _days_before_year(date.year) + \ + _days_before_month(date.month, date.year) + \ + date.day + +_DI400Y = _days_before_year(400) # number of days in 400 years + +def _num2date(n): # return date with ordinal n + if type(n) not in _INT_TYPES: + raise TypeError, 'argument must be integer: %r' % type(n) + + ans = Date(1,1,1) # arguments irrelevant; just getting a Date obj + del ans.ord, ans.month, ans.day, ans.year # un-initialize it + ans.ord = n + + n400 = (n-1)//_DI400Y # # of 400-year blocks preceding + year, n = 400 * n400, n - _DI400Y * n400 + more = n // 365 + dby = _days_before_year(more) + if dby >= n: + more = more - 1 + dby = dby - _days_in_year(more) + year, n = year + more, int(n - dby) + + try: year = int(year) # chop to int, if it fits + except (ValueError, OverflowError): pass + + month = min(n//29 + 1, 12) + dbm = _days_before_month(month, year) + if dbm >= n: + month = month - 1 + dbm = dbm - _days_in_month(month, year) + + ans.month, ans.day, ans.year = month, n-dbm, year + return ans + +def _num2day(n): # return weekday name of day with ordinal n + return _DAY_NAMES[ int(n % 7) ] + + +class Date: + def __init__(self, month, day, year): + if not 1 <= month <= 12: + raise ValueError, 'month must be in 1..12: %r' % (month,) + dim = _days_in_month(month, year) + if not 1 <= day <= dim: + raise ValueError, 'day must be in 1..%r: %r' % (dim, day) + self.month, self.day, self.year = month, day, year + self.ord = _date2num(self) + + # don't allow setting existing attributes + def __setattr__(self, name, value): + if self.__dict__.has_key(name): + raise AttributeError, 'read-only attribute ' + name + self.__dict__[name] = value + + def __cmp__(self, other): + return cmp(self.ord, other.ord) + + # define a hash function so dates can be used as dictionary keys + def __hash__(self): + return hash(self.ord) + + # print as, e.g., Mon 16 Aug 1993 + def __repr__(self): + return '%.3s %2d %.3s %r' % ( + self.weekday(), + self.day, + _MONTH_NAMES[self.month-1], + self.year) + + # Python 1.1 coerces neither int+date nor date+int + def __add__(self, n): + if type(n) not in _INT_TYPES: + raise TypeError, 'can\'t add %r to date' % type(n) + return _num2date(self.ord + n) + __radd__ = __add__ # handle int+date + + # Python 1.1 coerces neither date-int nor date-date + def __sub__(self, other): + if type(other) in _INT_TYPES: # date-int + return _num2date(self.ord - other) + else: + return self.ord - other.ord # date-date + + # complain about int-date + def __rsub__(self, other): + raise TypeError, 'Can\'t subtract date from integer' + + def weekday(self): + return _num2day(self.ord) + +def today(): + import time + local = time.localtime(time.time()) + return Date(local[1], local[2], local[0]) + +class DateTestError(Exception): + pass + +def test(firstyear, lastyear): + a = Date(9,30,1913) + b = Date(9,30,1914) + if repr(a) != 'Tue 30 Sep 1913': + raise DateTestError, '__repr__ failure' + if (not a < b) or a == b or a > b or b != b: + raise DateTestError, '__cmp__ failure' + if a+365 != b or 365+a != b: + raise DateTestError, '__add__ failure' + if b-a != 365 or b-365 != a: + raise DateTestError, '__sub__ failure' + try: + x = 1 - a + raise DateTestError, 'int-date should have failed' + except TypeError: + pass + try: + x = a + b + raise DateTestError, 'date+date should have failed' + except TypeError: + pass + if a.weekday() != 'Tuesday': + raise DateTestError, 'weekday() failure' + if max(a,b) is not b or min(a,b) is not a: + raise DateTestError, 'min/max failure' + d = {a-1:b, b:a+1} + if d[b-366] != b or d[a+(b-a)] != Date(10,1,1913): + raise DateTestError, 'dictionary failure' + + # verify date<->number conversions for first and last days for + # all years in firstyear .. lastyear + + lord = _days_before_year(firstyear) + y = firstyear + while y <= lastyear: + ford = lord + 1 + lord = ford + _days_in_year(y) - 1 + fd, ld = Date(1,1,y), Date(12,31,y) + if (fd.ord,ld.ord) != (ford,lord): + raise DateTestError, ('date->num failed', y) + fd, ld = _num2date(ford), _num2date(lord) + if (1,1,y,12,31,y) != \ + (fd.month,fd.day,fd.year,ld.month,ld.day,ld.year): + raise DateTestError, ('num->date failed', y) + y = y + 1 + +if __name__ == '__main__': + test(1850, 2150) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dbm.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dbm.py new file mode 100644 index 0000000000..7bcb2572ce --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Dbm.py @@ -0,0 +1,66 @@ +# A wrapper around the (optional) built-in class dbm, supporting keys +# and values of almost any type instead of just string. +# (Actually, this works only for keys and values that can be read back +# correctly after being converted to a string.) + + +class Dbm: + + def __init__(self, filename, mode, perm): + import dbm + self.db = dbm.open(filename, mode, perm) + + def __repr__(self): + s = '' + for key in self.keys(): + t = repr(key) + ': ' + repr(self[key]) + if s: t = ', ' + t + s = s + t + return '{' + s + '}' + + def __len__(self): + return len(self.db) + + def __getitem__(self, key): + return eval(self.db[repr(key)]) + + def __setitem__(self, key, value): + self.db[repr(key)] = repr(value) + + def __delitem__(self, key): + del self.db[repr(key)] + + def keys(self): + res = [] + for key in self.db.keys(): + res.append(eval(key)) + return res + + def has_key(self, key): + return self.db.has_key(repr(key)) + + +def test(): + d = Dbm('@dbm', 'rw', 0600) + print d + while 1: + try: + key = input('key: ') + if d.has_key(key): + value = d[key] + print 'currently:', value + value = input('value: ') + if value is None: + del d[key] + else: + d[key] = value + except KeyboardInterrupt: + print '' + print d + except EOFError: + print '[eof]' + break + print d + + +test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/README new file mode 100644 index 0000000000..8fc839a475 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/README @@ -0,0 +1,12 @@ +Examples of classes that implement special operators (see reference manual): + +Complex.py Complex numbers +Dates.py Date manipulation package by Tim Peters +Dbm.py Wrapper around built-in dbm, supporting arbitrary values +Range.py Example of a generator: re-implement built-in range() +Rev.py Yield the reverse of a sequence +Vec.py A simple vector class +bitvec.py A bit-vector class by Jan-Hein B\"uhrman + +(For straightforward examples of basic class features, such as use of +methods and inheritance, see the library code.) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Range.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Range.py new file mode 100644 index 0000000000..b0ce5cbf46 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Range.py @@ -0,0 +1,93 @@ +"""Example of a generator: re-implement the built-in range function +without actually constructing the list of values. + +OldStyleRange is coded in the way required to work in a 'for' loop before +iterators were introduced into the language; using __getitem__ and __len__ . + +""" +def handleargs(arglist): + """Take list of arguments and extract/create proper start, stop, and step + values and return in a tuple""" + try: + if len(arglist) == 1: + return 0, int(arglist[0]), 1 + elif len(arglist) == 2: + return int(arglist[0]), int(arglist[1]), 1 + elif len(arglist) == 3: + if arglist[2] == 0: + raise ValueError("step argument must not be zero") + return tuple(int(x) for x in arglist) + else: + raise TypeError("range() accepts 1-3 arguments, given", len(arglist)) + except TypeError: + raise TypeError("range() arguments must be numbers or strings " + "representing numbers") + +def genrange(*a): + """Function to implement 'range' as a generator""" + start, stop, step = handleargs(a) + value = start + while value < stop: + yield value + value += step + +class oldrange: + """Class implementing a range object. + To the user the instances feel like immutable sequences + (and you can't concatenate or slice them) + + Done using the old way (pre-iterators; __len__ and __getitem__) to have an + object be used by a 'for' loop. + + """ + + def __init__(self, *a): + """ Initialize start, stop, and step values along with calculating the + nubmer of values (what __len__ will return) in the range""" + self.start, self.stop, self.step = handleargs(a) + self.len = max(0, (self.stop - self.start) // self.step) + + def __repr__(self): + """implement repr(x) which is also used by print""" + return 'range(%r, %r, %r)' % (self.start, self.stop, self.step) + + def __len__(self): + """implement len(x)""" + return self.len + + def __getitem__(self, i): + """implement x[i]""" + if 0 <= i <= self.len: + return self.start + self.step * i + else: + raise IndexError, 'range[i] index out of range' + + +def test(): + import time, __builtin__ + #Just a quick sanity check + correct_result = __builtin__.range(5, 100, 3) + oldrange_result = list(oldrange(5, 100, 3)) + genrange_result = list(genrange(5, 100, 3)) + if genrange_result != correct_result or oldrange_result != correct_result: + raise Exception("error in implementation:\ncorrect = %s" + "\nold-style = %s\ngenerator = %s" % + (correct_result, oldrange_result, genrange_result)) + print "Timings for range(1000):" + t1 = time.time() + for i in oldrange(1000): + pass + t2 = time.time() + for i in genrange(1000): + pass + t3 = time.time() + for i in __builtin__.range(1000): + pass + t4 = time.time() + print t2-t1, 'sec (old-style class)' + print t3-t2, 'sec (generator)' + print t4-t3, 'sec (built-in)' + + +if __name__ == '__main__': + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Rev.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Rev.py new file mode 100644 index 0000000000..a509e70800 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Rev.py @@ -0,0 +1,95 @@ +''' +A class which presents the reverse of a sequence without duplicating it. +From: "Steven D. Majewski" + +It works on mutable or inmutable sequences. + +>>> chars = list(Rev('Hello World!')) +>>> print ''.join(chars) +!dlroW olleH + +The .forw is so you can use anonymous sequences in __init__, and still +keep a reference the forward sequence. ) +If you give it a non-anonymous mutable sequence, the reverse sequence +will track the updated values. ( but not reassignment! - another +good reason to use anonymous values in creating the sequence to avoid +confusion. Maybe it should be change to copy input sequence to break +the connection completely ? ) + +>>> nnn = range(3) +>>> rnn = Rev(nnn) +>>> for n in rnn: print n +... +2 +1 +0 +>>> for n in range(4, 6): nnn.append(n) # update nnn +... +>>> for n in rnn: print n # prints reversed updated values +... +5 +4 +2 +1 +0 +>>> nnn = nnn[1:-1] +>>> nnn +[1, 2, 4] +>>> for n in rnn: print n # prints reversed values of old nnn +... +5 +4 +2 +1 +0 + +# +>>> WH = Rev('Hello World!') +>>> print WH.forw, WH.back +Hello World! !dlroW olleH +>>> nnn = Rev(range(1, 10)) +>>> print nnn.forw +[1, 2, 3, 4, 5, 6, 7, 8, 9] +>>> print nnn.back +[9, 8, 7, 6, 5, 4, 3, 2, 1] + +>>> rrr = Rev(nnn) +>>> rrr +<1, 2, 3, 4, 5, 6, 7, 8, 9> + +''' + +class Rev: + def __init__(self, seq): + self.forw = seq + self.back = self + + def __len__(self): + return len(self.forw) + + def __getitem__(self, j): + return self.forw[-(j + 1)] + + def __repr__(self): + seq = self.forw + if isinstance(seq, list): + wrap = '[]' + sep = ', ' + elif isinstance(seq, tuple): + wrap = '()' + sep = ', ' + elif isinstance(seq, str): + wrap = '' + sep = '' + else: + wrap = '<>' + sep = ', ' + outstrs = [str(item) for item in self.back] + return wrap[:1] + sep.join(outstrs) + wrap[-1:] + +def _test(): + import doctest, Rev + return doctest.testmod(Rev) + +if __name__ == "__main__": + _test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Vec.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Vec.py new file mode 100644 index 0000000000..a5834e933e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/Vec.py @@ -0,0 +1,68 @@ +class Vec: + """ A simple vector class + + Instances of the Vec class can be constructed from numbers + + >>> a = Vec(1, 2, 3) + >>> b = Vec(3, 2, 1) + + added + >>> a + b + Vec(4, 4, 4) + + subtracted + >>> a - b + Vec(-2, 0, 2) + + and multiplied by a scalar on the left + >>> 3.0 * a + Vec(3.0, 6.0, 9.0) + + or on the right + >>> a * 3.0 + Vec(3.0, 6.0, 9.0) + """ + def __init__(self, *v): + self.v = list(v) + + @classmethod + def fromlist(cls, v): + if not isinstance(v, list): + raise TypeError + inst = cls() + inst.v = v + return inst + + def __repr__(self): + args = ', '.join(repr(x) for x in self.v) + return 'Vec({0})'.format(args) + + def __len__(self): + return len(self.v) + + def __getitem__(self, i): + return self.v[i] + + def __add__(self, other): + # Element-wise addition + v = [x + y for x, y in zip(self.v, other.v)] + return Vec.fromlist(v) + + def __sub__(self, other): + # Element-wise subtraction + v = [x - y for x, y in zip(self.v, other.v)] + return Vec.fromlist(v) + + def __mul__(self, scalar): + # Multiply by scalar + v = [x * scalar for x in self.v] + return Vec.fromlist(v) + + __rmul__ = __mul__ + + +def test(): + import doctest + doctest.testmod() + +test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py new file mode 100644 index 0000000000..86805e18aa --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/classes/bitvec.py @@ -0,0 +1,333 @@ +# +# this is a rather strict implementation of a bit vector class +# it is accessed the same way as an array of python-ints, except +# the value must be 0 or 1 +# + +import sys; rprt = sys.stderr.write #for debugging + +class error(Exception): + pass + + +def _check_value(value): + if type(value) != type(0) or not 0 <= value < 2: + raise error, 'bitvec() items must have int value 0 or 1' + + +import math + +def _compute_len(param): + mant, l = math.frexp(float(param)) + bitmask = 1L << l + if bitmask <= param: + raise RuntimeError('(param, l) = %r' % ((param, l),)) + while l: + bitmask = bitmask >> 1 + if param & bitmask: + break + l = l - 1 + return l + + +def _check_key(len, key): + if type(key) != type(0): + raise TypeError, 'sequence subscript not int' + if key < 0: + key = key + len + if not 0 <= key < len: + raise IndexError, 'list index out of range' + return key + +def _check_slice(len, i, j): + #the type is ok, Python already checked that + i, j = max(i, 0), min(len, j) + if i > j: + i = j + return i, j + + +class BitVec: + + def __init__(self, *params): + self._data = 0L + self._len = 0 + if not len(params): + pass + elif len(params) == 1: + param, = params + if type(param) == type([]): + value = 0L + bit_mask = 1L + for item in param: + # strict check + #_check_value(item) + if item: + value = value | bit_mask + bit_mask = bit_mask << 1 + self._data = value + self._len = len(param) + elif type(param) == type(0L): + if param < 0: + raise error, 'bitvec() can\'t handle negative longs' + self._data = param + self._len = _compute_len(param) + else: + raise error, 'bitvec() requires array or long parameter' + elif len(params) == 2: + param, length = params + if type(param) == type(0L): + if param < 0: + raise error, \ + 'can\'t handle negative longs' + self._data = param + if type(length) != type(0): + raise error, 'bitvec()\'s 2nd parameter must be int' + computed_length = _compute_len(param) + if computed_length > length: + print 'warning: bitvec() value is longer than the length indicates, truncating value' + self._data = self._data & \ + ((1L << length) - 1) + self._len = length + else: + raise error, 'bitvec() requires array or long parameter' + else: + raise error, 'bitvec() requires 0 -- 2 parameter(s)' + + + def append(self, item): + #_check_value(item) + #self[self._len:self._len] = [item] + self[self._len:self._len] = \ + BitVec(long(not not item), 1) + + + def count(self, value): + #_check_value(value) + if value: + data = self._data + else: + data = (~self)._data + count = 0 + while data: + data, count = data >> 1, count + (data & 1 != 0) + return count + + + def index(self, value): + #_check_value(value): + if value: + data = self._data + else: + data = (~self)._data + index = 0 + if not data: + raise ValueError, 'list.index(x): x not in list' + while not (data & 1): + data, index = data >> 1, index + 1 + return index + + + def insert(self, index, item): + #_check_value(item) + #self[index:index] = [item] + self[index:index] = BitVec(long(not not item), 1) + + + def remove(self, value): + del self[self.index(value)] + + + def reverse(self): + #ouch, this one is expensive! + #for i in self._len>>1: self[i], self[l-i] = self[l-i], self[i] + data, result = self._data, 0L + for i in range(self._len): + if not data: + result = result << (self._len - i) + break + result, data = (result << 1) | (data & 1), data >> 1 + self._data = result + + + def sort(self): + c = self.count(1) + self._data = ((1L << c) - 1) << (self._len - c) + + + def copy(self): + return BitVec(self._data, self._len) + + + def seq(self): + result = [] + for i in self: + result.append(i) + return result + + + def __repr__(self): + ##rprt('.' + '__repr__()\n') + return 'bitvec(%r, %r)' % (self._data, self._len) + + def __cmp__(self, other, *rest): + #rprt('%r.__cmp__%r\n' % (self, (other,) + rest)) + if type(other) != type(self): + other = apply(bitvec, (other, ) + rest) + #expensive solution... recursive binary, with slicing + length = self._len + if length == 0 or other._len == 0: + return cmp(length, other._len) + if length != other._len: + min_length = min(length, other._len) + return cmp(self[:min_length], other[:min_length]) or \ + cmp(self[min_length:], other[min_length:]) + #the lengths are the same now... + if self._data == other._data: + return 0 + if length == 1: + return cmp(self[0], other[0]) + else: + length = length >> 1 + return cmp(self[:length], other[:length]) or \ + cmp(self[length:], other[length:]) + + + def __len__(self): + #rprt('%r.__len__()\n' % (self,)) + return self._len + + def __getitem__(self, key): + #rprt('%r.__getitem__(%r)\n' % (self, key)) + key = _check_key(self._len, key) + return self._data & (1L << key) != 0 + + def __setitem__(self, key, value): + #rprt('%r.__setitem__(%r, %r)\n' % (self, key, value)) + key = _check_key(self._len, key) + #_check_value(value) + if value: + self._data = self._data | (1L << key) + else: + self._data = self._data & ~(1L << key) + + def __delitem__(self, key): + #rprt('%r.__delitem__(%r)\n' % (self, key)) + key = _check_key(self._len, key) + #el cheapo solution... + self._data = self[:key]._data | self[key+1:]._data >> key + self._len = self._len - 1 + + def __getslice__(self, i, j): + #rprt('%r.__getslice__(%r, %r)\n' % (self, i, j)) + i, j = _check_slice(self._len, i, j) + if i >= j: + return BitVec(0L, 0) + if i: + ndata = self._data >> i + else: + ndata = self._data + nlength = j - i + if j != self._len: + #we'll have to invent faster variants here + #e.g. mod_2exp + ndata = ndata & ((1L << nlength) - 1) + return BitVec(ndata, nlength) + + def __setslice__(self, i, j, sequence, *rest): + #rprt('%s.__setslice__%r\n' % (self, (i, j, sequence) + rest)) + i, j = _check_slice(self._len, i, j) + if type(sequence) != type(self): + sequence = apply(bitvec, (sequence, ) + rest) + #sequence is now of our own type + ls_part = self[:i] + ms_part = self[j:] + self._data = ls_part._data | \ + ((sequence._data | \ + (ms_part._data << sequence._len)) << ls_part._len) + self._len = self._len - j + i + sequence._len + + def __delslice__(self, i, j): + #rprt('%r.__delslice__(%r, %r)\n' % (self, i, j)) + i, j = _check_slice(self._len, i, j) + if i == 0 and j == self._len: + self._data, self._len = 0L, 0 + elif i < j: + self._data = self[:i]._data | (self[j:]._data >> i) + self._len = self._len - j + i + + def __add__(self, other): + #rprt('%r.__add__(%r)\n' % (self, other)) + retval = self.copy() + retval[self._len:self._len] = other + return retval + + def __mul__(self, multiplier): + #rprt('%r.__mul__(%r)\n' % (self, multiplier)) + if type(multiplier) != type(0): + raise TypeError, 'sequence subscript not int' + if multiplier <= 0: + return BitVec(0L, 0) + elif multiplier == 1: + return self.copy() + #handle special cases all 0 or all 1... + if self._data == 0L: + return BitVec(0L, self._len * multiplier) + elif (~self)._data == 0L: + return ~BitVec(0L, self._len * multiplier) + #otherwise el cheapo again... + retval = BitVec(0L, 0) + while multiplier: + retval, multiplier = retval + self, multiplier - 1 + return retval + + def __and__(self, otherseq, *rest): + #rprt('%r.__and__%r\n' % (self, (otherseq,) + rest)) + if type(otherseq) != type(self): + otherseq = apply(bitvec, (otherseq, ) + rest) + #sequence is now of our own type + return BitVec(self._data & otherseq._data, \ + min(self._len, otherseq._len)) + + + def __xor__(self, otherseq, *rest): + #rprt('%r.__xor__%r\n' % (self, (otherseq,) + rest)) + if type(otherseq) != type(self): + otherseq = apply(bitvec, (otherseq, ) + rest) + #sequence is now of our own type + return BitVec(self._data ^ otherseq._data, \ + max(self._len, otherseq._len)) + + + def __or__(self, otherseq, *rest): + #rprt('%r.__or__%r\n' % (self, (otherseq,) + rest)) + if type(otherseq) != type(self): + otherseq = apply(bitvec, (otherseq, ) + rest) + #sequence is now of our own type + return BitVec(self._data | otherseq._data, \ + max(self._len, otherseq._len)) + + + def __invert__(self): + #rprt('%r.__invert__()\n' % (self,)) + return BitVec(~self._data & ((1L << self._len) - 1), \ + self._len) + + def __coerce__(self, otherseq, *rest): + #needed for *some* of the arithmetic operations + #rprt('%r.__coerce__%r\n' % (self, (otherseq,) + rest)) + if type(otherseq) != type(self): + otherseq = apply(bitvec, (otherseq, ) + rest) + return self, otherseq + + def __int__(self): + return int(self._data) + + def __long__(self): + return long(self._data) + + def __float__(self): + return float(self._data) + + +bitvec = BitVec diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/README new file mode 100644 index 0000000000..af86febbe9 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/README @@ -0,0 +1,60 @@ +Subject: Re: What language would you use? +From: Tom Christiansen +Date: 6 Nov 1994 15:14:51 GMT +Newsgroups: comp.lang.python,comp.lang.tcl,comp.lang.scheme,comp.lang.misc,comp.lang.perl +Message-Id: <39irtb$3t4@csnews.cs.Colorado.EDU> +References: <39b7ha$j9v@zeno.nscf.org> <39hhjp$lgn@csnews.cs.Colorado.EDU> <39hvsu$dus@mathserv.mps.ohio-state.edu> + +[...] +If you're really into benchmarks, I'd love it if someone were to code up +the following problems in tcl, python, and scheme (and whatever else you'd +like). Separate versions (one optimized for speed, one for beauty :-) are +ok. Post your code so we can time it on our own systems. + +0) Factorial Test (numerics and function calls) + + (we did this already) + +1) Regular Expressions Test + + Read a file of (extended per egrep) regular expressions (one per line), + and apply those to all files whose names are listed on the command line. + Basically, an 'egrep -f' simulator. Test it with 20 "vt100" patterns + against a five /etc/termcap files. Tests using more elaborate patters + would also be interesting. Your code should not break if given hundreds + of regular expressions or binary files to scan. + +2) Sorting Test + + Sort an input file that consists of lines like this + + var1=23 other=14 ditto=23 fred=2 + + such that each output line is sorted WRT to the number. Order + of output lines does not change. Resolve collisions using the + variable name. e.g. + + fred=2 other=14 ditto=23 var1=23 + + Lines may be up to several kilobytes in length and contain + zillions of variables. + +3) System Test + + Given a list of directories, report any bogus symbolic links contained + anywhere in those subtrees. A bogus symbolic link is one that cannot + be resolved because it points to a nonexistent or otherwise + unresolvable file. Do *not* use an external find executable. + Directories may be very very deep. Print a warning immediately if the + system you're running on doesn't support symbolic links. + + +I'll post perl solutions if people post the others. + + +--tom +-- +Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com + + "But Billy! A *small* allowance prepares you for a lifetime of small + salaries and for your Social Security payments." --Family Circus diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/patterns b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/patterns new file mode 100644 index 0000000000..11ec3faa2f --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/patterns @@ -0,0 +1,4 @@ +^def +^class +^import +^from diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/regextest.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/regextest.py new file mode 100644 index 0000000000..19617a3ce0 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/regextest.py @@ -0,0 +1,47 @@ +#! /usr/bin/env python + +# 1) Regular Expressions Test +# +# Read a file of (extended per egrep) regular expressions (one per line), +# and apply those to all files whose names are listed on the command line. +# Basically, an 'egrep -f' simulator. Test it with 20 "vt100" patterns +# against a five /etc/termcap files. Tests using more elaborate patters +# would also be interesting. Your code should not break if given hundreds +# of regular expressions or binary files to scan. + +# This implementation: +# - combines all patterns into a single one using ( ... | ... | ... ) +# - reads patterns from stdin, scans files given as command line arguments +# - produces output in the format :: +# - is only about 2.5 times as slow as egrep (though I couldn't run +# Tom's test -- this system, a vanilla SGI, only has /etc/terminfo) + +import string +import sys +import re + +def main(): + pats = map(chomp, sys.stdin.readlines()) + bigpat = '(' + '|'.join(pats) + ')' + prog = re.compile(bigpat) + + for file in sys.argv[1:]: + try: + fp = open(file, 'r') + except IOError, msg: + print "%s: %s" % (file, msg) + continue + lineno = 0 + while 1: + line = fp.readline() + if not line: + break + lineno = lineno + 1 + if prog.search(line): + print "%s:%s:%s" % (file, lineno, line), + +def chomp(s): + return s.rstrip('\n') + +if __name__ == '__main__': + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/sortingtest.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/sortingtest.py new file mode 100644 index 0000000000..e19f63eb52 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/sortingtest.py @@ -0,0 +1,45 @@ +#! /usr/bin/env python + +# 2) Sorting Test +# +# Sort an input file that consists of lines like this +# +# var1=23 other=14 ditto=23 fred=2 +# +# such that each output line is sorted WRT to the number. Order +# of output lines does not change. Resolve collisions using the +# variable name. e.g. +# +# fred=2 other=14 ditto=23 var1=23 +# +# Lines may be up to several kilobytes in length and contain +# zillions of variables. + +# This implementation: +# - Reads stdin, writes stdout +# - Uses any amount of whitespace to separate fields +# - Allows signed numbers +# - Treats illegally formatted fields as field=0 +# - Outputs the sorted fields with exactly one space between them +# - Handles blank input lines correctly + +import re +import sys + +def main(): + prog = re.compile('^(.*)=([-+]?[0-9]+)') + def makekey(item, prog=prog): + match = prog.match(item) + if match: + var, num = match.groups() + return int(num), var + else: + # Bad input -- pretend it's a var with value 0 + return 0, item + for line in sys.stdin: + items = sorted(makekey(item) for item in line.split()) + for num, var in items: + print "%s=%s" % (var, num), + print + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/systemtest.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/systemtest.py new file mode 100644 index 0000000000..a715fe0d42 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/comparisons/systemtest.py @@ -0,0 +1,74 @@ +#! /usr/bin/env python + +# 3) System Test +# +# Given a list of directories, report any bogus symbolic links contained +# anywhere in those subtrees. A bogus symbolic link is one that cannot +# be resolved because it points to a nonexistent or otherwise +# unresolvable file. Do *not* use an external find executable. +# Directories may be very very deep. Print a warning immediately if the +# system you're running on doesn't support symbolic links. + +# This implementation: +# - takes one optional argument, using the current directory as default +# - uses chdir to increase performance +# - sorts the names per directory +# - prints output lines of the form "path1 -> path2" as it goes +# - prints error messages about directories it can't list or chdir into + +import os +import sys +from stat import * + +def main(): + try: + # Note: can't test for presence of lstat -- it's always there + dummy = os.readlink + except AttributeError: + print "This system doesn't have symbolic links" + sys.exit(0) + if sys.argv[1:]: + prefix = sys.argv[1] + else: + prefix = '' + if prefix: + os.chdir(prefix) + if prefix[-1:] != '/': prefix = prefix + '/' + reportboguslinks(prefix) + else: + reportboguslinks('') + +def reportboguslinks(prefix): + try: + names = os.listdir('.') + except os.error, msg: + print "%s%s: can't list: %s" % (prefix, '.', msg) + return + names.sort() + for name in names: + if name == os.curdir or name == os.pardir: + continue + try: + mode = os.lstat(name)[ST_MODE] + except os.error: + print "%s%s: can't stat: %s" % (prefix, name, msg) + continue + if S_ISLNK(mode): + try: + os.stat(name) + except os.error: + print "%s%s -> %s" % \ + (prefix, name, os.readlink(name)) + elif S_ISDIR(mode): + try: + os.chdir(name) + except os.error, msg: + print "%s%s: can't chdir: %s" % \ + (prefix, name, msg) + continue + try: + reportboguslinks(prefix + name + '/') + finally: + os.chdir('..') + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/README new file mode 100644 index 0000000000..69f62649f2 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/README @@ -0,0 +1,10 @@ +This is the Python version of the MD5 test program from the MD5 +Internet Draft (Rivest and Dusse, The MD5 Message-Digest Algorithm, 10 +July 1991). The file "foo" contains the string "abc" with no trailing +newline. + +When called without arguments, it acts as a filter. When called with +"-x", it executes a self-test, and the output should literally match +the output given in the RFC. + +Code by Jan-Hein B\"uhrman after the original in C. diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/foo b/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/foo new file mode 100644 index 0000000000..f2ba8f84ab --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/foo @@ -0,0 +1 @@ +abc \ No newline at end of file diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/md5driver.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/md5driver.py new file mode 100644 index 0000000000..ec4323cb2d --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/md5test/md5driver.py @@ -0,0 +1,123 @@ +import string +import md5 +from sys import argv + +def MDPrint(str): + outstr = '' + for i in str: + o = ord(i) + outstr = (outstr + + string.hexdigits[(o >> 4) & 0xF] + + string.hexdigits[o & 0xF]) + print outstr, + + +from time import time + +def makestr(start, end): + result = '' + for i in range(start, end + 1): + result = result + chr(i) + + return result + + +def MDTimeTrial(): + TEST_BLOCK_SIZE = 1000 + TEST_BLOCKS = 10000 + + TEST_BYTES = TEST_BLOCK_SIZE * TEST_BLOCKS + + # initialize test data, need temporary string filler + + filsiz = 1 << 8 + filler = makestr(0, filsiz-1) + data = filler * (TEST_BLOCK_SIZE // filsiz) + data = data + filler[:(TEST_BLOCK_SIZE % filsiz)] + + del filsiz, filler + + + # start timer + print 'MD5 time trial. Processing', TEST_BYTES, 'characters...' + t1 = time() + + mdContext = md5.new() + + for i in range(TEST_BLOCKS): + mdContext.update(data) + + str = mdContext.digest() + t2 = time() + + MDPrint(str) + print 'is digest of test input.' + print 'Seconds to process test input:', t2 - t1 + print 'Characters processed per second:', TEST_BYTES / (t2 - t1) + + +def MDString(str): + MDPrint(md5.new(str).digest()) + print '"' + str + '"' + + +def MDFile(filename): + f = open(filename, 'rb') + mdContext = md5.new() + + while 1: + data = f.read(1024) + if not data: + break + mdContext.update(data) + + MDPrint(mdContext.digest()) + print filename + + +import sys + +def MDFilter(): + mdContext = md5.new() + + while 1: + data = sys.stdin.read(16) + if not data: + break + mdContext.update(data) + + MDPrint(mdContext.digest()) + print + + +def MDTestSuite(): + print 'MD5 test suite results:' + MDString('') + MDString('a') + MDString('abc') + MDString('message digest') + MDString(makestr(ord('a'), ord('z'))) + MDString(makestr(ord('A'), ord('Z')) + + makestr(ord('a'), ord('z')) + + makestr(ord('0'), ord('9'))) + MDString((makestr(ord('1'), ord('9')) + '0') * 8) + + # Contents of file foo are "abc" + MDFile('foo') + + +# I don't wanna use getopt(), since I want to use the same i/f... +def main(): + if len(argv) == 1: + MDFilter() + for arg in argv[1:]: + if arg[:2] == '-s': + MDString(arg[2:]) + elif arg == '-t': + MDTimeTrial() + elif arg == '-x': + MDTestSuite() + else: + MDFile(arg) + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Eiffel.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Eiffel.py new file mode 100644 index 0000000000..732c7beecd --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Eiffel.py @@ -0,0 +1,113 @@ +"""Support Eiffel-style preconditions and postconditions. + +For example, + +class C: + def m1(self, arg): + require arg > 0 + return whatever + ensure Result > arg + +can be written (clumsily, I agree) as: + +class C(Eiffel): + def m1(self, arg): + return whatever + def m1_pre(self, arg): + assert arg > 0 + def m1_post(self, Result, arg): + assert Result > arg + +Pre- and post-conditions for a method, being implemented as methods +themselves, are inherited independently from the method. This gives +much of the same effect of Eiffel, where pre- and post-conditions are +inherited when a method is overridden by a derived class. However, +when a derived class in Python needs to extend a pre- or +post-condition, it must manually merge the base class' pre- or +post-condition with that defined in the derived class', for example: + +class D(C): + def m1(self, arg): + return arg**2 + def m1_post(self, Result, arg): + C.m1_post(self, Result, arg) + assert Result < 100 + +This gives derived classes more freedom but also more responsibility +than in Eiffel, where the compiler automatically takes care of this. + +In Eiffel, pre-conditions combine using contravariance, meaning a +derived class can only make a pre-condition weaker; in Python, this is +up to the derived class. For example, a derived class that takes away +the requirement that arg > 0 could write: + + def m1_pre(self, arg): + pass + +but one could equally write a derived class that makes a stronger +requirement: + + def m1_pre(self, arg): + require arg > 50 + +It would be easy to modify the classes shown here so that pre- and +post-conditions can be disabled (separately, on a per-class basis). + +A different design would have the pre- or post-condition testing +functions return true for success and false for failure. This would +make it possible to implement automatic combination of inherited +and new pre-/post-conditions. All this is left as an exercise to the +reader. + +""" + +from Meta import MetaClass, MetaHelper, MetaMethodWrapper + +class EiffelMethodWrapper(MetaMethodWrapper): + + def __init__(self, func, inst): + MetaMethodWrapper.__init__(self, func, inst) + # Note that the following causes recursive wrappers around + # the pre-/post-condition testing methods. These are harmless + # but inefficient; to avoid them, the lookup must be done + # using the class. + try: + self.pre = getattr(inst, self.__name__ + "_pre") + except AttributeError: + self.pre = None + try: + self.post = getattr(inst, self.__name__ + "_post") + except AttributeError: + self.post = None + + def __call__(self, *args, **kw): + if self.pre: + apply(self.pre, args, kw) + Result = apply(self.func, (self.inst,) + args, kw) + if self.post: + apply(self.post, (Result,) + args, kw) + return Result + +class EiffelHelper(MetaHelper): + __methodwrapper__ = EiffelMethodWrapper + +class EiffelMetaClass(MetaClass): + __helper__ = EiffelHelper + +Eiffel = EiffelMetaClass('Eiffel', (), {}) + + +def _test(): + class C(Eiffel): + def m1(self, arg): + return arg+1 + def m1_pre(self, arg): + assert arg > 0, "precondition for m1 failed" + def m1_post(self, Result, arg): + assert Result > arg + x = C() + x.m1(12) +## x.m1(-1) + +if __name__ == '__main__': + _test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Enum.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Enum.py new file mode 100644 index 0000000000..204f308584 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Enum.py @@ -0,0 +1,169 @@ +"""Enumeration metaclass. + +XXX This is very much a work in progress. + +""" + +import string + +class EnumMetaClass: + """Metaclass for enumeration. + + To define your own enumeration, do something like + + class Color(Enum): + red = 1 + green = 2 + blue = 3 + + Now, Color.red, Color.green and Color.blue behave totally + different: they are enumerated values, not integers. + + Enumerations cannot be instantiated; however they can be + subclassed. + + """ + + def __init__(self, name, bases, dict): + """Constructor -- create an enumeration. + + Called at the end of the class statement. The arguments are + the name of the new class, a tuple containing the base + classes, and a dictionary containing everything that was + entered in the class' namespace during execution of the class + statement. In the above example, it would be {'red': 1, + 'green': 2, 'blue': 3}. + + """ + for base in bases: + if base.__class__ is not EnumMetaClass: + raise TypeError, "Enumeration base class must be enumeration" + bases = filter(lambda x: x is not Enum, bases) + self.__name__ = name + self.__bases__ = bases + self.__dict = {} + for key, value in dict.items(): + self.__dict[key] = EnumInstance(name, key, value) + + def __getattr__(self, name): + """Return an enumeration value. + + For example, Color.red returns the value corresponding to red. + + XXX Perhaps the values should be created in the constructor? + + This looks in the class dictionary and if it is not found + there asks the base classes. + + The special attribute __members__ returns the list of names + defined in this class (it does not merge in the names defined + in base classes). + + """ + if name == '__members__': + return self.__dict.keys() + + try: + return self.__dict[name] + except KeyError: + for base in self.__bases__: + try: + return getattr(base, name) + except AttributeError: + continue + + raise AttributeError, name + + def __repr__(self): + s = self.__name__ + if self.__bases__: + s = s + '(' + string.join(map(lambda x: x.__name__, + self.__bases__), ", ") + ')' + if self.__dict: + list = [] + for key, value in self.__dict.items(): + list.append("%s: %s" % (key, int(value))) + s = "%s: {%s}" % (s, string.join(list, ", ")) + return s + + +class EnumInstance: + """Class to represent an enumeration value. + + EnumInstance('Color', 'red', 12) prints as 'Color.red' and behaves + like the integer 12 when compared, but doesn't support arithmetic. + + XXX Should it record the actual enumeration rather than just its + name? + + """ + + def __init__(self, classname, enumname, value): + self.__classname = classname + self.__enumname = enumname + self.__value = value + + def __int__(self): + return self.__value + + def __repr__(self): + return "EnumInstance(%r, %r, %r)" % (self.__classname, + self.__enumname, + self.__value) + + def __str__(self): + return "%s.%s" % (self.__classname, self.__enumname) + + def __cmp__(self, other): + return cmp(self.__value, int(other)) + + +# Create the base class for enumerations. +# It is an empty enumeration. +Enum = EnumMetaClass("Enum", (), {}) + + +def _test(): + + class Color(Enum): + red = 1 + green = 2 + blue = 3 + + print Color.red + print dir(Color) + + print Color.red == Color.red + print Color.red == Color.blue + print Color.red == 1 + print Color.red == 2 + + class ExtendedColor(Color): + white = 0 + orange = 4 + yellow = 5 + purple = 6 + black = 7 + + print ExtendedColor.orange + print ExtendedColor.red + + print Color.red == ExtendedColor.red + + class OtherColor(Enum): + white = 4 + blue = 5 + + class MergedColor(Color, OtherColor): + pass + + print MergedColor.red + print MergedColor.white + + print Color + print ExtendedColor + print OtherColor + print MergedColor + +if __name__ == '__main__': + _test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Meta.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Meta.py new file mode 100644 index 0000000000..b262a8021c --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Meta.py @@ -0,0 +1,118 @@ +"""Generic metaclass. + +XXX This is very much a work in progress. + +""" + +import types + +class MetaMethodWrapper: + + def __init__(self, func, inst): + self.func = func + self.inst = inst + self.__name__ = self.func.__name__ + + def __call__(self, *args, **kw): + return apply(self.func, (self.inst,) + args, kw) + +class MetaHelper: + + __methodwrapper__ = MetaMethodWrapper # For derived helpers to override + + def __helperinit__(self, formalclass): + self.__formalclass__ = formalclass + + def __getattr__(self, name): + # Invoked for any attr not in the instance's __dict__ + try: + raw = self.__formalclass__.__getattr__(name) + except AttributeError: + try: + ga = self.__formalclass__.__getattr__('__usergetattr__') + except (KeyError, AttributeError): + raise AttributeError, name + return ga(self, name) + if type(raw) != types.FunctionType: + return raw + return self.__methodwrapper__(raw, self) + +class MetaClass: + + """A generic metaclass. + + This can be subclassed to implement various kinds of meta-behavior. + + """ + + __helper__ = MetaHelper # For derived metaclasses to override + + __inited = 0 + + def __init__(self, name, bases, dict): + try: + ga = dict['__getattr__'] + except KeyError: + pass + else: + dict['__usergetattr__'] = ga + del dict['__getattr__'] + self.__name__ = name + self.__bases__ = bases + self.__realdict__ = dict + self.__inited = 1 + + def __getattr__(self, name): + try: + return self.__realdict__[name] + except KeyError: + for base in self.__bases__: + try: + return base.__getattr__(name) + except AttributeError: + pass + raise AttributeError, name + + def __setattr__(self, name, value): + if not self.__inited: + self.__dict__[name] = value + else: + self.__realdict__[name] = value + + def __call__(self, *args, **kw): + inst = self.__helper__() + inst.__helperinit__(self) + try: + init = inst.__getattr__('__init__') + except AttributeError: + init = lambda: None + apply(init, args, kw) + return inst + + +Meta = MetaClass('Meta', (), {}) + + +def _test(): + class C(Meta): + def __init__(self, *args): + print "__init__, args =", args + def m1(self, x): + print "m1(x=%r)" % (x,) + print C + x = C() + print x + x.m1(12) + class D(C): + def __getattr__(self, name): + if name[:2] == '__': raise AttributeError, name + return "getattr:%s" % name + x = D() + print x.foo + print x._foo +## print x.__foo +## print x.__foo__ + + +if __name__ == '__main__': + _test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Simple.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Simple.py new file mode 100644 index 0000000000..5334860732 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Simple.py @@ -0,0 +1,45 @@ +import types + +class Tracing: + def __init__(self, name, bases, namespace): + """Create a new class.""" + self.__name__ = name + self.__bases__ = bases + self.__namespace__ = namespace + def __call__(self): + """Create a new instance.""" + return Instance(self) + +class Instance: + def __init__(self, klass): + self.__klass__ = klass + def __getattr__(self, name): + try: + value = self.__klass__.__namespace__[name] + except KeyError: + raise AttributeError, name + if type(value) is not types.FunctionType: + return value + return BoundMethod(value, self) + +class BoundMethod: + def __init__(self, function, instance): + self.function = function + self.instance = instance + def __call__(self, *args): + print "calling", self.function, "for", self.instance, "with", args + return apply(self.function, (self.instance,) + args) + +Trace = Tracing('Trace', (), {}) + +class MyTracedClass(Trace): + def method1(self, a): + self.a = a + def method2(self): + return self.a + +aninstance = MyTracedClass() + +aninstance.method1(10) + +print aninstance.method2() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Synch.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Synch.py new file mode 100644 index 0000000000..d3b3f3893a --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Synch.py @@ -0,0 +1,256 @@ +"""Synchronization metaclass. + +This metaclass makes it possible to declare synchronized methods. + +""" + +import thread + +# First we need to define a reentrant lock. +# This is generally useful and should probably be in a standard Python +# library module. For now, we in-line it. + +class Lock: + + """Reentrant lock. + + This is a mutex-like object which can be acquired by the same + thread more than once. It keeps a reference count of the number + of times it has been acquired by the same thread. Each acquire() + call must be matched by a release() call and only the last + release() call actually releases the lock for acquisition by + another thread. + + The implementation uses two locks internally: + + __mutex is a short term lock used to protect the instance variables + __wait is the lock for which other threads wait + + A thread intending to acquire both locks should acquire __wait + first. + + The implementation uses two other instance variables, protected by + locking __mutex: + + __tid is the thread ID of the thread that currently has the lock + __count is the number of times the current thread has acquired it + + When the lock is released, __tid is None and __count is zero. + + """ + + def __init__(self): + """Constructor. Initialize all instance variables.""" + self.__mutex = thread.allocate_lock() + self.__wait = thread.allocate_lock() + self.__tid = None + self.__count = 0 + + def acquire(self, flag=1): + """Acquire the lock. + + If the optional flag argument is false, returns immediately + when it cannot acquire the __wait lock without blocking (it + may still block for a little while in order to acquire the + __mutex lock). + + The return value is only relevant when the flag argument is + false; it is 1 if the lock is acquired, 0 if not. + + """ + self.__mutex.acquire() + try: + if self.__tid == thread.get_ident(): + self.__count = self.__count + 1 + return 1 + finally: + self.__mutex.release() + locked = self.__wait.acquire(flag) + if not flag and not locked: + return 0 + try: + self.__mutex.acquire() + assert self.__tid == None + assert self.__count == 0 + self.__tid = thread.get_ident() + self.__count = 1 + return 1 + finally: + self.__mutex.release() + + def release(self): + """Release the lock. + + If this thread doesn't currently have the lock, an assertion + error is raised. + + Only allow another thread to acquire the lock when the count + reaches zero after decrementing it. + + """ + self.__mutex.acquire() + try: + assert self.__tid == thread.get_ident() + assert self.__count > 0 + self.__count = self.__count - 1 + if self.__count == 0: + self.__tid = None + self.__wait.release() + finally: + self.__mutex.release() + + +def _testLock(): + + done = [] + + def f2(lock, done=done): + lock.acquire() + print "f2 running in thread %d\n" % thread.get_ident(), + lock.release() + done.append(1) + + def f1(lock, f2=f2, done=done): + lock.acquire() + print "f1 running in thread %d\n" % thread.get_ident(), + try: + f2(lock) + finally: + lock.release() + done.append(1) + + lock = Lock() + lock.acquire() + f1(lock) # Adds 2 to done + lock.release() + + lock.acquire() + + thread.start_new_thread(f1, (lock,)) # Adds 2 + thread.start_new_thread(f1, (lock, f1)) # Adds 3 + thread.start_new_thread(f2, (lock,)) # Adds 1 + thread.start_new_thread(f2, (lock,)) # Adds 1 + + lock.release() + import time + while len(done) < 9: + print len(done) + time.sleep(0.001) + print len(done) + + +# Now, the Locking metaclass is a piece of cake. +# As an example feature, methods whose name begins with exactly one +# underscore are not synchronized. + +from Meta import MetaClass, MetaHelper, MetaMethodWrapper + +class LockingMethodWrapper(MetaMethodWrapper): + def __call__(self, *args, **kw): + if self.__name__[:1] == '_' and self.__name__[1:] != '_': + return apply(self.func, (self.inst,) + args, kw) + self.inst.__lock__.acquire() + try: + return apply(self.func, (self.inst,) + args, kw) + finally: + self.inst.__lock__.release() + +class LockingHelper(MetaHelper): + __methodwrapper__ = LockingMethodWrapper + def __helperinit__(self, formalclass): + MetaHelper.__helperinit__(self, formalclass) + self.__lock__ = Lock() + +class LockingMetaClass(MetaClass): + __helper__ = LockingHelper + +Locking = LockingMetaClass('Locking', (), {}) + +def _test(): + # For kicks, take away the Locking base class and see it die + class Buffer(Locking): + def __init__(self, initialsize): + assert initialsize > 0 + self.size = initialsize + self.buffer = [None]*self.size + self.first = self.last = 0 + def put(self, item): + # Do we need to grow the buffer? + if (self.last+1) % self.size != self.first: + # Insert the new item + self.buffer[self.last] = item + self.last = (self.last+1) % self.size + return + # Double the buffer size + # First normalize it so that first==0 and last==size-1 + print "buffer =", self.buffer + print "first = %d, last = %d, size = %d" % ( + self.first, self.last, self.size) + if self.first <= self.last: + temp = self.buffer[self.first:self.last] + else: + temp = self.buffer[self.first:] + self.buffer[:self.last] + print "temp =", temp + self.buffer = temp + [None]*(self.size+1) + self.first = 0 + self.last = self.size-1 + self.size = self.size*2 + print "Buffer size doubled to", self.size + print "new buffer =", self.buffer + print "first = %d, last = %d, size = %d" % ( + self.first, self.last, self.size) + self.put(item) # Recursive call to test the locking + def get(self): + # Is the buffer empty? + if self.first == self.last: + raise EOFError # Avoid defining a new exception + item = self.buffer[self.first] + self.first = (self.first+1) % self.size + return item + + def producer(buffer, wait, n=1000): + import time + i = 0 + while i < n: + print "put", i + buffer.put(i) + i = i+1 + print "Producer: done producing", n, "items" + wait.release() + + def consumer(buffer, wait, n=1000): + import time + i = 0 + tout = 0.001 + while i < n: + try: + x = buffer.get() + if x != i: + raise AssertionError, \ + "get() returned %s, expected %s" % (x, i) + print "got", i + i = i+1 + tout = 0.001 + except EOFError: + time.sleep(tout) + tout = tout*2 + print "Consumer: done consuming", n, "items" + wait.release() + + pwait = thread.allocate_lock() + pwait.acquire() + cwait = thread.allocate_lock() + cwait.acquire() + buffer = Buffer(1) + n = 1000 + thread.start_new_thread(consumer, (buffer, cwait, n)) + thread.start_new_thread(producer, (buffer, pwait, n)) + pwait.acquire() + print "Producer done" + cwait.acquire() + print "All done" + print "buffer size ==", len(buffer.buffer) + +if __name__ == '__main__': + _testLock() + _test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Trace.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Trace.py new file mode 100644 index 0000000000..b02d05a9e4 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/Trace.py @@ -0,0 +1,144 @@ +"""Tracing metaclass. + +XXX This is very much a work in progress. + +""" + +import types, sys + +class TraceMetaClass: + """Metaclass for tracing. + + Classes defined using this metaclass have an automatic tracing + feature -- by setting the __trace_output__ instance (or class) + variable to a file object, trace messages about all calls are + written to the file. The trace formatting can be changed by + defining a suitable __trace_call__ method. + + """ + + __inited = 0 + + def __init__(self, name, bases, dict): + self.__name__ = name + self.__bases__ = bases + self.__dict = dict + # XXX Can't define __dict__, alas + self.__inited = 1 + + def __getattr__(self, name): + try: + return self.__dict[name] + except KeyError: + for base in self.__bases__: + try: + return base.__getattr__(name) + except AttributeError: + pass + raise AttributeError, name + + def __setattr__(self, name, value): + if not self.__inited: + self.__dict__[name] = value + else: + self.__dict[name] = value + + def __call__(self, *args, **kw): + inst = TracingInstance() + inst.__meta_init__(self) + try: + init = inst.__getattr__('__init__') + except AttributeError: + init = lambda: None + apply(init, args, kw) + return inst + + __trace_output__ = None + +class TracingInstance: + """Helper class to represent an instance of a tracing class.""" + + def __trace_call__(self, fp, fmt, *args): + fp.write((fmt+'\n') % args) + + def __meta_init__(self, klass): + self.__class = klass + + def __getattr__(self, name): + # Invoked for any attr not in the instance's __dict__ + try: + raw = self.__class.__getattr__(name) + except AttributeError: + raise AttributeError, name + if type(raw) != types.FunctionType: + return raw + # It's a function + fullname = self.__class.__name__ + "." + name + if not self.__trace_output__ or name == '__trace_call__': + return NotTracingWrapper(fullname, raw, self) + else: + return TracingWrapper(fullname, raw, self) + +class NotTracingWrapper: + def __init__(self, name, func, inst): + self.__name__ = name + self.func = func + self.inst = inst + def __call__(self, *args, **kw): + return apply(self.func, (self.inst,) + args, kw) + +class TracingWrapper(NotTracingWrapper): + def __call__(self, *args, **kw): + self.inst.__trace_call__(self.inst.__trace_output__, + "calling %s, inst=%s, args=%s, kw=%s", + self.__name__, self.inst, args, kw) + try: + rv = apply(self.func, (self.inst,) + args, kw) + except: + t, v, tb = sys.exc_info() + self.inst.__trace_call__(self.inst.__trace_output__, + "returning from %s with exception %s: %s", + self.__name__, t, v) + raise t, v, tb + else: + self.inst.__trace_call__(self.inst.__trace_output__, + "returning from %s with value %s", + self.__name__, rv) + return rv + +Traced = TraceMetaClass('Traced', (), {'__trace_output__': None}) + + +def _test(): + global C, D + class C(Traced): + def __init__(self, x=0): self.x = x + def m1(self, x): self.x = x + def m2(self, y): return self.x + y + __trace_output__ = sys.stdout + class D(C): + def m2(self, y): print "D.m2(%r)" % (y,); return C.m2(self, y) + __trace_output__ = None + x = C(4321) + print x + print x.x + print x.m1(100) + print x.m1(10) + print x.m2(33) + print x.m1(5) + print x.m2(4000) + print x.x + + print C.__init__ + print C.m2 + print D.__init__ + print D.m2 + + y = D() + print y + print y.m1(10) + print y.m2(100) + print y.x + +if __name__ == '__main__': + _test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/index.html b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/index.html new file mode 100644 index 0000000000..88e05a3417 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/index.html @@ -0,0 +1,605 @@ + + + +Metaclasses in Python 1.5 + + + + +

Metaclasses in Python 1.5

+

(A.k.a. The Killer Joke :-)

+ +
+ +(Postscript: reading this essay is probably not the best way to +understand the metaclass hook described here. See a message posted by Vladimir Marangozov +which may give a gentler introduction to the matter. You may also +want to search Deja News for messages with "metaclass" in the subject +posted to comp.lang.python in July and August 1998.) + +
+ +

In previous Python releases (and still in 1.5), there is something +called the ``Don Beaudry hook'', after its inventor and champion. +This allows C extensions to provide alternate class behavior, thereby +allowing the Python class syntax to be used to define other class-like +entities. Don Beaudry has used this in his infamous MESS package; Jim +Fulton has used it in his Extension +Classes package. (It has also been referred to as the ``Don +Beaudry hack,'' but that's a misnomer. There's nothing hackish +about it -- in fact, it is rather elegant and deep, even though +there's something dark to it.) + +

(On first reading, you may want to skip directly to the examples in +the section "Writing Metaclasses in Python" below, unless you want +your head to explode.) + +

+ +


+ +

Documentation of the Don Beaudry hook has purposefully been kept +minimal, since it is a feature of incredible power, and is easily +abused. Basically, it checks whether the type of the base +class is callable, and if so, it is called to create the new +class. + +

Note the two indirection levels. Take a simple example: + +

+class B:
+    pass
+
+class C(B):
+    pass
+
+ +Take a look at the second class definition, and try to fathom ``the +type of the base class is callable.'' + +

(Types are not classes, by the way. See questions 4.2, 4.19 and in +particular 6.22 in the Python FAQ +for more on this topic.) + +

+ +

+ +

So our conclusion is that in our example, the type of the base +class (of C) is not callable. So the Don Beaudry hook does not apply, +and the default class creation mechanism is used (which is also used +when there is no base class). In fact, the Don Beaudry hook never +applies when using only core Python, since the type of a core object +is never callable. + +

So what do Don and Jim do in order to use Don's hook? Write an +extension that defines at least two new Python object types. The +first would be the type for ``class-like'' objects usable as a base +class, to trigger Don's hook. This type must be made callable. +That's why we need a second type. Whether an object is callable +depends on its type. So whether a type object is callable depends on +its type, which is a meta-type. (In core Python there +is only one meta-type, the type ``type'' (types.TypeType), which is +the type of all type objects, even itself.) A new meta-type must +be defined that makes the type of the class-like objects callable. +(Normally, a third type would also be needed, the new ``instance'' +type, but this is not an absolute requirement -- the new class type +could return an object of some existing type when invoked to create an +instance.) + +

Still confused? Here's a simple device due to Don himself to +explain metaclasses. Take a simple class definition; assume B is a +special class that triggers Don's hook: + +

+class C(B):
+    a = 1
+    b = 2
+
+ +This can be though of as equivalent to: + +
+C = type(B)('C', (B,), {'a': 1, 'b': 2})
+
+ +If that's too dense for you, here's the same thing written out using +temporary variables: + +
+creator = type(B)               # The type of the base class
+name = 'C'                      # The name of the new class
+bases = (B,)                    # A tuple containing the base class(es)
+namespace = {'a': 1, 'b': 2}    # The namespace of the class statement
+C = creator(name, bases, namespace)
+
+ +This is analogous to what happens without the Don Beaudry hook, except +that in that case the creator function is set to the default class +creator. + +

In either case, the creator is called with three arguments. The +first one, name, is the name of the new class (as given at the +top of the class statement). The bases argument is a tuple of +base classes (a singleton tuple if there's only one base class, like +the example). Finally, namespace is a dictionary containing +the local variables collected during execution of the class statement. + +

Note that the contents of the namespace dictionary is simply +whatever names were defined in the class statement. A little-known +fact is that when Python executes a class statement, it enters a new +local namespace, and all assignments and function definitions take +place in this namespace. Thus, after executing the following class +statement: + +

+class C:
+    a = 1
+    def f(s): pass
+
+ +the class namespace's contents would be {'a': 1, 'f': <function f +...>}. + +

But enough already about writing Python metaclasses in C; read the +documentation of MESS or Extension +Classes for more information. + +

+ +


+ +

Writing Metaclasses in Python

+ +

In Python 1.5, the requirement to write a C extension in order to +write metaclasses has been dropped (though you can still do +it, of course). In addition to the check ``is the type of the base +class callable,'' there's a check ``does the base class have a +__class__ attribute.'' If so, it is assumed that the __class__ +attribute refers to a class. + +

Let's repeat our simple example from above: + +

+class C(B):
+    a = 1
+    b = 2
+
+ +Assuming B has a __class__ attribute, this translates into: + +
+C = B.__class__('C', (B,), {'a': 1, 'b': 2})
+
+ +This is exactly the same as before except that instead of type(B), +B.__class__ is invoked. If you have read FAQ question 6.22 you will understand that while there is a big +technical difference between type(B) and B.__class__, they play the +same role at different abstraction levels. And perhaps at some point +in the future they will really be the same thing (at which point you +would be able to derive subclasses from built-in types). + +

At this point it may be worth mentioning that C.__class__ is the +same object as B.__class__, i.e., C's metaclass is the same as B's +metaclass. In other words, subclassing an existing class creates a +new (meta)inststance of the base class's metaclass. + +

Going back to the example, the class B.__class__ is instantiated, +passing its constructor the same three arguments that are passed to +the default class constructor or to an extension's metaclass: +name, bases, and namespace. + +

It is easy to be confused by what exactly happens when using a +metaclass, because we lose the absolute distinction between classes +and instances: a class is an instance of a metaclass (a +``metainstance''), but technically (i.e. in the eyes of the python +runtime system), the metaclass is just a class, and the metainstance +is just an instance. At the end of the class statement, the metaclass +whose metainstance is used as a base class is instantiated, yielding a +second metainstance (of the same metaclass). This metainstance is +then used as a (normal, non-meta) class; instantiation of the class +means calling the metainstance, and this will return a real instance. +And what class is that an instance of? Conceptually, it is of course +an instance of our metainstance; but in most cases the Python runtime +system will see it as an instance of a a helper class used by the +metaclass to implement its (non-meta) instances... + +

Hopefully an example will make things clearer. Let's presume we +have a metaclass MetaClass1. It's helper class (for non-meta +instances) is callled HelperClass1. We now (manually) instantiate +MetaClass1 once to get an empty special base class: + +

+BaseClass1 = MetaClass1("BaseClass1", (), {})
+
+ +We can now use BaseClass1 as a base class in a class statement: + +
+class MySpecialClass(BaseClass1):
+    i = 1
+    def f(s): pass
+
+ +At this point, MySpecialClass is defined; it is a metainstance of +MetaClass1 just like BaseClass1, and in fact the expression +``BaseClass1.__class__ == MySpecialClass.__class__ == MetaClass1'' +yields true. + +

We are now ready to create instances of MySpecialClass. Let's +assume that no constructor arguments are required: + +

+x = MySpecialClass()
+y = MySpecialClass()
+print x.__class__, y.__class__
+
+ +The print statement shows that x and y are instances of HelperClass1. +How did this happen? MySpecialClass is an instance of MetaClass1 +(``meta'' is irrelevant here); when an instance is called, its +__call__ method is invoked, and presumably the __call__ method defined +by MetaClass1 returns an instance of HelperClass1. + +

Now let's see how we could use metaclasses -- what can we do +with metaclasses that we can't easily do without them? Here's one +idea: a metaclass could automatically insert trace calls for all +method calls. Let's first develop a simplified example, without +support for inheritance or other ``advanced'' Python features (we'll +add those later). + +

+import types
+
+class Tracing:
+    def __init__(self, name, bases, namespace):
+        """Create a new class."""
+        self.__name__ = name
+        self.__bases__ = bases
+        self.__namespace__ = namespace
+    def __call__(self):
+        """Create a new instance."""
+        return Instance(self)
+
+class Instance:
+    def __init__(self, klass):
+        self.__klass__ = klass
+    def __getattr__(self, name):
+        try:
+            value = self.__klass__.__namespace__[name]
+        except KeyError:
+            raise AttributeError, name
+        if type(value) is not types.FunctionType:
+            return value
+        return BoundMethod(value, self)
+
+class BoundMethod:
+    def __init__(self, function, instance):
+        self.function = function
+        self.instance = instance
+    def __call__(self, *args):
+        print "calling", self.function, "for", self.instance, "with", args
+        return apply(self.function, (self.instance,) + args)
+
+Trace = Tracing('Trace', (), {})
+
+class MyTracedClass(Trace):
+    def method1(self, a):
+        self.a = a
+    def method2(self):
+        return self.a
+
+aninstance = MyTracedClass()
+
+aninstance.method1(10)
+
+print "the answer is %d" % aninstance.method2()
+
+ +Confused already? The intention is to read this from top down. The +Tracing class is the metaclass we're defining. Its structure is +really simple. + +

+ +

+ +

The class Instance is the class used for all instances of classes +built using the Tracing metaclass, e.g. aninstance. It has two +methods: + +

+ +

+ +

The __getattr__ method looks the name up in the __namespace__ +dictionary. If it isn't found, it raises an AttributeError exception. +(In a more realistic example, it would first have to look through the +base classes as well.) If it is found, there are two possibilities: +it's either a function or it isn't. If it's not a function, it is +assumed to be a class variable, and its value is returned. If it's a +function, we have to ``wrap'' it in instance of yet another helper +class, BoundMethod. + +

The BoundMethod class is needed to implement a familiar feature: +when a method is defined, it has an initial argument, self, which is +automatically bound to the relevant instance when it is called. For +example, aninstance.method1(10) is equivalent to method1(aninstance, +10). In the example if this call, first a temporary BoundMethod +instance is created with the following constructor call: temp = +BoundMethod(method1, aninstance); then this instance is called as +temp(10). After the call, the temporary instance is discarded. + +

+ +

+ +

In order to be able to support arbitrary argument lists, the +__call__ method first constructs a new argument tuple. Conveniently, +because of the notation *args in __call__'s own argument list, the +arguments to __call__ (except for self) are placed in the tuple args. +To construct the desired argument list, we concatenate a singleton +tuple containing the instance with the args tuple: (self.instance,) + +args. (Note the trailing comma used to construct the singleton +tuple.) In our example, the resulting argument tuple is (aninstance, +10). + +

The intrinsic function apply() takes a function and an argument +tuple and calls the function for it. In our example, we are calling +apply(method1, (aninstance, 10)) which is equivalent to calling +method(aninstance, 10). + +

From here on, things should come together quite easily. The output +of the example code is something like this: + +

+calling <function method1 at ae8d8> for <Instance instance at 95ab0> with (10,)
+calling <function method2 at ae900> for <Instance instance at 95ab0> with ()
+the answer is 10
+
+ +

That was about the shortest meaningful example that I could come up +with. A real tracing metaclass (for example, Trace.py discussed below) needs to be more +complicated in two dimensions. + +

First, it needs to support more advanced Python features such as +class variables, inheritance, __init__ methods, and keyword arguments. + +

Second, it needs to provide a more flexible way to handle the +actual tracing information; perhaps it should be possible to write +your own tracing function that gets called, perhaps it should be +possible to enable and disable tracing on a per-class or per-instance +basis, and perhaps a filter so that only interesting calls are traced; +it should also be able to trace the return value of the call (or the +exception it raised if an error occurs). Even the Trace.py example +doesn't support all these features yet. + +

+ +


+ +

Real-life Examples

+ +

Have a look at some very preliminary examples that I coded up to +teach myself how to write metaclasses: + +

+ +
Enum.py + +
This (ab)uses the class syntax as an elegant way to define +enumerated types. The resulting classes are never instantiated -- +rather, their class attributes are the enumerated values. For +example: + +
+class Color(Enum):
+    red = 1
+    green = 2
+    blue = 3
+print Color.red
+
+ +will print the string ``Color.red'', while ``Color.red==1'' is true, +and ``Color.red + 1'' raise a TypeError exception. + +

+ +

Trace.py + +
The resulting classes work much like standard +classes, but by setting a special class or instance attribute +__trace_output__ to point to a file, all calls to the class's methods +are traced. It was a bit of a struggle to get this right. This +should probably redone using the generic metaclass below. + +

+ +

Meta.py + +
A generic metaclass. This is an attempt at finding out how much +standard class behavior can be mimicked by a metaclass. The +preliminary answer appears to be that everything's fine as long as the +class (or its clients) don't look at the instance's __class__ +attribute, nor at the class's __dict__ attribute. The use of +__getattr__ internally makes the classic implementation of __getattr__ +hooks tough; we provide a similar hook _getattr_ instead. +(__setattr__ and __delattr__ are not affected.) +(XXX Hm. Could detect presence of __getattr__ and rename it.) + +

+ +

Eiffel.py + +
Uses the above generic metaclass to implement Eiffel style +pre-conditions and post-conditions. + +

+ +

Synch.py + +
Uses the above generic metaclass to implement synchronized +methods. + +

+ +

Simple.py + +
The example module used above. + +

+ +

+ +

A pattern seems to be emerging: almost all these uses of +metaclasses (except for Enum, which is probably more cute than useful) +mostly work by placing wrappers around method calls. An obvious +problem with that is that it's not easy to combine the features of +different metaclasses, while this would actually be quite useful: for +example, I wouldn't mind getting a trace from the test run of the +Synch module, and it would be interesting to add preconditions to it +as well. This needs more research. Perhaps a metaclass could be +provided that allows stackable wrappers... + +

+ +


+ +

Things You Could Do With Metaclasses

+ +

There are lots of things you could do with metaclasses. Most of +these can also be done with creative use of __getattr__, but +metaclasses make it easier to modify the attribute lookup behavior of +classes. Here's a partial list. + +

+ +

+ +

+ +


+ +

Credits

+ +

Many thanks to David Ascher and Donald Beaudry for their comments +on earlier draft of this paper. Also thanks to Matt Conway and Tommy +Burnette for putting a seed for the idea of metaclasses in my +mind, nearly three years ago, even though at the time my response was +``you can do that with __getattr__ hooks...'' :-) + +

+ +


+ + + + diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/meta-vladimir.txt b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/meta-vladimir.txt new file mode 100644 index 0000000000..81298a73d1 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/metaclasses/meta-vladimir.txt @@ -0,0 +1,256 @@ +Subject: Re: The metaclass saga using Python +From: Vladimir Marangozov +To: tim_one@email.msn.com (Tim Peters) +Cc: python-list@cwi.nl +Date: Wed, 5 Aug 1998 15:59:06 +0200 (DFT) + +[Tim] +> +> building-on-examples-tends-to-prevent-abstract-thrashing-ly y'rs - tim +> + +OK, I stand corrected. I understand that anybody's interpretation of +the meta-class concept is likely to be difficult to digest by others. + +Here's another try, expressing the same thing, but using the Python +programming model, examples and, perhaps, more popular terms. + +1. Classes. + + This is pure Python of today. Sorry about the tutorial, but it is + meant to illustrate the second part, which is the one we're + interested in and which will follow the same development scenario. + Besides, newbies are likely to understand that the discussion is + affordable even for them :-) + + a) Class definition + + A class is meant to define the common properties of a set of objects. + A class is a "package" of properties. The assembly of properties + in a class package is sometimes called a class structure (which isn't + always appropriate). + + >>> class A: + attr1 = "Hello" # an attribute of A + def method1(self, *args): pass # method1 of A + def method2(self, *args): pass # method2 of A + >>> + + So far, we defined the structure of the class A. The class A is + of type . We can check this by asking Python: "what is A?" + + >>> A # What is A? + + + b) Class instantiation + + Creating an object with the properties defined in the class A is + called instantiation of the class A. After an instantiation of A, we + obtain a new object, called an instance, which has the properties + packaged in the class A. + + >>> a = A() # 'a' is the 1st instance of A + >>> a # What is 'a'? + <__main__.A instance at 2022b9d0> + + >>> b = A() # 'b' is another instance of A + >>> b # What is 'b'? + <__main__.A instance at 2022b9c0> + + The objects, 'a' and 'b', are of type and they both have + the same properties. Note, that 'a' and 'b' are different objects. + (their adresses differ). This is a bit hard to see, so let's ask Python: + + >>> a == b # Is 'a' the same object as 'b'? + 0 # No. + + Instance objects have one more special property, indicating the class + they are an instance of. This property is named __class__. + + >>> a.__class__ # What is the class of 'a'? + # 'a' is an instance of A + >>> b.__class__ # What is the class of 'b'? + # 'b' is an instance of A + >>> a.__class__ == b.__class__ # Is it really the same class A? + 1 # Yes. + + c) Class inheritance (class composition and specialization) + + Classes can be defined in terms of other existing classes (and only + classes! -- don't bug me on this now). Thus, we can compose property + packages and create new ones. We reuse the property set defined + in a class by defining a new class, which "inherits" from the former. + In other words, a class B which inherits from the class A, inherits + the properties defined in A, or, B inherits the structure of A. + + In the same time, at the definition of the new class B, we can enrich + the inherited set of properties by adding new ones and/or modify some + of the inherited properties. + + >>> class B(A): # B inherits A's properties + attr2 = "World" # additional attr2 + def method2(self, arg1): pass # method2 is redefined + def method3(self, *args): pass # additional method3 + + >>> B # What is B? + + >>> B == A # Is B the same class as A? + 0 # No. + + Classes define one special property, indicating whether a class + inherits the properties of another class. This property is called + __bases__ and it contains a list (a tuple) of the classes the new + class inherits from. The classes from which a class is inheriting the + properties are called superclasses (in Python, we call them also -- + base classes). + + >>> A.__bases__ # Does A have any superclasses? + () # No. + >>> B.__bases__ # Does B have any superclasses? + (,) # Yes. It has one superclass. + >>> B.__bases__[0] == A # Is it really the class A? + 1 # Yes, it is. + +-------- + + Congratulations on getting this far! This was the hard part. + Now, let's continue with the easy one. + +-------- + +2. Meta-classes + + You have to admit, that an anonymous group of Python wizards are + not satisfied with the property packaging facilities presented above. + They say, that the Real-World bugs them with problems that cannot be + modelled successfully with classes. Or, that the way classes are + implemented in Python and the way classes and instances behave at + runtime isn't always appropriate for reproducing the Real-World's + behavior in a way that satisfies them. + + Hence, what they want is the following: + + a) leave objects as they are (instances of classes) + b) leave classes as they are (property packages and object creators) + + BUT, at the same time: + + c) consider classes as being instances of mysterious objects. + d) label mysterious objects "meta-classes". + + Easy, eh? + + You may ask: "Why on earth do they want to do that?". + They answer: "Poor soul... Go and see how cruel the Real-World is!". + You - fuzzy: "OK, will do!" + + And here we go for another round of what I said in section 1 -- Classes. + + However, be warned! The features we're going to talk about aren't fully + implemented yet, because the Real-World don't let wizards to evaluate + precisely how cruel it is, so the features are still highly-experimental. + + a) Meta-class definition + + A meta-class is meant to define the common properties of a set of + classes. A meta-class is a "package" of properties. The assembly + of properties in a meta-class package is sometimes called a meta-class + structure (which isn't always appropriate). + + In Python, a meta-class definition would have looked like this: + + >>> metaclass M: + attr1 = "Hello" # an attribute of M + def method1(self, *args): pass # method1 of M + def method2(self, *args): pass # method2 of M + >>> + + So far, we defined the structure of the meta-class M. The meta-class + M is of type . We cannot check this by asking Python, but + if we could, it would have answered: + + >>> M # What is M? + + + b) Meta-class instantiation + + Creating an object with the properties defined in the meta-class M is + called instantiation of the meta-class M. After an instantiation of M, + we obtain a new object, called an class, but now it is called also + a meta-instance, which has the properties packaged in the meta-class M. + + In Python, instantiating a meta-class would have looked like this: + + >>> A = M() # 'A' is the 1st instance of M + >>> A # What is 'A'? + + + >>> B = M() # 'B' is another instance of M + >>> B # What is 'B'? + + + The metaclass-instances, A and B, are of type and they both + have the same properties. Note, that A and B are different objects. + (their adresses differ). This is a bit hard to see, but if it was + possible to ask Python, it would have answered: + + >>> A == B # Is A the same class as B? + 0 # No. + + Class objects have one more special property, indicating the meta-class + they are an instance of. This property is named __metaclass__. + + >>> A.__metaclass__ # What is the meta-class of A? + # A is an instance of M + >>> A.__metaclass__ # What is the meta-class of B? + # B is an instance of M + >>> A.__metaclass__ == B.__metaclass__ # Is it the same meta-class M? + 1 # Yes. + + c) Meta-class inheritance (meta-class composition and specialization) + + Meta-classes can be defined in terms of other existing meta-classes + (and only meta-classes!). Thus, we can compose property packages and + create new ones. We reuse the property set defined in a meta-class by + defining a new meta-class, which "inherits" from the former. + In other words, a meta-class N which inherits from the meta-class M, + inherits the properties defined in M, or, N inherits the structure of M. + + In the same time, at the definition of the new meta-class N, we can + enrich the inherited set of properties by adding new ones and/or modify + some of the inherited properties. + + >>> metaclass N(M): # N inherits M's properties + attr2 = "World" # additional attr2 + def method2(self, arg1): pass # method2 is redefined + def method3(self, *args): pass # additional method3 + + >>> N # What is N? + + >>> N == M # Is N the same meta-class as M? + 0 # No. + + Meta-classes define one special property, indicating whether a + meta-class inherits the properties of another meta-class. This property + is called __metabases__ and it contains a list (a tuple) of the + meta-classes the new meta-class inherits from. The meta-classes from + which a meta-class is inheriting the properties are called + super-meta-classes (in Python, we call them also -- super meta-bases). + + >>> M.__metabases__ # Does M have any supermetaclasses? + () # No. + >>> N.__metabases__ # Does N have any supermetaclasses? + (,) # Yes. It has a supermetaclass. + >>> N.__metabases__[0] == M # Is it really the meta-class M? + 1 # Yes, it is. + +-------- + + Triple congratulations on getting this far! + Now you know everything about meta-classes and the Real-World! + + + +-- + Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr +http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252 diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Eiffel.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Eiffel.py new file mode 100644 index 0000000000..f3a412b4c2 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Eiffel.py @@ -0,0 +1,141 @@ +"""Support Eiffel-style preconditions and postconditions.""" + +from types import FunctionType as function + +class EiffelBaseMetaClass(type): + + def __new__(meta, name, bases, dict): + meta.convert_methods(dict) + return super(EiffelBaseMetaClass, meta).__new__(meta, name, bases, + dict) + + @classmethod + def convert_methods(cls, dict): + """Replace functions in dict with EiffelMethod wrappers. + + The dict is modified in place. + + If a method ends in _pre or _post, it is removed from the dict + regardless of whether there is a corresponding method. + """ + # find methods with pre or post conditions + methods = [] + for k, v in dict.iteritems(): + if k.endswith('_pre') or k.endswith('_post'): + assert isinstance(v, function) + elif isinstance(v, function): + methods.append(k) + for m in methods: + pre = dict.get("%s_pre" % m) + post = dict.get("%s_post" % m) + if pre or post: + dict[k] = cls.make_eiffel_method(dict[m], pre, post) + +class EiffelMetaClass1(EiffelBaseMetaClass): + # an implementation of the "eiffel" meta class that uses nested functions + + @staticmethod + def make_eiffel_method(func, pre, post): + def method(self, *args, **kwargs): + if pre: + pre(self, *args, **kwargs) + x = func(self, *args, **kwargs) + if post: + post(self, x, *args, **kwargs) + return x + + if func.__doc__: + method.__doc__ = func.__doc__ + + return method + +class EiffelMethodWrapper: + + def __init__(self, inst, descr): + self._inst = inst + self._descr = descr + + def __call__(self, *args, **kwargs): + return self._descr.callmethod(self._inst, args, kwargs) + +class EiffelDescriptor(object): + + def __init__(self, func, pre, post): + self._func = func + self._pre = pre + self._post = post + + self.__name__ = func.__name__ + self.__doc__ = func.__doc__ + + def __get__(self, obj, cls): + return EiffelMethodWrapper(obj, self) + + def callmethod(self, inst, args, kwargs): + if self._pre: + self._pre(inst, *args, **kwargs) + x = self._func(inst, *args, **kwargs) + if self._post: + self._post(inst, x, *args, **kwargs) + return x + +class EiffelMetaClass2(EiffelBaseMetaClass): + # an implementation of the "eiffel" meta class that uses descriptors + + make_eiffel_method = EiffelDescriptor + +def _test(metaclass): + class Eiffel: + __metaclass__ = metaclass + + class Test(Eiffel): + + def m(self, arg): + """Make it a little larger""" + return arg + 1 + + def m2(self, arg): + """Make it a little larger""" + return arg + 1 + + def m2_pre(self, arg): + assert arg > 0 + + def m2_post(self, result, arg): + assert result > arg + + class Sub(Test): + def m2(self, arg): + return arg**2 + def m2_post(self, Result, arg): + super(Sub, self).m2_post(Result, arg) + assert Result < 100 + + t = Test() + t.m(1) + t.m2(1) + try: + t.m2(0) + except AssertionError: + pass + else: + assert False + + s = Sub() + try: + s.m2(1) + except AssertionError: + pass # result == arg + else: + assert False + try: + s.m2(10) + except AssertionError: + pass # result == 100 + else: + assert False + s.m2(5) + +if __name__ == "__main__": + _test(EiffelMetaClass1) + _test(EiffelMetaClass2) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Enum.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Enum.py new file mode 100644 index 0000000000..a080e8d98c --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/newmetaclasses/Enum.py @@ -0,0 +1,177 @@ +"""Enumeration metaclass.""" + +class EnumMetaclass(type): + """Metaclass for enumeration. + + To define your own enumeration, do something like + + class Color(Enum): + red = 1 + green = 2 + blue = 3 + + Now, Color.red, Color.green and Color.blue behave totally + different: they are enumerated values, not integers. + + Enumerations cannot be instantiated; however they can be + subclassed. + """ + + def __init__(cls, name, bases, dict): + super(EnumMetaclass, cls).__init__(name, bases, dict) + cls._members = [] + for attr in dict.keys(): + if not (attr.startswith('__') and attr.endswith('__')): + enumval = EnumInstance(name, attr, dict[attr]) + setattr(cls, attr, enumval) + cls._members.append(attr) + + def __getattr__(cls, name): + if name == "__members__": + return cls._members + raise AttributeError, name + + def __repr__(cls): + s1 = s2 = "" + enumbases = [base.__name__ for base in cls.__bases__ + if isinstance(base, EnumMetaclass) and not base is Enum] + if enumbases: + s1 = "(%s)" % ", ".join(enumbases) + enumvalues = ["%s: %d" % (val, getattr(cls, val)) + for val in cls._members] + if enumvalues: + s2 = ": {%s}" % ", ".join(enumvalues) + return "%s%s%s" % (cls.__name__, s1, s2) + +class FullEnumMetaclass(EnumMetaclass): + """Metaclass for full enumerations. + + A full enumeration displays all the values defined in base classes. + """ + + def __init__(cls, name, bases, dict): + super(FullEnumMetaclass, cls).__init__(name, bases, dict) + for obj in cls.__mro__: + if isinstance(obj, EnumMetaclass): + for attr in obj._members: + # XXX inefficient + if not attr in cls._members: + cls._members.append(attr) + +class EnumInstance(int): + """Class to represent an enumeration value. + + EnumInstance('Color', 'red', 12) prints as 'Color.red' and behaves + like the integer 12 when compared, but doesn't support arithmetic. + + XXX Should it record the actual enumeration rather than just its + name? + """ + + def __new__(cls, classname, enumname, value): + return int.__new__(cls, value) + + def __init__(self, classname, enumname, value): + self.__classname = classname + self.__enumname = enumname + + def __repr__(self): + return "EnumInstance(%s, %s, %d)" % (self.__classname, self.__enumname, + self) + + def __str__(self): + return "%s.%s" % (self.__classname, self.__enumname) + +class Enum: + __metaclass__ = EnumMetaclass + +class FullEnum: + __metaclass__ = FullEnumMetaclass + +def _test(): + + class Color(Enum): + red = 1 + green = 2 + blue = 3 + + print Color.red + + print repr(Color.red) + print Color.red == Color.red + print Color.red == Color.blue + print Color.red == 1 + print Color.red == 2 + + class ExtendedColor(Color): + white = 0 + orange = 4 + yellow = 5 + purple = 6 + black = 7 + + print ExtendedColor.orange + print ExtendedColor.red + + print Color.red == ExtendedColor.red + + class OtherColor(Enum): + white = 4 + blue = 5 + + class MergedColor(Color, OtherColor): + pass + + print MergedColor.red + print MergedColor.white + + print Color + print ExtendedColor + print OtherColor + print MergedColor + +def _test2(): + + class Color(FullEnum): + red = 1 + green = 2 + blue = 3 + + print Color.red + + print repr(Color.red) + print Color.red == Color.red + print Color.red == Color.blue + print Color.red == 1 + print Color.red == 2 + + class ExtendedColor(Color): + white = 0 + orange = 4 + yellow = 5 + purple = 6 + black = 7 + + print ExtendedColor.orange + print ExtendedColor.red + + print Color.red == ExtendedColor.red + + class OtherColor(FullEnum): + white = 4 + blue = 5 + + class MergedColor(Color, OtherColor): + pass + + print MergedColor.red + print MergedColor.white + + print Color + print ExtendedColor + print OtherColor + print MergedColor + +if __name__ == '__main__': + _test() + _test2() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/FILES b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/FILES new file mode 100644 index 0000000000..1df6c3d26d --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/FILES @@ -0,0 +1,6 @@ +Demo/parser +Doc/libparser.tex +Lib/AST.py +Lib/symbol.py +Lib/token.py +Modules/parsermodule.c diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/README new file mode 100644 index 0000000000..fa5bd31351 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/README @@ -0,0 +1,32 @@ +These files are from the large example of using the `parser' module. Refer +to the Python Library Reference for more information. + +It also contains examples for the AST parser. + +Files: +------ + + FILES -- list of files associated with the parser module. + + README -- this file. + + docstring.py -- sample source file containing only a module docstring. + + example.py -- module that uses the `parser' module to extract + information from the parse tree of Python source + code. + + simple.py -- sample source containing a "short form" definition. + + source.py -- sample source code used to demonstrate ability to + handle nested constructs easily using the functions + and classes in example.py. + + test_parser.py program to put the parser module through its paces. + + test_unparse.py tests for the unparse module + + unparse.py AST (2.7) based example to recreate source code + from an AST. + +Enjoy! diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/docstring.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/docstring.py new file mode 100644 index 0000000000..81efa02cb7 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/docstring.py @@ -0,0 +1,2 @@ +"""Some documentation. +""" diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/example.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/example.py new file mode 100644 index 0000000000..346f973d16 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/example.py @@ -0,0 +1,190 @@ +"""Simple code to extract class & function docstrings from a module. + +This code is used as an example in the library reference manual in the +section on using the parser module. Refer to the manual for a thorough +discussion of the operation of this code. +""" + +import os +import parser +import symbol +import token +import types + +from types import ListType, TupleType + + +def get_docs(fileName): + """Retrieve information from the parse tree of a source file. + + fileName + Name of the file to read Python source code from. + """ + source = open(fileName).read() + basename = os.path.basename(os.path.splitext(fileName)[0]) + ast = parser.suite(source) + return ModuleInfo(ast.totuple(), basename) + + +class SuiteInfoBase: + _docstring = '' + _name = '' + + def __init__(self, tree = None): + self._class_info = {} + self._function_info = {} + if tree: + self._extract_info(tree) + + def _extract_info(self, tree): + # extract docstring + if len(tree) == 2: + found, vars = match(DOCSTRING_STMT_PATTERN[1], tree[1]) + else: + found, vars = match(DOCSTRING_STMT_PATTERN, tree[3]) + if found: + self._docstring = eval(vars['docstring']) + # discover inner definitions + for node in tree[1:]: + found, vars = match(COMPOUND_STMT_PATTERN, node) + if found: + cstmt = vars['compound'] + if cstmt[0] == symbol.funcdef: + name = cstmt[2][1] + self._function_info[name] = FunctionInfo(cstmt) + elif cstmt[0] == symbol.classdef: + name = cstmt[2][1] + self._class_info[name] = ClassInfo(cstmt) + + def get_docstring(self): + return self._docstring + + def get_name(self): + return self._name + + def get_class_names(self): + return self._class_info.keys() + + def get_class_info(self, name): + return self._class_info[name] + + def __getitem__(self, name): + try: + return self._class_info[name] + except KeyError: + return self._function_info[name] + + +class SuiteFuncInfo: + # Mixin class providing access to function names and info. + + def get_function_names(self): + return self._function_info.keys() + + def get_function_info(self, name): + return self._function_info[name] + + +class FunctionInfo(SuiteInfoBase, SuiteFuncInfo): + def __init__(self, tree = None): + self._name = tree[2][1] + SuiteInfoBase.__init__(self, tree and tree[-1] or None) + + +class ClassInfo(SuiteInfoBase): + def __init__(self, tree = None): + self._name = tree[2][1] + SuiteInfoBase.__init__(self, tree and tree[-1] or None) + + def get_method_names(self): + return self._function_info.keys() + + def get_method_info(self, name): + return self._function_info[name] + + +class ModuleInfo(SuiteInfoBase, SuiteFuncInfo): + def __init__(self, tree = None, name = ""): + self._name = name + SuiteInfoBase.__init__(self, tree) + if tree: + found, vars = match(DOCSTRING_STMT_PATTERN, tree[1]) + if found: + self._docstring = vars["docstring"] + + +def match(pattern, data, vars=None): + """Match `data' to `pattern', with variable extraction. + + pattern + Pattern to match against, possibly containing variables. + + data + Data to be checked and against which variables are extracted. + + vars + Dictionary of variables which have already been found. If not + provided, an empty dictionary is created. + + The `pattern' value may contain variables of the form ['varname'] which + are allowed to match anything. The value that is matched is returned as + part of a dictionary which maps 'varname' to the matched value. 'varname' + is not required to be a string object, but using strings makes patterns + and the code which uses them more readable. + + This function returns two values: a boolean indicating whether a match + was found and a dictionary mapping variable names to their associated + values. + """ + if vars is None: + vars = {} + if type(pattern) is ListType: # 'variables' are ['varname'] + vars[pattern[0]] = data + return 1, vars + if type(pattern) is not TupleType: + return (pattern == data), vars + if len(data) != len(pattern): + return 0, vars + for pattern, data in map(None, pattern, data): + same, vars = match(pattern, data, vars) + if not same: + break + return same, vars + + +# This pattern identifies compound statements, allowing them to be readily +# differentiated from simple statements. +# +COMPOUND_STMT_PATTERN = ( + symbol.stmt, + (symbol.compound_stmt, ['compound']) + ) + + +# This pattern will match a 'stmt' node which *might* represent a docstring; +# docstrings require that the statement which provides the docstring be the +# first statement in the class or function, which this pattern does not check. +# +DOCSTRING_STMT_PATTERN = ( + symbol.stmt, + (symbol.simple_stmt, + (symbol.small_stmt, + (symbol.expr_stmt, + (symbol.testlist, + (symbol.test, + (symbol.and_test, + (symbol.not_test, + (symbol.comparison, + (symbol.expr, + (symbol.xor_expr, + (symbol.and_expr, + (symbol.shift_expr, + (symbol.arith_expr, + (symbol.term, + (symbol.factor, + (symbol.power, + (symbol.atom, + (token.STRING, ['docstring']) + )))))))))))))))), + (token.NEWLINE, '') + )) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/simple.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/simple.py new file mode 100644 index 0000000000..75ab0e7d5d --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/simple.py @@ -0,0 +1 @@ +def f(): "maybe a docstring" diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/source.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/source.py new file mode 100644 index 0000000000..e5b6bec0b9 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/source.py @@ -0,0 +1,27 @@ +"""Exmaple file to be parsed for the parsermodule example. + +The classes and functions in this module exist only to exhibit the ability +of the handling information extraction from nested definitions using parse +trees. They shouldn't interest you otherwise! +""" + +class Simple: + "This class does very little." + + def method(self): + "This method does almost nothing." + return 1 + + class Nested: + "This is a nested class." + + def nested_method(self): + "Method of Nested class." + def nested_function(): + "Function in method of Nested class." + pass + return nested_function + +def function(): + "This function lives at the module level." + return 0 diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_parser.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_parser.py new file mode 100644 index 0000000000..f3f48b89b6 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_parser.py @@ -0,0 +1,48 @@ +#! /usr/bin/env python +# (Force the script to use the latest build.) +# +# test_parser.py + +import parser, traceback + +_numFailed = 0 + +def testChunk(t, fileName): + global _numFailed + print '----', fileName, + try: + st = parser.suite(t) + tup = parser.st2tuple(st) + # this discards the first ST; a huge memory savings when running + # against a large source file like Tkinter.py. + st = None + new = parser.tuple2st(tup) + except parser.ParserError, err: + print + print 'parser module raised exception on input file', fileName + ':' + traceback.print_exc() + _numFailed = _numFailed + 1 + else: + if tup != parser.st2tuple(new): + print + print 'parser module failed on input file', fileName + _numFailed = _numFailed + 1 + else: + print 'o.k.' + +def testFile(fileName): + t = open(fileName).read() + testChunk(t, fileName) + +def test(): + import sys + args = sys.argv[1:] + if not args: + import glob + args = glob.glob("*.py") + args.sort() + map(testFile, args) + sys.exit(_numFailed != 0) + +if __name__ == '__main__': + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_unparse.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_unparse.py new file mode 100644 index 0000000000..eee1c7ab4c --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_unparse.py @@ -0,0 +1,213 @@ +import unittest +from test import test_support +import cStringIO +import sys +import os +import tokenize +import ast +import unparse + +def read_pyfile(filename): + """Read and return the contents of a Python source file (as a + string), taking into account the file encoding.""" + with open(filename, "r") as pyfile: + source = pyfile.read() + return source + +for_else = """\ +def f(): + for x in range(10): + break + else: + y = 2 + z = 3 +""" + +while_else = """\ +def g(): + while True: + break + else: + y = 2 + z = 3 +""" + +relative_import = """\ +from . import fred +from .. import barney +from .australia import shrimp as prawns +""" + +class_decorator = """\ +@f1(arg) +@f2 +class Foo: pass +""" + +elif1 = """\ +if cond1: + suite1 +elif cond2: + suite2 +else: + suite3 +""" + +elif2 = """\ +if cond1: + suite1 +elif cond2: + suite2 +""" + +try_except_finally = """\ +try: + suite1 +except ex1: + suite2 +except ex2: + suite3 +else: + suite4 +finally: + suite5 +""" + +class ASTTestCase(unittest.TestCase): + def assertASTEqual(self, ast1, ast2): + dump1 = ast.dump(ast1) + dump2 = ast.dump(ast2) + self.assertEqual(ast.dump(ast1), ast.dump(ast2)) + + def check_roundtrip(self, code1, filename="internal"): + ast1 = compile(code1, filename, "exec", ast.PyCF_ONLY_AST) + unparse_buffer = cStringIO.StringIO() + unparse.Unparser(ast1, unparse_buffer) + code2 = unparse_buffer.getvalue() + ast2 = compile(code2, filename, "exec", ast.PyCF_ONLY_AST) + self.assertASTEqual(ast1, ast2) + +class UnparseTestCase(ASTTestCase): + # Tests for specific bugs found in earlier versions of unparse + + def test_del_statement(self): + self.check_roundtrip("del x, y, z") + + def test_shifts(self): + self.check_roundtrip("45 << 2") + self.check_roundtrip("13 >> 7") + + def test_for_else(self): + self.check_roundtrip(for_else) + + def test_while_else(self): + self.check_roundtrip(while_else) + + def test_unary_parens(self): + self.check_roundtrip("(-1)**7") + self.check_roundtrip("(-1.)**8") + self.check_roundtrip("(-1j)**6") + self.check_roundtrip("not True or False") + self.check_roundtrip("True or not False") + + def test_integer_parens(self): + self.check_roundtrip("3 .__abs__()") + + def test_huge_float(self): + self.check_roundtrip("1e1000") + self.check_roundtrip("-1e1000") + self.check_roundtrip("1e1000j") + self.check_roundtrip("-1e1000j") + + def test_min_int(self): + self.check_roundtrip(str(-sys.maxint-1)) + self.check_roundtrip("-(%s)" % (sys.maxint + 1)) + + def test_imaginary_literals(self): + self.check_roundtrip("7j") + self.check_roundtrip("-7j") + self.check_roundtrip("-(7j)") + self.check_roundtrip("0j") + self.check_roundtrip("-0j") + self.check_roundtrip("-(0j)") + + def test_negative_zero(self): + self.check_roundtrip("-0") + self.check_roundtrip("-(0)") + self.check_roundtrip("-0b0") + self.check_roundtrip("-(0b0)") + self.check_roundtrip("-0o0") + self.check_roundtrip("-(0o0)") + self.check_roundtrip("-0x0") + self.check_roundtrip("-(0x0)") + + def test_lambda_parentheses(self): + self.check_roundtrip("(lambda: int)()") + + def test_chained_comparisons(self): + self.check_roundtrip("1 < 4 <= 5") + self.check_roundtrip("a is b is c is not d") + + def test_function_arguments(self): + self.check_roundtrip("def f(): pass") + self.check_roundtrip("def f(a): pass") + self.check_roundtrip("def f(b = 2): pass") + self.check_roundtrip("def f(a, b): pass") + self.check_roundtrip("def f(a, b = 2): pass") + self.check_roundtrip("def f(a = 5, b = 2): pass") + self.check_roundtrip("def f(*args, **kwargs): pass") + + def test_relative_import(self): + self.check_roundtrip(relative_import) + + def test_bytes(self): + self.check_roundtrip("b'123'") + + def test_set_literal(self): + self.check_roundtrip("{'a', 'b', 'c'}") + + def test_set_comprehension(self): + self.check_roundtrip("{x for x in range(5)}") + + def test_dict_comprehension(self): + self.check_roundtrip("{x: x*x for x in range(10)}") + + def test_class_decorators(self): + self.check_roundtrip(class_decorator) + + def test_elifs(self): + self.check_roundtrip(elif1) + self.check_roundtrip(elif2) + + def test_try_except_finally(self): + self.check_roundtrip(try_except_finally) + +class DirectoryTestCase(ASTTestCase): + """Test roundtrip behaviour on all files in Lib and Lib/test.""" + + # test directories, relative to the root of the distribution + test_directories = 'Lib', os.path.join('Lib', 'test') + + def test_files(self): + # get names of files to test + dist_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir) + + names = [] + for d in self.test_directories: + test_dir = os.path.join(dist_dir, d) + for n in os.listdir(test_dir): + if n.endswith('.py') and not n.startswith('bad'): + names.append(os.path.join(test_dir, n)) + + for filename in names: + if test_support.verbose: + print('Testing %s' % filename) + source = read_pyfile(filename) + self.check_roundtrip(source) + + +def test_main(): + test_support.run_unittest(UnparseTestCase, DirectoryTestCase) + +if __name__ == '__main__': + test_main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/unparse.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/unparse.py new file mode 100644 index 0000000000..b42d979a5e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/unparse.py @@ -0,0 +1,606 @@ +"Usage: unparse.py " +import sys +import ast +import cStringIO +import os + +# Large float and imaginary literals get turned into infinities in the AST. +# We unparse those infinities to INFSTR. +INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) + +def interleave(inter, f, seq): + """Call f on each item in seq, calling inter() in between. + """ + seq = iter(seq) + try: + f(next(seq)) + except StopIteration: + pass + else: + for x in seq: + inter() + f(x) + +class Unparser: + """Methods in this class recursively traverse an AST and + output source code for the abstract syntax; original formatting + is disregarded. """ + + def __init__(self, tree, file = sys.stdout): + """Unparser(tree, file=sys.stdout) -> None. + Print the source for tree to file.""" + self.f = file + self.future_imports = [] + self._indent = 0 + self.dispatch(tree) + self.f.write("") + self.f.flush() + + def fill(self, text = ""): + "Indent a piece of text, according to the current indentation level" + self.f.write("\n"+" "*self._indent + text) + + def write(self, text): + "Append a piece of text to the current line." + self.f.write(text) + + def enter(self): + "Print ':', and increase the indentation." + self.write(":") + self._indent += 1 + + def leave(self): + "Decrease the indentation level." + self._indent -= 1 + + def dispatch(self, tree): + "Dispatcher function, dispatching tree type T to method _T." + if isinstance(tree, list): + for t in tree: + self.dispatch(t) + return + meth = getattr(self, "_"+tree.__class__.__name__) + meth(tree) + + + ############### Unparsing methods ###################### + # There should be one method per concrete grammar type # + # Constructors should be grouped by sum type. Ideally, # + # this would follow the order in the grammar, but # + # currently doesn't. # + ######################################################## + + def _Module(self, tree): + for stmt in tree.body: + self.dispatch(stmt) + + # stmt + def _Expr(self, tree): + self.fill() + self.dispatch(tree.value) + + def _Import(self, t): + self.fill("import ") + interleave(lambda: self.write(", "), self.dispatch, t.names) + + def _ImportFrom(self, t): + # A from __future__ import may affect unparsing, so record it. + if t.module and t.module == '__future__': + self.future_imports.extend(n.name for n in t.names) + + self.fill("from ") + self.write("." * t.level) + if t.module: + self.write(t.module) + self.write(" import ") + interleave(lambda: self.write(", "), self.dispatch, t.names) + + def _Assign(self, t): + self.fill() + for target in t.targets: + self.dispatch(target) + self.write(" = ") + self.dispatch(t.value) + + def _AugAssign(self, t): + self.fill() + self.dispatch(t.target) + self.write(" "+self.binop[t.op.__class__.__name__]+"= ") + self.dispatch(t.value) + + def _Return(self, t): + self.fill("return") + if t.value: + self.write(" ") + self.dispatch(t.value) + + def _Pass(self, t): + self.fill("pass") + + def _Break(self, t): + self.fill("break") + + def _Continue(self, t): + self.fill("continue") + + def _Delete(self, t): + self.fill("del ") + interleave(lambda: self.write(", "), self.dispatch, t.targets) + + def _Assert(self, t): + self.fill("assert ") + self.dispatch(t.test) + if t.msg: + self.write(", ") + self.dispatch(t.msg) + + def _Exec(self, t): + self.fill("exec ") + self.dispatch(t.body) + if t.globals: + self.write(" in ") + self.dispatch(t.globals) + if t.locals: + self.write(", ") + self.dispatch(t.locals) + + def _Print(self, t): + self.fill("print ") + do_comma = False + if t.dest: + self.write(">>") + self.dispatch(t.dest) + do_comma = True + for e in t.values: + if do_comma:self.write(", ") + else:do_comma=True + self.dispatch(e) + if not t.nl: + self.write(",") + + def _Global(self, t): + self.fill("global ") + interleave(lambda: self.write(", "), self.write, t.names) + + def _Yield(self, t): + self.write("(") + self.write("yield") + if t.value: + self.write(" ") + self.dispatch(t.value) + self.write(")") + + def _Raise(self, t): + self.fill('raise ') + if t.type: + self.dispatch(t.type) + if t.inst: + self.write(", ") + self.dispatch(t.inst) + if t.tback: + self.write(", ") + self.dispatch(t.tback) + + def _TryExcept(self, t): + self.fill("try") + self.enter() + self.dispatch(t.body) + self.leave() + + for ex in t.handlers: + self.dispatch(ex) + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + + def _TryFinally(self, t): + if len(t.body) == 1 and isinstance(t.body[0], ast.TryExcept): + # try-except-finally + self.dispatch(t.body) + else: + self.fill("try") + self.enter() + self.dispatch(t.body) + self.leave() + + self.fill("finally") + self.enter() + self.dispatch(t.finalbody) + self.leave() + + def _ExceptHandler(self, t): + self.fill("except") + if t.type: + self.write(" ") + self.dispatch(t.type) + if t.name: + self.write(" as ") + self.dispatch(t.name) + self.enter() + self.dispatch(t.body) + self.leave() + + def _ClassDef(self, t): + self.write("\n") + for deco in t.decorator_list: + self.fill("@") + self.dispatch(deco) + self.fill("class "+t.name) + if t.bases: + self.write("(") + for a in t.bases: + self.dispatch(a) + self.write(", ") + self.write(")") + self.enter() + self.dispatch(t.body) + self.leave() + + def _FunctionDef(self, t): + self.write("\n") + for deco in t.decorator_list: + self.fill("@") + self.dispatch(deco) + self.fill("def "+t.name + "(") + self.dispatch(t.args) + self.write(")") + self.enter() + self.dispatch(t.body) + self.leave() + + def _For(self, t): + self.fill("for ") + self.dispatch(t.target) + self.write(" in ") + self.dispatch(t.iter) + self.enter() + self.dispatch(t.body) + self.leave() + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + + def _If(self, t): + self.fill("if ") + self.dispatch(t.test) + self.enter() + self.dispatch(t.body) + self.leave() + # collapse nested ifs into equivalent elifs. + while (t.orelse and len(t.orelse) == 1 and + isinstance(t.orelse[0], ast.If)): + t = t.orelse[0] + self.fill("elif ") + self.dispatch(t.test) + self.enter() + self.dispatch(t.body) + self.leave() + # final else + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + + def _While(self, t): + self.fill("while ") + self.dispatch(t.test) + self.enter() + self.dispatch(t.body) + self.leave() + if t.orelse: + self.fill("else") + self.enter() + self.dispatch(t.orelse) + self.leave() + + def _With(self, t): + self.fill("with ") + self.dispatch(t.context_expr) + if t.optional_vars: + self.write(" as ") + self.dispatch(t.optional_vars) + self.enter() + self.dispatch(t.body) + self.leave() + + # expr + def _Str(self, tree): + # if from __future__ import unicode_literals is in effect, + # then we want to output string literals using a 'b' prefix + # and unicode literals with no prefix. + if "unicode_literals" not in self.future_imports: + self.write(repr(tree.s)) + elif isinstance(tree.s, str): + self.write("b" + repr(tree.s)) + elif isinstance(tree.s, unicode): + self.write(repr(tree.s).lstrip("u")) + else: + assert False, "shouldn't get here" + + def _Name(self, t): + self.write(t.id) + + def _Repr(self, t): + self.write("`") + self.dispatch(t.value) + self.write("`") + + def _Num(self, t): + repr_n = repr(t.n) + # Parenthesize negative numbers, to avoid turning (-1)**2 into -1**2. + if repr_n.startswith("-"): + self.write("(") + # Substitute overflowing decimal literal for AST infinities. + self.write(repr_n.replace("inf", INFSTR)) + if repr_n.startswith("-"): + self.write(")") + + def _List(self, t): + self.write("[") + interleave(lambda: self.write(", "), self.dispatch, t.elts) + self.write("]") + + def _ListComp(self, t): + self.write("[") + self.dispatch(t.elt) + for gen in t.generators: + self.dispatch(gen) + self.write("]") + + def _GeneratorExp(self, t): + self.write("(") + self.dispatch(t.elt) + for gen in t.generators: + self.dispatch(gen) + self.write(")") + + def _SetComp(self, t): + self.write("{") + self.dispatch(t.elt) + for gen in t.generators: + self.dispatch(gen) + self.write("}") + + def _DictComp(self, t): + self.write("{") + self.dispatch(t.key) + self.write(": ") + self.dispatch(t.value) + for gen in t.generators: + self.dispatch(gen) + self.write("}") + + def _comprehension(self, t): + self.write(" for ") + self.dispatch(t.target) + self.write(" in ") + self.dispatch(t.iter) + for if_clause in t.ifs: + self.write(" if ") + self.dispatch(if_clause) + + def _IfExp(self, t): + self.write("(") + self.dispatch(t.body) + self.write(" if ") + self.dispatch(t.test) + self.write(" else ") + self.dispatch(t.orelse) + self.write(")") + + def _Set(self, t): + assert(t.elts) # should be at least one element + self.write("{") + interleave(lambda: self.write(", "), self.dispatch, t.elts) + self.write("}") + + def _Dict(self, t): + self.write("{") + def write_pair(pair): + (k, v) = pair + self.dispatch(k) + self.write(": ") + self.dispatch(v) + interleave(lambda: self.write(", "), write_pair, zip(t.keys, t.values)) + self.write("}") + + def _Tuple(self, t): + self.write("(") + if len(t.elts) == 1: + (elt,) = t.elts + self.dispatch(elt) + self.write(",") + else: + interleave(lambda: self.write(", "), self.dispatch, t.elts) + self.write(")") + + unop = {"Invert":"~", "Not": "not", "UAdd":"+", "USub":"-"} + def _UnaryOp(self, t): + self.write("(") + self.write(self.unop[t.op.__class__.__name__]) + self.write(" ") + # If we're applying unary minus to a number, parenthesize the number. + # This is necessary: -2147483648 is different from -(2147483648) on + # a 32-bit machine (the first is an int, the second a long), and + # -7j is different from -(7j). (The first has real part 0.0, the second + # has real part -0.0.) + if isinstance(t.op, ast.USub) and isinstance(t.operand, ast.Num): + self.write("(") + self.dispatch(t.operand) + self.write(")") + else: + self.dispatch(t.operand) + self.write(")") + + binop = { "Add":"+", "Sub":"-", "Mult":"*", "Div":"/", "Mod":"%", + "LShift":"<<", "RShift":">>", "BitOr":"|", "BitXor":"^", "BitAnd":"&", + "FloorDiv":"//", "Pow": "**"} + def _BinOp(self, t): + self.write("(") + self.dispatch(t.left) + self.write(" " + self.binop[t.op.__class__.__name__] + " ") + self.dispatch(t.right) + self.write(")") + + cmpops = {"Eq":"==", "NotEq":"!=", "Lt":"<", "LtE":"<=", "Gt":">", "GtE":">=", + "Is":"is", "IsNot":"is not", "In":"in", "NotIn":"not in"} + def _Compare(self, t): + self.write("(") + self.dispatch(t.left) + for o, e in zip(t.ops, t.comparators): + self.write(" " + self.cmpops[o.__class__.__name__] + " ") + self.dispatch(e) + self.write(")") + + boolops = {ast.And: 'and', ast.Or: 'or'} + def _BoolOp(self, t): + self.write("(") + s = " %s " % self.boolops[t.op.__class__] + interleave(lambda: self.write(s), self.dispatch, t.values) + self.write(")") + + def _Attribute(self,t): + self.dispatch(t.value) + # Special case: 3.__abs__() is a syntax error, so if t.value + # is an integer literal then we need to either parenthesize + # it or add an extra space to get 3 .__abs__(). + if isinstance(t.value, ast.Num) and isinstance(t.value.n, int): + self.write(" ") + self.write(".") + self.write(t.attr) + + def _Call(self, t): + self.dispatch(t.func) + self.write("(") + comma = False + for e in t.args: + if comma: self.write(", ") + else: comma = True + self.dispatch(e) + for e in t.keywords: + if comma: self.write(", ") + else: comma = True + self.dispatch(e) + if t.starargs: + if comma: self.write(", ") + else: comma = True + self.write("*") + self.dispatch(t.starargs) + if t.kwargs: + if comma: self.write(", ") + else: comma = True + self.write("**") + self.dispatch(t.kwargs) + self.write(")") + + def _Subscript(self, t): + self.dispatch(t.value) + self.write("[") + self.dispatch(t.slice) + self.write("]") + + # slice + def _Ellipsis(self, t): + self.write("...") + + def _Index(self, t): + self.dispatch(t.value) + + def _Slice(self, t): + if t.lower: + self.dispatch(t.lower) + self.write(":") + if t.upper: + self.dispatch(t.upper) + if t.step: + self.write(":") + self.dispatch(t.step) + + def _ExtSlice(self, t): + interleave(lambda: self.write(', '), self.dispatch, t.dims) + + # others + def _arguments(self, t): + first = True + # normal arguments + defaults = [None] * (len(t.args) - len(t.defaults)) + t.defaults + for a,d in zip(t.args, defaults): + if first:first = False + else: self.write(", ") + self.dispatch(a), + if d: + self.write("=") + self.dispatch(d) + + # varargs + if t.vararg: + if first:first = False + else: self.write(", ") + self.write("*") + self.write(t.vararg) + + # kwargs + if t.kwarg: + if first:first = False + else: self.write(", ") + self.write("**"+t.kwarg) + + def _keyword(self, t): + self.write(t.arg) + self.write("=") + self.dispatch(t.value) + + def _Lambda(self, t): + self.write("(") + self.write("lambda ") + self.dispatch(t.args) + self.write(": ") + self.dispatch(t.body) + self.write(")") + + def _alias(self, t): + self.write(t.name) + if t.asname: + self.write(" as "+t.asname) + +def roundtrip(filename, output=sys.stdout): + with open(filename, "r") as pyfile: + source = pyfile.read() + tree = compile(source, filename, "exec", ast.PyCF_ONLY_AST) + Unparser(tree, output) + + + +def testdir(a): + try: + names = [n for n in os.listdir(a) if n.endswith('.py')] + except OSError: + sys.stderr.write("Directory not readable: %s" % a) + else: + for n in names: + fullname = os.path.join(a, n) + if os.path.isfile(fullname): + output = cStringIO.StringIO() + print 'Testing %s' % fullname + try: + roundtrip(fullname, output) + except Exception as e: + print ' Failed to compile, exception is %s' % repr(e) + elif os.path.isdir(fullname): + testdir(fullname) + +def main(args): + if args[0] == '--testdir': + for a in args[1:]: + testdir(a) + else: + for a in args: + roundtrip(a) + +if __name__=='__main__': + main(sys.argv[1:]) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/FSProxy.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/FSProxy.py new file mode 100644 index 0000000000..58354e1e31 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/FSProxy.py @@ -0,0 +1,301 @@ +"""File System Proxy. + +Provide an OS-neutral view on a file system, locally or remotely. +The functionality is geared towards implementing some sort of +rdist-like utility between a Mac and a UNIX system. + +The module defines three classes: + +FSProxyLocal -- used for local access +FSProxyServer -- used on the server side of remote access +FSProxyClient -- used on the client side of remote access + +The remote classes are instantiated with an IP address and an optional +verbosity flag. +""" + +import server +import client +import md5 +import os +import fnmatch +from stat import * +import time +import fnmatch + +maxnamelen = 255 + +skipnames = (os.curdir, os.pardir) + + +class FSProxyLocal: + + def __init__(self): + self._dirstack = [] + self._ignore = ['*.pyc'] + self._readignore() + + def _close(self): + while self._dirstack: + self.back() + + def _readignore(self): + file = self._hide('ignore') + try: + f = open(file) + except IOError: + file = self._hide('synctree.ignorefiles') + try: + f = open(file) + except IOError: + return [] + ignore = [] + while 1: + line = f.readline() + if not line: break + if line[-1] == '\n': line = line[:-1] + ignore.append(line) + f.close() + return ignore + + def _hidden(self, name): + return name[0] == '.' + + def _hide(self, name): + return '.%s' % name + + def visible(self, name): + if len(name) > maxnamelen: return 0 + if name[-1] == '~': return 0 + if name in skipnames: return 0 + if self._hidden(name): return 0 + head, tail = os.path.split(name) + if head or not tail: return 0 + if os.path.islink(name): return 0 + if '\0' in open(name, 'rb').read(512): return 0 + for ign in self._ignore: + if fnmatch.fnmatch(name, ign): return 0 + return 1 + + def check(self, name): + if not self.visible(name): + raise os.error, "protected name %s" % repr(name) + + def checkfile(self, name): + self.check(name) + if not os.path.isfile(name): + raise os.error, "not a plain file %s" % repr(name) + + def pwd(self): + return os.getcwd() + + def cd(self, name): + self.check(name) + save = os.getcwd(), self._ignore + os.chdir(name) + self._dirstack.append(save) + self._ignore = self._ignore + self._readignore() + + def back(self): + if not self._dirstack: + raise os.error, "empty directory stack" + dir, ignore = self._dirstack[-1] + os.chdir(dir) + del self._dirstack[-1] + self._ignore = ignore + + def _filter(self, files, pat = None): + if pat: + def keep(name, pat = pat): + return fnmatch.fnmatch(name, pat) + files = filter(keep, files) + files = filter(self.visible, files) + files.sort() + return files + + def list(self, pat = None): + files = os.listdir(os.curdir) + return self._filter(files, pat) + + def listfiles(self, pat = None): + files = os.listdir(os.curdir) + files = filter(os.path.isfile, files) + return self._filter(files, pat) + + def listsubdirs(self, pat = None): + files = os.listdir(os.curdir) + files = filter(os.path.isdir, files) + return self._filter(files, pat) + + def exists(self, name): + return self.visible(name) and os.path.exists(name) + + def isdir(self, name): + return self.visible(name) and os.path.isdir(name) + + def islink(self, name): + return self.visible(name) and os.path.islink(name) + + def isfile(self, name): + return self.visible(name) and os.path.isfile(name) + + def sum(self, name): + self.checkfile(name) + BUFFERSIZE = 1024*8 + f = open(name) + sum = md5.new() + while 1: + buffer = f.read(BUFFERSIZE) + if not buffer: + break + sum.update(buffer) + return sum.digest() + + def size(self, name): + self.checkfile(name) + return os.stat(name)[ST_SIZE] + + def mtime(self, name): + self.checkfile(name) + return time.localtime(os.stat(name)[ST_MTIME]) + + def stat(self, name): + self.checkfile(name) + size = os.stat(name)[ST_SIZE] + mtime = time.localtime(os.stat(name)[ST_MTIME]) + return size, mtime + + def info(self, name): + sum = self.sum(name) + size = os.stat(name)[ST_SIZE] + mtime = time.localtime(os.stat(name)[ST_MTIME]) + return sum, size, mtime + + def _list(self, function, list): + if list is None: + list = self.listfiles() + res = [] + for name in list: + try: + res.append((name, function(name))) + except (os.error, IOError): + res.append((name, None)) + return res + + def sumlist(self, list = None): + return self._list(self.sum, list) + + def statlist(self, list = None): + return self._list(self.stat, list) + + def mtimelist(self, list = None): + return self._list(self.mtime, list) + + def sizelist(self, list = None): + return self._list(self.size, list) + + def infolist(self, list = None): + return self._list(self.info, list) + + def _dict(self, function, list): + if list is None: + list = self.listfiles() + dict = {} + for name in list: + try: + dict[name] = function(name) + except (os.error, IOError): + pass + return dict + + def sumdict(self, list = None): + return self.dict(self.sum, list) + + def sizedict(self, list = None): + return self.dict(self.size, list) + + def mtimedict(self, list = None): + return self.dict(self.mtime, list) + + def statdict(self, list = None): + return self.dict(self.stat, list) + + def infodict(self, list = None): + return self._dict(self.info, list) + + def read(self, name, offset = 0, length = -1): + self.checkfile(name) + f = open(name) + f.seek(offset) + if length == 0: + data = '' + elif length < 0: + data = f.read() + else: + data = f.read(length) + f.close() + return data + + def create(self, name): + self.check(name) + if os.path.exists(name): + self.checkfile(name) + bname = name + '~' + try: + os.unlink(bname) + except os.error: + pass + os.rename(name, bname) + f = open(name, 'w') + f.close() + + def write(self, name, data, offset = 0): + self.checkfile(name) + f = open(name, 'r+') + f.seek(offset) + f.write(data) + f.close() + + def mkdir(self, name): + self.check(name) + os.mkdir(name, 0777) + + def rmdir(self, name): + self.check(name) + os.rmdir(name) + + +class FSProxyServer(FSProxyLocal, server.Server): + + def __init__(self, address, verbose = server.VERBOSE): + FSProxyLocal.__init__(self) + server.Server.__init__(self, address, verbose) + + def _close(self): + server.Server._close(self) + FSProxyLocal._close(self) + + def _serve(self): + server.Server._serve(self) + # Retreat into start directory + while self._dirstack: self.back() + + +class FSProxyClient(client.Client): + + def __init__(self, address, verbose = client.VERBOSE): + client.Client.__init__(self, address, verbose) + + +def test(): + import string + import sys + if sys.argv[1:]: + port = string.atoi(sys.argv[1]) + else: + port = 4127 + proxy = FSProxyServer(('', port)) + proxy._serverloop() + + +if __name__ == '__main__': + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/RCSProxy.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/RCSProxy.py new file mode 100644 index 0000000000..b4b0d92b7e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/RCSProxy.py @@ -0,0 +1,198 @@ +#! /usr/bin/env python + +"""RCS Proxy. + +Provide a simplified interface on RCS files, locally or remotely. +The functionality is geared towards implementing some sort of +remote CVS like utility. It is modeled after the similar module +FSProxy. + +The module defines two classes: + +RCSProxyLocal -- used for local access +RCSProxyServer -- used on the server side of remote access + +The corresponding client class, RCSProxyClient, is defined in module +rcsclient. + +The remote classes are instantiated with an IP address and an optional +verbosity flag. +""" + +import server +import md5 +import os +import fnmatch +import string +import tempfile +import rcslib + + +class DirSupport: + + def __init__(self): + self._dirstack = [] + + def __del__(self): + self._close() + + def _close(self): + while self._dirstack: + self.back() + + def pwd(self): + return os.getcwd() + + def cd(self, name): + save = os.getcwd() + os.chdir(name) + self._dirstack.append(save) + + def back(self): + if not self._dirstack: + raise os.error, "empty directory stack" + dir = self._dirstack[-1] + os.chdir(dir) + del self._dirstack[-1] + + def listsubdirs(self, pat = None): + files = os.listdir(os.curdir) + files = filter(os.path.isdir, files) + return self._filter(files, pat) + + def isdir(self, name): + return os.path.isdir(name) + + def mkdir(self, name): + os.mkdir(name, 0777) + + def rmdir(self, name): + os.rmdir(name) + + +class RCSProxyLocal(rcslib.RCS, DirSupport): + + def __init__(self): + rcslib.RCS.__init__(self) + DirSupport.__init__(self) + + def __del__(self): + DirSupport.__del__(self) + rcslib.RCS.__del__(self) + + def sumlist(self, list = None): + return self._list(self.sum, list) + + def sumdict(self, list = None): + return self._dict(self.sum, list) + + def sum(self, name_rev): + f = self._open(name_rev) + BUFFERSIZE = 1024*8 + sum = md5.new() + while 1: + buffer = f.read(BUFFERSIZE) + if not buffer: + break + sum.update(buffer) + self._closepipe(f) + return sum.digest() + + def get(self, name_rev): + f = self._open(name_rev) + data = f.read() + self._closepipe(f) + return data + + def put(self, name_rev, data, message=None): + name, rev = self._unmangle(name_rev) + f = open(name, 'w') + f.write(data) + f.close() + self.checkin(name_rev, message) + self._remove(name) + + def _list(self, function, list = None): + """INTERNAL: apply FUNCTION to all files in LIST. + + Return a list of the results. + + The list defaults to all files in the directory if None. + + """ + if list is None: + list = self.listfiles() + res = [] + for name in list: + try: + res.append((name, function(name))) + except (os.error, IOError): + res.append((name, None)) + return res + + def _dict(self, function, list = None): + """INTERNAL: apply FUNCTION to all files in LIST. + + Return a dictionary mapping files to results. + + The list defaults to all files in the directory if None. + + """ + if list is None: + list = self.listfiles() + dict = {} + for name in list: + try: + dict[name] = function(name) + except (os.error, IOError): + pass + return dict + + +class RCSProxyServer(RCSProxyLocal, server.SecureServer): + + def __init__(self, address, verbose = server.VERBOSE): + RCSProxyLocal.__init__(self) + server.SecureServer.__init__(self, address, verbose) + + def _close(self): + server.SecureServer._close(self) + RCSProxyLocal._close(self) + + def _serve(self): + server.SecureServer._serve(self) + # Retreat into start directory + while self._dirstack: self.back() + + +def test_server(): + import string + import sys + if sys.argv[1:]: + port = string.atoi(sys.argv[1]) + else: + port = 4127 + proxy = RCSProxyServer(('', port)) + proxy._serverloop() + + +def test(): + import sys + if not sys.argv[1:] or sys.argv[1] and sys.argv[1][0] in '0123456789': + test_server() + sys.exit(0) + proxy = RCSProxyLocal() + what = sys.argv[1] + if hasattr(proxy, what): + attr = getattr(proxy, what) + if callable(attr): + print apply(attr, tuple(sys.argv[2:])) + else: + print repr(attr) + else: + print "%s: no such attribute" % what + sys.exit(2) + + +if __name__ == '__main__': + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/README new file mode 100644 index 0000000000..c8137e9a84 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/README @@ -0,0 +1,121 @@ +Filesystem, RCS and CVS client and server classes +================================================= + +*** See the security warning at the end of this file! *** + +This directory contains various modules and classes that support +remote file system operations. + +CVS stuff +--------- + +rcvs Script to put in your bin directory +rcvs.py Remote CVS client command line interface + +cvslib.py CVS admin files classes (used by rrcs) +cvslock.py CVS locking algorithms + +RCS stuff +--------- + +rrcs Script to put in your bin directory +rrcs.py Remote RCS client command line interface + +rcsclient.py Return an RCSProxyClient instance + (has reasonable default server/port/directory) + +RCSProxy.py RCS proxy and server classes (on top of rcslib.py) + +rcslib.py Local-only RCS base class (affects stdout & + local work files) + +FSProxy stuff +------------- + +sumtree.py Old demo for FSProxy +cmptree.py First FSProxy client (used to sync from the Mac) +FSProxy.py Filesystem interface classes + +Generic client/server stuff +--------------------------- + +client.py Client class +server.py Server class + +security.py Security mix-in class (not very secure I think) + +Other generic stuff +------------------- + +cmdfw.py CommandFrameWork class + (used by rcvs, should be used by rrcs as well) + + +Client/Server operation +----------------------- + +The Client and Server classes implement a simple-minded RPC protocol, +using Python's pickle module to transfer arguments, return values and +exceptions with the most generality. The Server class is instantiated +with a port number on which it should listen for requests; the Client +class is instantiated with a host name and a port number where it +should connect to. Once a client is connected, a TCP connection is +maintained between client and server. + +The Server class currently handles only one connection at a time; +however it could be rewritten to allow various modes of operations, +using multiple threads or processes or the select() system call as +desired to serve multiple clients simultaneously (when using select(), +still handling one request at a time). This would not require +rewriting of the Client class. It may also be possible to adapt the +code to use UDP instead of TCP, but then both classes will have to be +rewritten (and unless extensive acknowlegements and request serial +numbers are used, the server should handle duplicate requests, so its +semantics should be idempotent -- shrudder). + +Even though the FSProxy and RCSProxy modules define client classes, +the client class is fully generic -- what methods it supports is +determined entirely by the server. The server class, however, must be +derived from. This is generally done as follows: + + from server import Server + from client import Client + + # Define a class that performs the operations locally + class MyClassLocal: + def __init__(self): ... + def _close(self): ... + + # Derive a server class using multiple inheritance + class MyClassServer(MyClassLocal, Server): + def __init__(self, address): + # Must initialize MyClassLocal as well as Server + MyClassLocal.__init__(self) + Server.__init__(self, address) + def _close(self): + Server._close() + MyClassLocal._close() + + # A dummy client class + class MyClassClient(Client): pass + +Note that because MyClassLocal isn't used in the definition of +MyClassClient, it would actually be better to place it in a separate +module so the definition of MyClassLocal isn't executed when we only +instantiate a client. + +The modules client and server should probably be renamed to Client and +Server in order to match the class names. + + +*** Security warning: this version requires that you have a file +$HOME/.python_keyfile at the server and client side containing two +comma- separated numbers. The security system at the moment makes no +guarantees of actuallng being secure -- however it requires that the +key file exists and contains the same numbers at both ends for this to +work. (You can specify an alternative keyfile in $PYTHON_KEYFILE). +Have a look at the Security class in security.py for details; +basically, if the key file contains (x, y), then the security server +class chooses a random number z (the challenge) in the range +10..100000 and the client must be able to produce pow(z, x, y) +(i.e. z**x mod y). diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/client.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/client.py new file mode 100644 index 0000000000..41a5bcc2c8 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/client.py @@ -0,0 +1,157 @@ +"""RPC Client module.""" + +import sys +import socket +import pickle +import __builtin__ +import os + + +# Default verbosity (0 = silent, 1 = print connections, 2 = print requests too) +VERBOSE = 1 + + +class Client: + + """RPC Client class. No need to derive a class -- it's fully generic.""" + + def __init__(self, address, verbose = VERBOSE): + self._pre_init(address, verbose) + self._post_init() + + def _pre_init(self, address, verbose = VERBOSE): + if type(address) == type(0): + address = ('', address) + self._address = address + self._verbose = verbose + if self._verbose: print "Connecting to %s ..." % repr(address) + self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self._socket.connect(address) + if self._verbose: print "Connected." + self._lastid = 0 # Last id for which a reply has been received + self._nextid = 1 # Id of next request + self._replies = {} # Unprocessed replies + self._rf = self._socket.makefile('r') + self._wf = self._socket.makefile('w') + + def _post_init(self): + self._methods = self._call('.methods') + + def __del__(self): + self._close() + + def _close(self): + if self._rf: self._rf.close() + self._rf = None + if self._wf: self._wf.close() + self._wf = None + if self._socket: self._socket.close() + self._socket = None + + def __getattr__(self, name): + if name in self._methods: + method = _stub(self, name) + setattr(self, name, method) # XXX circular reference + return method + raise AttributeError, name + + def _setverbose(self, verbose): + self._verbose = verbose + + def _call(self, name, *args): + return self._vcall(name, args) + + def _vcall(self, name, args): + return self._recv(self._vsend(name, args)) + + def _send(self, name, *args): + return self._vsend(name, args) + + def _send_noreply(self, name, *args): + return self._vsend(name, args, 0) + + def _vsend_noreply(self, name, args): + return self._vsend(name, args, 0) + + def _vsend(self, name, args, wantreply = 1): + id = self._nextid + self._nextid = id+1 + if not wantreply: id = -id + request = (name, args, id) + if self._verbose > 1: print "sending request: %s" % repr(request) + wp = pickle.Pickler(self._wf) + wp.dump(request) + return id + + def _recv(self, id): + exception, value, rid = self._vrecv(id) + if rid != id: + raise RuntimeError, "request/reply id mismatch: %d/%d" % (id, rid) + if exception is None: + return value + x = exception + if hasattr(__builtin__, exception): + x = getattr(__builtin__, exception) + elif exception in ('posix.error', 'mac.error'): + x = os.error + if x == exception: + exception = x + raise exception, value + + def _vrecv(self, id): + self._flush() + if self._replies.has_key(id): + if self._verbose > 1: print "retrieving previous reply, id = %d" % id + reply = self._replies[id] + del self._replies[id] + return reply + aid = abs(id) + while 1: + if self._verbose > 1: print "waiting for reply, id = %d" % id + rp = pickle.Unpickler(self._rf) + reply = rp.load() + del rp + if self._verbose > 1: print "got reply: %s" % repr(reply) + rid = reply[2] + arid = abs(rid) + if arid == aid: + if self._verbose > 1: print "got it" + return reply + self._replies[rid] = reply + if arid > aid: + if self._verbose > 1: print "got higher id, assume all ok" + return (None, None, id) + + def _flush(self): + self._wf.flush() + + +from security import Security + + +class SecureClient(Client, Security): + + def __init__(self, *args): + import string + apply(self._pre_init, args) + Security.__init__(self) + self._wf.flush() + line = self._rf.readline() + challenge = string.atoi(string.strip(line)) + response = self._encode_challenge(challenge) + line = repr(long(response)) + if line[-1] in 'Ll': line = line[:-1] + self._wf.write(line + '\n') + self._wf.flush() + self._post_init() + +class _stub: + + """Helper class for Client -- each instance serves as a method of the client.""" + + def __init__(self, client, name): + self._client = client + self._name = name + + def __call__(self, *args): + return self._client._vcall(self._name, args) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmdfw.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmdfw.py new file mode 100644 index 0000000000..96cc257db1 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmdfw.py @@ -0,0 +1,144 @@ +"Framework for command line interfaces like CVS. See class CmdFrameWork." + + +class CommandFrameWork: + + """Framework class for command line interfaces like CVS. + + The general command line structure is + + command [flags] subcommand [subflags] [argument] ... + + There's a class variable GlobalFlags which specifies the + global flags options. Subcommands are defined by defining + methods named do_. Flags for the subcommand are + defined by defining class or instance variables named + flags_. If there's no command, method default() + is called. The __doc__ strings for the do_ methods are used + for the usage message, printed after the general usage message + which is the class variable UsageMessage. The class variable + PostUsageMessage is printed after all the do_ methods' __doc__ + strings. The method's return value can be a suggested exit + status. [XXX Need to rewrite this to clarify it.] + + Common usage is to derive a class, instantiate it, and then call its + run() method; by default this takes its arguments from sys.argv[1:]. + """ + + UsageMessage = \ + "usage: (name)s [flags] subcommand [subflags] [argument] ..." + + PostUsageMessage = None + + GlobalFlags = '' + + def __init__(self): + """Constructor, present for completeness.""" + pass + + def run(self, args = None): + """Process flags, subcommand and options, then run it.""" + import getopt, sys + if args is None: args = sys.argv[1:] + try: + opts, args = getopt.getopt(args, self.GlobalFlags) + except getopt.error, msg: + return self.usage(msg) + self.options(opts) + if not args: + self.ready() + return self.default() + else: + cmd = args[0] + mname = 'do_' + cmd + fname = 'flags_' + cmd + try: + method = getattr(self, mname) + except AttributeError: + return self.usage("command %r unknown" % (cmd,)) + try: + flags = getattr(self, fname) + except AttributeError: + flags = '' + try: + opts, args = getopt.getopt(args[1:], flags) + except getopt.error, msg: + return self.usage( + "subcommand %s: " % cmd + str(msg)) + self.ready() + return method(opts, args) + + def options(self, opts): + """Process the options retrieved by getopt. + Override this if you have any options.""" + if opts: + print "-"*40 + print "Options:" + for o, a in opts: + print 'option', o, 'value', repr(a) + print "-"*40 + + def ready(self): + """Called just before calling the subcommand.""" + pass + + def usage(self, msg = None): + """Print usage message. Return suitable exit code (2).""" + if msg: print msg + print self.UsageMessage % {'name': self.__class__.__name__} + docstrings = {} + c = self.__class__ + while 1: + for name in dir(c): + if name[:3] == 'do_': + if docstrings.has_key(name): + continue + try: + doc = getattr(c, name).__doc__ + except: + doc = None + if doc: + docstrings[name] = doc + if not c.__bases__: + break + c = c.__bases__[0] + if docstrings: + print "where subcommand can be:" + names = docstrings.keys() + names.sort() + for name in names: + print docstrings[name] + if self.PostUsageMessage: + print self.PostUsageMessage + return 2 + + def default(self): + """Default method, called when no subcommand is given. + You should always override this.""" + print "Nobody expects the Spanish Inquisition!" + + +def test(): + """Test script -- called when this module is run as a script.""" + import sys + class Hello(CommandFrameWork): + def do_hello(self, opts, args): + "hello -- print 'hello world', needs no arguments" + print "Hello, world" + x = Hello() + tests = [ + [], + ['hello'], + ['spam'], + ['-x'], + ['hello', '-x'], + None, + ] + for t in tests: + print '-'*10, t, '-'*10 + sts = x.run(t) + print "Exit status:", repr(sts) + + +if __name__ == '__main__': + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmptree.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmptree.py new file mode 100644 index 0000000000..2f8a8a83b9 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cmptree.py @@ -0,0 +1,208 @@ +"""Compare local and remote dictionaries and transfer differing files -- like rdist.""" + +import sys +from repr import repr +import FSProxy +import time +import os + +def main(): + pwd = os.getcwd() + s = raw_input("chdir [%s] " % pwd) + if s: + os.chdir(s) + pwd = os.getcwd() + host = ask("host", 'voorn.cwi.nl') + port = 4127 + verbose = 1 + mode = '' + print """\ +Mode should be a string of characters, indicating what to do with differences. +r - read different files to local file system +w - write different files to remote file system +c - create new files, either remote or local +d - delete disappearing files, either remote or local +""" + s = raw_input("mode [%s] " % mode) + if s: mode = s + address = (host, port) + t1 = time.time() + local = FSProxy.FSProxyLocal() + remote = FSProxy.FSProxyClient(address, verbose) + compare(local, remote, mode) + remote._close() + local._close() + t2 = time.time() + dt = t2-t1 + mins, secs = divmod(dt, 60) + print mins, "minutes and", round(secs), "seconds" + raw_input("[Return to exit] ") + +def ask(prompt, default): + s = raw_input("%s [%s] " % (prompt, default)) + return s or default + +def askint(prompt, default): + s = raw_input("%s [%s] " % (prompt, str(default))) + if s: return string.atoi(s) + return default + +def compare(local, remote, mode): + print + print "PWD =", repr(os.getcwd()) + sums_id = remote._send('sumlist') + subdirs_id = remote._send('listsubdirs') + remote._flush() + print "calculating local sums ..." + lsumdict = {} + for name, info in local.sumlist(): + lsumdict[name] = info + print "getting remote sums ..." + sums = remote._recv(sums_id) + print "got", len(sums) + rsumdict = {} + for name, rsum in sums: + rsumdict[name] = rsum + if not lsumdict.has_key(name): + print repr(name), "only remote" + if 'r' in mode and 'c' in mode: + recvfile(local, remote, name) + else: + lsum = lsumdict[name] + if lsum != rsum: + print repr(name), + rmtime = remote.mtime(name) + lmtime = local.mtime(name) + if rmtime > lmtime: + print "remote newer", + if 'r' in mode: + recvfile(local, remote, name) + elif lmtime > rmtime: + print "local newer", + if 'w' in mode: + sendfile(local, remote, name) + else: + print "same mtime but different sum?!?!", + print + for name in lsumdict.keys(): + if not rsumdict.keys(): + print repr(name), "only locally", + fl() + if 'w' in mode and 'c' in mode: + sendfile(local, remote, name) + elif 'r' in mode and 'd' in mode: + os.unlink(name) + print "removed." + print + print "gettin subdirs ..." + subdirs = remote._recv(subdirs_id) + common = [] + for name in subdirs: + if local.isdir(name): + print "Common subdirectory", repr(name) + common.append(name) + else: + print "Remote subdirectory", repr(name), "not found locally" + if 'r' in mode and 'c' in mode: + pr = "Create local subdirectory %s? [y] " % \ + repr(name) + if 'y' in mode: + ok = 'y' + else: + ok = ask(pr, "y") + if ok[:1] in ('y', 'Y'): + local.mkdir(name) + print "Subdirectory %s made" % \ + repr(name) + common.append(name) + lsubdirs = local.listsubdirs() + for name in lsubdirs: + if name not in subdirs: + print "Local subdirectory", repr(name), "not found remotely" + for name in common: + print "Entering subdirectory", repr(name) + local.cd(name) + remote.cd(name) + compare(local, remote, mode) + remote.back() + local.back() + +def sendfile(local, remote, name): + try: + remote.create(name) + except (IOError, os.error), msg: + print "cannot create:", msg + return + + print "sending ...", + fl() + + data = open(name).read() + + t1 = time.time() + + remote._send_noreply('write', name, data) + remote._flush() + + t2 = time.time() + + dt = t2-t1 + print len(data), "bytes in", round(dt), "seconds", + if dt: + print "i.e.", round(len(data)/dt), "bytes/sec", + print + +def recvfile(local, remote, name): + ok = 0 + try: + rv = recvfile_real(local, remote, name) + ok = 1 + return rv + finally: + if not ok: + print "*** recvfile of %r failed, deleting" % (name,) + local.delete(name) + +def recvfile_real(local, remote, name): + try: + local.create(name) + except (IOError, os.error), msg: + print "cannot create:", msg + return + + print "receiving ...", + fl() + + f = open(name, 'w') + t1 = time.time() + + length = 4*1024 + offset = 0 + id = remote._send('read', name, offset, length) + remote._flush() + while 1: + newoffset = offset + length + newid = remote._send('read', name, newoffset, length) + data = remote._recv(id) + id = newid + if not data: break + f.seek(offset) + f.write(data) + offset = newoffset + size = f.tell() + + t2 = time.time() + f.close() + + dt = t2-t1 + print size, "bytes in", round(dt), "seconds", + if dt: + print "i.e.", size//dt, "bytes/sec", + print + remote._recv(id) # ignored + +def fl(): + sys.stdout.flush() + +if __name__ == '__main__': + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslib.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslib.py new file mode 100644 index 0000000000..41c5979baf --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslib.py @@ -0,0 +1,364 @@ +"""Utilities for CVS administration.""" + +import string +import os +import time +import md5 +import fnmatch + +if not hasattr(time, 'timezone'): + time.timezone = 0 + +class File: + + """Represent a file's status. + + Instance variables: + + file -- the filename (no slashes), None if uninitialized + lseen -- true if the data for the local file is up to date + eseen -- true if the data from the CVS/Entries entry is up to date + (this implies that the entry must be written back) + rseen -- true if the data for the remote file is up to date + proxy -- RCSProxy instance used to contact the server, or None + + Note that lseen and rseen don't necessary mean that a local + or remote file *exists* -- they indicate that we've checked it. + However, eseen means that this instance corresponds to an + entry in the CVS/Entries file. + + If lseen is true: + + lsum -- checksum of the local file, None if no local file + lctime -- ctime of the local file, None if no local file + lmtime -- mtime of the local file, None if no local file + + If eseen is true: + + erev -- revision, None if this is a no revision (not '0') + enew -- true if this is an uncommitted added file + edeleted -- true if this is an uncommitted removed file + ectime -- ctime of last local file corresponding to erev + emtime -- mtime of last local file corresponding to erev + extra -- 5th string from CVS/Entries file + + If rseen is true: + + rrev -- revision of head, None if non-existent + rsum -- checksum of that revision, Non if non-existent + + If eseen and rseen are both true: + + esum -- checksum of revision erev, None if no revision + + Note + """ + + def __init__(self, file = None): + if file and '/' in file: + raise ValueError, "no slash allowed in file" + self.file = file + self.lseen = self.eseen = self.rseen = 0 + self.proxy = None + + def __cmp__(self, other): + return cmp(self.file, other.file) + + def getlocal(self): + try: + self.lmtime, self.lctime = os.stat(self.file)[-2:] + except os.error: + self.lmtime = self.lctime = self.lsum = None + else: + self.lsum = md5.new(open(self.file).read()).digest() + self.lseen = 1 + + def getentry(self, line): + words = string.splitfields(line, '/') + if self.file and words[1] != self.file: + raise ValueError, "file name mismatch" + self.file = words[1] + self.erev = words[2] + self.edeleted = 0 + self.enew = 0 + self.ectime = self.emtime = None + if self.erev[:1] == '-': + self.edeleted = 1 + self.erev = self.erev[1:] + if self.erev == '0': + self.erev = None + self.enew = 1 + else: + dates = words[3] + self.ectime = unctime(dates[:24]) + self.emtime = unctime(dates[25:]) + self.extra = words[4] + if self.rseen: + self.getesum() + self.eseen = 1 + + def getremote(self, proxy = None): + if proxy: + self.proxy = proxy + try: + self.rrev = self.proxy.head(self.file) + except (os.error, IOError): + self.rrev = None + if self.rrev: + self.rsum = self.proxy.sum(self.file) + else: + self.rsum = None + if self.eseen: + self.getesum() + self.rseen = 1 + + def getesum(self): + if self.erev == self.rrev: + self.esum = self.rsum + elif self.erev: + name = (self.file, self.erev) + self.esum = self.proxy.sum(name) + else: + self.esum = None + + def putentry(self): + """Return a line suitable for inclusion in CVS/Entries. + + The returned line is terminated by a newline. + If no entry should be written for this file, + return "". + """ + if not self.eseen: + return "" + + rev = self.erev or '0' + if self.edeleted: + rev = '-' + rev + if self.enew: + dates = 'Initial ' + self.file + else: + dates = gmctime(self.ectime) + ' ' + \ + gmctime(self.emtime) + return "/%s/%s/%s/%s/\n" % ( + self.file, + rev, + dates, + self.extra) + + def report(self): + print '-'*50 + def r(key, repr=repr, self=self): + try: + value = repr(getattr(self, key)) + except AttributeError: + value = "?" + print "%-15s:" % key, value + r("file") + if self.lseen: + r("lsum", hexify) + r("lctime", gmctime) + r("lmtime", gmctime) + if self.eseen: + r("erev") + r("enew") + r("edeleted") + r("ectime", gmctime) + r("emtime", gmctime) + if self.rseen: + r("rrev") + r("rsum", hexify) + if self.eseen: + r("esum", hexify) + + +class CVS: + + """Represent the contents of a CVS admin file (and more). + + Class variables: + + FileClass -- the class to be instantiated for entries + (this should be derived from class File above) + IgnoreList -- shell patterns for local files to be ignored + + Instance variables: + + entries -- a dictionary containing File instances keyed by + their file name + proxy -- an RCSProxy instance, or None + """ + + FileClass = File + + IgnoreList = ['.*', '@*', ',*', '*~', '*.o', '*.a', '*.so', '*.pyc'] + + def __init__(self): + self.entries = {} + self.proxy = None + + def setproxy(self, proxy): + if proxy is self.proxy: + return + self.proxy = proxy + for e in self.entries.values(): + e.rseen = 0 + + def getentries(self): + """Read the contents of CVS/Entries""" + self.entries = {} + f = self.cvsopen("Entries") + while 1: + line = f.readline() + if not line: break + e = self.FileClass() + e.getentry(line) + self.entries[e.file] = e + f.close() + + def putentries(self): + """Write CVS/Entries back""" + f = self.cvsopen("Entries", 'w') + for e in self.values(): + f.write(e.putentry()) + f.close() + + def getlocalfiles(self): + list = self.entries.keys() + addlist = os.listdir(os.curdir) + for name in addlist: + if name in list: + continue + if not self.ignored(name): + list.append(name) + list.sort() + for file in list: + try: + e = self.entries[file] + except KeyError: + e = self.entries[file] = self.FileClass(file) + e.getlocal() + + def getremotefiles(self, proxy = None): + if proxy: + self.proxy = proxy + if not self.proxy: + raise RuntimeError, "no RCS proxy" + addlist = self.proxy.listfiles() + for file in addlist: + try: + e = self.entries[file] + except KeyError: + e = self.entries[file] = self.FileClass(file) + e.getremote(self.proxy) + + def report(self): + for e in self.values(): + e.report() + print '-'*50 + + def keys(self): + keys = self.entries.keys() + keys.sort() + return keys + + def values(self): + def value(key, self=self): + return self.entries[key] + return map(value, self.keys()) + + def items(self): + def item(key, self=self): + return (key, self.entries[key]) + return map(item, self.keys()) + + def cvsexists(self, file): + file = os.path.join("CVS", file) + return os.path.exists(file) + + def cvsopen(self, file, mode = 'r'): + file = os.path.join("CVS", file) + if 'r' not in mode: + self.backup(file) + return open(file, mode) + + def backup(self, file): + if os.path.isfile(file): + bfile = file + '~' + try: os.unlink(bfile) + except os.error: pass + os.rename(file, bfile) + + def ignored(self, file): + if os.path.isdir(file): return True + for pat in self.IgnoreList: + if fnmatch.fnmatch(file, pat): return True + return False + + +# hexify and unhexify are useful to print MD5 checksums in hex format + +hexify_format = '%02x' * 16 +def hexify(sum): + "Return a hex representation of a 16-byte string (e.g. an MD5 digest)" + if sum is None: + return "None" + return hexify_format % tuple(map(ord, sum)) + +def unhexify(hexsum): + "Return the original from a hexified string" + if hexsum == "None": + return None + sum = '' + for i in range(0, len(hexsum), 2): + sum = sum + chr(string.atoi(hexsum[i:i+2], 16)) + return sum + + +unctime_monthmap = {} +def unctime(date): + if date == "None": return None + if not unctime_monthmap: + months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + i = 0 + for m in months: + i = i+1 + unctime_monthmap[m] = i + words = string.split(date) # Day Mon DD HH:MM:SS YEAR + year = string.atoi(words[4]) + month = unctime_monthmap[words[1]] + day = string.atoi(words[2]) + [hh, mm, ss] = map(string.atoi, string.splitfields(words[3], ':')) + ss = ss - time.timezone + return time.mktime((year, month, day, hh, mm, ss, 0, 0, 0)) + +def gmctime(t): + if t is None: return "None" + return time.asctime(time.gmtime(t)) + +def test_unctime(): + now = int(time.time()) + t = time.gmtime(now) + at = time.asctime(t) + print 'GMT', now, at + print 'timezone', time.timezone + print 'local', time.ctime(now) + u = unctime(at) + print 'unctime()', u + gu = time.gmtime(u) + print '->', gu + print time.asctime(gu) + +def test(): + x = CVS() + x.getentries() + x.getlocalfiles() +## x.report() + import rcsclient + proxy = rcsclient.openrcsclient() + x.getremotefiles(proxy) + x.report() + + +if __name__ == "__main__": + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslock.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslock.py new file mode 100644 index 0000000000..95f5c58c05 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/cvslock.py @@ -0,0 +1,280 @@ +"""CVS locking algorithm. + +CVS locking strategy +==================== + +As reverse engineered from the CVS 1.3 sources (file lock.c): + +- Locking is done on a per repository basis (but a process can hold +write locks for multiple directories); all lock files are placed in +the repository and have names beginning with "#cvs.". + +- Before even attempting to lock, a file "#cvs.tfl." is created +(and removed again), to test that we can write the repository. [The +algorithm can still be fooled (1) if the repository's mode is changed +while attempting to lock; (2) if this file exists and is writable but +the directory is not.] + +- While creating the actual read/write lock files (which may exist for +a long time), a "meta-lock" is held. The meta-lock is a directory +named "#cvs.lock" in the repository. The meta-lock is also held while +a write lock is held. + +- To set a read lock: + + - acquire the meta-lock + - create the file "#cvs.rfl." + - release the meta-lock + +- To set a write lock: + + - acquire the meta-lock + - check that there are no files called "#cvs.rfl.*" + - if there are, release the meta-lock, sleep, try again + - create the file "#cvs.wfl." + +- To release a write lock: + + - remove the file "#cvs.wfl." + - rmdir the meta-lock + +- To release a read lock: + + - remove the file "#cvs.rfl." + + +Additional notes +---------------- + +- A process should read-lock at most one repository at a time. + +- A process may write-lock as many repositories as it wishes (to avoid +deadlocks, I presume it should always lock them top-down in the +directory hierarchy). + +- A process should make sure it removes all its lock files and +directories when it crashes. + +- Limitation: one user id should not be committing files into the same +repository at the same time. + + +Turn this into Python code +-------------------------- + +rl = ReadLock(repository, waittime) + +wl = WriteLock(repository, waittime) + +list = MultipleWriteLock([repository1, repository2, ...], waittime) + +""" + + +import os +import time +import stat +import pwd + + +# Default wait time +DELAY = 10 + + +# XXX This should be the same on all Unix versions +EEXIST = 17 + + +# Files used for locking (must match cvs.h in the CVS sources) +CVSLCK = "#cvs.lck" +CVSRFL = "#cvs.rfl." +CVSWFL = "#cvs.wfl." + + +class Error: + + def __init__(self, msg): + self.msg = msg + + def __repr__(self): + return repr(self.msg) + + def __str__(self): + return str(self.msg) + + +class Locked(Error): + pass + + +class Lock: + + def __init__(self, repository = ".", delay = DELAY): + self.repository = repository + self.delay = delay + self.lockdir = None + self.lockfile = None + pid = repr(os.getpid()) + self.cvslck = self.join(CVSLCK) + self.cvsrfl = self.join(CVSRFL + pid) + self.cvswfl = self.join(CVSWFL + pid) + + def __del__(self): + print "__del__" + self.unlock() + + def setlockdir(self): + while 1: + try: + self.lockdir = self.cvslck + os.mkdir(self.cvslck, 0777) + return + except os.error, msg: + self.lockdir = None + if msg[0] == EEXIST: + try: + st = os.stat(self.cvslck) + except os.error: + continue + self.sleep(st) + continue + raise Error("failed to lock %s: %s" % ( + self.repository, msg)) + + def unlock(self): + self.unlockfile() + self.unlockdir() + + def unlockfile(self): + if self.lockfile: + print "unlink", self.lockfile + try: + os.unlink(self.lockfile) + except os.error: + pass + self.lockfile = None + + def unlockdir(self): + if self.lockdir: + print "rmdir", self.lockdir + try: + os.rmdir(self.lockdir) + except os.error: + pass + self.lockdir = None + + def sleep(self, st): + sleep(st, self.repository, self.delay) + + def join(self, name): + return os.path.join(self.repository, name) + + +def sleep(st, repository, delay): + if delay <= 0: + raise Locked(st) + uid = st[stat.ST_UID] + try: + pwent = pwd.getpwuid(uid) + user = pwent[0] + except KeyError: + user = "uid %d" % uid + print "[%s]" % time.ctime(time.time())[11:19], + print "Waiting for %s's lock in" % user, repository + time.sleep(delay) + + +class ReadLock(Lock): + + def __init__(self, repository, delay = DELAY): + Lock.__init__(self, repository, delay) + ok = 0 + try: + self.setlockdir() + self.lockfile = self.cvsrfl + fp = open(self.lockfile, 'w') + fp.close() + ok = 1 + finally: + if not ok: + self.unlockfile() + self.unlockdir() + + +class WriteLock(Lock): + + def __init__(self, repository, delay = DELAY): + Lock.__init__(self, repository, delay) + self.setlockdir() + while 1: + uid = self.readers_exist() + if not uid: + break + self.unlockdir() + self.sleep(uid) + self.lockfile = self.cvswfl + fp = open(self.lockfile, 'w') + fp.close() + + def readers_exist(self): + n = len(CVSRFL) + for name in os.listdir(self.repository): + if name[:n] == CVSRFL: + try: + st = os.stat(self.join(name)) + except os.error: + continue + return st + return None + + +def MultipleWriteLock(repositories, delay = DELAY): + while 1: + locks = [] + for r in repositories: + try: + locks.append(WriteLock(r, 0)) + except Locked, instance: + del locks + break + else: + break + sleep(instance.msg, r, delay) + return list + + +def test(): + import sys + if sys.argv[1:]: + repository = sys.argv[1] + else: + repository = "." + rl = None + wl = None + try: + print "attempting write lock ..." + wl = WriteLock(repository) + print "got it." + wl.unlock() + print "attempting read lock ..." + rl = ReadLock(repository) + print "got it." + rl.unlock() + finally: + print [1] + sys.exc_traceback = None + print [2] + if rl: + rl.unlock() + print [3] + if wl: + wl.unlock() + print [4] + rl = None + print [5] + wl = None + print [6] + + +if __name__ == '__main__': + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/mac.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/mac.py new file mode 100644 index 0000000000..43a904e480 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/mac.py @@ -0,0 +1,19 @@ +import sys +import string +import rcvs + +def main(): + while 1: + try: + line = raw_input('$ ') + except EOFError: + break + words = string.split(line) + if not words: + continue + if words[0] != 'rcvs': + words.insert(0, 'rcvs') + sys.argv = words + rcvs.main() + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/makechangelog.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/makechangelog.py new file mode 100644 index 0000000000..2f5519f473 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/makechangelog.py @@ -0,0 +1,109 @@ +#! /usr/bin/env python + +"""Turn a pile of RCS log output into ChangeLog file entries. + +""" + +import sys +import string +import re +import getopt +import time + +def main(): + args = sys.argv[1:] + opts, args = getopt.getopt(args, 'p:') + prefix = '' + for o, a in opts: + if p == '-p': prefix = a + + f = sys.stdin + allrevs = [] + while 1: + file = getnextfile(f) + if not file: break + revs = [] + while 1: + rev = getnextrev(f, file) + if not rev: + break + revs.append(rev) + if revs: + allrevs[len(allrevs):] = revs + allrevs.sort() + allrevs.reverse() + for rev in allrevs: + formatrev(rev, prefix) + +parsedateprog = re.compile( + '^date: ([0-9]+)/([0-9]+)/([0-9]+) ' + + '([0-9]+):([0-9]+):([0-9]+); author: ([^ ;]+)') + +authormap = { + 'guido': 'Guido van Rossum ', + 'jack': 'Jack Jansen ', + 'sjoerd': 'Sjoerd Mullender ', + } + +def formatrev(rev, prefix): + dateline, file, revline, log = rev + if parsedateprog.match(dateline) >= 0: + fields = parsedateprog.group(1, 2, 3, 4, 5, 6) + author = parsedateprog.group(7) + if authormap.has_key(author): author = authormap[author] + tfields = map(string.atoi, fields) + [0, 0, 0] + tfields[5] = tfields[5] - time.timezone + t = time.mktime(tuple(tfields)) + print time.ctime(t), '', author + words = string.split(log) + words[:0] = ['*', prefix + file + ':'] + maxcol = 72-8 + col = maxcol + for word in words: + if col > 0 and col + len(word) >= maxcol: + print + print '\t' + word, + col = -1 + else: + print word, + col = col + 1 + len(word) + print + print + +startprog = re.compile("^Working file: (.*)$") + +def getnextfile(f): + while 1: + line = f.readline() + if not line: return None + if startprog.match(line) >= 0: + file = startprog.group(1) + # Skip until first revision + while 1: + line = f.readline() + if not line: return None + if line[:10] == '='*10: return None + if line[:10] == '-'*10: break +## print "Skipped", line, + return file +## else: +## print "Ignored", line, + +def getnextrev(f, file): + # This is called when we are positioned just after a '---' separator + revline = f.readline() + dateline = f.readline() + log = '' + while 1: + line = f.readline() + if not line: break + if line[:10] == '='*10: + # Ignore the *last* log entry for each file since it + # is the revision since which we are logging. + return None + if line[:10] == '-'*10: break + log = log + line + return dateline, file, revline, log + +if __name__ == '__main__': + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsbump b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsbump new file mode 100644 index 0000000000..775de717e3 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsbump @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- python -*- +# +# guido's version, from rcsbump,v 1.2 1995/06/22 21:27:27 bwarsaw Exp +# +# Python script for bumping up an RCS major revision number. + +import sys +import re +import rcslib +import string + +WITHLOCK = 1 +majorrev_re = re.compile('^[0-9]+') + +dir = rcslib.RCS() + +if sys.argv[1:]: + files = sys.argv[1:] +else: + files = dir.listfiles() + +for file in files: + # get the major revnumber of the file + headbranch = dir.info(file)['head'] + majorrev_re.match(headbranch) + majorrev = string.atoi(majorrev_re.group(0)) + 1 + + if not dir.islocked(file): + dir.checkout(file, WITHLOCK) + + msg = "Bumping major revision number (to %d)" % majorrev + dir.checkin((file, "%s.0" % majorrev), msg, "-f") diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsclient.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsclient.py new file mode 100644 index 0000000000..dfa94368a6 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcsclient.py @@ -0,0 +1,71 @@ +"""Customize this file to change the default client etc. + +(In general, it is probably be better to make local operation the +default and to require something like an RCSSERVER environment +variable to enable remote operation.) + +""" + +import string +import os + +# These defaults don't belong here -- they should be taken from the +# environment or from a hidden file in the current directory + +HOST = 'voorn.cwi.nl' +PORT = 4127 +VERBOSE = 1 +LOCAL = 0 + +import client + + +class RCSProxyClient(client.SecureClient): + + def __init__(self, address, verbose = client.VERBOSE): + client.SecureClient.__init__(self, address, verbose) + + +def openrcsclient(opts = []): + "open an RCSProxy client based on a list of options returned by getopt" + import RCSProxy + host = HOST + port = PORT + verbose = VERBOSE + local = LOCAL + directory = None + for o, a in opts: + if o == '-h': + host = a + if ':' in host: + i = string.find(host, ':') + host, p = host[:i], host[i+1:] + if p: + port = string.atoi(p) + if o == '-p': + port = string.atoi(a) + if o == '-d': + directory = a + if o == '-v': + verbose = verbose + 1 + if o == '-q': + verbose = 0 + if o == '-L': + local = 1 + if local: + import RCSProxy + x = RCSProxy.RCSProxyLocal() + else: + address = (host, port) + x = RCSProxyClient(address, verbose) + if not directory: + try: + directory = open(os.path.join("CVS", "Repository")).readline() + except IOError: + pass + else: + if directory[-1] == '\n': + directory = directory[:-1] + if directory: + x.cd(directory) + return x diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcslib.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcslib.py new file mode 100644 index 0000000000..7d6ce9f3ff --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/rcslib.py @@ -0,0 +1,334 @@ +"""RCS interface module. + +Defines the class RCS, which represents a directory with rcs version +files and (possibly) corresponding work files. + +""" + + +import fnmatch +import os +import re +import string +import tempfile + + +class RCS: + + """RCS interface class (local filesystem version). + + An instance of this class represents a directory with rcs version + files and (possible) corresponding work files. + + Methods provide access to most rcs operations such as + checkin/checkout, access to the rcs metadata (revisions, logs, + branches etc.) as well as some filesystem operations such as + listing all rcs version files. + + XXX BUGS / PROBLEMS + + - The instance always represents the current directory so it's not + very useful to have more than one instance around simultaneously + + """ + + # Characters allowed in work file names + okchars = string.ascii_letters + string.digits + '-_=+' + + def __init__(self): + """Constructor.""" + pass + + def __del__(self): + """Destructor.""" + pass + + # --- Informational methods about a single file/revision --- + + def log(self, name_rev, otherflags = ''): + """Return the full log text for NAME_REV as a string. + + Optional OTHERFLAGS are passed to rlog. + + """ + f = self._open(name_rev, 'rlog ' + otherflags) + data = f.read() + status = self._closepipe(f) + if status: + data = data + "%s: %s" % status + elif data[-1] == '\n': + data = data[:-1] + return data + + def head(self, name_rev): + """Return the head revision for NAME_REV""" + dict = self.info(name_rev) + return dict['head'] + + def info(self, name_rev): + """Return a dictionary of info (from rlog -h) for NAME_REV + + The dictionary's keys are the keywords that rlog prints + (e.g. 'head' and its values are the corresponding data + (e.g. '1.3'). + + XXX symbolic names and locks are not returned + + """ + f = self._open(name_rev, 'rlog -h') + dict = {} + while 1: + line = f.readline() + if not line: break + if line[0] == '\t': + # XXX could be a lock or symbolic name + # Anything else? + continue + i = string.find(line, ':') + if i > 0: + key, value = line[:i], string.strip(line[i+1:]) + dict[key] = value + status = self._closepipe(f) + if status: + raise IOError, status + return dict + + # --- Methods that change files --- + + def lock(self, name_rev): + """Set an rcs lock on NAME_REV.""" + name, rev = self.checkfile(name_rev) + cmd = "rcs -l%s %s" % (rev, name) + return self._system(cmd) + + def unlock(self, name_rev): + """Clear an rcs lock on NAME_REV.""" + name, rev = self.checkfile(name_rev) + cmd = "rcs -u%s %s" % (rev, name) + return self._system(cmd) + + def checkout(self, name_rev, withlock=0, otherflags=""): + """Check out NAME_REV to its work file. + + If optional WITHLOCK is set, check out locked, else unlocked. + + The optional OTHERFLAGS is passed to co without + interpretation. + + Any output from co goes to directly to stdout. + + """ + name, rev = self.checkfile(name_rev) + if withlock: lockflag = "-l" + else: lockflag = "-u" + cmd = 'co %s%s %s %s' % (lockflag, rev, otherflags, name) + return self._system(cmd) + + def checkin(self, name_rev, message=None, otherflags=""): + """Check in NAME_REV from its work file. + + The optional MESSAGE argument becomes the checkin message + (default "" if None); or the file description if this is + a new file. + + The optional OTHERFLAGS argument is passed to ci without + interpretation. + + Any output from ci goes to directly to stdout. + + """ + name, rev = self._unmangle(name_rev) + new = not self.isvalid(name) + if not message: message = "" + if message and message[-1] != '\n': + message = message + '\n' + lockflag = "-u" + if new: + f = tempfile.NamedTemporaryFile() + f.write(message) + f.flush() + cmd = 'ci %s%s -t%s %s %s' % \ + (lockflag, rev, f.name, otherflags, name) + else: + message = re.sub(r'([\"$`])', r'\\\1', message) + cmd = 'ci %s%s -m"%s" %s %s' % \ + (lockflag, rev, message, otherflags, name) + return self._system(cmd) + + # --- Exported support methods --- + + def listfiles(self, pat = None): + """Return a list of all version files matching optional PATTERN.""" + files = os.listdir(os.curdir) + files = filter(self._isrcs, files) + if os.path.isdir('RCS'): + files2 = os.listdir('RCS') + files2 = filter(self._isrcs, files2) + files = files + files2 + files = map(self.realname, files) + return self._filter(files, pat) + + def isvalid(self, name): + """Test whether NAME has a version file associated.""" + namev = self.rcsname(name) + return (os.path.isfile(namev) or + os.path.isfile(os.path.join('RCS', namev))) + + def rcsname(self, name): + """Return the pathname of the version file for NAME. + + The argument can be a work file name or a version file name. + If the version file does not exist, the name of the version + file that would be created by "ci" is returned. + + """ + if self._isrcs(name): namev = name + else: namev = name + ',v' + if os.path.isfile(namev): return namev + namev = os.path.join('RCS', os.path.basename(namev)) + if os.path.isfile(namev): return namev + if os.path.isdir('RCS'): + return os.path.join('RCS', namev) + else: + return namev + + def realname(self, namev): + """Return the pathname of the work file for NAME. + + The argument can be a work file name or a version file name. + If the work file does not exist, the name of the work file + that would be created by "co" is returned. + + """ + if self._isrcs(namev): name = namev[:-2] + else: name = namev + if os.path.isfile(name): return name + name = os.path.basename(name) + return name + + def islocked(self, name_rev): + """Test whether FILE (which must have a version file) is locked. + + XXX This does not tell you which revision number is locked and + ignores any revision you may pass in (by virtue of using rlog + -L -R). + + """ + f = self._open(name_rev, 'rlog -L -R') + line = f.readline() + status = self._closepipe(f) + if status: + raise IOError, status + if not line: return None + if line[-1] == '\n': + line = line[:-1] + return self.realname(name_rev) == self.realname(line) + + def checkfile(self, name_rev): + """Normalize NAME_REV into a (NAME, REV) tuple. + + Raise an exception if there is no corresponding version file. + + """ + name, rev = self._unmangle(name_rev) + if not self.isvalid(name): + raise os.error, 'not an rcs file %r' % (name,) + return name, rev + + # --- Internal methods --- + + def _open(self, name_rev, cmd = 'co -p', rflag = '-r'): + """INTERNAL: open a read pipe to NAME_REV using optional COMMAND. + + Optional FLAG is used to indicate the revision (default -r). + + Default COMMAND is "co -p". + + Return a file object connected by a pipe to the command's + output. + + """ + name, rev = self.checkfile(name_rev) + namev = self.rcsname(name) + if rev: + cmd = cmd + ' ' + rflag + rev + return os.popen("%s %r" % (cmd, namev)) + + def _unmangle(self, name_rev): + """INTERNAL: Normalize NAME_REV argument to (NAME, REV) tuple. + + Raise an exception if NAME contains invalid characters. + + A NAME_REV argument is either NAME string (implying REV='') or + a tuple of the form (NAME, REV). + + """ + if type(name_rev) == type(''): + name_rev = name, rev = name_rev, '' + else: + name, rev = name_rev + for c in rev: + if c not in self.okchars: + raise ValueError, "bad char in rev" + return name_rev + + def _closepipe(self, f): + """INTERNAL: Close PIPE and print its exit status if nonzero.""" + sts = f.close() + if not sts: return None + detail, reason = divmod(sts, 256) + if reason == 0: return 'exit', detail # Exit status + signal = reason&0x7F + if signal == 0x7F: + code = 'stopped' + signal = detail + else: + code = 'killed' + if reason&0x80: + code = code + '(coredump)' + return code, signal + + def _system(self, cmd): + """INTERNAL: run COMMAND in a subshell. + + Standard input for the command is taken from /dev/null. + + Raise IOError when the exit status is not zero. + + Return whatever the calling method should return; normally + None. + + A derived class may override this method and redefine it to + capture stdout/stderr of the command and return it. + + """ + cmd = cmd + " > ") + sys.stderr.flush() + line = sys.stdin.readline() + if not line or line == '.\n': break + message = message + line + return message + +def remove(fn): + try: + os.unlink(fn) + except os.error: + pass + +commands = { + 'ci': ('', checkin), + 'put': ('', checkin), + 'co': ('', checkout), + 'get': ('', checkout), + 'info': ('', info), + 'head': ('', head), + 'list': ('', list), + 'lock': ('', lock), + 'unlock': ('', unlock), + 'log': ('bhLRtd:l:r:s:w:V:', log), + 'diff': ('c', diff), + } + +if __name__ == '__main__': + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/security.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/security.py new file mode 100644 index 0000000000..051ace8f3e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/security.py @@ -0,0 +1,33 @@ +class Security: + + def __init__(self): + import os + env = os.environ + if env.has_key('PYTHON_KEYFILE'): + keyfile = env['PYTHON_KEYFILE'] + else: + keyfile = '.python_keyfile' + if env.has_key('HOME'): + keyfile = os.path.join(env['HOME'], keyfile) + if not os.path.exists(keyfile): + import sys + for dir in sys.path: + kf = os.path.join(dir, keyfile) + if os.path.exists(kf): + keyfile = kf + break + try: + self._key = eval(open(keyfile).readline()) + except IOError: + raise IOError, "python keyfile %s: cannot open" % keyfile + + def _generate_challenge(self): + import random + return random.randint(100, 100000) + + def _compare_challenge_response(self, challenge, response): + return self._encode_challenge(challenge) == response + + def _encode_challenge(self, challenge): + p, m = self._key + return pow(long(challenge), p, m) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/server.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/server.py new file mode 100644 index 0000000000..c7a4491eb3 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/server.py @@ -0,0 +1,145 @@ +"""RPC Server module.""" + +import sys +import socket +import pickle +from fnmatch import fnmatch +from repr import repr + + +# Default verbosity (0 = silent, 1 = print connections, 2 = print requests too) +VERBOSE = 1 + + +class Server: + + """RPC Server class. Derive a class to implement a particular service.""" + + def __init__(self, address, verbose = VERBOSE): + if type(address) == type(0): + address = ('', address) + self._address = address + self._verbose = verbose + self._socket = None + self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self._socket.bind(address) + self._socket.listen(1) + self._listening = 1 + + def _setverbose(self, verbose): + self._verbose = verbose + + def __del__(self): + self._close() + + def _close(self): + self._listening = 0 + if self._socket: + self._socket.close() + self._socket = None + + def _serverloop(self): + while self._listening: + self._serve() + + def _serve(self): + if self._verbose: print "Wait for connection ..." + conn, address = self._socket.accept() + if self._verbose: print "Accepted connection from %s" % repr(address) + if not self._verify(conn, address): + print "*** Connection from %s refused" % repr(address) + conn.close() + return + rf = conn.makefile('r') + wf = conn.makefile('w') + ok = 1 + while ok: + wf.flush() + if self._verbose > 1: print "Wait for next request ..." + ok = self._dorequest(rf, wf) + + _valid = ['192.16.201.*', '192.16.197.*', '132.151.1.*', '129.6.64.*'] + + def _verify(self, conn, address): + host, port = address + for pat in self._valid: + if fnmatch(host, pat): return 1 + return 0 + + def _dorequest(self, rf, wf): + rp = pickle.Unpickler(rf) + try: + request = rp.load() + except EOFError: + return 0 + if self._verbose > 1: print "Got request: %s" % repr(request) + try: + methodname, args, id = request + if '.' in methodname: + reply = (None, self._special(methodname, args), id) + elif methodname[0] == '_': + raise NameError, "illegal method name %s" % repr(methodname) + else: + method = getattr(self, methodname) + reply = (None, apply(method, args), id) + except: + reply = (sys.exc_type, sys.exc_value, id) + if id < 0 and reply[:2] == (None, None): + if self._verbose > 1: print "Suppress reply" + return 1 + if self._verbose > 1: print "Send reply: %s" % repr(reply) + wp = pickle.Pickler(wf) + wp.dump(reply) + return 1 + + def _special(self, methodname, args): + if methodname == '.methods': + if not hasattr(self, '_methods'): + self._methods = tuple(self._listmethods()) + return self._methods + raise NameError, "unrecognized special method name %s" % repr(methodname) + + def _listmethods(self, cl=None): + if not cl: cl = self.__class__ + names = cl.__dict__.keys() + names = filter(lambda x: x[0] != '_', names) + names.sort() + for base in cl.__bases__: + basenames = self._listmethods(base) + basenames = filter(lambda x, names=names: x not in names, basenames) + names[len(names):] = basenames + return names + + +from security import Security + + +class SecureServer(Server, Security): + + def __init__(self, *args): + apply(Server.__init__, (self,) + args) + Security.__init__(self) + + def _verify(self, conn, address): + import string + challenge = self._generate_challenge() + conn.send("%d\n" % challenge) + response = "" + while "\n" not in response and len(response) < 100: + data = conn.recv(100) + if not data: + break + response = response + data + try: + response = string.atol(string.strip(response)) + except string.atol_error: + if self._verbose > 0: + print "Invalid response syntax", repr(response) + return 0 + if not self._compare_challenge_response(challenge, response): + if self._verbose > 0: + print "Invalid response value", repr(response) + return 0 + if self._verbose > 1: + print "Response matches challenge. Go ahead!" + return 1 diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py new file mode 100644 index 0000000000..3c82282461 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py @@ -0,0 +1,24 @@ +import time +import FSProxy + +def main(): + t1 = time.time() + #proxy = FSProxy.FSProxyClient(('voorn.cwi.nl', 4127)) + proxy = FSProxy.FSProxyLocal() + sumtree(proxy) + proxy._close() + t2 = time.time() + print t2-t1, "seconds" + raw_input("[Return to exit] ") + +def sumtree(proxy): + print "PWD =", proxy.pwd() + files = proxy.listfiles() + proxy.infolist(files) + subdirs = proxy.listsubdirs() + for name in subdirs: + proxy.cd(name) + sumtree(proxy) + proxy.back() + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/README new file mode 100644 index 0000000000..6550e67c59 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/README @@ -0,0 +1,22 @@ +This directory contains a collection of executable Python scripts. + +See also the Tools/scripts directory! + +beer.py Print the classic 'bottles of beer' list +eqfix.py Fix .py files to use the correct equality test operator +fact.py Factorize numbers +find-uname.py Search for Unicode characters using regexps +from.py Summarize mailbox +lpwatch.py Watch BSD line printer queues +makedir.py Like mkdir -p +markov.py Markov chain simulation of words or characters +mboxconvert.py Convert MH or MMDF mailboxes to unix mailbox format +morse.py Produce morse code (audible or on AIFF file) +newslist.py List all newsgroups on a NNTP server as HTML pages +pi.py Print all digits of pi -- given enough time and memory +pp.py Emulate some Perl command line options +primes.py Print prime numbers +queens.py Dijkstra's solution to Wirth's "N Queens problem" +script.py Equivalent to BSD script(1) -- by Steen Lumholt +unbirthday.py Print unbirthday count +update.py Update a bunch of files according to a script. diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/beer.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/beer.py new file mode 100644 index 0000000000..f1ff58b50e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/beer.py @@ -0,0 +1,20 @@ +#! /usr/bin/env python + +# By GvR, demystified after a version by Fredrik Lundh. + +import sys + +n = 100 +if sys.argv[1:]: + n = int(sys.argv[1]) + +def bottle(n): + if n == 0: return "no more bottles of beer" + if n == 1: return "one bottle of beer" + return str(n) + " bottles of beer" + +for i in range(n, 0, -1): + print bottle(i), "on the wall," + print bottle(i) + "." + print "Take one down, pass it around," + print bottle(i-1), "on the wall." diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/eqfix.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/eqfix.py new file mode 100644 index 0000000000..fc903c57cb --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/eqfix.py @@ -0,0 +1,198 @@ +#! /usr/bin/env python + +# Fix Python source files to use the new equality test operator, i.e., +# if x = y: ... +# is changed to +# if x == y: ... +# The script correctly tokenizes the Python program to reliably +# distinguish between assignments and equality tests. +# +# Command line arguments are files or directories to be processed. +# Directories are searched recursively for files whose name looks +# like a python module. +# Symbolic links are always ignored (except as explicit directory +# arguments). Of course, the original file is kept as a back-up +# (with a "~" attached to its name). +# It complains about binaries (files containing null bytes) +# and about files that are ostensibly not Python files: if the first +# line starts with '#!' and does not contain the string 'python'. +# +# Changes made are reported to stdout in a diff-like format. +# +# Undoubtedly you can do this using find and sed or perl, but this is +# a nice example of Python code that recurses down a directory tree +# and uses regular expressions. Also note several subtleties like +# preserving the file's mode and avoiding to even write a temp file +# when no changes are needed for a file. +# +# NB: by changing only the function fixline() you can turn this +# into a program for a different change to Python programs... + +import sys +import re +import os +from stat import * +import string + +err = sys.stderr.write +dbg = err +rep = sys.stdout.write + +def main(): + bad = 0 + if not sys.argv[1:]: # No arguments + err('usage: ' + sys.argv[0] + ' file-or-directory ...\n') + sys.exit(2) + for arg in sys.argv[1:]: + if os.path.isdir(arg): + if recursedown(arg): bad = 1 + elif os.path.islink(arg): + err(arg + ': will not process symbolic links\n') + bad = 1 + else: + if fix(arg): bad = 1 + sys.exit(bad) + +ispythonprog = re.compile('^[a-zA-Z0-9_]+\.py$') +def ispython(name): + return ispythonprog.match(name) >= 0 + +def recursedown(dirname): + dbg('recursedown(%r)\n' % (dirname,)) + bad = 0 + try: + names = os.listdir(dirname) + except os.error, msg: + err('%s: cannot list directory: %r\n' % (dirname, msg)) + return 1 + names.sort() + subdirs = [] + for name in names: + if name in (os.curdir, os.pardir): continue + fullname = os.path.join(dirname, name) + if os.path.islink(fullname): pass + elif os.path.isdir(fullname): + subdirs.append(fullname) + elif ispython(name): + if fix(fullname): bad = 1 + for fullname in subdirs: + if recursedown(fullname): bad = 1 + return bad + +def fix(filename): +## dbg('fix(%r)\n' % (dirname,)) + try: + f = open(filename, 'r') + except IOError, msg: + err('%s: cannot open: %r\n' % (filename, msg)) + return 1 + head, tail = os.path.split(filename) + tempname = os.path.join(head, '@' + tail) + g = None + # If we find a match, we rewind the file and start over but + # now copy everything to a temp file. + lineno = 0 + while 1: + line = f.readline() + if not line: break + lineno = lineno + 1 + if g is None and '\0' in line: + # Check for binary files + err(filename + ': contains null bytes; not fixed\n') + f.close() + return 1 + if lineno == 1 and g is None and line[:2] == '#!': + # Check for non-Python scripts + words = string.split(line[2:]) + if words and re.search('[pP]ython', words[0]) < 0: + msg = filename + ': ' + words[0] + msg = msg + ' script; not fixed\n' + err(msg) + f.close() + return 1 + while line[-2:] == '\\\n': + nextline = f.readline() + if not nextline: break + line = line + nextline + lineno = lineno + 1 + newline = fixline(line) + if newline != line: + if g is None: + try: + g = open(tempname, 'w') + except IOError, msg: + f.close() + err('%s: cannot create: %r\n' % (tempname, msg)) + return 1 + f.seek(0) + lineno = 0 + rep(filename + ':\n') + continue # restart from the beginning + rep(repr(lineno) + '\n') + rep('< ' + line) + rep('> ' + newline) + if g is not None: + g.write(newline) + + # End of file + f.close() + if not g: return 0 # No changes + + # Finishing touch -- move files + + # First copy the file's mode to the temp file + try: + statbuf = os.stat(filename) + os.chmod(tempname, statbuf[ST_MODE] & 07777) + except os.error, msg: + err('%s: warning: chmod failed (%r)\n' % (tempname, msg)) + # Then make a backup of the original file as filename~ + try: + os.rename(filename, filename + '~') + except os.error, msg: + err('%s: warning: backup failed (%r)\n' % (filename, msg)) + # Now move the temp file to the original file + try: + os.rename(tempname, filename) + except os.error, msg: + err('%s: rename failed (%r)\n' % (filename, msg)) + return 1 + # Return succes + return 0 + + +from tokenize import tokenprog + +match = {'if':':', 'elif':':', 'while':':', 'return':'\n', \ + '(':')', '[':']', '{':'}', '`':'`'} + +def fixline(line): + # Quick check for easy case + if '=' not in line: return line + + i, n = 0, len(line) + stack = [] + while i < n: + j = tokenprog.match(line, i) + if j < 0: + # A bad token; forget about the rest of this line + print '(Syntax error:)' + print line, + return line + a, b = tokenprog.regs[3] # Location of the token proper + token = line[a:b] + i = i+j + if stack and token == stack[-1]: + del stack[-1] + elif match.has_key(token): + stack.append(match[token]) + elif token == '=' and stack: + line = line[:a] + '==' + line[b:] + i, n = a + len('=='), len(line) + elif token == '==' and not stack: + print '(Warning: \'==\' at top level:)' + print line, + return line + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/fact.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/fact.py new file mode 100644 index 0000000000..2068c85bdc --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/fact.py @@ -0,0 +1,49 @@ +#! /usr/bin/env python + +# Factorize numbers. +# The algorithm is not efficient, but easy to understand. +# If there are large factors, it will take forever to find them, +# because we try all odd numbers between 3 and sqrt(n)... + +import sys +from math import sqrt + +def fact(n): + if n < 1: + raise ValueError('fact() argument should be >= 1') + if n == 1: + return [] # special case + res = [] + # Treat even factors special, so we can use i += 2 later + while n % 2 == 0: + res.append(2) + n //= 2 + # Try odd numbers up to sqrt(n) + limit = sqrt(n+1) + i = 3 + while i <= limit: + if n % i == 0: + res.append(i) + n //= i + limit = sqrt(n+1) + else: + i += 2 + if n != 1: + res.append(n) + return res + +def main(): + if len(sys.argv) > 1: + source = sys.argv[1:] + else: + source = iter(raw_input, '') + for arg in source: + try: + n = int(arg) + except ValueError: + print arg, 'is not an integer' + else: + print n, fact(n) + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/find-uname.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/find-uname.py new file mode 100644 index 0000000000..1213643694 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/find-uname.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +""" +For each argument on the command line, look for it in the set of all Unicode +names. Arguments are treated as case-insensitive regular expressions, e.g.: + + % find-uname 'small letter a$' 'horizontal line' + *** small letter a$ matches *** + LATIN SMALL LETTER A (97) + COMBINING LATIN SMALL LETTER A (867) + CYRILLIC SMALL LETTER A (1072) + PARENTHESIZED LATIN SMALL LETTER A (9372) + CIRCLED LATIN SMALL LETTER A (9424) + FULLWIDTH LATIN SMALL LETTER A (65345) + *** horizontal line matches *** + HORIZONTAL LINE EXTENSION (9135) +""" + +import unicodedata +import sys +import re + +def main(args): + unicode_names = [] + for ix in range(sys.maxunicode+1): + try: + unicode_names.append((ix, unicodedata.name(unichr(ix)))) + except ValueError: # no name for the character + pass + for arg in args: + pat = re.compile(arg, re.I) + matches = [(y,x) for (x,y) in unicode_names + if pat.search(y) is not None] + if matches: + print "***", arg, "matches", "***" + for match in matches: + print "%s (%d)" % match + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/from.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/from.py new file mode 100644 index 0000000000..c7fcb9f0ea --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/from.py @@ -0,0 +1,35 @@ +#! /usr/bin/env python + +# Print From and Subject of messages in $MAIL. +# Extension to multiple mailboxes and other bells & whistles are left +# as exercises for the reader. + +import sys, os + +# Open mailbox file. Exits with exception when this fails. + +try: + mailbox = os.environ['MAIL'] +except (AttributeError, KeyError): + sys.stderr.write('No environment variable $MAIL\n') + sys.exit(2) + +try: + mail = open(mailbox) +except IOError: + sys.exit('Cannot open mailbox file: ' + mailbox) + +while 1: + line = mail.readline() + if not line: + break # EOF + if line.startswith('From '): + # Start of message found + print line[:-1], + while 1: + line = mail.readline() + if not line or line == '\n': + break + if line.startswith('Subject: '): + print repr(line[9:-1]), + print diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/lpwatch.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/lpwatch.py new file mode 100644 index 0000000000..61e937fd2a --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/lpwatch.py @@ -0,0 +1,102 @@ +#! /usr/bin/env python + +# Watch line printer queue(s). +# Intended for BSD 4.3 lpq. + +import os +import sys +import time + +DEF_PRINTER = 'psc' +DEF_DELAY = 10 + +def main(): + delay = DEF_DELAY # XXX Use getopt() later + try: + thisuser = os.environ['LOGNAME'] + except: + thisuser = os.environ['USER'] + printers = sys.argv[1:] + if printers: + # Strip '-P' from printer names just in case + # the user specified it... + for i, name in enumerate(printers): + if name[:2] == '-P': + printers[i] = name[2:] + else: + if os.environ.has_key('PRINTER'): + printers = [os.environ['PRINTER']] + else: + printers = [DEF_PRINTER] + + clearhome = os.popen('clear', 'r').read() + + while True: + text = clearhome + for name in printers: + text += makestatus(name, thisuser) + '\n' + print text + time.sleep(delay) + +def makestatus(name, thisuser): + pipe = os.popen('lpq -P' + name + ' 2>&1', 'r') + lines = [] + users = {} + aheadbytes = 0 + aheadjobs = 0 + userseen = False + totalbytes = 0 + totaljobs = 0 + for line in pipe: + fields = line.split() + n = len(fields) + if len(fields) >= 6 and fields[n-1] == 'bytes': + rank, user, job = fields[0:3] + files = fields[3:-2] + bytes = int(fields[n-2]) + if user == thisuser: + userseen = True + elif not userseen: + aheadbytes += bytes + aheadjobs += 1 + totalbytes += bytes + totaljobs += 1 + ujobs, ubytes = users.get(user, (0, 0)) + ujobs += 1 + ubytes += bytes + users[user] = ujobs, ubytes + else: + if fields and fields[0] != 'Rank': + line = line.strip() + if line == 'no entries': + line = name + ': idle' + elif line[-22:] == ' is ready and printing': + line = name + lines.append(line) + + if totaljobs: + line = '%d K' % ((totalbytes+1023) // 1024) + if totaljobs != len(users): + line += ' (%d jobs)' % totaljobs + if len(users) == 1: + line += ' for %s' % (users.keys()[0],) + else: + line += ' for %d users' % len(users) + if userseen: + if aheadjobs == 0: + line += ' (%s first)' % thisuser + else: + line += ' (%d K before %s)' % ( + (aheadbytes+1023) // 1024, thisuser) + lines.append(line) + + sts = pipe.close() + if sts: + lines.append('lpq exit status %r' % (sts,)) + return ': '.join(lines) + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + pass diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/makedir.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/makedir.py new file mode 100644 index 0000000000..294502f3ad --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/makedir.py @@ -0,0 +1,21 @@ +#! /usr/bin/env python + +# Like mkdir, but also make intermediate directories if necessary. +# It is not an error if the given directory already exists (as long +# as it is a directory). +# Errors are not treated specially -- you just get a Python exception. + +import sys, os + +def main(): + for p in sys.argv[1:]: + makedirs(p) + +def makedirs(p): + if p and not os.path.isdir(p): + head, tail = os.path.split(p) + makedirs(head) + os.mkdir(p, 0777) + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/markov.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/markov.py new file mode 100644 index 0000000000..993c3f6ecd --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/markov.py @@ -0,0 +1,121 @@ +#! /usr/bin/env python + +class Markov: + def __init__(self, histsize, choice): + self.histsize = histsize + self.choice = choice + self.trans = {} + + def add(self, state, next): + self.trans.setdefault(state, []).append(next) + + def put(self, seq): + n = self.histsize + add = self.add + add(None, seq[:0]) + for i in range(len(seq)): + add(seq[max(0, i-n):i], seq[i:i+1]) + add(seq[len(seq)-n:], None) + + def get(self): + choice = self.choice + trans = self.trans + n = self.histsize + seq = choice(trans[None]) + while True: + subseq = seq[max(0, len(seq)-n):] + options = trans[subseq] + next = choice(options) + if not next: + break + seq += next + return seq + + +def test(): + import sys, random, getopt + args = sys.argv[1:] + try: + opts, args = getopt.getopt(args, '0123456789cdwq') + except getopt.error: + print 'Usage: %s [-#] [-cddqw] [file] ...' % sys.argv[0] + print 'Options:' + print '-#: 1-digit history size (default 2)' + print '-c: characters (default)' + print '-w: words' + print '-d: more debugging output' + print '-q: no debugging output' + print 'Input files (default stdin) are split in paragraphs' + print 'separated blank lines and each paragraph is split' + print 'in words by whitespace, then reconcatenated with' + print 'exactly one space separating words.' + print 'Output consists of paragraphs separated by blank' + print 'lines, where lines are no longer than 72 characters.' + sys.exit(2) + histsize = 2 + do_words = False + debug = 1 + for o, a in opts: + if '-0' <= o <= '-9': histsize = int(o[1:]) + if o == '-c': do_words = False + if o == '-d': debug += 1 + if o == '-q': debug = 0 + if o == '-w': do_words = True + if not args: + args = ['-'] + + m = Markov(histsize, random.choice) + try: + for filename in args: + if filename == '-': + f = sys.stdin + if f.isatty(): + print 'Sorry, need stdin from file' + continue + else: + f = open(filename, 'r') + if debug: print 'processing', filename, '...' + text = f.read() + f.close() + paralist = text.split('\n\n') + for para in paralist: + if debug > 1: print 'feeding ...' + words = para.split() + if words: + if do_words: + data = tuple(words) + else: + data = ' '.join(words) + m.put(data) + except KeyboardInterrupt: + print 'Interrupted -- continue with data read so far' + if not m.trans: + print 'No valid input files' + return + if debug: print 'done.' + + if debug > 1: + for key in m.trans.keys(): + if key is None or len(key) < histsize: + print repr(key), m.trans[key] + if histsize == 0: print repr(''), m.trans[''] + print + while True: + data = m.get() + if do_words: + words = data + else: + words = data.split() + n = 0 + limit = 72 + for w in words: + if n + len(w) > limit: + print + n = 0 + print w, + n += len(w) + 1 + print + print + +if __name__ == "__main__": + test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/mboxconvert.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/mboxconvert.py new file mode 100644 index 0000000000..41d59d62a4 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/mboxconvert.py @@ -0,0 +1,124 @@ +#! /usr/bin/env python + +# Convert MH directories (1 message per file) or MMDF mailboxes (4x^A +# delimited) to unix mailbox (From ... delimited) on stdout. +# If -f is given, files contain one message per file (e.g. MH messages) + +import rfc822 +import sys +import time +import os +import stat +import getopt +import re + +def main(): + dofile = mmdf + try: + opts, args = getopt.getopt(sys.argv[1:], 'f') + except getopt.error, msg: + sys.stderr.write('%s\n' % msg) + sys.exit(2) + for o, a in opts: + if o == '-f': + dofile = message + if not args: + args = ['-'] + sts = 0 + for arg in args: + if arg == '-' or arg == '': + sts = dofile(sys.stdin) or sts + elif os.path.isdir(arg): + sts = mh(arg) or sts + elif os.path.isfile(arg): + try: + f = open(arg) + except IOError, msg: + sys.stderr.write('%s: %s\n' % (arg, msg)) + sts = 1 + continue + sts = dofile(f) or sts + f.close() + else: + sys.stderr.write('%s: not found\n' % arg) + sts = 1 + if sts: + sys.exit(sts) + +numeric = re.compile('[1-9][0-9]*') + +def mh(dir): + sts = 0 + msgs = os.listdir(dir) + for msg in msgs: + if numeric.match(msg) != len(msg): + continue + fn = os.path.join(dir, msg) + try: + f = open(fn) + except IOError, msg: + sys.stderr.write('%s: %s\n' % (fn, msg)) + sts = 1 + continue + sts = message(f) or sts + return sts + +def mmdf(f): + sts = 0 + while 1: + line = f.readline() + if not line: + break + if line == '\1\1\1\1\n': + sts = message(f, line) or sts + else: + sys.stderr.write( + 'Bad line in MMFD mailbox: %r\n' % (line,)) + return sts + +counter = 0 # for generating unique Message-ID headers + +def message(f, delimiter = ''): + sts = 0 + # Parse RFC822 header + m = rfc822.Message(f) + # Write unix header line + fullname, email = m.getaddr('From') + tt = m.getdate('Date') + if tt: + t = time.mktime(tt) + else: + sys.stderr.write( + 'Unparseable date: %r\n' % (m.getheader('Date'),)) + t = os.fstat(f.fileno())[stat.ST_MTIME] + print 'From', email, time.ctime(t) + # Copy RFC822 header + for line in m.headers: + print line, + # Invent Message-ID header if none is present + if not m.has_key('message-id'): + global counter + counter = counter + 1 + msgid = "<%s.%d>" % (hex(t), counter) + sys.stderr.write("Adding Message-ID %s (From %s)\n" % + (msgid, email)) + print "Message-ID:", msgid + print + # Copy body + while 1: + line = f.readline() + if line == delimiter: + break + if not line: + sys.stderr.write('Unexpected EOF in message\n') + sts = 1 + break + if line[:5] == 'From ': + line = '>' + line + print line, + # Print trailing newline + print + return sts + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/morse.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/morse.py new file mode 100644 index 0000000000..138a186711 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/morse.py @@ -0,0 +1,138 @@ +#! /usr/bin/env python + +# DAH should be three DOTs. +# Space between DOTs and DAHs should be one DOT. +# Space between two letters should be one DAH. +# Space between two words should be DOT DAH DAH. + +import sys, math, audiodev + +DOT = 30 +DAH = 3 * DOT +OCTAVE = 2 # 1 == 441 Hz, 2 == 882 Hz, ... + +morsetab = { + 'A': '.-', 'a': '.-', + 'B': '-...', 'b': '-...', + 'C': '-.-.', 'c': '-.-.', + 'D': '-..', 'd': '-..', + 'E': '.', 'e': '.', + 'F': '..-.', 'f': '..-.', + 'G': '--.', 'g': '--.', + 'H': '....', 'h': '....', + 'I': '..', 'i': '..', + 'J': '.---', 'j': '.---', + 'K': '-.-', 'k': '-.-', + 'L': '.-..', 'l': '.-..', + 'M': '--', 'm': '--', + 'N': '-.', 'n': '-.', + 'O': '---', 'o': '---', + 'P': '.--.', 'p': '.--.', + 'Q': '--.-', 'q': '--.-', + 'R': '.-.', 'r': '.-.', + 'S': '...', 's': '...', + 'T': '-', 't': '-', + 'U': '..-', 'u': '..-', + 'V': '...-', 'v': '...-', + 'W': '.--', 'w': '.--', + 'X': '-..-', 'x': '-..-', + 'Y': '-.--', 'y': '-.--', + 'Z': '--..', 'z': '--..', + '0': '-----', ',': '--..--', + '1': '.----', '.': '.-.-.-', + '2': '..---', '?': '..--..', + '3': '...--', ';': '-.-.-.', + '4': '....-', ':': '---...', + '5': '.....', "'": '.----.', + '6': '-....', '-': '-....-', + '7': '--...', '/': '-..-.', + '8': '---..', '(': '-.--.-', + '9': '----.', ')': '-.--.-', + ' ': ' ', '_': '..--.-', +} + +nowave = '\0' * 200 + +# If we play at 44.1 kHz (which we do), then if we produce one sine +# wave in 100 samples, we get a tone of 441 Hz. If we produce two +# sine waves in these 100 samples, we get a tone of 882 Hz. 882 Hz +# appears to be a nice one for playing morse code. +def mkwave(octave): + sinewave = '' + for i in range(100): + val = int(math.sin(math.pi * i * octave / 50.0) * 30000) + sinewave += chr((val >> 8) & 255) + chr(val & 255) + return sinewave + +defaultwave = mkwave(OCTAVE) + +def main(): + import getopt + try: + opts, args = getopt.getopt(sys.argv[1:], 'o:p:') + except getopt.error: + sys.stderr.write('Usage ' + sys.argv[0] + + ' [ -o outfile ] [ -p octave ] [ words ] ...\n') + sys.exit(1) + dev = None + wave = defaultwave + for o, a in opts: + if o == '-o': + import aifc + dev = aifc.open(a, 'w') + dev.setframerate(44100) + dev.setsampwidth(2) + dev.setnchannels(1) + if o == '-p': + wave = mkwave(int(a)) + if not dev: + import audiodev + dev = audiodev.AudioDev() + dev.setoutrate(44100) + dev.setsampwidth(2) + dev.setnchannels(1) + dev.close = dev.stop + dev.writeframesraw = dev.writeframes + if args: + source = [' '.join(args)] + else: + source = iter(sys.stdin.readline, '') + for line in source: + mline = morse(line) + play(mline, dev, wave) + if hasattr(dev, 'wait'): + dev.wait() + dev.close() + +# Convert a string to morse code with \001 between the characters in +# the string. +def morse(line): + res = '' + for c in line: + try: + res += morsetab[c] + '\001' + except KeyError: + pass + return res + +# Play a line of morse code. +def play(line, dev, wave): + for c in line: + if c == '.': + sine(dev, DOT, wave) + elif c == '-': + sine(dev, DAH, wave) + else: # space + pause(dev, DAH + DOT) + pause(dev, DOT) + +def sine(dev, length, wave): + for i in range(length): + dev.writeframesraw(wave) + +def pause(dev, length): + for i in range(length): + dev.writeframesraw(nowave) + +if __name__ == '__main__': + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.doc b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.doc new file mode 100644 index 0000000000..d02e96f0a7 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.doc @@ -0,0 +1,59 @@ + NEWSLIST + ======== + A program to assist HTTP browsing of newsgroups + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +WWW browsers such as NCSA Mosaic allow the user to read newsgroup +articles by specifying the group name in a URL eg 'news:comp.answers'. + +To browse through many groups, though, (and there are several thousand +of them) you really need a page or pages containing links to all the +groups. There are some good ones out there, for example, + + http://info.cern.ch/hypertext/DataSources/News/Groups/Overview.html + +is the standard one at CERN, but it only shows the groups available there, +which may be rather different from those available on your machine. + +Newslist is a program which creates a hierarchy of pages for you based +on the groups available from YOUR server. It is written in python - a +splendid interpreted object-oriented language which I suggest you get +right now from the directory /pub/python at ftp.cwi.nl, if you haven't +already got it. + +You should be able to see some sample output by looking at: + http://pelican.cl.cam.ac.uk/newspage/root.html + +Descriptions of newsgroups can be added from a file with one group +per line. eg: + + alt.foo Articles about foo + comp.bar Programming in 'bar' and related languages + +A suitable list detailing most groups can be found at ftp.uu.net in +/uunet-info/newsgroups.gz. + +Make sure you read the information at the beginning of the program source and +configure the variables before running. + +In addition to python, you need: + + An NNTP-based news feed. + A directory in which to put the pages. + +The programming is not very beautiful, but it works! It comes with no +warranty, express or implied, but with the hope that some others may +find it useful. + +Comments, improvements & suggestions welcomed. +Quentin Stafford-Fraser + + ---------------------------------------------------------------------- + Quentin Stafford-Fraser + http://pelican.cl.cam.ac.uk/people/qs101/me.html + + Cambridge University Computer Lab Rank Xerox Cambridge EuroPARC + qs101@cl.cam.ac.uk fraser@europarc.xerox.com + Tel: +44 223 334411 Tel: +44 223 341521 + Fax: +44 223 334679 Fax: +44 223 341510 + ---------------------------------------------------------------------- diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.py new file mode 100644 index 0000000000..54625203b0 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/newslist.py @@ -0,0 +1,362 @@ +#! /usr/bin/env python +####################################################################### +# Newslist $Revision$ +# +# Syntax: +# newslist [ -a ] +# +# This is a program to create a directory full of HTML pages +# which between them contain links to all the newsgroups available +# on your server. +# +# The -a option causes a complete list of all groups to be read from +# the server rather than just the ones which have appeared since last +# execution. This recreates the local list from scratch. Use this on +# the first invocation of the program, and from time to time thereafter. +# When new groups are first created they may appear on your server as +# empty groups. By default, empty groups are ignored by the -a option. +# However, these new groups will not be created again, and so will not +# appear in the server's list of 'new groups' at a later date. Hence it +# won't appear until you do a '-a' after some articles have appeared. +# +# I should really keep a list of ignored empty groups and re-check them +# for articles on every run, but I haven't got around to it yet. +# +# This assumes an NNTP news feed. +# +# Feel free to copy, distribute and modify this code for +# non-commercial use. If you make any useful modifications, let me +# know! +# +# (c) Quentin Stafford-Fraser 1994 +# fraser@europarc.xerox.com qs101@cl.cam.ac.uk +# # +####################################################################### +import sys, nntplib, marshal, time, os + +####################################################################### +# Check these variables before running! # + +# Top directory. +# Filenames which don't start with / are taken as being relative to this. +topdir = os.path.expanduser('~/newspage') + +# The name of your NNTP host +# eg. +# newshost = 'nntp-serv.cl.cam.ac.uk' +# or use following to get the name from the NNTPSERVER environment +# variable: +# newshost = os.environ['NNTPSERVER'] +newshost = 'news.example.com' + +# The filename for a local cache of the newsgroup list +treefile = 'grouptree' + +# The filename for descriptions of newsgroups +# I found a suitable one at ftp.uu.net in /uunet-info/newgroups.gz +# You can set this to '' if you don't wish to use one. +descfile = 'newsgroups' + +# The directory in which HTML pages should be created +# eg. +# pagedir = '/usr/local/lib/html/newspage' +# pagedir = 'pages' +pagedir = topdir + +# The html prefix which will refer to this directory +# eg. +# httppref = '/newspage/', +# or leave blank for relative links between pages: (Recommended) +# httppref = '' +httppref = '' + +# The name of the 'root' news page in this directory. +# A .html suffix will be added. +rootpage = 'root' + +# Set skipempty to 0 if you wish to see links to empty groups as well. +# Only affects the -a option. +skipempty = 1 + +# pagelinkicon can contain html to put an icon after links to +# further pages. This helps to make important links stand out. +# Set to '' if not wanted, or '...' is quite a good one. +pagelinkicon = '... ' + +# --------------------------------------------------------------------- +# Less important personal preferences: + +# Sublistsize controls the maximum number of items the will appear as +# an indented sub-list before the whole thing is moved onto a different +# page. The smaller this is, the more pages you will have, but the +# shorter each will be. +sublistsize = 4 + +# That should be all. # +####################################################################### + +for dir in os.curdir, os.environ['HOME']: + rcfile = os.path.join(dir, '.newslistrc.py') + if os.path.exists(rcfile): + print rcfile + execfile(rcfile) + break + +from nntplib import NNTP +from stat import * + +rcsrev = '$Revision$' +rcsrev = ' '.join(filter(lambda s: '$' not in s, rcsrev.split())) +desc = {} + +# Make (possibly) relative filenames into absolute ones +treefile = os.path.join(topdir,treefile) +descfile = os.path.join(topdir,descfile) +page = os.path.join(topdir,pagedir) + +# First the bits for creating trees --------------------------- + +# Addtotree creates/augments a tree from a list of group names +def addtotree(tree, groups): + print 'Updating tree...' + for i in groups: + parts = i.split('.') + makeleaf(tree, parts) + +# Makeleaf makes a leaf and the branch leading to it if necessary +def makeleaf(tree,path): + j = path[0] + l = len(path) + + if j not in tree: + tree[j] = {} + if l == 1: + tree[j]['.'] = '.' + if l > 1: + makeleaf(tree[j],path[1:]) + +# Then the bits for outputting trees as pages ---------------- + +# Createpage creates an HTML file named .html containing links +# to those groups beginning with . + +def createpage(root, tree, p): + filename = os.path.join(pagedir, root+'.html') + if root == rootpage: + detail = '' + else: + detail = ' under ' + root + with open(filename, 'w') as f: + # f.write('Content-Type: text/html\n') + f.write('\n\n') + f.write('Newsgroups available%s\n' % detail) + f.write('\n\n') + f.write('

Newsgroups available%s

\n' % detail) + f.write('Back to top level

\n' % + (httppref, rootpage)) + printtree(f, tree, 0, p) + f.write('\n

') + f.write("This page automatically created by 'newslist' v. %s." % + rcsrev) + f.write(time.ctime(time.time()) + '\n') + f.write('\n\n') + +# Printtree prints the groups as a bulleted list. Groups with +# more than subgroups will be put on a separate page. +# Other sets of subgroups are just indented. + +def printtree(f, tree, indent, p): + l = len(tree) + + if l > sublistsize and indent > 0: + # Create a new page and a link to it + f.write('

  • ' % (httppref, p[1:])) + f.write(p[1:] + '.*') + f.write('%s\n' % pagelinkicon) + createpage(p[1:], tree, p) + return + + kl = tree.keys() + + if l > 1: + kl.sort() + if indent > 0: + # Create a sub-list + f.write('
  • %s\n
      ' % p[1:]) + else: + # Create a main list + f.write('
        ') + indent = indent + 1 + + for i in kl: + if i == '.': + # Output a newsgroup + f.write('
      • %s ' % (p[1:], p[1:])) + if p[1:] in desc: + f.write(' %s\n' % desc[p[1:]]) + else: + f.write('\n') + else: + # Output a hierarchy + printtree(f, tree[i], indent, p+'.'+i) + + if l > 1: + f.write('\n
      ') + +# Reading descriptions file --------------------------------------- + +# This returns a dict mapping group name to its description + +def readdesc(descfile): + global desc + desc = {} + + if descfile == '': + return + + try: + with open(descfile, 'r') as d: + print 'Reading descriptions...' + for l in d: + bits = l.split() + try: + grp = bits[0] + dsc = ' '.join(bits[1:]) + if len(dsc) > 1: + desc[grp] = dsc + except IndexError: + pass + except IOError: + print 'Failed to open description file ' + descfile + return + +# Check that ouput directory exists, ------------------------------ +# and offer to create it if not + +def checkopdir(pagedir): + if not os.path.isdir(pagedir): + print 'Directory %s does not exist.' % pagedir + print 'Shall I create it for you? (y/n)' + if sys.stdin.readline()[0] == 'y': + try: + os.mkdir(pagedir, 0777) + except: + print 'Sorry - failed!' + sys.exit(1) + else: + print 'OK. Exiting.' + sys.exit(1) + +# Read and write current local tree ---------------------------------- + +def readlocallist(treefile): + print 'Reading current local group list...' + tree = {} + try: + treetime = time.localtime(os.stat(treefile)[ST_MTIME]) + except: + print '\n*** Failed to open local group cache '+treefile + print 'If this is the first time you have run newslist, then' + print 'use the -a option to create it.' + sys.exit(1) + treedate = '%02d%02d%02d' % (treetime[0] % 100, treetime[1], treetime[2]) + try: + with open(treefile, 'rb') as dump: + tree = marshal.load(dump) + except IOError: + print 'Cannot open local group list ' + treefile + return (tree, treedate) + +def writelocallist(treefile, tree): + try: + with open(treefile, 'wb') as dump: + groups = marshal.dump(tree, dump) + print 'Saved list to %s\n' % treefile + except: + print 'Sorry - failed to write to local group cache', treefile + print 'Does it (or its directory) have the correct permissions?' + sys.exit(1) + +# Return list of all groups on server ----------------------------- + +def getallgroups(server): + print 'Getting list of all groups...' + treedate = '010101' + info = server.list()[1] + groups = [] + print 'Processing...' + if skipempty: + print '\nIgnoring following empty groups:' + for i in info: + grpname = i[0].split()[0] + if skipempty and int(i[1]) < int(i[2]): + print grpname + ' ', + else: + groups.append(grpname) + print '\n' + if skipempty: + print '(End of empty groups)' + return groups + +# Return list of new groups on server ----------------------------- + +def getnewgroups(server, treedate): + print 'Getting list of new groups since start of %s...' % treedate, + info = server.newgroups(treedate, '000001')[1] + print 'got %d.' % len(info) + print 'Processing...', + groups = [] + for i in info: + grpname = i.split()[0] + groups.append(grpname) + print 'Done' + return groups + +# Now the main program -------------------------------------------- + +def main(): + tree = {} + + # Check that the output directory exists + checkopdir(pagedir) + + try: + print 'Connecting to %s...' % newshost + if sys.version[0] == '0': + s = NNTP.init(newshost) + else: + s = NNTP(newshost) + connected = True + except (nntplib.error_temp, nntplib.error_perm), x: + print 'Error connecting to host:', x + print 'I\'ll try to use just the local list.' + connected = False + + # If -a is specified, read the full list of groups from server + if connected and len(sys.argv) > 1 and sys.argv[1] == '-a': + groups = getallgroups(s) + + # Otherwise just read the local file and then add + # groups created since local file last modified. + else: + + (tree, treedate) = readlocallist(treefile) + if connected: + groups = getnewgroups(s, treedate) + + if connected: + addtotree(tree, groups) + writelocallist(treefile,tree) + + # Read group descriptions + readdesc(descfile) + + print 'Creating pages...' + createpage(rootpage, tree, '') + print 'Done' + +if __name__ == "__main__": + main() + +# That's all folks +###################################################################### diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pi.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pi.py new file mode 100644 index 0000000000..f46fcffc29 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pi.py @@ -0,0 +1,33 @@ +#! /usr/bin/env python + +# Print digits of pi forever. +# +# The algorithm, using Python's 'long' integers ("bignums"), works +# with continued fractions, and was conceived by Lambert Meertens. +# +# See also the ABC Programmer's Handbook, by Geurts, Meertens & Pemberton, +# published by Prentice-Hall (UK) Ltd., 1990. + +import sys + +def main(): + k, a, b, a1, b1 = 2, 4, 1, 12, 4 + while True: + # Next approximation + p, q, k = k*k, 2*k+1, k+1 + a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1 + # Print common digits + d, d1 = a//b, a1//b1 + while d == d1: + output(d) + a, a1 = 10*(a%b), 10*(a1%b1) + d, d1 = a//b, a1//b1 + +def output(d): + # Use write() to avoid spaces between the digits + sys.stdout.write(str(d)) + # Flush so the output is seen immediately + sys.stdout.flush() + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pp.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pp.py new file mode 100644 index 0000000000..ccc7bc070e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/pp.py @@ -0,0 +1,129 @@ +#! /usr/bin/env python + +# Emulate some Perl command line options. +# Usage: pp [-a] [-c] [-d] [-e scriptline] [-F fieldsep] [-n] [-p] [file] ... +# Where the options mean the following: +# -a : together with -n or -p, splits each line into list F +# -c : check syntax only, do not execute any code +# -d : run the script under the debugger, pdb +# -e scriptline : gives one line of the Python script; may be repeated +# -F fieldsep : sets the field separator for the -a option [not in Perl] +# -n : runs the script for each line of input +# -p : prints the line after the script has run +# When no script lines have been passed, the first file argument +# contains the script. With -n or -p, the remaining arguments are +# read as input to the script, line by line. If a file is '-' +# or missing, standard input is read. + +# XXX To do: +# - add -i extension option (change files in place) +# - make a single loop over the files and lines (changes effect of 'break')? +# - add an option to specify the record separator +# - except for -n/-p, run directly from the file if at all possible + +import sys +import getopt + +FS = '' +SCRIPT = [] +AFLAG = 0 +CFLAG = 0 +DFLAG = 0 +NFLAG = 0 +PFLAG = 0 + +try: + optlist, ARGS = getopt.getopt(sys.argv[1:], 'acde:F:np') +except getopt.error, msg: + sys.stderr.write('%s: %s\n' % (sys.argv[0], msg)) + sys.exit(2) + +for option, optarg in optlist: + if option == '-a': + AFLAG = 1 + elif option == '-c': + CFLAG = 1 + elif option == '-d': + DFLAG = 1 + elif option == '-e': + for line in optarg.split('\n'): + SCRIPT.append(line) + elif option == '-F': + FS = optarg + elif option == '-n': + NFLAG = 1 + PFLAG = 0 + elif option == '-p': + NFLAG = 1 + PFLAG = 1 + else: + print option, 'not recognized???' + +if not ARGS: ARGS.append('-') + +if not SCRIPT: + if ARGS[0] == '-': + fp = sys.stdin + else: + fp = open(ARGS[0], 'r') + while 1: + line = fp.readline() + if not line: break + SCRIPT.append(line[:-1]) + del fp + del ARGS[0] + if not ARGS: ARGS.append('-') + +if CFLAG: + prologue = ['if 0:'] + epilogue = [] +elif NFLAG: + # Note that it is on purpose that AFLAG and PFLAG are + # tested dynamically each time through the loop + prologue = [ + 'LINECOUNT = 0', + 'for FILE in ARGS:', + ' \tif FILE == \'-\':', + ' \t \tFP = sys.stdin', + ' \telse:', + ' \t \tFP = open(FILE, \'r\')', + ' \tLINENO = 0', + ' \twhile 1:', + ' \t \tLINE = FP.readline()', + ' \t \tif not LINE: break', + ' \t \tLINENO = LINENO + 1', + ' \t \tLINECOUNT = LINECOUNT + 1', + ' \t \tL = LINE[:-1]', + ' \t \taflag = AFLAG', + ' \t \tif aflag:', + ' \t \t \tif FS: F = L.split(FS)', + ' \t \t \telse: F = L.split()' + ] + epilogue = [ + ' \t \tif not PFLAG: continue', + ' \t \tif aflag:', + ' \t \t \tif FS: print FS.join(F)', + ' \t \t \telse: print \' \'.join(F)', + ' \t \telse: print L', + ] +else: + prologue = ['if 1:'] + epilogue = [] + +# Note that we indent using tabs only, so that any indentation style +# used in 'command' will come out right after re-indentation. + +program = '\n'.join(prologue) + '\n' +for line in SCRIPT: + program += ' \t \t' + line + '\n' +program += '\n'.join(epilogue) + '\n' + +import tempfile +fp = tempfile.NamedTemporaryFile() +fp.write(program) +fp.flush() +if DFLAG: + import pdb + pdb.run('execfile(%r)' % (fp.name,)) +else: + execfile(fp.name) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/primes.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/primes.py new file mode 100644 index 0000000000..6c6a152fc7 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/primes.py @@ -0,0 +1,30 @@ +#! /usr/bin/env python + +# Print prime numbers in a given range + +def primes(min, max): + if max >= 2 >= min: + print 2 + primes = [2] + i = 3 + while i <= max: + for p in primes: + if i % p == 0 or p*p > i: + break + if i % p != 0: + primes.append(i) + if i >= min: + print i + i += 2 + +def main(): + import sys + min, max = 2, 0x7fffffff + if sys.argv[1:]: + min = int(sys.argv[1]) + if sys.argv[2:]: + max = int(sys.argv[2]) + primes(min, max) + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/queens.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/queens.py new file mode 100644 index 0000000000..5d212ed86d --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/queens.py @@ -0,0 +1,85 @@ +#! /usr/bin/env python + +"""N queens problem. + +The (well-known) problem is due to Niklaus Wirth. + +This solution is inspired by Dijkstra (Structured Programming). It is +a classic recursive backtracking approach. + +""" + +N = 8 # Default; command line overrides + +class Queens: + + def __init__(self, n=N): + self.n = n + self.reset() + + def reset(self): + n = self.n + self.y = [None] * n # Where is the queen in column x + self.row = [0] * n # Is row[y] safe? + self.up = [0] * (2*n-1) # Is upward diagonal[x-y] safe? + self.down = [0] * (2*n-1) # Is downward diagonal[x+y] safe? + self.nfound = 0 # Instrumentation + + def solve(self, x=0): # Recursive solver + for y in range(self.n): + if self.safe(x, y): + self.place(x, y) + if x+1 == self.n: + self.display() + else: + self.solve(x+1) + self.remove(x, y) + + def safe(self, x, y): + return not self.row[y] and not self.up[x-y] and not self.down[x+y] + + def place(self, x, y): + self.y[x] = y + self.row[y] = 1 + self.up[x-y] = 1 + self.down[x+y] = 1 + + def remove(self, x, y): + self.y[x] = None + self.row[y] = 0 + self.up[x-y] = 0 + self.down[x+y] = 0 + + silent = 0 # If true, count solutions only + + def display(self): + self.nfound = self.nfound + 1 + if self.silent: + return + print '+-' + '--'*self.n + '+' + for y in range(self.n-1, -1, -1): + print '|', + for x in range(self.n): + if self.y[x] == y: + print "Q", + else: + print ".", + print '|' + print '+-' + '--'*self.n + '+' + +def main(): + import sys + silent = 0 + n = N + if sys.argv[1:2] == ['-n']: + silent = 1 + del sys.argv[1] + if sys.argv[1:]: + n = int(sys.argv[1]) + q = Queens(n) + q.silent = silent + q.solve() + print "Found", q.nfound, "solutions." + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/script.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/script.py new file mode 100644 index 0000000000..8098dfc893 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/script.py @@ -0,0 +1,42 @@ +#! /usr/bin/env python + +# script.py -- Make typescript of terminal session. +# Usage: +# -a Append to typescript. +# -p Use Python as shell. +# Author: Steen Lumholt. + + +import os, time, sys, getopt +import pty + +def read(fd): + data = os.read(fd, 1024) + script.write(data) + return data + +shell = 'sh' +filename = 'typescript' +mode = 'w' +if os.environ.has_key('SHELL'): + shell = os.environ['SHELL'] + +try: + opts, args = getopt.getopt(sys.argv[1:], 'ap') +except getopt.error, msg: + print '%s: %s' % (sys.argv[0], msg) + sys.exit(2) + +for o, a in opts: + if o == '-a': + mode = 'a' + elif o == '-p': + shell = 'python' + +script = open(filename, mode) + +sys.stdout.write('Script started, file is %s\n' % filename) +script.write('Script started on %s\n' % time.ctime(time.time())) +pty.spawn(shell, read) +script.write('Script done on %s\n' % time.ctime(time.time())) +sys.stdout.write('Script done, file is %s\n' % filename) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/unbirthday.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/unbirthday.py new file mode 100644 index 0000000000..e4dbb1a407 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/unbirthday.py @@ -0,0 +1,104 @@ +#! /usr/bin/env python + +# Calculate your unbirthday count (see Alice in Wonderland). +# This is defined as the number of days from your birth until today +# that weren't your birthday. (The day you were born is not counted). +# Leap years make it interesting. + +import sys +import time +import calendar + +def main(): + if sys.argv[1:]: + year = int(sys.argv[1]) + else: + year = int(raw_input('In which year were you born? ')) + if 0 <= year < 100: + print "I'll assume that by", year, + year = year + 1900 + print 'you mean', year, 'and not the early Christian era' + elif not (1850 <= year <= time.localtime()[0]): + print "It's hard to believe you were born in", year + return + + if sys.argv[2:]: + month = int(sys.argv[2]) + else: + month = int(raw_input('And in which month? (1-12) ')) + if not (1 <= month <= 12): + print 'There is no month numbered', month + return + + if sys.argv[3:]: + day = int(sys.argv[3]) + else: + day = int(raw_input('And on what day of that month? (1-31) ')) + if month == 2 and calendar.isleap(year): + maxday = 29 + else: + maxday = calendar.mdays[month] + if not (1 <= day <= maxday): + print 'There are no', day, 'days in that month!' + return + + bdaytuple = (year, month, day) + bdaydate = mkdate(bdaytuple) + print 'You were born on', format(bdaytuple) + + todaytuple = time.localtime()[:3] + todaydate = mkdate(todaytuple) + print 'Today is', format(todaytuple) + + if bdaytuple > todaytuple: + print 'You are a time traveler. Go back to the future!' + return + + if bdaytuple == todaytuple: + print 'You were born today. Have a nice life!' + return + + days = todaydate - bdaydate + print 'You have lived', days, 'days' + + age = 0 + for y in range(year, todaytuple[0] + 1): + if bdaytuple < (y, month, day) <= todaytuple: + age = age + 1 + + print 'You are', age, 'years old' + + if todaytuple[1:] == bdaytuple[1:]: + print 'Congratulations! Today is your', nth(age), 'birthday' + print 'Yesterday was your', + else: + print 'Today is your', + print nth(days - age), 'unbirthday' + +def format((year, month, day)): + return '%d %s %d' % (day, calendar.month_name[month], year) + +def nth(n): + if n == 1: return '1st' + if n == 2: return '2nd' + if n == 3: return '3rd' + return '%dth' % n + +def mkdate((year, month, day)): + # January 1st, in 0 A.D. is arbitrarily defined to be day 1, + # even though that day never actually existed and the calendar + # was different then... + days = year*365 # years, roughly + days = days + (year+3)//4 # plus leap years, roughly + days = days - (year+99)//100 # minus non-leap years every century + days = days + (year+399)//400 # plus leap years every 4 centirues + for i in range(1, month): + if i == 2 and calendar.isleap(year): + days = days + 29 + else: + days = days + calendar.mdays[i] + days = days + day + return days + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/update.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/update.py new file mode 100644 index 0000000000..17f101cba0 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/scripts/update.py @@ -0,0 +1,92 @@ +#! /usr/bin/env python + +# Update a bunch of files according to a script. +# The input file contains lines of the form ::, +# meaning that the given line of the given file is to be replaced +# by the given text. This is useful for performing global substitutions +# on grep output: + +import os +import sys +import re + +pat = '^([^: \t\n]+):([1-9][0-9]*):' +prog = re.compile(pat) + +class FileObj: + def __init__(self, filename): + self.filename = filename + self.changed = 0 + try: + self.lines = open(filename, 'r').readlines() + except IOError, msg: + print '*** Can\'t open "%s":' % filename, msg + self.lines = None + return + print 'diffing', self.filename + + def finish(self): + if not self.changed: + print 'no changes to', self.filename + return + try: + os.rename(self.filename, self.filename + '~') + fp = open(self.filename, 'w') + except (os.error, IOError), msg: + print '*** Can\'t rewrite "%s":' % self.filename, msg + return + print 'writing', self.filename + for line in self.lines: + fp.write(line) + fp.close() + self.changed = 0 + + def process(self, lineno, rest): + if self.lines is None: + print '(not processed): %s:%s:%s' % ( + self.filename, lineno, rest), + return + i = eval(lineno) - 1 + if not 0 <= i < len(self.lines): + print '*** Line number out of range: %s:%s:%s' % ( + self.filename, lineno, rest), + return + if self.lines[i] == rest: + print '(no change): %s:%s:%s' % ( + self.filename, lineno, rest), + return + if not self.changed: + self.changed = 1 + print '%sc%s' % (lineno, lineno) + print '<', self.lines[i], + print '---' + self.lines[i] = rest + print '>', self.lines[i], + +def main(): + if sys.argv[1:]: + try: + fp = open(sys.argv[1], 'r') + except IOError, msg: + print 'Can\'t open "%s":' % sys.argv[1], msg + sys.exit(1) + else: + fp = sys.stdin + curfile = None + while 1: + line = fp.readline() + if not line: + if curfile: curfile.finish() + break + n = prog.match(line) + if n < 0: + print 'Funny line:', line, + continue + filename, lineno = prog.group(1, 2) + if not curfile or filename <> curfile.filename: + if curfile: curfile.finish() + curfile = FileObj(filename) + curfile.process(lineno, line[n:]) + +if __name__ == "__main__": + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/README b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/README new file mode 100644 index 0000000000..69618fc5bf --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/README @@ -0,0 +1,14 @@ +This directory contains some demonstrations of the socket module: + +broadcast.py Broadcast the time to radio.py. +echosvr.py About the simplest TCP server possible. +finger.py Client for the 'finger' protocol. +ftp.py A very simple ftp client. +gopher.py A simple gopher client. +mcast.py IPv4/v6 multicast example +radio.py Receive time broadcasts from broadcast.py. +telnet.py Client for the 'telnet' protocol. +throughput.py Client and server to measure TCP throughput. +unixclient.py Unix socket example, client side +unixserver.py Unix socket example, server side +udpecho.py Client and server for the UDP echo protocol. diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/broadcast.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/broadcast.py new file mode 100644 index 0000000000..f0222408c2 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/broadcast.py @@ -0,0 +1,15 @@ +# Send UDP broadcast packets + +MYPORT = 50000 + +import sys, time +from socket import * + +s = socket(AF_INET, SOCK_DGRAM) +s.bind(('', 0)) +s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) + +while 1: + data = repr(time.time()) + '\n' + s.sendto(data, ('', MYPORT)) + time.sleep(2) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/echosvr.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/echosvr.py new file mode 100644 index 0000000000..893a48678b --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/echosvr.py @@ -0,0 +1,31 @@ +#! /usr/bin/env python + +# Python implementation of an 'echo' tcp server: echo all data it receives. +# +# This is the simplest possible server, servicing a single request only. + +import sys +from socket import * + +# The standard echo port isn't very useful, it requires root permissions! +# ECHO_PORT = 7 +ECHO_PORT = 50000 + 7 +BUFSIZE = 1024 + +def main(): + if len(sys.argv) > 1: + port = int(eval(sys.argv[1])) + else: + port = ECHO_PORT + s = socket(AF_INET, SOCK_STREAM) + s.bind(('', port)) + s.listen(1) + conn, (remotehost, remoteport) = s.accept() + print 'connected by', remotehost, remoteport + while 1: + data = conn.recv(BUFSIZE) + if not data: + break + conn.send(data) + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/finger.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/finger.py new file mode 100644 index 0000000000..9cd854ccc4 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/finger.py @@ -0,0 +1,58 @@ +#! /usr/bin/env python + +# Python interface to the Internet finger daemon. +# +# Usage: finger [options] [user][@host] ... +# +# If no host is given, the finger daemon on the local host is contacted. +# Options are passed uninterpreted to the finger daemon! + + +import sys, string +from socket import * + + +# Hardcode the number of the finger port here. +# It's not likely to change soon... +# +FINGER_PORT = 79 + + +# Function to do one remote finger invocation. +# Output goes directly to stdout (although this can be changed). +# +def finger(host, args): + s = socket(AF_INET, SOCK_STREAM) + s.connect((host, FINGER_PORT)) + s.send(args + '\n') + while 1: + buf = s.recv(1024) + if not buf: break + sys.stdout.write(buf) + sys.stdout.flush() + + +# Main function: argument parsing. +# +def main(): + options = '' + i = 1 + while i < len(sys.argv) and sys.argv[i][:1] == '-': + options = options + sys.argv[i] + ' ' + i = i+1 + args = sys.argv[i:] + if not args: + args = [''] + for arg in args: + if '@' in arg: + at = string.index(arg, '@') + host = arg[at+1:] + arg = arg[:at] + else: + host = '' + finger(host, options + arg) + + +# Call the main function. +# +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/ftp.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/ftp.py new file mode 100644 index 0000000000..3acdabfe37 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/ftp.py @@ -0,0 +1,146 @@ +# A simple FTP client. +# +# The information to write this program was gathered from RFC 959, +# but this is not a complete implementation! Yet it shows how a simple +# FTP client can be built, and you are welcome to extend it to suit +# it to your needs... +# +# How it works (assuming you've read the RFC): +# +# User commands are passed uninterpreted to the server. However, the +# user never needs to send a PORT command. Rather, the client opens a +# port right away and sends the appropriate PORT command to the server. +# When a response code 150 is received, this port is used to receive +# the data (which is written to stdout in this version), and when the +# data is exhausted, a new port is opened and a corresponding PORT +# command sent. In order to avoid errors when reusing ports quickly +# (and because there is no s.getsockname() method in Python yet) we +# cycle through a number of ports in the 50000 range. + + +import sys, posix, string +from socket import * + + +BUFSIZE = 1024 + +# Default port numbers used by the FTP protocol. +# +FTP_PORT = 21 +FTP_DATA_PORT = FTP_PORT - 1 + +# Change the data port to something not needing root permissions. +# +FTP_DATA_PORT = FTP_DATA_PORT + 50000 + + +# Main program (called at the end of this file). +# +def main(): + hostname = sys.argv[1] + control(hostname) + + +# Control process (user interface and user protocol interpreter). +# +def control(hostname): + # + # Create control connection + # + s = socket(AF_INET, SOCK_STREAM) + s.connect((hostname, FTP_PORT)) + f = s.makefile('r') # Reading the replies is easier from a file... + # + # Control loop + # + r = None + while 1: + code = getreply(f) + if code in ('221', 'EOF'): break + if code == '150': + getdata(r) + code = getreply(f) + r = None + if not r: + r = newdataport(s, f) + cmd = getcommand() + if not cmd: break + s.send(cmd + '\r\n') + + +# Create a new data port and send a PORT command to the server for it. +# (Cycle through a number of ports to avoid problems with reusing +# a port within a short time.) +# +nextport = 0 +# +def newdataport(s, f): + global nextport + port = nextport + FTP_DATA_PORT + nextport = (nextport+1) % 16 + r = socket(AF_INET, SOCK_STREAM) + r.bind((gethostbyname(gethostname()), port)) + r.listen(1) + sendportcmd(s, f, port) + return r + + +# Send an appropriate port command. +# +def sendportcmd(s, f, port): + hostname = gethostname() + hostaddr = gethostbyname(hostname) + hbytes = string.splitfields(hostaddr, '.') + pbytes = [repr(port//256), repr(port%256)] + bytes = hbytes + pbytes + cmd = 'PORT ' + string.joinfields(bytes, ',') + s.send(cmd + '\r\n') + code = getreply(f) + + +# Process an ftp reply and return the 3-digit reply code (as a string). +# The reply should be a line of text starting with a 3-digit number. +# If the 4th char is '-', it is a multi-line reply and is +# terminate by a line starting with the same 3-digit number. +# Any text while receiving the reply is echoed to the file. +# +def getreply(f): + line = f.readline() + if not line: return 'EOF' + print line, + code = line[:3] + if line[3:4] == '-': + while 1: + line = f.readline() + if not line: break # Really an error + print line, + if line[:3] == code and line[3:4] != '-': break + return code + + +# Get the data from the data connection. +# +def getdata(r): + print '(accepting data connection)' + conn, host = r.accept() + print '(data connection accepted)' + while 1: + data = conn.recv(BUFSIZE) + if not data: break + sys.stdout.write(data) + print '(end of data connection)' + +# Get a command from the user. +# +def getcommand(): + try: + while 1: + line = raw_input('ftp.py> ') + if line: return line + except EOFError: + return '' + + +# Call the main program. +# +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/gopher.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/gopher.py new file mode 100644 index 0000000000..e47eca5f24 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/gopher.py @@ -0,0 +1,347 @@ +#! /usr/bin/env python + +# A simple gopher client. +# +# Usage: gopher [ [selector] host [port] ] + +import string +import sys +import os +import socket + +# Default selector, host and port +DEF_SELECTOR = '' +DEF_HOST = 'gopher.micro.umn.edu' +DEF_PORT = 70 + +# Recognized file types +T_TEXTFILE = '0' +T_MENU = '1' +T_CSO = '2' +T_ERROR = '3' +T_BINHEX = '4' +T_DOS = '5' +T_UUENCODE = '6' +T_SEARCH = '7' +T_TELNET = '8' +T_BINARY = '9' +T_REDUNDANT = '+' +T_SOUND = 's' + +# Dictionary mapping types to strings +typename = {'0': '', '1': '', '2': '', '3': '', \ + '4': '', '5': '', '6': '', '7': '', \ + '8': '', '9': '', '+': '', 's': ''} + +# Oft-used characters and strings +CRLF = '\r\n' +TAB = '\t' + +# Open a TCP connection to a given host and port +def open_socket(host, port): + if not port: + port = DEF_PORT + elif type(port) == type(''): + port = string.atoi(port) + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.connect((host, port)) + return s + +# Send a selector to a given host and port, return a file with the reply +def send_request(selector, host, port): + s = open_socket(host, port) + s.send(selector + CRLF) + s.shutdown(1) + return s.makefile('r') + +# Get a menu in the form of a list of entries +def get_menu(selector, host, port): + f = send_request(selector, host, port) + list = [] + while 1: + line = f.readline() + if not line: + print '(Unexpected EOF from server)' + break + if line[-2:] == CRLF: + line = line[:-2] + elif line[-1:] in CRLF: + line = line[:-1] + if line == '.': + break + if not line: + print '(Empty line from server)' + continue + typechar = line[0] + parts = string.splitfields(line[1:], TAB) + if len(parts) < 4: + print '(Bad line from server: %r)' % (line,) + continue + if len(parts) > 4: + print '(Extra info from server: %r)' % (parts[4:],) + parts.insert(0, typechar) + list.append(parts) + f.close() + return list + +# Get a text file as a list of lines, with trailing CRLF stripped +def get_textfile(selector, host, port): + list = [] + get_alt_textfile(selector, host, port, list.append) + return list + +# Get a text file and pass each line to a function, with trailing CRLF stripped +def get_alt_textfile(selector, host, port, func): + f = send_request(selector, host, port) + while 1: + line = f.readline() + if not line: + print '(Unexpected EOF from server)' + break + if line[-2:] == CRLF: + line = line[:-2] + elif line[-1:] in CRLF: + line = line[:-1] + if line == '.': + break + if line[:2] == '..': + line = line[1:] + func(line) + f.close() + +# Get a binary file as one solid data block +def get_binary(selector, host, port): + f = send_request(selector, host, port) + data = f.read() + f.close() + return data + +# Get a binary file and pass each block to a function +def get_alt_binary(selector, host, port, func, blocksize): + f = send_request(selector, host, port) + while 1: + data = f.read(blocksize) + if not data: + break + func(data) + +# A *very* simple interactive browser + +# Browser main command, has default arguments +def browser(*args): + selector = DEF_SELECTOR + host = DEF_HOST + port = DEF_PORT + n = len(args) + if n > 0 and args[0]: + selector = args[0] + if n > 1 and args[1]: + host = args[1] + if n > 2 and args[2]: + port = args[2] + if n > 3: + raise RuntimeError, 'too many args' + try: + browse_menu(selector, host, port) + except socket.error, msg: + print 'Socket error:', msg + sys.exit(1) + except KeyboardInterrupt: + print '\n[Goodbye]' + +# Browse a menu +def browse_menu(selector, host, port): + list = get_menu(selector, host, port) + while 1: + print '----- MENU -----' + print 'Selector:', repr(selector) + print 'Host:', host, ' Port:', port + print + for i in range(len(list)): + item = list[i] + typechar, description = item[0], item[1] + print string.rjust(repr(i+1), 3) + ':', description, + if typename.has_key(typechar): + print typename[typechar] + else: + print '' + print + while 1: + try: + str = raw_input('Choice [CR == up a level]: ') + except EOFError: + print + return + if not str: + return + try: + choice = string.atoi(str) + except string.atoi_error: + print 'Choice must be a number; try again:' + continue + if not 0 < choice <= len(list): + print 'Choice out of range; try again:' + continue + break + item = list[choice-1] + typechar = item[0] + [i_selector, i_host, i_port] = item[2:5] + if typebrowser.has_key(typechar): + browserfunc = typebrowser[typechar] + try: + browserfunc(i_selector, i_host, i_port) + except (IOError, socket.error): + print '***', sys.exc_type, ':', sys.exc_value + else: + print 'Unsupported object type' + +# Browse a text file +def browse_textfile(selector, host, port): + x = None + try: + p = os.popen('${PAGER-more}', 'w') + x = SaveLines(p) + get_alt_textfile(selector, host, port, x.writeln) + except IOError, msg: + print 'IOError:', msg + if x: + x.close() + f = open_savefile() + if not f: + return + x = SaveLines(f) + try: + get_alt_textfile(selector, host, port, x.writeln) + print 'Done.' + except IOError, msg: + print 'IOError:', msg + x.close() + +# Browse a search index +def browse_search(selector, host, port): + while 1: + print '----- SEARCH -----' + print 'Selector:', repr(selector) + print 'Host:', host, ' Port:', port + print + try: + query = raw_input('Query [CR == up a level]: ') + except EOFError: + print + break + query = string.strip(query) + if not query: + break + if '\t' in query: + print 'Sorry, queries cannot contain tabs' + continue + browse_menu(selector + TAB + query, host, port) + +# "Browse" telnet-based information, i.e. open a telnet session +def browse_telnet(selector, host, port): + if selector: + print 'Log in as', repr(selector) + if type(port) <> type(''): + port = repr(port) + sts = os.system('set -x; exec telnet ' + host + ' ' + port) + if sts: + print 'Exit status:', sts + +# "Browse" a binary file, i.e. save it to a file +def browse_binary(selector, host, port): + f = open_savefile() + if not f: + return + x = SaveWithProgress(f) + get_alt_binary(selector, host, port, x.write, 8*1024) + x.close() + +# "Browse" a sound file, i.e. play it or save it +def browse_sound(selector, host, port): + browse_binary(selector, host, port) + +# Dictionary mapping types to browser functions +typebrowser = {'0': browse_textfile, '1': browse_menu, \ + '4': browse_binary, '5': browse_binary, '6': browse_textfile, \ + '7': browse_search, \ + '8': browse_telnet, '9': browse_binary, 's': browse_sound} + +# Class used to save lines, appending a newline to each line +class SaveLines: + def __init__(self, f): + self.f = f + def writeln(self, line): + self.f.write(line + '\n') + def close(self): + sts = self.f.close() + if sts: + print 'Exit status:', sts + +# Class used to save data while showing progress +class SaveWithProgress: + def __init__(self, f): + self.f = f + def write(self, data): + sys.stdout.write('#') + sys.stdout.flush() + self.f.write(data) + def close(self): + print + sts = self.f.close() + if sts: + print 'Exit status:', sts + +# Ask for and open a save file, or return None if not to save +def open_savefile(): + try: + savefile = raw_input( \ + 'Save as file [CR == don\'t save; |pipeline or ~user/... OK]: ') + except EOFError: + print + return None + savefile = string.strip(savefile) + if not savefile: + return None + if savefile[0] == '|': + cmd = string.strip(savefile[1:]) + try: + p = os.popen(cmd, 'w') + except IOError, msg: + print repr(cmd), ':', msg + return None + print 'Piping through', repr(cmd), '...' + return p + if savefile[0] == '~': + savefile = os.path.expanduser(savefile) + try: + f = open(savefile, 'w') + except IOError, msg: + print repr(savefile), ':', msg + return None + print 'Saving to', repr(savefile), '...' + return f + +# Test program +def test(): + if sys.argv[4:]: + print 'usage: gopher [ [selector] host [port] ]' + sys.exit(2) + elif sys.argv[3:]: + browser(sys.argv[1], sys.argv[2], sys.argv[3]) + elif sys.argv[2:]: + try: + port = string.atoi(sys.argv[2]) + selector = '' + host = sys.argv[1] + except string.atoi_error: + selector = sys.argv[1] + host = sys.argv[2] + port = '' + browser(selector, host, port) + elif sys.argv[1:]: + browser('', sys.argv[1]) + else: + browser() + +# Call the test program as a main program +test() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/mcast.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/mcast.py new file mode 100644 index 0000000000..55d405eec0 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/mcast.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python +# +# Send/receive UDP multicast packets. +# Requires that your OS kernel supports IP multicast. +# +# Usage: +# mcast -s (sender, IPv4) +# mcast -s -6 (sender, IPv6) +# mcast (receivers, IPv4) +# mcast -6 (receivers, IPv6) + +MYPORT = 8123 +MYGROUP_4 = '225.0.0.250' +MYGROUP_6 = 'ff15:7079:7468:6f6e:6465:6d6f:6d63:6173' +MYTTL = 1 # Increase to reach other networks + +import time +import struct +import socket +import sys + +def main(): + group = MYGROUP_6 if "-6" in sys.argv[1:] else MYGROUP_4 + + if "-s" in sys.argv[1:]: + sender(group) + else: + receiver(group) + + +def sender(group): + addrinfo = socket.getaddrinfo(group, None)[0] + + s = socket.socket(addrinfo[0], socket.SOCK_DGRAM) + + # Set Time-to-live (optional) + ttl_bin = struct.pack('@i', MYTTL) + if addrinfo[0] == socket.AF_INET: # IPv4 + s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl_bin) + else: + s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, ttl_bin) + + while True: + data = repr(time.time()) + s.sendto(data + '\0', (addrinfo[4][0], MYPORT)) + time.sleep(1) + + +def receiver(group): + # Look up multicast group address in name server and find out IP version + addrinfo = socket.getaddrinfo(group, None)[0] + + # Create a socket + s = socket.socket(addrinfo[0], socket.SOCK_DGRAM) + + # Allow multiple copies of this program on one machine + # (not strictly needed) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + + # Bind it to the port + s.bind(('', MYPORT)) + + group_bin = socket.inet_pton(addrinfo[0], addrinfo[4][0]) + # Join group + if addrinfo[0] == socket.AF_INET: # IPv4 + mreq = group_bin + struct.pack('=I', socket.INADDR_ANY) + s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq) + else: + mreq = group_bin + struct.pack('@I', 0) + s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq) + + # Loop, printing any data we receive + while True: + data, sender = s.recvfrom(1500) + while data[-1:] == '\0': data = data[:-1] # Strip trailing \0's + print (str(sender) + ' ' + repr(data)) + + +if __name__ == '__main__': + main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/radio.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/radio.py new file mode 100644 index 0000000000..084ef88ca9 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/radio.py @@ -0,0 +1,14 @@ +# Receive UDP packets transmitted by a broadcasting service + +MYPORT = 50000 + +import sys +from socket import * + +s = socket(AF_INET, SOCK_DGRAM) +s.bind(('', MYPORT)) + +while 1: + data, wherefrom = s.recvfrom(1500, 0) + sys.stderr.write(repr(wherefrom) + '\n') + sys.stdout.write(data) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpython.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpython.py new file mode 100644 index 0000000000..a28de1d0c5 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpython.py @@ -0,0 +1,35 @@ +#! /usr/bin/env python + +# Remote python client. +# Execute Python commands remotely and send output back. + +import sys +import string +from socket import * + +PORT = 4127 +BUFSIZE = 1024 + +def main(): + if len(sys.argv) < 3: + print "usage: rpython host command" + sys.exit(2) + host = sys.argv[1] + port = PORT + i = string.find(host, ':') + if i >= 0: + port = string.atoi(port[i+1:]) + host = host[:i] + command = string.join(sys.argv[2:]) + s = socket(AF_INET, SOCK_STREAM) + s.connect((host, port)) + s.send(command) + s.shutdown(1) + reply = '' + while 1: + data = s.recv(BUFSIZE) + if not data: break + reply = reply + data + print reply, + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpythond.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpythond.py new file mode 100644 index 0000000000..50653fbaf5 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpythond.py @@ -0,0 +1,52 @@ +#! /usr/bin/env python + +# Remote python server. +# Execute Python commands remotely and send output back. +# WARNING: This version has a gaping security hole -- it accepts requests +# from any host on the Internet! + +import sys +from socket import * +import StringIO +import traceback + +PORT = 4127 +BUFSIZE = 1024 + +def main(): + if len(sys.argv) > 1: + port = int(eval(sys.argv[1])) + else: + port = PORT + s = socket(AF_INET, SOCK_STREAM) + s.bind(('', port)) + s.listen(1) + while 1: + conn, (remotehost, remoteport) = s.accept() + print 'connected by', remotehost, remoteport + request = '' + while 1: + data = conn.recv(BUFSIZE) + if not data: + break + request = request + data + reply = execute(request) + conn.send(reply) + conn.close() + +def execute(request): + stdout = sys.stdout + stderr = sys.stderr + sys.stdout = sys.stderr = fakefile = StringIO.StringIO() + try: + try: + exec request in {}, {} + except: + print + traceback.print_exc(100) + finally: + sys.stderr = stderr + sys.stdout = stdout + return fakefile.getvalue() + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/telnet.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/telnet.py new file mode 100644 index 0000000000..1702392203 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/telnet.py @@ -0,0 +1,109 @@ +#! /usr/bin/env python + +# Minimal interface to the Internet telnet protocol. +# +# It refuses all telnet options and does not recognize any of the other +# telnet commands, but can still be used to connect in line-by-line mode. +# It's also useful to play with a number of other services, +# like time, finger, smtp and even ftp. +# +# Usage: telnet host [port] +# +# The port may be a service name or a decimal port number; +# it defaults to 'telnet'. + + +import sys, posix, time +from socket import * + +BUFSIZE = 1024 + +# Telnet protocol characters + +IAC = chr(255) # Interpret as command +DONT = chr(254) +DO = chr(253) +WONT = chr(252) +WILL = chr(251) + +def main(): + host = sys.argv[1] + try: + hostaddr = gethostbyname(host) + except error: + sys.stderr.write(sys.argv[1] + ': bad host name\n') + sys.exit(2) + # + if len(sys.argv) > 2: + servname = sys.argv[2] + else: + servname = 'telnet' + # + if '0' <= servname[:1] <= '9': + port = eval(servname) + else: + try: + port = getservbyname(servname, 'tcp') + except error: + sys.stderr.write(servname + ': bad tcp service name\n') + sys.exit(2) + # + s = socket(AF_INET, SOCK_STREAM) + # + try: + s.connect((host, port)) + except error, msg: + sys.stderr.write('connect failed: ' + repr(msg) + '\n') + sys.exit(1) + # + pid = posix.fork() + # + if pid == 0: + # child -- read stdin, write socket + while 1: + line = sys.stdin.readline() + s.send(line) + else: + # parent -- read socket, write stdout + iac = 0 # Interpret next char as command + opt = '' # Interpret next char as option + while 1: + data = s.recv(BUFSIZE) + if not data: + # EOF; kill child and exit + sys.stderr.write( '(Closed by remote host)\n') + posix.kill(pid, 9) + sys.exit(1) + cleandata = '' + for c in data: + if opt: + print ord(c) + s.send(opt + c) + opt = '' + elif iac: + iac = 0 + if c == IAC: + cleandata = cleandata + c + elif c in (DO, DONT): + if c == DO: print '(DO)', + else: print '(DONT)', + opt = IAC + WONT + elif c in (WILL, WONT): + if c == WILL: print '(WILL)', + else: print '(WONT)', + opt = IAC + DONT + else: + print '(command)', ord(c) + elif c == IAC: + iac = 1 + print '(IAC)', + else: + cleandata = cleandata + c + sys.stdout.write(cleandata) + sys.stdout.flush() + + +try: + main() +except KeyboardInterrupt: + pass diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/throughput.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/throughput.py new file mode 100644 index 0000000000..6ac76af397 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/throughput.py @@ -0,0 +1,93 @@ +#! /usr/bin/env python + +# Test network throughput. +# +# Usage: +# 1) on host_A: throughput -s [port] # start a server +# 2) on host_B: throughput -c count host_A [port] # start a client +# +# The server will service multiple clients until it is killed. +# +# The client performs one transfer of count*BUFSIZE bytes and +# measures the time it takes (roundtrip!). + + +import sys, time +from socket import * + +MY_PORT = 50000 + 42 + +BUFSIZE = 1024 + + +def main(): + if len(sys.argv) < 2: + usage() + if sys.argv[1] == '-s': + server() + elif sys.argv[1] == '-c': + client() + else: + usage() + + +def usage(): + sys.stdout = sys.stderr + print 'Usage: (on host_A) throughput -s [port]' + print 'and then: (on host_B) throughput -c count host_A [port]' + sys.exit(2) + + +def server(): + if len(sys.argv) > 2: + port = eval(sys.argv[2]) + else: + port = MY_PORT + s = socket(AF_INET, SOCK_STREAM) + s.bind(('', port)) + s.listen(1) + print 'Server ready...' + while 1: + conn, (host, remoteport) = s.accept() + while 1: + data = conn.recv(BUFSIZE) + if not data: + break + del data + conn.send('OK\n') + conn.close() + print 'Done with', host, 'port', remoteport + + +def client(): + if len(sys.argv) < 4: + usage() + count = int(eval(sys.argv[2])) + host = sys.argv[3] + if len(sys.argv) > 4: + port = eval(sys.argv[4]) + else: + port = MY_PORT + testdata = 'x' * (BUFSIZE-1) + '\n' + t1 = time.time() + s = socket(AF_INET, SOCK_STREAM) + t2 = time.time() + s.connect((host, port)) + t3 = time.time() + i = 0 + while i < count: + i = i+1 + s.send(testdata) + s.shutdown(1) # Send EOF + t4 = time.time() + data = s.recv(BUFSIZE) + t5 = time.time() + print data + print 'Raw timers:', t1, t2, t3, t4, t5 + print 'Intervals:', t2-t1, t3-t2, t4-t3, t5-t4 + print 'Total:', t5-t1 + print 'Throughput:', round((BUFSIZE*count*0.001) / (t5-t1), 3), + print 'K/sec.' + + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/udpecho.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/udpecho.py new file mode 100644 index 0000000000..ea7d396a26 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/udpecho.py @@ -0,0 +1,63 @@ +#! /usr/bin/env python + +# Client and server for udp (datagram) echo. +# +# Usage: udpecho -s [port] (to start a server) +# or: udpecho -c host [port] 2: + port = eval(sys.argv[2]) + else: + port = ECHO_PORT + s = socket(AF_INET, SOCK_DGRAM) + s.bind(('', port)) + print 'udp echo server ready' + while 1: + data, addr = s.recvfrom(BUFSIZE) + print 'server received %r from %r' % (data, addr) + s.sendto(data, addr) + +def client(): + if len(sys.argv) < 3: + usage() + host = sys.argv[2] + if len(sys.argv) > 3: + port = eval(sys.argv[3]) + else: + port = ECHO_PORT + addr = host, port + s = socket(AF_INET, SOCK_DGRAM) + s.bind(('', 0)) + print 'udp echo client ready, reading stdin' + while 1: + line = sys.stdin.readline() + if not line: + break + s.sendto(line, addr) + data, fromaddr = s.recvfrom(BUFSIZE) + print 'client received %r from %r' % (data, fromaddr) + +main() diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unicast.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unicast.py new file mode 100644 index 0000000000..9d36f45f97 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unicast.py @@ -0,0 +1,14 @@ +# Send UDP broadcast packets + +MYPORT = 50000 + +import sys, time +from socket import * + +s = socket(AF_INET, SOCK_DGRAM) +s.bind(('', 0)) + +while 1: + data = repr(time.time()) + '\n' + s.sendto(data, ('', MYPORT)) + time.sleep(2) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py new file mode 100644 index 0000000000..369e225f4e --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py @@ -0,0 +1,12 @@ +# Echo client demo using Unix sockets +# Piet van Oostrum + +from socket import * + +FILE = 'unix-socket' +s = socket(AF_UNIX, SOCK_STREAM) +s.connect(FILE) +s.send('Hello, world') +data = s.recv(1024) +s.close() +print 'Received', repr(data) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixserver.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixserver.py new file mode 100644 index 0000000000..a597b3ba8b --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixserver.py @@ -0,0 +1,24 @@ +# Echo server demo using Unix sockets (handles one connection only) +# Piet van Oostrum + +import os +from socket import * + +FILE = 'unix-socket' +s = socket(AF_UNIX, SOCK_STREAM) +s.bind(FILE) + +print 'Sock name is: ['+s.getsockname()+']' + +# Wait for a connection +s.listen(1) +conn, addr = s.accept() + +while True: + data = conn.recv(1024) + if not data: + break + conn.send(data) + +conn.close() +os.unlink(FILE) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/elem_count.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/elem_count.py new file mode 100644 index 0000000000..73ac38076b --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/elem_count.py @@ -0,0 +1,42 @@ +""" +A simple demo that reads in an XML document and displays the number of +elements and attributes as well as a tally of elements and attributes by name. +""" + +import sys +from collections import defaultdict + +from xml.sax import make_parser, handler + +class FancyCounter(handler.ContentHandler): + + def __init__(self): + self._elems = 0 + self._attrs = 0 + self._elem_types = defaultdict(int) + self._attr_types = defaultdict(int) + + def startElement(self, name, attrs): + self._elems += 1 + self._attrs += len(attrs) + self._elem_types[name] += 1 + + for name in attrs.keys(): + self._attr_types[name] += 1 + + def endDocument(self): + print "There were", self._elems, "elements." + print "There were", self._attrs, "attributes." + + print "---ELEMENT TYPES" + for pair in self._elem_types.items(): + print "%20s %d" % pair + + print "---ATTRIBUTE TYPES" + for pair in self._attr_types.items(): + print "%20s %d" % pair + +if __name__ == '__main__': + parser = make_parser() + parser.setContentHandler(FancyCounter()) + parser.parse(sys.argv[1]) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/roundtrip.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/roundtrip.py new file mode 100644 index 0000000000..921b2b84aa --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/roundtrip.py @@ -0,0 +1,46 @@ +""" +A simple demo that reads in an XML document and spits out an equivalent, +but not necessarily identical, document. +""" + +import sys + +from xml.sax import saxutils, handler, make_parser + +# --- The ContentHandler + +class ContentGenerator(handler.ContentHandler): + + def __init__(self, out=sys.stdout): + handler.ContentHandler.__init__(self) + self._out = out + + # ContentHandler methods + + def startDocument(self): + self._out.write('\n') + + def startElement(self, name, attrs): + self._out.write('<' + name) + for (name, value) in attrs.items(): + self._out.write(' %s="%s"' % (name, saxutils.escape(value))) + self._out.write('>') + + def endElement(self, name): + self._out.write('' % name) + + def characters(self, content): + self._out.write(saxutils.escape(content)) + + def ignorableWhitespace(self, content): + self._out.write(content) + + def processingInstruction(self, target, data): + self._out.write('' % (target, data)) + +# --- The main program + +if __name__ == '__main__': + parser = make_parser() + parser.setContentHandler(ContentGenerator()) + parser.parse(sys.argv[1]) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/rss2html.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/rss2html.py new file mode 100644 index 0000000000..e9bb76d145 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Demo/xml/rss2html.py @@ -0,0 +1,97 @@ +""" +A demo that reads in an RSS XML document and emits an HTML file containing +a list of the individual items in the feed. +""" + +import sys +import codecs + +from xml.sax import make_parser, handler + +# --- Templates + +top = """\ + + + + %s + + + + +

      %s

      +""" + +bottom = """ +
    + +
    +
    +Converted to HTML by rss2html.py. +
    + + + +""" + +# --- The ContentHandler + +class RSSHandler(handler.ContentHandler): + + def __init__(self, out=sys.stdout): + handler.ContentHandler.__init__(self) + self._out = codecs.getwriter('utf-8')(out) + + self._text = "" + self._parent = None + self._list_started = False + self._title = None + self._link = None + self._descr = "" + + # ContentHandler methods + + def startElement(self, name, attrs): + if name == "channel" or name == "image" or name == "item": + self._parent = name + + self._text = "" + + def endElement(self, name): + if self._parent == "channel": + if name == "title": + self._out.write(top % (self._text, self._text)) + elif name == "description": + self._out.write("

    %s

    \n" % self._text) + + elif self._parent == "item": + if name == "title": + self._title = self._text + elif name == "link": + self._link = self._text + elif name == "description": + self._descr = self._text + elif name == "item": + if not self._list_started: + self._out.write("