Imported Upstream version 2.7.11 49/138349/1 upstream/2.7.11
authorDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 12 Jul 2017 02:05:38 +0000 (11:05 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 12 Jul 2017 02:05:46 +0000 (11:05 +0900)
Change-Id: I6fd1d4f1828aa56cf9e1ece97699852529157243
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
527 files changed:
Doc/c-api/code.rst
Doc/c-api/exceptions.rst
Doc/c-api/gen.rst
Doc/c-api/iter.rst
Doc/c-api/veryhigh.rst
Doc/distutils/apiref.rst
Doc/distutils/index.rst
Doc/distutils/packageindex.rst
Doc/extending/building.rst
Doc/extending/index.rst
Doc/extending/windows.rst
Doc/faq/extending.rst
Doc/faq/general.rst
Doc/faq/gui.rst
Doc/faq/programming.rst
Doc/faq/windows.rst
Doc/glossary.rst
Doc/howto/descriptor.rst
Doc/howto/logging-cookbook.rst
Doc/howto/urllib2.rst
Doc/install/index.rst
Doc/library/2to3.rst
Doc/library/argparse.rst
Doc/library/bdb.rst
Doc/library/codecs.rst
Doc/library/collections.rst
Doc/library/cookie.rst
Doc/library/cookielib.rst
Doc/library/csv.rst
Doc/library/decimal.rst
Doc/library/difflib.rst
Doc/library/dis.rst
Doc/library/doctest.rst
Doc/library/email.parser.rst
Doc/library/exceptions.rst
Doc/library/fcntl.rst
Doc/library/fractions.rst
Doc/library/functions.rst
Doc/library/glob.rst
Doc/library/gzip.rst
Doc/library/hashlib.rst
Doc/library/hmac.rst
Doc/library/htmllib.rst
Doc/library/htmlparser.rst
Doc/library/idle.rst
Doc/library/io.rst
Doc/library/json.rst
Doc/library/locale.rst
Doc/library/math.rst
Doc/library/modulefinder.rst
Doc/library/msvcrt.rst
Doc/library/multiprocessing.rst
Doc/library/os.rst
Doc/library/pickle.rst
Doc/library/platform.rst
Doc/library/profile.rst
Doc/library/re.rst
Doc/library/resource.rst
Doc/library/shutil.rst
Doc/library/signal.rst
Doc/library/socket.rst
Doc/library/socketserver.rst
Doc/library/stdtypes.rst
Doc/library/subprocess.rst
Doc/library/thread.rst
Doc/library/threading.rst
Doc/library/time.rst
Doc/library/tkinter.rst
Doc/library/ttk.rst
Doc/library/unittest.rst
Doc/library/urllib.rst
Doc/library/urlparse.rst
Doc/library/wsgiref.rst
Doc/library/xml.dom.minidom.rst
Doc/library/xml.dom.rst
Doc/library/xml.etree.elementtree.rst
Doc/library/zlib.rst
Doc/reference/lexical_analysis.rst
Doc/tools/static/version_switch.js
Doc/tools/susp-ignored.csv
Doc/tutorial/appendix.rst
Doc/tutorial/datastructures.rst
Doc/tutorial/interpreter.rst
Doc/using/cmdline.rst
Doc/using/mac.rst
Doc/whatsnew/2.0.rst
Doc/whatsnew/2.5.rst
Doc/whatsnew/2.7.rst
Include/ceval.h
Include/codecs.h
Include/opcode.h
Include/patchlevel.h
Include/pymath.h
Include/unicodeobject.h
Lib/CGIHTTPServer.py
Lib/UserDict.py
Lib/_abcoll.py
Lib/_pyio.py
Lib/base64.py
Lib/codecs.py
Lib/cookielib.py
Lib/ctypes/test/test_bitfields.py
Lib/ctypes/test/test_pointers.py
Lib/ctypes/test/test_random_things.py
Lib/ctypes/test/test_win32.py
Lib/distutils/__init__.py
Lib/distutils/ccompiler.py
Lib/distutils/command/build_ext.py
Lib/distutils/msvc9compiler.py
Lib/distutils/tests/test_core.py
Lib/distutils/tests/test_dist.py
Lib/email/test/test_email.py
Lib/email/utils.py
Lib/encodings/base64_codec.py
Lib/encodings/bz2_codec.py
Lib/encodings/hex_codec.py
Lib/encodings/quopri_codec.py
Lib/encodings/rot_13.py
Lib/encodings/uu_codec.py
Lib/encodings/zlib_codec.py
Lib/ensurepip/__init__.py
Lib/ensurepip/_bundled/pip-6.1.1-py2.py3-none-any.whl [deleted file]
Lib/ensurepip/_bundled/pip-7.1.2-py2.py3-none-any.whl [new file with mode: 0644]
Lib/ensurepip/_bundled/setuptools-15.2-py2.py3-none-any.whl [deleted file]
Lib/ensurepip/_bundled/setuptools-18.2-py2.py3-none-any.whl [new file with mode: 0644]
Lib/httplib.py
Lib/idlelib/AutoCompleteWindow.py
Lib/idlelib/Bindings.py
Lib/idlelib/CallTipWindow.py
Lib/idlelib/ClassBrowser.py
Lib/idlelib/ColorDelegator.py
Lib/idlelib/Debugger.py
Lib/idlelib/EditorWindow.py
Lib/idlelib/GrepDialog.py
Lib/idlelib/IOBinding.py
Lib/idlelib/MultiStatusBar.py
Lib/idlelib/NEWS.txt
Lib/idlelib/OutputWindow.py
Lib/idlelib/PathBrowser.py
Lib/idlelib/PyShell.py
Lib/idlelib/README.txt
Lib/idlelib/RemoteDebugger.py
Lib/idlelib/ScriptBinding.py
Lib/idlelib/ScrolledList.py
Lib/idlelib/SearchDialog.py
Lib/idlelib/StackViewer.py
Lib/idlelib/TreeWidget.py
Lib/idlelib/WidgetRedirector.py
Lib/idlelib/__init__.py
Lib/idlelib/aboutDialog.py
Lib/idlelib/config-highlight.def
Lib/idlelib/config-main.def
Lib/idlelib/configDialog.py
Lib/idlelib/configHandler.py
Lib/idlelib/help.html [new file with mode: 0644]
Lib/idlelib/help.py [new file with mode: 0644]
Lib/idlelib/help.txt
Lib/idlelib/idle.pyw
Lib/idlelib/idle_test/README.txt
Lib/idlelib/idle_test/htest.py
Lib/idlelib/idle_test/test_autocomplete.py
Lib/idlelib/idle_test/test_formatparagraph.py
Lib/idlelib/idle_test/test_pathbrowser.py
Lib/idlelib/idle_test/test_searchdialogbase.py
Lib/idlelib/idle_test/test_searchengine.py
Lib/idlelib/idle_test/test_text.py
Lib/idlelib/idle_test/test_warning.py
Lib/idlelib/idlever.py
Lib/idlelib/macosxSupport.py
Lib/idlelib/rpc.py
Lib/idlelib/run.py
Lib/idlelib/textView.py
Lib/inspect.py
Lib/json/__init__.py
Lib/json/decoder.py
Lib/lib-tk/FixTk.py
Lib/lib-tk/Tkinter.py
Lib/lib-tk/test/test_tkinter/test_font.py
Lib/lib-tk/test/test_ttk/support.py
Lib/lib2to3/fixes/fix_metaclass.py
Lib/lib2to3/fixes/fix_types.py
Lib/lib2to3/refactor.py
Lib/lib2to3/tests/test_fixers.py
Lib/logging/__init__.py
Lib/mhlib.py
Lib/multiprocessing/forking.py
Lib/nturl2path.py
Lib/pdb.py
Lib/pickle.py
Lib/platform.py
Lib/pydoc.py
Lib/pydoc_data/topics.py
Lib/rlcompleter.py
Lib/shutil.py
Lib/sqlite3/test/factory.py
Lib/tarfile.py
Lib/tempfile.py
Lib/test/lock_tests.py
Lib/test/pickletester.py
Lib/test/regrtest.py
Lib/test/seq_tests.py
Lib/test/string_tests.py
Lib/test/test__locale.py
Lib/test/test_array.py
Lib/test/test_audioop.py
Lib/test/test_bufio.py
Lib/test/test_bytes.py
Lib/test/test_calendar.py
Lib/test/test_cmath.py
Lib/test/test_codeccallbacks.py
Lib/test/test_codecs.py
Lib/test/test_collections.py
Lib/test/test_compile.py
Lib/test/test_contextlib.py
Lib/test/test_cpickle.py
Lib/test/test_decimal.py
Lib/test/test_descr.py
Lib/test/test_dict.py
Lib/test/test_dictviews.py
Lib/test/test_ensurepip.py
Lib/test/test_file.py
Lib/test/test_fileinput.py
Lib/test/test_fileio.py
Lib/test/test_float.py
Lib/test/test_gdb.py
Lib/test/test_hotshot.py
Lib/test/test_httplib.py
Lib/test/test_httpservers.py
Lib/test/test_imageop.py
Lib/test/test_inspect.py
Lib/test/test_int.py
Lib/test/test_io.py
Lib/test/test_long.py
Lib/test/test_memoryio.py
Lib/test/test_os.py
Lib/test/test_pdb.py
Lib/test/test_pep277.py
Lib/test/test_pickle.py
Lib/test/test_posixpath.py
Lib/test/test_pprint.py
Lib/test/test_py3kwarn.py
Lib/test/test_py_compile.py
Lib/test/test_pyexpat.py
Lib/test/test_random.py
Lib/test/test_rlcompleter.py
Lib/test/test_set.py
Lib/test/test_shutil.py
Lib/test/test_slice.py
Lib/test/test_socketserver.py
Lib/test/test_ssl.py
Lib/test/test_str.py
Lib/test/test_strop.py
Lib/test/test_subprocess.py
Lib/test/test_support.py
Lib/test/test_tarfile.py
Lib/test/test_tcl.py
Lib/test/test_tempfile.py
Lib/test/test_textwrap.py
Lib/test/test_timeit.py
Lib/test/test_tokenize.py
Lib/test/test_traceback.py
Lib/test/test_unicode.py
Lib/test/test_unicode_file.py
Lib/test/test_userdict.py
Lib/test/test_warnings.py
Lib/test/test_weakref.py
Lib/test/test_wsgiref.py
Lib/test/test_xpickle.py
Lib/test/test_zipfile.py
Lib/test/test_zlib.py
Lib/textwrap.py
Lib/threading.py
Lib/timeit.py
Lib/tokenize.py
Lib/unittest/case.py
Lib/unittest/main.py
Lib/unittest/test/test_case.py
Lib/uuid.py
Lib/warnings.py
Lib/weakref.py
Lib/wsgiref/validate.py
Lib/zipfile.py
Mac/BuildScript/build-installer.py
Mac/BuildScript/openssl_sdk_makedepend.patch
Makefile.pre.in
Misc/ACKS
Misc/HISTORY
Misc/NEWS
Misc/python.man
Misc/valgrind-python.supp
Modules/_bsddb.c
Modules/_collectionsmodule.c
Modules/_csv.c
Modules/_ctypes/cfield.c
Modules/_elementtree.c
Modules/_hashopenssl.c
Modules/_heapqmodule.c
Modules/_hotshot.c
Modules/_io/_iomodule.h
Modules/_io/bytesio.c
Modules/_io/textio.c
Modules/_json.c
Modules/_randommodule.c
Modules/_sqlite/row.c
Modules/_sre.c
Modules/_ssl.c
Modules/_testcapimodule.c
Modules/arraymodule.c
Modules/audioop.c
Modules/cPickle.c
Modules/cjkcodecs/multibytecodec.c
Modules/cmathmodule.c
Modules/imageop.c
Modules/itertoolsmodule.c
Modules/mmapmodule.c
Modules/posixmodule.c
Modules/readline.c
Modules/selectmodule.c
Modules/socketmodule.c
Modules/stropmodule.c
Modules/threadmodule.c
Objects/abstract.c
Objects/bytearrayobject.c
Objects/complexobject.c
Objects/descrobject.c
Objects/dictobject.c
Objects/floatobject.c
Objects/iterobject.c
Objects/obmalloc.c
Objects/setobject.c
Objects/stringlib/formatter.h
Objects/stringobject.c
Objects/typeobject.c
Objects/unicodeobject.c
PC/VS9.0/_bsddb.vcproj [new file with mode: 0644]
PC/VS9.0/_ctypes.vcproj [new file with mode: 0644]
PC/VS9.0/_ctypes_test.vcproj [new file with mode: 0644]
PC/VS9.0/_elementtree.vcproj [new file with mode: 0644]
PC/VS9.0/_hashlib.vcproj [new file with mode: 0644]
PC/VS9.0/_msi.vcproj [new file with mode: 0644]
PC/VS9.0/_multiprocessing.vcproj [new file with mode: 0644]
PC/VS9.0/_socket.vcproj [new file with mode: 0644]
PC/VS9.0/_sqlite3.vcproj [new file with mode: 0644]
PC/VS9.0/_ssl.vcproj [new file with mode: 0644]
PC/VS9.0/_testcapi.vcproj [new file with mode: 0644]
PC/VS9.0/_tkinter.vcproj [new file with mode: 0644]
PC/VS9.0/bdist_wininst.vcproj [new file with mode: 0644]
PC/VS9.0/build.bat [new file with mode: 0644]
PC/VS9.0/build_env.bat [new file with mode: 0644]
PC/VS9.0/build_pgo.bat [new file with mode: 0644]
PC/VS9.0/build_ssl.bat [new file with mode: 0644]
PC/VS9.0/build_ssl.py [new file with mode: 0644]
PC/VS9.0/build_tkinter.py [new file with mode: 0644]
PC/VS9.0/bz2.vcproj [new file with mode: 0644]
PC/VS9.0/debug.vsprops [new file with mode: 0644]
PC/VS9.0/env.bat [new file with mode: 0644]
PC/VS9.0/field3.py [new file with mode: 0644]
PC/VS9.0/idle.bat [new file with mode: 0644]
PC/VS9.0/installer.bmp [new file with mode: 0644]
PC/VS9.0/kill_python.c [new file with mode: 0644]
PC/VS9.0/kill_python.vcproj [new file with mode: 0644]
PC/VS9.0/make_buildinfo.c [new file with mode: 0644]
PC/VS9.0/make_buildinfo.vcproj [new file with mode: 0644]
PC/VS9.0/make_versioninfo.vcproj [new file with mode: 0644]
PC/VS9.0/pcbuild.sln [new file with mode: 0644]
PC/VS9.0/pginstrument.vsprops [new file with mode: 0644]
PC/VS9.0/pgupdate.vsprops [new file with mode: 0644]
PC/VS9.0/pyd.vsprops [new file with mode: 0644]
PC/VS9.0/pyd_d.vsprops [new file with mode: 0644]
PC/VS9.0/pyexpat.vcproj [new file with mode: 0644]
PC/VS9.0/pyproject.vsprops [new file with mode: 0644]
PC/VS9.0/python.vcproj [new file with mode: 0644]
PC/VS9.0/pythoncore.vcproj [new file with mode: 0644]
PC/VS9.0/pythonw.vcproj [new file with mode: 0644]
PC/VS9.0/readme.txt [new file with mode: 0644]
PC/VS9.0/release.vsprops [new file with mode: 0644]
PC/VS9.0/rmpyc.py [new file with mode: 0644]
PC/VS9.0/rt.bat [new file with mode: 0644]
PC/VS9.0/select.vcproj [new file with mode: 0644]
PC/VS9.0/sqlite3.vcproj [new file with mode: 0644]
PC/VS9.0/sqlite3.vsprops [new file with mode: 0644]
PC/VS9.0/unicodedata.vcproj [new file with mode: 0644]
PC/VS9.0/vs9to8.py [new file with mode: 0644]
PC/VS9.0/w9xpopen.vcproj [new file with mode: 0644]
PC/VS9.0/winsound.vcproj [new file with mode: 0644]
PC/VS9.0/x64.vsprops [new file with mode: 0644]
PC/bdist_wininst/bdist_wininst.vcxproj [new file with mode: 0644]
PC/bdist_wininst/bdist_wininst.vcxproj.filters [new file with mode: 0644]
PC/bdist_wininst/install.c
PC/example_nt/example.c [deleted file]
PC/example_nt/example.sln [deleted file]
PC/example_nt/example.vcproj [deleted file]
PC/example_nt/readme.txt [deleted file]
PC/example_nt/setup.py [deleted file]
PC/pyconfig.h
PC/readme.txt
PCbuild/_bsddb.vcproj [deleted file]
PCbuild/_bsddb.vcxproj [new file with mode: 0644]
PCbuild/_bsddb.vcxproj.filters [new file with mode: 0644]
PCbuild/_ctypes.vcproj [deleted file]
PCbuild/_ctypes.vcxproj [new file with mode: 0644]
PCbuild/_ctypes.vcxproj.filters [new file with mode: 0644]
PCbuild/_ctypes_test.vcproj [deleted file]
PCbuild/_ctypes_test.vcxproj [new file with mode: 0644]
PCbuild/_ctypes_test.vcxproj.filters [new file with mode: 0644]
PCbuild/_elementtree.vcproj [deleted file]
PCbuild/_elementtree.vcxproj [new file with mode: 0644]
PCbuild/_elementtree.vcxproj.filters [new file with mode: 0644]
PCbuild/_hashlib.vcproj [deleted file]
PCbuild/_hashlib.vcxproj [new file with mode: 0644]
PCbuild/_hashlib.vcxproj.filters [new file with mode: 0644]
PCbuild/_msi.vcproj [deleted file]
PCbuild/_msi.vcxproj [new file with mode: 0644]
PCbuild/_msi.vcxproj.filters [new file with mode: 0644]
PCbuild/_multiprocessing.vcproj [deleted file]
PCbuild/_multiprocessing.vcxproj [new file with mode: 0644]
PCbuild/_multiprocessing.vcxproj.filters [new file with mode: 0644]
PCbuild/_socket.vcproj [deleted file]
PCbuild/_socket.vcxproj [new file with mode: 0644]
PCbuild/_socket.vcxproj.filters [new file with mode: 0644]
PCbuild/_sqlite3.vcproj [deleted file]
PCbuild/_sqlite3.vcxproj [new file with mode: 0644]
PCbuild/_sqlite3.vcxproj.filters [new file with mode: 0644]
PCbuild/_ssl.vcproj [deleted file]
PCbuild/_ssl.vcxproj [new file with mode: 0644]
PCbuild/_ssl.vcxproj.filters [new file with mode: 0644]
PCbuild/_testcapi.vcproj [deleted file]
PCbuild/_testcapi.vcxproj [new file with mode: 0644]
PCbuild/_testcapi.vcxproj.filters [new file with mode: 0644]
PCbuild/_tkinter.vcproj [deleted file]
PCbuild/_tkinter.vcxproj [new file with mode: 0644]
PCbuild/_tkinter.vcxproj.filters [new file with mode: 0644]
PCbuild/bdist_wininst.vcproj [deleted file]
PCbuild/build.bat
PCbuild/build_pgo.bat
PCbuild/build_ssl.bat [deleted file]
PCbuild/build_ssl.py [deleted file]
PCbuild/build_tkinter.py [deleted file]
PCbuild/bz2.vcproj [deleted file]
PCbuild/bz2.vcxproj [new file with mode: 0644]
PCbuild/bz2.vcxproj.filters [new file with mode: 0644]
PCbuild/clean.bat [new file with mode: 0644]
PCbuild/debug.vsprops [deleted file]
PCbuild/env.bat
PCbuild/get_externals.bat [new file with mode: 0644]
PCbuild/kill_python.c [deleted file]
PCbuild/kill_python.vcproj [deleted file]
PCbuild/libeay.vcxproj [new file with mode: 0644]
PCbuild/make_buildinfo.c [deleted file]
PCbuild/make_buildinfo.vcproj [deleted file]
PCbuild/make_versioninfo.vcproj [deleted file]
PCbuild/openssl.props [new file with mode: 0644]
PCbuild/pcbuild.proj [new file with mode: 0644]
PCbuild/pcbuild.sln
PCbuild/pginstrument.vsprops [deleted file]
PCbuild/pgupdate.vsprops [deleted file]
PCbuild/pyd.vsprops [deleted file]
PCbuild/pyd_d.vsprops [deleted file]
PCbuild/pyexpat.vcproj [deleted file]
PCbuild/pyexpat.vcxproj [new file with mode: 0644]
PCbuild/pyexpat.vcxproj.filters [new file with mode: 0644]
PCbuild/pyproject.props [new file with mode: 0644]
PCbuild/pyproject.vsprops [deleted file]
PCbuild/python.props [new file with mode: 0644]
PCbuild/python.vcproj [deleted file]
PCbuild/python.vcxproj [new file with mode: 0644]
PCbuild/python.vcxproj.filters [new file with mode: 0644]
PCbuild/pythoncore.vcproj [deleted file]
PCbuild/pythoncore.vcxproj [new file with mode: 0644]
PCbuild/pythoncore.vcxproj.filters [new file with mode: 0644]
PCbuild/pythonw.vcproj [deleted file]
PCbuild/pythonw.vcxproj [new file with mode: 0644]
PCbuild/pythonw.vcxproj.filters [new file with mode: 0644]
PCbuild/readme.txt
PCbuild/release.vsprops [deleted file]
PCbuild/rt.bat
PCbuild/select.vcproj [deleted file]
PCbuild/select.vcxproj [new file with mode: 0644]
PCbuild/select.vcxproj.filters [new file with mode: 0644]
PCbuild/sqlite3.vcproj [deleted file]
PCbuild/sqlite3.vcxproj [new file with mode: 0644]
PCbuild/sqlite3.vcxproj.filters [new file with mode: 0644]
PCbuild/sqlite3.vsprops [deleted file]
PCbuild/ssleay.vcxproj [new file with mode: 0644]
PCbuild/tcl.vcxproj [new file with mode: 0644]
PCbuild/tcltk.props [new file with mode: 0644]
PCbuild/tix.vcxproj [new file with mode: 0644]
PCbuild/tk.vcxproj [new file with mode: 0644]
PCbuild/unicodedata.vcproj [deleted file]
PCbuild/unicodedata.vcxproj [new file with mode: 0644]
PCbuild/unicodedata.vcxproj.filters [new file with mode: 0644]
PCbuild/vs9to8.py [deleted file]
PCbuild/w9xpopen.vcproj [deleted file]
PCbuild/w9xpopen.vcxproj [new file with mode: 0644]
PCbuild/w9xpopen.vcxproj.filters [new file with mode: 0644]
PCbuild/winsound.vcproj [deleted file]
PCbuild/winsound.vcxproj [new file with mode: 0644]
PCbuild/winsound.vcxproj.filters [new file with mode: 0644]
PCbuild/x64.vsprops [deleted file]
Parser/tokenizer.c
Python/bltinmodule.c
Python/ceval.c
Python/codecs.c
Python/compile.c
Python/makeopcodetargets.py [new file with mode: 0755]
Python/opcode_targets.h [new file with mode: 0644]
Python/pythonrun.c
Python/random.c
README
Tools/buildbot/README.tcltk-AMD64 [deleted file]
Tools/buildbot/build-amd64.bat
Tools/buildbot/build.bat
Tools/buildbot/clean-amd64.bat
Tools/buildbot/clean.bat
Tools/buildbot/external-amd64.bat
Tools/buildbot/external-common.bat [deleted file]
Tools/buildbot/external.bat
Tools/buildbot/test-amd64.bat
Tools/buildbot/test.bat
Tools/freeze/checkextensions_win32.py
Tools/gdb/libpython.py
Tools/msi/msi.py
Tools/msi/uuids.py
Tools/scripts/fixdiv.py
configure
configure.ac
pyconfig.h.in

index 7d9b4b6c1d7e81cb06b1a5c3dce99bcb173839bb..041213843912dc73de1c68779a1fbd3d7c54c861 100644 (file)
@@ -29,7 +29,7 @@ bound into a function.
 
 .. c:function:: int PyCode_Check(PyObject *co)
 
-   Return true if *co* is a :class:`code` object
+   Return true if *co* is a :class:`code` object.
 
 .. c:function:: int PyCode_GetNumFree(PyObject *co)
 
index 6f8f243423d770d72770beb3da99a36de01935af..65249e1b819295394dc72eb07f41f1c674b35c68 100644 (file)
@@ -493,7 +493,7 @@ level, both in the core and in extension modules.  They are needed if the
 recursive code does not necessarily invoke Python code (which tracks its
 recursion depth automatically).
 
-.. c:function:: int Py_EnterRecursiveCall(char *where)
+.. c:function:: int Py_EnterRecursiveCall(const char *where)
 
    Marks a point where a recursive C-level call is about to be performed.
 
index 33cd27a5aa6c44bf99a0630745000043d98da9c7..0c851a75efbe1dba04fefda992eff1338190c2c7 100644 (file)
@@ -17,7 +17,7 @@ than explicitly calling :c:func:`PyGen_New`.
 
 .. c:var:: PyTypeObject PyGen_Type
 
-   The type object corresponding to generator objects
+   The type object corresponding to generator objects.
 
 
 .. c:function:: int PyGen_Check(ob)
index 8d1567c7b34a99ed1663dae277c8060667928e8c..fb2a71cf1a825a85205c09b2d04abfc57d9b7530 100644 (file)
@@ -14,6 +14,10 @@ There are two functions specifically for working with iterators.
 
    Return true if the object *o* supports the iterator protocol.
 
+   This function can return a false positive in the case of old-style
+   classes because those classes always define a :c:member:`tp_iternext`
+   slot with logic that either invokes a :meth:`next` method or raises
+   a :exc:`TypeError`.
 
 .. c:function:: PyObject* PyIter_Next(PyObject *o)
 
index 610766557741d4fe8db8121731069aaff9444177..9e54c1409d63bc1033e0e264a991bb71c322f579 100644 (file)
@@ -168,7 +168,7 @@ the same library that the Python runtime is using.
 .. c:function:: struct _node* PyParser_SimpleParseFile(FILE *fp, const char *filename, int start)
 
    This is a simplified interface to :c:func:`PyParser_SimpleParseFileFlags` below,
-   leaving *flags* set to ``0``
+   leaving *flags* set to ``0``.
 
 
 .. c:function:: struct _node* PyParser_SimpleParseFileFlags(FILE *fp, const char *filename, int start, int flags)
index 8366d8a2c6d942d3d566e7a690e66c97ff55a0bd..c7d399f595dc19a1db491b85f53d8f924ff60bdd 100644 (file)
@@ -516,7 +516,7 @@ This module provides the following functions.
 
    .. method:: CCompiler.library_option(lib)
 
-      Return the compiler option to add *dir* to the list of libraries linked into the
+      Return the compiler option to add *lib* to the list of libraries linked into the
       shared library or executable.
 
 
@@ -926,7 +926,7 @@ timestamp dependency analysis.
 
    Walk two filename lists in parallel, testing if each source is newer than its
    corresponding target.  Return a pair of lists (*sources*, *targets*) where
-   source is newer than target, according to the semantics of :func:`newer`
+   source is newer than target, according to the semantics of :func:`newer`.
 
    .. % % equivalent to a listcomp...
 
index 1a6f04c87af8a2216d850f057de3425ef43e148a..1f21e14be5e672fc1c3a71f0ffd52f44bd190e10 100644 (file)
@@ -15,10 +15,9 @@ very little overhead for build/release/install mechanics.
 .. note::
 
    This guide only covers the basic tools for building and distributing
-   extensions that are provided as part of this version of Python. Third
-   party tools offer easier to use and more secure alternatives. Refer to the
-   `quick recommendations section
-   <https://python-packaging-user-guide.readthedocs.org/en/latest/current.html>`__
+   extensions that are provided as part of this version of Python. Third party
+   tools offer easier to use and more secure alternatives. Refer to the `quick
+   recommendations section <https://packaging.python.org/en/latest/current/>`__
    in the Python Packaging User Guide for more information.
 
 
index be72bb77877aaeb72528757acff3257cb76ed574..74944953a6d68627655e43b26de9fe08c122572b 100644 (file)
@@ -169,7 +169,7 @@ follows::
     username: <username>
     password: <password>
 
-The *distutils* section defines a *index-servers* variable that lists the
+The *distutils* section defines an *index-servers* variable that lists the
 name of all sections describing a repository.
 
 Each section describing a repository defines three variables:
index 06d300547d4d058a7ed32dc13da000590a067edd..656af88131b57ab5248ac91c7a85b7cf9208c8d9 100644 (file)
@@ -56,7 +56,7 @@ documentation in :ref:`distutils-index` to learn more about the features of
 distutils; this section explains building extension modules only.
 
 It is common to pre-compute arguments to :func:`setup`, to better structure the
-driver script. In the example above, the\ ``ext_modules`` argument to
+driver script. In the example above, the ``ext_modules`` argument to
 :func:`setup` is a list of extension modules, each of which is an instance of
 the :class:`~distutils.extension.Extension`. In the example, the instance
 defines an extension named ``demo`` which is build by compiling a single source
index 44a7f92c007b1a3cd0a4afc88f9db5c03350eeed..1ba5d5aa712e3a0f1a64acaef007e1266085e7ef 100644 (file)
@@ -26,8 +26,8 @@ For a detailed description of the whole Python/C API, see the separate
    This guide only covers the basic tools for creating extensions provided
    as part of this version of CPython. Third party tools may offer simpler
    alternatives. Refer to the `binary extensions section
-   <https://python-packaging-user-guide.readthedocs.org/en/latest/extensions.html>`__
-   in the Python Packaging User Guide for more information.
+   <https://packaging.python.org/en/latest/extensions/>`__ in the Python
+   Packaging User Guide for more information.
 
 
 .. toctree::
index 66b518d8d406aff23d23fad7b0443c09e8d7ad72..67bdd475aeb610ade97f12ed008f98f890e5b1c4 100644 (file)
@@ -37,154 +37,9 @@ There are two approaches to building extension modules on Windows, just as there
 are on Unix: use the :mod:`distutils` package to control the build process, or
 do things manually.  The distutils approach works well for most extensions;
 documentation on using :mod:`distutils` to build and package extension modules
-is available in :ref:`distutils-index`.  This section describes the manual
-approach to building Python extensions written in C or C++.
-
-To build extensions using these instructions, you need to have a copy of the
-Python sources of the same version as your installed Python. You will need
-Microsoft Visual C++ "Developer Studio"; project files are supplied for VC++
-version 7.1, but you can use older versions of VC++.  Notice that you should use
-the same version of VC++that was used to build Python itself. The example files
-described here are distributed with the Python sources in the
-:file:`PC\\example_nt\\` directory.
-
-#. **Copy the example files** ---  The :file:`example_nt` directory is a
-   subdirectory of the :file:`PC` directory, in order to keep all the PC-specific
-   files under the same directory in the source distribution.  However, the
-   :file:`example_nt` directory can't actually be used from this location.  You
-   first need to copy or move it up one level, so that :file:`example_nt` is a
-   sibling of the :file:`PC` and :file:`Include` directories.  Do all your work
-   from within this new location.
-
-#. **Open the project** ---  From VC++, use the :menuselection:`File --> Open
-   Solution` dialog (not :menuselection:`File --> Open`!).  Navigate to and select
-   the file :file:`example.sln`, in the *copy* of the :file:`example_nt` directory
-   you made above.  Click Open.
-
-#. **Build the example DLL** ---  In order to check that everything is set up
-   right, try building:
-
-#. Select a configuration.  This step is optional.  Choose
-   :menuselection:`Build --> Configuration Manager --> Active Solution Configuration`
-   and select either :guilabel:`Release`  or :guilabel:`Debug`.  If you skip this
-   step, VC++ will use the Debug configuration by default.
-
-#. Build the DLL.  Choose :menuselection:`Build --> Build Solution`.  This
-   creates all intermediate and result files in a subdirectory called either
-   :file:`Debug` or :file:`Release`, depending on which configuration you selected
-   in the preceding step.
-
-#. **Testing the debug-mode DLL** ---  Once the Debug build has succeeded, bring
-   up a DOS box, and change to the :file:`example_nt\\Debug` directory.  You should
-   now be able to repeat the following session (``C>`` is the DOS prompt, ``>>>``
-   is the Python prompt; note that build information and various debug output from
-   Python may not match this screen dump exactly)::
-
-      C>..\..\PCbuild\python_d
-      Adding parser accelerators ...
-      Done.
-      Python 2.2 (#28, Dec 19 2001, 23:26:37) [MSC 32 bit (Intel)] on win32
-      Type "copyright", "credits" or "license" for more information.
-      >>> import example
-      [4897 refs]
-      >>> example.foo()
-      Hello, world
-      [4903 refs]
-      >>>
-
-   Congratulations!  You've successfully built your first Python extension module.
-
-#. **Creating your own project** ---  Choose a name and create a directory for
-   it.  Copy your C sources into it.  Note that the module source file name does
-   not necessarily have to match the module name, but the name of the
-   initialization function should match the module name --- you can only import a
-   module :mod:`spam` if its initialization function is called :c:func:`initspam`,
-   and it should call :c:func:`Py_InitModule` with the string ``"spam"`` as its
-   first argument (use the minimal :file:`example.c` in this directory as a guide).
-   By convention, it lives in a file called :file:`spam.c` or :file:`spammodule.c`.
-   The output file should be called :file:`spam.pyd` (in Release mode) or
-   :file:`spam_d.pyd` (in Debug mode). The extension :file:`.pyd` was chosen
-   to avoid confusion with a system library :file:`spam.dll` to which your module
-   could be a Python interface.
-
-   .. versionchanged:: 2.5
-      Previously, file names like :file:`spam.dll` (in release mode) or
-      :file:`spam_d.dll` (in debug mode) were also recognized.
-
-   Now your options are:
-
-#. Copy :file:`example.sln` and :file:`example.vcproj`, rename them to
-   :file:`spam.\*`, and edit them by hand, or
-
-#. Create a brand new project; instructions are below.
-
-   In either case, copy :file:`example_nt\\example.def` to :file:`spam\\spam.def`,
-   and edit the new :file:`spam.def` so its second line contains the string
-   '``initspam``'.  If you created a new project yourself, add the file
-   :file:`spam.def` to the project now.  (This is an annoying little file with only
-   two lines.  An alternative approach is to forget about the :file:`.def` file,
-   and add the option :option:`/export:initspam` somewhere to the Link settings, by
-   manually editing the setting in Project Properties dialog).
-
-#. **Creating a brand new project** ---  Use the :menuselection:`File --> New
-   --> Project` dialog to create a new Project Workspace.  Select :guilabel:`Visual
-   C++ Projects/Win32/ Win32 Project`, enter the name (``spam``), and make sure the
-   Location is set to parent of the :file:`spam` directory you have created (which
-   should be a direct subdirectory of the Python build tree, a sibling of
-   :file:`Include` and :file:`PC`).  Select Win32 as the platform (in my version,
-   this is the only choice).  Make sure the Create new workspace radio button is
-   selected.  Click OK.
-
-   You should now create the file :file:`spam.def` as instructed in the previous
-   section. Add the source files to the project, using :menuselection:`Project -->
-   Add Existing Item`. Set the pattern to ``*.*`` and select both :file:`spam.c`
-   and :file:`spam.def` and click OK.  (Inserting them one by one is fine too.)
-
-   Now open the :menuselection:`Project --> spam properties` dialog. You only need
-   to change a few settings.  Make sure :guilabel:`All Configurations` is selected
-   from the :guilabel:`Settings for:` dropdown list.  Select the C/C++ tab.  Choose
-   the General category in the popup menu at the top.  Type the following text in
-   the entry box labeled :guilabel:`Additional Include Directories`::
-
-      ..\Include,..\PC
-
-   Then, choose the General category in the Linker tab, and enter ::
-
-      ..\PCbuild
-
-   in the text box labelled :guilabel:`Additional library Directories`.
-
-   Now you need to add some mode-specific settings:
-
-   Select :guilabel:`Release` in the :guilabel:`Configuration` dropdown list.
-   Choose the :guilabel:`Link` tab, choose the :guilabel:`Input` category, and
-   append ``pythonXY.lib`` to the list in the :guilabel:`Additional Dependencies`
-   box.
-
-   Select :guilabel:`Debug` in the :guilabel:`Configuration` dropdown list, and
-   append ``pythonXY_d.lib`` to the list in the :guilabel:`Additional Dependencies`
-   box.  Then click the C/C++ tab, select :guilabel:`Code Generation`, and select
-   :guilabel:`Multi-threaded Debug DLL` from the :guilabel:`Runtime library`
-   dropdown list.
-
-   Select :guilabel:`Release` again from the :guilabel:`Configuration` dropdown
-   list.  Select :guilabel:`Multi-threaded DLL` from the :guilabel:`Runtime
-   library` dropdown list.
-
-If your module creates a new type, you may have trouble with this line::
-
-   PyObject_HEAD_INIT(&PyType_Type)
-
-Static type object initializers in extension modules may cause
-compiles to fail with an error message like "initializer not a
-constant".  This shows up when building DLL under MSVC.  Change it to::
-
-   PyObject_HEAD_INIT(NULL)
-
-and add the following to the module initialization function::
-
-   if (PyType_Ready(&MyObject_Type) < 0)
-        return NULL;
+is available in :ref:`distutils-index`.  If you find you really need to do
+things manually, it may be instructive to study the project file for the
+:source:`winsound <PCbuild/winsound.vcxproj>` standard library module.
 
 
 .. _dynamic-linking:
index ccd8b285b2fc24c79474652b68050ff56a006dab..6e9e1540283fca28cfa9752e94ef80acecc47ad8 100644 (file)
@@ -345,7 +345,7 @@ complete example using the GNU readline library (you may want to ignore
      {
        line = readline (prompt);
 
-       if (NULL == line)                          /* CTRL-D pressed */
+       if (NULL == line)                          /* Ctrl-D pressed */
        {
          done = 1;
        }
@@ -440,8 +440,8 @@ extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``).
 Can I create an object class with some methods implemented in C and others in Python (e.g. through inheritance)?
 ----------------------------------------------------------------------------------------------------------------
 
-In Python 2.2, you can inherit from built-in classes such as :class:`int`,
-:class:`list`, :class:`dict`, etc.
+Yes, you can inherit from built-in classes such as :class:`int`, :class:`list`,
+:class:`dict`, etc.
 
 The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index.html)
 provides a way of doing this from C++ (i.e. you can inherit from an extension
index 8dc8a1931eb4c55bade30d9a7a09b69cabc81340..8c7f5380816d2ca30c50cedc9aff87d2cc355953 100644 (file)
@@ -53,7 +53,7 @@ commercial use, to sell copies of Python in source or binary form (modified or
 unmodified), or to sell products that incorporate Python in some form.  We would
 still like to know about all commercial use of Python, of course.
 
-See `the PSF license page <https://docs.python.org/3/license/>`_ to find further
+See `the PSF license page <https://www.python.org/psf/license/>`_ to find further
 explanations and a link to the full text of the license.
 
 The Python logo is trademarked, and in certain cases permission is required to
@@ -151,8 +151,8 @@ after a final minor release is made, the Subversion trunk is incremented to the
 next minor version, which becomes the "a0" version,
 e.g. "2.4a0".
 
-See also the documentation for ``sys.version``, ``sys.hexversion``, and
-``sys.version_info``.
+See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, and
+:data:`sys.version_info`.
 
 
 How do I obtain a copy of the Python source?
index 5e1d8beafd6e0590ac1f28b665f5a318a96d22f6..44e5908474b4e4de40668a2e12f52842e4561386 100644 (file)
@@ -125,30 +125,11 @@ might include the Tix libraries as well).
 Can I have Tk events handled while waiting for I/O?
 ---------------------------------------------------
 
-Yes, and you don't even need threads!  But you'll have to restructure your I/O
+On platforms other than Windows, yes, and you don't even
+need threads!  But you'll have to restructure your I/O
 code a bit.  Tk has the equivalent of Xt's :c:func:`XtAddInput()` call, which allows you
 to register a callback function which will be called from the Tk mainloop when
-I/O is possible on a file descriptor.  Here's what you need::
-
-   from Tkinter import tkinter
-   tkinter.createfilehandler(file, mask, callback)
-
-The file may be a Python file or socket object (actually, anything with a
-fileno() method), or an integer file descriptor.  The mask is one of the
-constants tkinter.READABLE or tkinter.WRITABLE.  The callback is called as
-follows::
-
-   callback(file, mask)
-
-You must unregister the callback when you're done, using ::
-
-   tkinter.deletefilehandler(file)
-
-Note: since you don't know *how many bytes* are available for reading, you can't
-use the Python file object's read or readline methods, since these will insist
-on reading a predefined number of bytes.  For sockets, the :meth:`recv` or
-:meth:`recvfrom` methods will work fine; for other files, use
-``os.read(file.fileno(), maxbytecount)``.
+I/O is possible on a file descriptor.  See :ref:`tkinter-file-handlers`.
 
 
 I can't get key bindings to work in Tkinter: why?
index 588066dbc5e275e3e30dd9e443c8e6e86ab41cfa..135ae521fbd101310f4872caa7a0dd9d8dbc8198 100644 (file)
@@ -333,10 +333,8 @@ What are the rules for local and global variables in Python?
 ------------------------------------------------------------
 
 In Python, variables that are only referenced inside a function are implicitly
-global.  If a variable is assigned a new value anywhere within the function's
-body, it's assumed to be a local.  If a variable is ever assigned a new value
-inside the function, the variable is implicitly local, and you need to
-explicitly declare it as 'global'.
+global.  If a variable is assigned a value anywhere within the function's body,
+it's assumed to be a local unless explicitly declared as global.
 
 Though a bit surprising at first, a moment's consideration explains this.  On
 one hand, requiring :keyword:`global` for assigned variables provides a bar
@@ -1282,6 +1280,8 @@ analogue of lisp car is ``lisp_list[0]`` and the analogue of cdr is
 usually a lot slower than using Python lists.
 
 
+.. _faq-multidimensional-list:
+
 How do I create a multidimensional list?
 ----------------------------------------
 
index 19bd12019ddeabb2d05682c413ec0f99918c6230..27299c88a70d25008cbf9d3dcb0da5752cfd0b30 100644 (file)
@@ -77,14 +77,14 @@ by entering a few expressions of your choice and seeing the results::
     'HelloHelloHello'
 
 Many people use the interactive mode as a convenient yet highly programmable
-calculator.  When you want to end your interactive Python session, hold the Ctrl
-key down while you enter a Z, then hit the "Enter" key to get back to your
+calculator.  When you want to end your interactive Python session, hold the :kbd:`Ctrl`
+key down while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get back to your
 Windows command prompt.
 
 You may also find that you have a Start-menu entry such as :menuselection:`Start
 --> Programs --> Python 2.7 --> Python (command line)` that results in you
 seeing the ``>>>`` prompt in a new window.  If so, the window will disappear
-after you enter the Ctrl-Z character; Windows is running a single "python"
+after you enter the :kbd:`Ctrl-Z` character; Windows is running a single "python"
 command in the window, and closes it when you terminate the interpreter.
 
 If the ``python`` command, instead of displaying the interpreter prompt ``>>>``,
@@ -127,8 +127,8 @@ you should make sure that entering the command ::
 
    c:\Python27\python
 
-starts up the interpreter as above (and don't forget you'll need a "CTRL-Z" and
-an "Enter" to get out of it). Once you have verified the directory, you can
+starts up the interpreter as above (and don't forget you'll need a ":kbd:`Ctrl-Z`" and
+an ":kbd:`Enter`" to get out of it). Once you have verified the directory, you can
 add it to the system path to make it easier to start Python by just running
 the ``python`` command. This is currently an option in the installer as of
 CPython 2.7.
@@ -321,7 +321,7 @@ Prior to Python 2.7 and 3.2, to terminate a process, you can use :mod:`ctypes`::
        return (0 != kernel32.TerminateProcess(handle, 0))
 
 In 2.7 and 3.2, :func:`os.kill` is implemented similar to the above function,
-with the additional feature of being able to send CTRL+C and CTRL+BREAK
+with the additional feature of being able to send :kbd:`Ctrl+C` and :kbd:`Ctrl+Break`
 to console subprocesses which are designed to handle those signals. See
 :func:`os.kill` for further details.
 
index 010fdf204b628aee0417707d2e68abb668ba9845..8b6dbac81351071965f9891fe390b8269658266f 100644 (file)
@@ -182,6 +182,14 @@ Glossary
       keys can be any object with :meth:`__hash__`  and :meth:`__eq__` methods.
       Called a hash in Perl.
 
+   dictionary view
+      The objects returned from :meth:`dict.viewkeys`, :meth:`dict.viewvalues`,
+      and :meth:`dict.viewitems` are called dictionary views. They provide a dynamic
+      view on the dictionary’s entries, which means that when the dictionary
+      changes, the view reflects these changes. To force the
+      dictionary view to become a full list use ``list(dictview)``.  See
+      :ref:`dict-views`.
+
    docstring
       A string literal which appears as the first expression in a class,
       function or module.  While ignored when the suite is executed, it is
@@ -713,13 +721,6 @@ Glossary
       ``'\r'``.  See :pep:`278` and :pep:`3116`, as well as
       :func:`str.splitlines` for an additional use.
 
-   view
-      The objects returned from :meth:`dict.viewkeys`, :meth:`dict.viewvalues`,
-      and :meth:`dict.viewitems` are called dictionary views.  They are lazy
-      sequences that will see changes in the underlying dictionary.  To force
-      the dictionary view to become a full list use ``list(dictview)``.  See
-      :ref:`dict-views`.
-
    virtual environment
       A cooperatively isolated runtime environment that allows Python users
       and applications to install and upgrade Python distribution packages
index 1a2628127c74fde5c6ab5e4dd7402dd15c6e771c..e2359d98b39f51425f66b9a314c2e36635f6cddc 100644 (file)
@@ -325,7 +325,7 @@ Non-data descriptors provide a simple mechanism for variations on the usual
 patterns of binding functions into methods.
 
 To recap, functions have a :meth:`__get__` method so that they can be converted
-to a method when accessed as attributes.  The non-data descriptor transforms a
+to a method when accessed as attributes.  The non-data descriptor transforms an
 ``obj.f(*args)`` call into ``f(obj, *args)``.  Calling ``klass.f(*args)``
 becomes ``f(*args)``.
 
index f0a3221d4df1665f543686af1edcceb935829c6a..45fd7796f8f658170b59b326b550ffcefdbf10d6 100644 (file)
@@ -1168,3 +1168,205 @@ The above approach can, of course, be adapted to other TTS systems and even
 other systems altogether which can process messages via external programs run
 from a command line.
 
+.. _buffered-logging:
+
+Buffering logging messages and outputting them conditionally
+------------------------------------------------------------
+
+There might be situations where you want to log messages in a temporary area
+and only output them if a certain condition occurs. For example, you may want to
+start logging debug events in a function, and if the function completes without
+errors, you don't want to clutter the log with the collected debug information,
+but if there is an error, you want all the debug information to be output as well
+as the error.
+
+Here is an example which shows how you could do this using a decorator for your
+functions where you want logging to behave this way. It makes use of the
+:class:`logging.handlers.MemoryHandler`, which allows buffering of logged events
+until some condition occurs, at which point the buffered events are ``flushed``
+- passed to another handler (the ``target`` handler) for processing. By default,
+the ``MemoryHandler`` flushed when its buffer gets filled up or an event whose
+level is greater than or equal to a specified threshold is seen. You can use this
+recipe with a more specialised subclass of ``MemoryHandler`` if you want custom
+flushing behavior.
+
+The example script has a simple function, ``foo``, which just cycles through
+all the logging levels, writing to ``sys.stderr`` to say what level it's about
+to log at, and then actually logging a message that that level. You can pass a
+parameter to ``foo`` which, if true, will log at ERROR and CRITICAL levels -
+otherwise, it only logs at DEBUG, INFO and WARNING levels.
+
+The script just arranges to decorate ``foo`` with a decorator which will do the
+conditional logging that's required. The decorator takes a logger as a parameter
+and attaches a memory handler for the duration of the call to the decorated
+function. The decorator can be additionally parameterised using a target handler,
+a level at which flushing should occur, and a capacity for the buffer. These
+default to a :class:`~logging.StreamHandler` which writes to ``sys.stderr``,
+``logging.ERROR`` and ``100`` respectively.
+
+Here's the script::
+
+    import logging
+    from logging.handlers import MemoryHandler
+    import sys
+
+    logger = logging.getLogger(__name__)
+    logger.addHandler(logging.NullHandler())
+
+    def log_if_errors(logger, target_handler=None, flush_level=None, capacity=None):
+        if target_handler is None:
+            target_handler = logging.StreamHandler()
+        if flush_level is None:
+            flush_level = logging.ERROR
+        if capacity is None:
+            capacity = 100
+        handler = MemoryHandler(capacity, flushLevel=flush_level, target=target_handler)
+
+        def decorator(fn):
+            def wrapper(*args, **kwargs):
+                logger.addHandler(handler)
+                try:
+                    return fn(*args, **kwargs)
+                except Exception:
+                    logger.exception('call failed')
+                    raise
+                finally:
+                    super(MemoryHandler, handler).flush()
+                    logger.removeHandler(handler)
+            return wrapper
+
+        return decorator
+
+    def write_line(s):
+        sys.stderr.write('%s\n' % s)
+
+    def foo(fail=False):
+        write_line('about to log at DEBUG ...')
+        logger.debug('Actually logged at DEBUG')
+        write_line('about to log at INFO ...')
+        logger.info('Actually logged at INFO')
+        write_line('about to log at WARNING ...')
+        logger.warning('Actually logged at WARNING')
+        if fail:
+            write_line('about to log at ERROR ...')
+            logger.error('Actually logged at ERROR')
+            write_line('about to log at CRITICAL ...')
+            logger.critical('Actually logged at CRITICAL')
+        return fail
+
+    decorated_foo = log_if_errors(logger)(foo)
+
+    if __name__ == '__main__':
+        logger.setLevel(logging.DEBUG)
+        write_line('Calling undecorated foo with False')
+        assert not foo(False)
+        write_line('Calling undecorated foo with True')
+        assert foo(True)
+        write_line('Calling decorated foo with False')
+        assert not decorated_foo(False)
+        write_line('Calling decorated foo with True')
+        assert decorated_foo(True)
+
+When this script is run, the following output should be observed::
+
+    Calling undecorated foo with False
+    about to log at DEBUG ...
+    about to log at INFO ...
+    about to log at WARNING ...
+    Calling undecorated foo with True
+    about to log at DEBUG ...
+    about to log at INFO ...
+    about to log at WARNING ...
+    about to log at ERROR ...
+    about to log at CRITICAL ...
+    Calling decorated foo with False
+    about to log at DEBUG ...
+    about to log at INFO ...
+    about to log at WARNING ...
+    Calling decorated foo with True
+    about to log at DEBUG ...
+    about to log at INFO ...
+    about to log at WARNING ...
+    about to log at ERROR ...
+    Actually logged at DEBUG
+    Actually logged at INFO
+    Actually logged at WARNING
+    Actually logged at ERROR
+    about to log at CRITICAL ...
+    Actually logged at CRITICAL
+
+As you can see, actual logging output only occurs when an event is logged whose
+severity is ERROR or greater, but in that case, any previous events at lower
+severities are also logged.
+
+You can of course use the conventional means of decoration::
+
+    @log_if_errors(logger)
+    def foo(fail=False):
+        ...
+
+
+.. _utc-formatting:
+
+Formatting times using UTC (GMT) via configuration
+--------------------------------------------------
+
+Sometimes you want to format times using UTC, which can be done using a class
+such as `UTCFormatter`, shown below::
+
+    import logging
+    import time
+
+    class UTCFormatter(logging.Formatter):
+        converter = time.gmtime
+
+and you can then use the ``UTCFormatter`` in your code instead of
+:class:`~logging.Formatter`. If you want to do that via configuration, you can
+use the :func:`~logging.config.dictConfig` API with an approach illustrated by
+the following complete example::
+
+    import logging
+    import logging.config
+    import time
+
+    class UTCFormatter(logging.Formatter):
+        converter = time.gmtime
+
+    LOGGING = {
+        'version': 1,
+        'disable_existing_loggers': False,
+        'formatters': {
+            'utc': {
+                '()': UTCFormatter,
+                'format': '%(asctime)s %(message)s',
+            },
+            'local': {
+                'format': '%(asctime)s %(message)s',
+            }
+        },
+        'handlers': {
+            'console1': {
+                'class': 'logging.StreamHandler',
+                'formatter': 'utc',
+            },
+            'console2': {
+                'class': 'logging.StreamHandler',
+                'formatter': 'local',
+            },
+        },
+        'root': {
+            'handlers': ['console1', 'console2'],
+       }
+    }
+
+    if __name__ == '__main__':
+        logging.config.dictConfig(LOGGING)
+        logging.warning('The local time is %s', time.asctime())
+
+When this script is run, it should print something like::
+
+    2015-10-17 12:53:29,501 The local time is Sat Oct 17 13:53:29 2015
+    2015-10-17 13:53:29,501 The local time is Sat Oct 17 13:53:29 2015
+
+showing how the time is formatted both as local time and UTC, one for each
+handler.
index 0be740e5e9a8684ac64ef57f29863a6a4a476381..cccbc54169b36dff9e4443ff382c5cad380b81ed 100644 (file)
@@ -164,7 +164,7 @@ Explorer [#]_. ::
     import urllib2
 
     url = 'http://www.someserver.com/cgi-bin/register.cgi'
-    user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
+    user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'
     values = {'name' : 'Michael Foord',
               'location' : 'Northampton',
               'language' : 'Python' }
@@ -559,8 +559,7 @@ This document was reviewed and revised by John Lee.
 
 .. [#] For an introduction to the CGI protocol see
        `Writing Web Applications in Python <http://www.pyzine.com/Issue008/Section_Articles/article_CGIOne.html>`_.
-.. [#] Like Google for example. The *proper* way to use google from a program
-       is to use `PyGoogle <http://pygoogle.sourceforge.net>`_ of course.
+.. [#] Google for example.
 .. [#] Browser sniffing is a very bad practise for website design - building
        sites using web standards is much more sensible. Unfortunately a lot of
        sites still send different versions to different browsers.
index 3b6ccba71e91dbf17d87326fce81379ed07994c7..7f3560a8a5cea70dbdb2015df63861f2527f884f 100644 (file)
@@ -28,16 +28,16 @@ modules and extensions.
 
 .. note::
 
-   This guide only covers the basic tools for installing extensions that are
-   provided as part of this version of Python. Third party tools offer easier
-   to use and more secure alternatives. Refer to the
-   `quick recommendations section
-   <https://python-packaging-user-guide.readthedocs.org/en/latest/current.html>`__
+   This guide only covers the basic tools for building and distributing
+   extensions that are provided as part of this version of Python. Third party
+   tools offer easier to use and more secure alternatives. Refer to the `quick
+   recommendations section <https://packaging.python.org/en/latest/current/>`__
    in the Python Packaging User Guide for more information.
 
 
 .. _inst-intro:
 
+
 Introduction
 ============
 
@@ -149,7 +149,7 @@ into.  For example, if you've just downloaded a module source distribution
 
 On Windows, you'd probably download :file:`foo-1.0.zip`.  If you downloaded the
 archive file to :file:`C:\\Temp`, then it would unpack into
-:file:`C:\\Temp\\foo-1.0`; you can use either a archive manipulator with a
+:file:`C:\\Temp\\foo-1.0`; you can use either an archive manipulator with a
 graphical user interface (such as WinZip) or a command-line tool (such as
 :program:`unzip` or :program:`pkunzip`) to unpack the archive.  Then, open a
 command prompt window and run::
index bfa7ea3fb12faf5c7efbf0b6363f952ed7d0c178..7ebc208efe124ef3465741584becb22b86eda770 100644 (file)
@@ -271,7 +271,7 @@ and off individually.  They are described here in more detail.
 
 .. 2to3fixer:: input
 
-   Converts ``input(prompt)`` to ``eval(input(prompt))``
+   Converts ``input(prompt)`` to ``eval(input(prompt))``.
 
 .. 2to3fixer:: intern
 
index 9955646b671d5728762d982971002dd022af0577..181291fec019786a072238ed3d6eec02e2688e1e 100644 (file)
@@ -1948,4 +1948,4 @@ A partial upgrade path from :mod:`optparse` to :mod:`argparse`:
   ``%(default)s`` and ``%(prog)s``.
 
 * Replace the OptionParser constructor ``version`` argument with a call to
-  ``parser.add_argument('--version', action='version', version='<the version>')``
+  ``parser.add_argument('--version', action='version', version='<the version>')``.
index 82ef37e5670263ab85f3362da2456a8228f8a08e..6980353d7ad2500ca151d6772a2ff08839740ad2 100644 (file)
@@ -223,7 +223,7 @@ The :mod:`bdb` module also defines two classes:
    .. method:: set_until(frame)
 
       Stop when the line with the line no greater than the current one is
-      reached or when returning from current frame
+      reached or when returning from current frame.
 
    .. method:: set_trace([frame])
 
index feeb23628999c9fffc8c87b67a2060c8144ddd79..6f8b7af04e2c719827e521a65fb9ae4129dd1bbb 100644 (file)
@@ -392,8 +392,8 @@ interfaces of the stateless encoder and decoder:
    handling.
 
    The method may not store state in the :class:`Codec` instance. Use
-   :class:`StreamCodec` for codecs which have to keep state in order to make
-   encoding/decoding efficient.
+   :class:`StreamWriter` for codecs which have to keep state in order to make
+   encoding efficient.
 
    The encoder must be able to handle zero length input and return an empty object
    of the output object type in this situation.
@@ -413,8 +413,8 @@ interfaces of the stateless encoder and decoder:
    handling.
 
    The method may not store state in the :class:`Codec` instance. Use
-   :class:`StreamCodec` for codecs which have to keep state in order to make
-   encoding/decoding efficient.
+   :class:`StreamReader` for codecs which have to keep state in order to make
+   decoding efficient.
 
    The decoder must be able to handle zero length input and return an empty object
    of the output object type in this situation.
@@ -1067,6 +1067,8 @@ particular, the following variants typically exist:
 +-----------------+--------------------------------+--------------------------------+
 | iso8859_10      | iso-8859-10, latin6, L6        | Nordic languages               |
 +-----------------+--------------------------------+--------------------------------+
+| iso8859_11      | iso-8859-11, thai              | Thai languages                 |
++-----------------+--------------------------------+--------------------------------+
 | iso8859_13      | iso-8859-13, latin7, L7        | Baltic languages               |
 +-----------------+--------------------------------+--------------------------------+
 | iso8859_14      | iso-8859-14, latin8, L8        | Celtic languages               |
@@ -1193,21 +1195,22 @@ The following codecs provide str-to-str encoding and decoding
 +--------------------+---------------------------+---------------------------+------------------------------+
 | Codec              | Aliases                   | Purpose                   | Encoder/decoder              |
 +====================+===========================+===========================+==============================+
-| base64_codec       | base64, base-64           | Convert operand to MIME   | :meth:`base64.b64encode`,    |
-|                    |                           | base64 (the result always | :meth:`base64.b64decode`     |
-|                    |                           | includes a trailing       |                              |
-|                    |                           | ``'\n'``)                 |                              |
+| base64_codec       | base64, base-64           | Convert operand to        | :meth:`base64.encodestring`, |
+|                    |                           | multiline MIME base64 (the| :meth:`base64.decodestring`  |
+|                    |                           | result always includes a  |                              |
+|                    |                           | trailing ``'\n'``)        |                              |
 +--------------------+---------------------------+---------------------------+------------------------------+
 | bz2_codec          | bz2                       | Compress the operand      | :meth:`bz2.compress`,        |
 |                    |                           | using bz2                 | :meth:`bz2.decompress`       |
 +--------------------+---------------------------+---------------------------+------------------------------+
-| hex_codec          | hex                       | Convert operand to        | :meth:`base64.b16encode`,    |
-|                    |                           | hexadecimal               | :meth:`base64.b16decode`     |
+| hex_codec          | hex                       | Convert operand to        | :meth:`binascii.b2a_hex`,    |
+|                    |                           | hexadecimal               | :meth:`binascii.a2b_hex`     |
 |                    |                           | representation, with two  |                              |
 |                    |                           | digits per byte           |                              |
 +--------------------+---------------------------+---------------------------+------------------------------+
-| quopri_codec       | quopri, quoted-printable, | Convert operand to MIME   | :meth:`quopri.encodestring`, |
-|                    | quotedprintable           | quoted printable          | :meth:`quopri.decodestring`  |
+| quopri_codec       | quopri, quoted-printable, | Convert operand to MIME   | :meth:`quopri.encode` with   |
+|                    | quotedprintable           | quoted printable          | ``quotetabs=True``,          |
+|                    |                           |                           | :meth:`quopri.decode`        |
 +--------------------+---------------------------+---------------------------+------------------------------+
 | string_escape      |                           | Produce a string that is  |                              |
 |                    |                           | suitable as string        |                              |
index b947e272da4331fb68a8cd4beed04c6a6c39c3b0..58278d1502043800e5b68e0abe9612ac6080527d 100644 (file)
@@ -104,9 +104,9 @@ For example::
    .. method:: most_common([n])
 
       Return a list of the *n* most common elements and their counts from the
-      most common to the least.  If *n* is not specified, :func:`most_common`
-      returns *all* elements in the counter.  Elements with equal counts are
-      ordered arbitrarily:
+      most common to the least.  If *n* is omitted or ``None``,
+      :func:`most_common` returns *all* elements in the counter.
+      Elements with equal counts are ordered arbitrarily:
 
             >>> Counter('abracadabra').most_common(3)
             [('a', 5), ('r', 2), ('b', 2)]
@@ -696,6 +696,7 @@ field names, the method and attribute names start with an underscore.
    Return a new :class:`OrderedDict` which maps field names to their corresponding
    values::
 
+      >>> p = Point(x=11, y=22)
       >>> p._asdict()
       OrderedDict([('x', 11), ('y', 22)])
 
@@ -977,7 +978,7 @@ ABC                        Inherits from          Abstract Methods        Mixin
            KeysView
            ValuesView
 
-   ABCs for mapping, items, keys, and values :term:`views <view>`.
+   ABCs for mapping, items, keys, and values :term:`views <dictionary view>`.
 
 
 These ABCs allow us to ask classes or instances if they provide
index 19786f7da22ba18ef1929d13d2b691afd6fa7f6b..8d6420681ca574dfeb0c4191c9c0350ee8f67e51 100644 (file)
@@ -116,7 +116,7 @@ Cookie Objects
 
    Return an encoded value. *val* can be any type, but return value must be a
    string. This method does nothing in :class:`BaseCookie` --- it exists so it can
-   be overridden
+   be overridden.
 
    In general, it should be the case that :meth:`value_encode` and
    :meth:`value_decode` are inverses on the range of *value_decode*.
index e559f829cfb5b4194db648958d5e967b8c4050fa..7829f53c111e9fac65f4fecba4c7c8463d6a3414 100644 (file)
@@ -546,7 +546,7 @@ Netscape protocol strictness switches:
 
 .. attribute:: DefaultCookiePolicy.strict_ns_unverifiable
 
-   apply RFC 2965 rules on unverifiable transactions even to Netscape cookies
+   Apply RFC 2965 rules on unverifiable transactions even to Netscape cookies.
 
 
 .. attribute:: DefaultCookiePolicy.strict_ns_domain
index 1f5ae65d53f3adf8b441157524d90ee963eb93be..d3d505e42192c98971dc85406aa2290535d02625 100644 (file)
@@ -338,7 +338,7 @@ Dialects support the following attributes:
 
 .. attribute:: Dialect.doublequote
 
-   Controls how instances of *quotechar* appearing inside a field should be
+   Controls how instances of *quotechar* appearing inside a field should
    themselves be quoted.  When :const:`True`, the character is doubled. When
    :const:`False`, the *escapechar* is used as a prefix to the *quotechar*.  It
    defaults to :const:`True`.
index 564d10c5f7d70a2176a6440e22fd2612545aaf29..a203fbd5567b264a4cfae6583da2e40b4cde8481 100644 (file)
@@ -890,7 +890,7 @@ Decimal objects
 
       Engineering notation has an exponent which is a multiple of 3, so there
       are up to 3 digits left of the decimal place.  For example, converts
-      ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``
+      ``Decimal('123E+1')`` to ``Decimal('1.23E+3')``.
 
    .. method:: to_integral([rounding[, context]])
 
index 89a457c5e5d28e2762a5002c274d400aa98fbf65..03e8cb8804f4c8c2a13abc4669eabe528b90ce26 100644 (file)
@@ -94,9 +94,9 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
       *wrapcolumn* is an optional keyword to specify column number where lines are
       broken and wrapped, defaults to ``None`` where lines are not wrapped.
 
-      *linejunk* and *charjunk* are optional keyword arguments passed into ``ndiff()``
+      *linejunk* and *charjunk* are optional keyword arguments passed into :func:`ndiff`
       (used by :class:`HtmlDiff` to generate the side by side HTML differences).  See
-      ``ndiff()`` documentation for argument default values and descriptions.
+      :func:`ndiff` documentation for argument default values and descriptions.
 
    The following methods are public:
 
index 727af4198bd69aeb6abda43da7de3a963825d9b1..04b9b15386336e88b297dcfa2585ff5ecdc50668 100644 (file)
@@ -647,6 +647,13 @@ the more significant byte last.
    Works as ``BUILD_TUPLE``, but creates a list.
 
 
+.. opcode:: BUILD_SET (count)
+
+   Works as ``BUILD_TUPLE``, but creates a set.
+
+   .. versionadded:: 2.7
+
+
 .. opcode:: BUILD_MAP (count)
 
    Pushes a new dictionary object onto the stack.  The dictionary is pre-sized
index a1e270dbf8fe2f672ade60ad1d7161ebecc21fc1..45581239fb60d2978a44d58b08fef78a7fc580a5 100644 (file)
@@ -950,15 +950,11 @@ and :ref:`doctest-simple-testfile`.
    .. versionchanged:: 2.5
       The optional argument *isprivate*, deprecated in 2.4, was removed.
 
-There's also a function to run the doctests associated with a single object.
-This function is provided for backward compatibility.  There are no plans to
-deprecate it, but it's rarely useful:
-
 
 .. function:: run_docstring_examples(f, globs[, verbose][, name][, compileflags][, optionflags])
 
-   Test examples associated with object *f*; for example, *f* may be a module,
-   function, or class object.
+   Test examples associated with object *f*; for example, *f* may be a string,
+   a module, a function, or a class object.
 
    A shallow copy of dictionary argument *globs* is used for the execution context.
 
@@ -1899,6 +1895,27 @@ several options for organizing tests:
 * Define a ``__test__`` dictionary mapping from regression test topics to
   docstrings containing test cases.
 
+When you have placed your tests in a module, the module can itself be the test
+runner.  When a test fails, you can arrange for your test runner to re-run only
+the failing doctest while you debug the problem.  Here is a minimal example of
+such a test runner::
+
+    if __name__ == '__main__':
+        import doctest
+        flags = doctest.REPORT_NDIFF|doctest.REPORT_ONLY_FIRST_FAILURE
+        if len(sys.argv) > 1:
+            name = sys.argv[1]
+            if name in globals():
+                obj = globals()[name]
+            else:
+                obj = __test__[name]
+            doctest.run_docstring_examples(obj, globals(), name=name,
+                                           optionflags=flags)
+        else:
+            fail, total = doctest.testmod(optionflags=flags)
+            print("{} failures out of {} tests".format(fail, total))
+
+
 .. rubric:: Footnotes
 
 .. [#] Examples containing both expected output and an exception are not supported.
index 0f99a2fb040e113c7549e134490ae86133437d81..04e23345977b573e09a9b687cd4c9a79a5a6f8cc 100644 (file)
@@ -133,7 +133,7 @@ class.
       methods on file-like objects.
 
       The text contained in *fp* must be formatted as a block of :rfc:`2822`
-      style headers and header continuation lines, optionally preceded by a
+      style headers and header continuation lines, optionally preceded by an
       envelope header.  The header block is terminated either by the end of the
       data or by a blank line.  Following the header block is the body of the
       message (which may contain MIME-encoded subparts).
index 9291c1801676e5f4cf22ed5aea238be24bac5c1d..fe14656008177f99c54aa71a66962648f9c0e861 100644 (file)
@@ -496,7 +496,7 @@ module for more information.
 
 .. exception:: SyntaxWarning
 
-   Base class for warnings about dubious syntax
+   Base class for warnings about dubious syntax.
 
 
 .. exception:: RuntimeWarning
index 562e78fb06abd5da83a46ee208e69a73e7e7da88..478c4505ac60df1535930d9942cdf6f272bc05f3 100644 (file)
@@ -82,6 +82,8 @@ The module defines the following functions:
    which is a change from versions 2.3 and 2.4. Supply the argument explicitly if
    version portability is a priority.
 
+   If the :c:func:`ioctl` fails, an :exc:`IOError` exception is raised.
+
    An example::
 
       >>> import array, fcntl, struct, termios, os
@@ -103,6 +105,8 @@ The module defines the following functions:
    :manpage:`flock(2)` for details.  (On some systems, this function is emulated
    using :c:func:`fcntl`.)
 
+   If the :c:func:`flock` fails, an :exc:`IOError` exception is raised.
+
 
 .. function:: lockf(fd, operation, [length, [start, [whence]]])
 
index 81b419ea36e482c2d42876939a288a38e840b1c8..00a7672e125b21b3cc492e34fa80e1cc4acb9002 100644 (file)
@@ -89,7 +89,7 @@ another rational number, or from a string.
 
       This class method constructs a :class:`Fraction` representing the exact
       value of *flt*, which must be a :class:`float`. Beware that
-      ``Fraction.from_float(0.3)`` is not the same value as ``Fraction(3, 10)``
+      ``Fraction.from_float(0.3)`` is not the same value as ``Fraction(3, 10)``.
 
       .. note:: From Python 2.7 onwards, you can also construct a
          :class:`Fraction` instance directly from a :class:`float`.
index 8af9f582709cb8e1ebcd9391e248bbcc12da503d..8b677edeeb8061a1a8df189d75582a1847eaa8db 100644 (file)
@@ -261,7 +261,7 @@ section.
 
 .. class:: complex([real[, imag]])
 
-   Return a complex number with the value *real* + *imag*\*j or convert a string or
+   Return a complex number with the value *real* + *imag*\*1j or convert a string or
    number to a complex number.  If the first parameter is a string, it will be
    interpreted as a complex number and the function must be called without a second
    parameter.  The second parameter can never be a string. Each argument may be any
@@ -687,10 +687,10 @@ section.
    is a type object (new-style class) and *object* is an object of that type or of
    a (direct, indirect or :term:`virtual <abstract base class>`) subclass
    thereof.  If *object* is not a class instance or
-   an object of the given type, the function always returns false.  If *classinfo*
-   is neither a class object nor a type object, it may be a tuple of class or type
-   objects, or may recursively contain other such tuples (other sequence types are
-   not accepted).  If *classinfo* is not a class, type, or tuple of classes, types,
+   an object of the given type, the function always returns false.
+   If *classinfo* is a tuple of class or type objects (or recursively, other
+   such tuples), return true if *object* is an instance of any of the classes
+   or types.  If *classinfo* is not a class, type, or tuple of classes, types,
    and such tuples, a :exc:`TypeError` exception is raised.
 
    .. versionchanged:: 2.2
@@ -1191,10 +1191,11 @@ section.
       except NameError:
           cache = {}
 
-   It is legal though generally not very useful to reload built-in or dynamically
-   loaded modules, except for :mod:`sys`, :mod:`__main__` and :mod:`__builtin__`.
-   In many cases, however, extension modules are not designed to be initialized
-   more than once, and may fail in arbitrary ways when reloaded.
+   It is generally not very useful to reload built-in or dynamically loaded
+   modules.  Reloading :mod:`sys`, :mod:`__main__`, :mod:`builtins` and other
+   key modules is not recommended.  In many cases extension modules are not
+   designed to be initialized more than once, and may fail in arbitrary ways
+   when reloaded.
 
    If a module imports objects from another module using :keyword:`from` ...
    :keyword:`import` ..., calling :func:`reload` for the other module does not
@@ -1761,4 +1762,3 @@ bypass these functions without concerns about missing something important.
 .. [#] In the current implementation, local variable bindings cannot normally be
    affected this way, but variables retrieved from other scopes (such as modules)
    can be.  This may change.
-
index 75f67b9b0f09384a110dc548b4dbb85dcdb2dcb3..75f0f8a3f54101278a59fe6dc1473aae985f41b1 100644 (file)
 --------------
 
 The :mod:`glob` module finds all the pathnames matching a specified pattern
-according to the rules used by the Unix shell.  No tilde expansion is done, but
-``*``, ``?``, and character ranges expressed with ``[]`` will be correctly
-matched.  This is done by using the :func:`os.listdir` and
-:func:`fnmatch.fnmatch` functions in concert, and not by actually invoking a
-subshell.  Note that unlike :func:`fnmatch.fnmatch`, :mod:`glob` treats
-filenames beginning with a dot (``.``) as special cases.  (For tilde and shell
-variable expansion, use :func:`os.path.expanduser` and
+according to the rules used by the Unix shell, although results are returned in
+arbitrary order.  No tilde expansion is done, but ``*``, ``?``, and character
+ranges expressed with ``[]`` will be correctly matched.  This is done by using
+the :func:`os.listdir` and :func:`fnmatch.fnmatch` functions in concert, and
+not by actually invoking a subshell.  Note that unlike :func:`fnmatch.fnmatch`,
+:mod:`glob` treats filenames beginning with a dot (``.``) as special cases.
+(For tilde and shell variable expansion, use :func:`os.path.expanduser` and
 :func:`os.path.expandvars`.)
 
 For a literal match, wrap the meta-characters in brackets.
index e26fe286c40a6862910e8796e143e0ceae36ff63..7c16d3ae2495bf69a2f811992a8d254e6a6691ee 100644 (file)
@@ -96,26 +96,22 @@ Examples of usage
 Example of how to read a compressed file::
 
    import gzip
-   f = gzip.open('file.txt.gz', 'rb')
-   file_content = f.read()
-   f.close()
+   with gzip.open('file.txt.gz', 'rb') as f:
+       file_content = f.read()
 
 Example of how to create a compressed GZIP file::
 
    import gzip
    content = "Lots of content here"
-   f = gzip.open('file.txt.gz', 'wb')
-   f.write(content)
-   f.close()
+   with gzip.open('file.txt.gz', 'wb') as f:
+       f.write(content)
 
 Example of how to GZIP compress an existing file::
 
    import gzip
-   f_in = open('file.txt', 'rb')
-   f_out = gzip.open('file.txt.gz', 'wb')
-   f_out.writelines(f_in)
-   f_out.close()
-   f_in.close()
+   import shutil
+   with open('file.txt', 'rb') as f_in, gzip.open('file.txt.gz', 'wb') as f_out:
+       shutil.copyfileobj(f_in, f_out)
 
 
 .. seealso::
index e33ef50a6e6b5f852049bd8833b8b7c110061337..9bb3bb7ba5d575978f04eb28a1bfbbd378c1be77 100644 (file)
@@ -153,8 +153,8 @@ A hash object has the following methods:
    compute the digests of strings that share a common initial substring.
 
 
-Key Derivation Function
------------------------
+Key derivation
+--------------
 
 Key derivation and key stretching algorithms are designed for secure password
 hashing. Naive algorithms such as ``sha1(password)`` are not resistant against
@@ -204,7 +204,7 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
    http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
       The FIPS 180-2 publication on Secure Hash Algorithms.
 
-   http://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_algorithms
+   https://en.wikipedia.org/wiki/Cryptographic_hash_function#Cryptographic_hash_algorithms
       Wikipedia article with information on which algorithms have known issues and
       what that means regarding their use.
 
index 09e819ae5a204390edcf4ec0c7caad3a998579e2..eef8856e0c4d4813673fe221ee425eabd31a98de 100644 (file)
@@ -2,7 +2,7 @@
 ========================================================
 
 .. module:: hmac
-   :synopsis: Keyed-Hashing for Message Authentication (HMAC) implementation for Python.
+   :synopsis: Keyed-Hashing for Message Authentication (HMAC) implementation
 .. moduleauthor:: Gerhard Häring <ghaering@users.sourceforge.net>
 .. sectionauthor:: Gerhard Häring <ghaering@users.sourceforge.net>
 
index d9d81dfe2ebb230b6671b7551f51d7aa5f095de9..e5045dd39248479c094f96ed4d273ca56b6b1600 100644 (file)
@@ -7,6 +7,8 @@
 
 .. deprecated:: 2.6
     The :mod:`htmllib` module has been removed in Python 3.
+    Use :mod:`HTMLParser` instead in Python 2, and the equivalent,
+    :mod:`html.parser`, in Python 3.
 
 
 .. index::
index 3aba74ef3f273520cc264c26a867b4bc8de9e124..81d5c53b0cd156c31ca7e0cdba6b0f715700960d 100644 (file)
@@ -201,7 +201,7 @@ implementations do nothing (except for :meth:`~HTMLParser.handle_startendtag`):
 
    The content of Internet Explorer conditional comments (condcoms) will also be
    sent to this method, so, for ``<!--[if IE 9]>IE9-specific content<![endif]-->``,
-   this method will receive ``'[if IE 9]>IE-specific content<![endif]'``.
+   this method will receive ``'[if IE 9]>IE9-specific content<![endif]'``.
 
 
 .. method:: HTMLParser.handle_decl(decl)
index c842b2639cc993ddedb3e774880e7af885dbe2fa..4384d56814e1e61ff0972c0f19c7d52b7a84639a 100644 (file)
@@ -8,23 +8,29 @@ IDLE
    single: Python Editor
    single: Integrated Development Environment
 
-.. moduleauthor:: Guido van Rossum <guido@Python.org>
+.. moduleauthor:: Guido van Rossum <guido@python.org>
 
-IDLE is the Python IDE built with the :mod:`tkinter` GUI toolkit.
+IDLE is Python's Integrated Development and Learning Environment.
 
 IDLE has the following features:
 
 * coded in 100% pure Python, using the :mod:`tkinter` GUI toolkit
 
-* cross-platform: works on Windows, Unix, and Mac OS X
+* cross-platform: works mostly the same on Windows, Unix, and Mac OS X
+
+* Python shell window (interactive interpreter) with colorizing
+  of code input, output, and error messages
 
 * multi-window text editor with multiple undo, Python colorizing,
-  smart indent, call tips, and many other features
+  smart indent, call tips, auto completion, and other features
 
-* Python shell window (a.k.a. interactive interpreter)
+* search within any window, replace within editor windows, and search
+  through multiple files (grep)
 
-* debugger (not complete, but you can set breakpoints, view and step)
+* debugger with persistent breakpoints, stepping, and viewing
+  of global and local namespaces
 
+* configuration, browsers, and other dialogs
 
 Menus
 -----
@@ -37,8 +43,6 @@ context menu.
 
 IDLE's menus dynamically change based on which window is currently selected.
 Each menu documented below indicates which window type it is associated with.
-Click on the dotted line at the top of a menu to "tear it off": a separate
-window containing the menu is created (for Unix and Windows only).
 
 File menu (Shell and Editor)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -202,7 +206,12 @@ Check Module
 
 Run Module
    Do Check Module (above).  If no error, restart the shell to clean the
-   environment, then execute the module.
+   environment, then execute the module.  Output is displayed in the Shell
+   window.  Note that output requires use of ``print`` or ``write``.
+   When execution is complete, the Shell retains focus and displays a prompt.
+   At this point, one may interactively explore the result of execution.
+   This is similar to executing a file with ``python -i file`` at a command
+   line.
 
 Shell menu (Shell window only)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -243,16 +252,16 @@ Options menu (Shell and Editor)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Configure IDLE
-   Open a configuration dialog.  Fonts, indentation, keybindings, and color
-   themes may be altered.  Startup Preferences may be set, and additional
-   help sources can be specified.  Non-default user setting are saved in a
-   .idlerc directory in the user's home directory.  Problems caused by bad user
-   configuration files are solved by editing or deleting one or more of the
-   files in .idlerc.
+   Open a configuration dialog and change preferences for the following:
+   fonts, indentation, keybindings, text color themes, startup windows and
+   size, additional help sources, and extensions (see below).  On OS X,
+   open the configuration dialog by selecting Preferences in the application
+   menu.  To use a new built-in color theme (IDLE Dark) with older IDLEs,
+   save it as a new custom theme.
 
-Configure Extensions
-   Open a configuration dialog for setting preferences for extensions
-   (discussed below).  See note above about the location of user settings.
+   Non-default user settings are saved in a .idlerc directory in the user's
+   home directory.  Problems caused by bad user configuration files are solved
+   by editing or deleting one or more of the files in .idlerc.
 
 Code Context (toggle)(Editor Window only)
    Open a pane at the top of the edit window which shows the block context
@@ -331,8 +340,8 @@ Go to file/line
 Editing and navigation
 ----------------------
 
-In this section, 'C' refers to the Control key on Windows and Unix and
-the Command key on Mac OSX.
+In this section, 'C' refers to the :kbd:`Control` key on Windows and Unix and
+the :kbd:`Command` key on Mac OSX.
 
 * :kbd:`Backspace` deletes to the left; :kbd:`Del` deletes to the right
 
@@ -425,9 +434,35 @@ Note that IDLE itself places quite a few modules in sys.modules, so
 much can be found by default, e.g. the re module.
 
 If you don't like the ACW popping up unbidden, simply make the delay
-longer or disable the extension.  Or another option is the delay could
-be set to zero. Another alternative to preventing ACW popups is to
-disable the call tips extension.
+longer or disable the extension.
+
+Calltips
+^^^^^^^^
+
+A calltip is shown when one types :kbd:`(` after the name of an *acccessible*
+function.  A name expression may include dots and subscripts.  A calltip
+remains until it is clicked, the cursor is moved out of the argument area,
+or :kbd:`)` is typed.  When the cursor is in the argument part of a definition,
+the menu or shortcut display a calltip.
+
+A calltip consists of the function signature and the first line of the
+docstring.  For builtins without an accessible signature, the calltip
+consists of all lines up the fifth line or the first blank line.  These
+details may change.
+
+The set of *accessible* functions depends on what modules have been imported
+into the user process, including those imported by Idle itself,
+and what definitions have been run, all since the last restart.
+
+For example, restart the Shell and enter ``itertools.count(``.  A calltip
+appears because Idle imports itertools into the user process for its own use.
+(This could change.)  Enter ``turtle.write(`` and nothing appears.  Idle does
+not import turtle.  The menu or shortcut do nothing either.  Enter
+``import turtle`` and then ``turtle.write(`` will work.
+
+In an editor, import statements have no effect until one runs the file.  One
+might want to run a file after writing the import statements at the top,
+or immediately run an existing file before editing.
 
 Python Shell window
 ^^^^^^^^^^^^^^^^^^^
@@ -448,42 +483,24 @@ Python Shell window
   * :kbd:`Return` while on any previous command retrieves that command
 
 
-Syntax colors
--------------
-
-The coloring is applied in a background "thread," so you may occasionally see
-uncolorized text.  To change the color scheme, edit the ``[Colors]`` section in
-:file:`config.txt`.
-
-Python syntax colors:
-   Keywords
-      orange
-
-   Strings
-      green
-
-   Comments
-      red
-
-   Definitions
-      blue
-
-Shell colors:
-   Console output
-      brown
-
-   stdout
-      blue
+Text colors
+^^^^^^^^^^^
 
-   stderr
-      dark green
+Idle defaults to black on white text, but colors text with special meanings.
+For the shell, these are shell output, shell error, user output, and
+user error.  For Python code, at the shell prompt or in an editor, these are
+keywords, builtin class and function names, names following ``class`` and
+``def``, strings, and comments. For any text window, these are the cursor (when
+present), found text (when possible), and selected text.
 
-   stdin
-      black
+Text coloring is done in the background, so uncolorized text is occasionally
+visible.  To change the color scheme, use the Configure IDLE dialog
+Highlighting tab.  The marking of debugger breakpoint lines in the editor and
+text in popups and dialogs is not user-configurable.
 
 
-Startup
--------
+Startup and code execution
+--------------------------
 
 Upon startup with the ``-s`` option, IDLE will execute the file referenced by
 the environment variables :envvar:`IDLESTARTUP` or :envvar:`PYTHONSTARTUP`.
@@ -505,31 +522,60 @@ Command line usage
 
 ::
 
-   idle.py [-c command] [-d] [-e] [-s] [-t title] [arg] ...
+   idle.py [-c command] [-d] [-e] [-h] [-i] [-r file] [-s] [-t title] [-] [arg] ...
 
-   -c command  run this command
-   -d          enable debugger
-   -e          edit mode; arguments are files to be edited
-   -s          run $IDLESTARTUP or $PYTHONSTARTUP first
+   -c command  run command in the shell window
+   -d          enable debugger and open shell window
+   -e          open editor window
+   -h          print help message with legal combinatios and exit
+   -i          open shell window
+   -r file     run file in shell window
+   -s          run $IDLESTARTUP or $PYTHONSTARTUP first, in shell window
    -t title    set title of shell window
+   -           run stdin in shell (- must be last option before args)
 
 If there are arguments:
 
-#. If ``-e`` is used, arguments are files opened for editing and
-   ``sys.argv`` reflects the arguments passed to IDLE itself.
+* If ``-``, ``-c``, or ``r`` is used, all arguments are placed in
+  ``sys.argv[1:...]`` and ``sys.argv[0]`` is set to ``''``, ``'-c'``,
+  or ``'-r'``.  No editor window is opened, even if that is the default
+  set in the Options dialog.
+
+* Otherwise, arguments are files opened for editing and
+  ``sys.argv`` reflects the arguments passed to IDLE itself.
 
-#. Otherwise, if ``-c`` is used, all arguments are placed in
-   ``sys.argv[1:...]``, with ``sys.argv[0]`` set to ``'-c'``.
 
-#. Otherwise, if neither ``-e`` nor ``-c`` is used, the first
-   argument is a script which is executed with the remaining arguments in
-   ``sys.argv[1:...]``  and ``sys.argv[0]`` set to the script name.  If the
-   script name is '-', no script is executed but an interactive Python session
-   is started;    the arguments are still available in ``sys.argv``.
+IDLE-console differences
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+As much as possible, the result of executing Python code with IDLE is the
+same as executing the same code in a console window.  However, the different
+interface and operation occasionally affects results.
+
+For instance, IDLE normally executes user code in a separate process from
+the IDLE GUI itself.  The IDLE versions of sys.stdin, .stdout, and .stderr in the
+execution process get input from and send output to the GUI process,
+which keeps control of the keyboard and screen.  This is normally transparent,
+but code that access these object will see different attribute values.
+Also, functions that directly access the keyboard and screen will not work.
+
+With IDLE's Shell, one enters, edits, and recalls complete statements.
+Some consoles only work with a single physical line at a time.
 
 Running without a subprocess
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+By default, IDLE executes user code in a separate subprocess via a socket,
+which uses the internal loopback interface.  This connection is not
+externally visible and no data is sent to or received from the Internet.
+If firewall software complains anyway, you can ignore it.
+
+If the attempt to make the socket connection fails, Idle will notify you.
+Such failures are sometimes transient, but if persistent, the problem
+may be either a firewall blocking the connecton or misconfiguration of
+a particular system.  Until the problem is fixed, one can run Idle with
+the -n command line switch.
+
 If IDLE is started with the -n command line switch it will run in a
 single process and will not create the subprocess which runs the RPC
 Python execution server.  This can be useful if Python cannot create
index ab5a0436078fc26880e04a8460868e4aebfba935..6743b2711b75ffff60baae25eb91c4442b6e0781 100644 (file)
@@ -299,11 +299,11 @@ I/O Base Classes
       Note that it's already possible to iterate on file objects using ``for
       line in file: ...`` without calling ``file.readlines()``.
 
-   .. method:: seek(offset, whence=SEEK_SET)
+   .. method:: seek(offset[, whence])
 
       Change the stream position to the given byte *offset*.  *offset* is
-      interpreted relative to the position indicated by *whence*.  Values for
-      *whence* are:
+      interpreted relative to the position indicated by *whence*.  The default
+      value for *whence* is :data:`SEEK_SET`.  Values for *whence* are:
 
       * :data:`SEEK_SET` or ``0`` -- start of the stream (the default);
         *offset* should be zero or positive
@@ -716,10 +716,11 @@ Text I/O
 
       If *limit* is specified, at most *limit* characters will be read.
 
-   .. method:: seek(offset, whence=SEEK_SET)
+   .. method:: seek(offset[, whence])
 
-      Change the stream position to the given *offset*.  Behaviour depends
-      on the *whence* parameter:
+      Change the stream position to the given *offset*.  Behaviour depends on
+      the *whence* parameter.  The default value for *whence* is
+      :data:`SEEK_SET`.
 
       * :data:`SEEK_SET` or ``0``: seek from the start of the stream
         (the default); *offset* must either be a number returned by
@@ -802,10 +803,16 @@ Text I/O
 
    An in-memory stream for unicode text.  It inherits :class:`TextIOWrapper`.
 
-   The initial value of the buffer (an empty unicode string by default) can
-   be set by providing *initial_value*.  The *newline* argument works like
-   that of :class:`TextIOWrapper`.  The default is to consider only ``\n``
-   characters as end of lines and to do no newline translation.
+   The initial value of the buffer can be set by providing *initial_value*.
+   If newline translation is enabled, newlines will be encoded as if by
+   :meth:`~TextIOBase.write`.  The stream is positioned at the start of
+   the buffer.
+
+   The *newline* argument works like that of :class:`TextIOWrapper`.
+   The default is to consider only ``\n`` characters as ends of lines and
+   to do no newline translation.  If *newline* is set to ``None``,
+   newlines are written as ``\n`` on all platforms, but universal
+   newline decoding is still performed when reading.
 
    :class:`StringIO` provides this method in addition to those from
    :class:`TextIOWrapper` and its parents:
@@ -814,7 +821,8 @@ Text I/O
 
       Return a ``unicode`` containing the entire contents of the buffer at any
       time before the :class:`StringIO` object's :meth:`close` method is
-      called.
+      called.  Newlines are decoded as if by :meth:`~TextIOBase.read`,
+      although the stream position is not changed.
 
    Example usage::
 
index 6db8f97cc0e03669bc9989d3f68155d05fa23e0c..b501d65c44a17c920234bdcd56b76d40b88aaf17 100644 (file)
@@ -356,7 +356,7 @@ Encoders and Decoders
    .. method:: decode(s)
 
       Return the Python representation of *s* (a :class:`str` or
-      :class:`unicode` instance containing a JSON document)
+      :class:`unicode` instance containing a JSON document).
 
    .. method:: raw_decode(s)
 
index 5590514c15eda1806d733a6f0a4497f2f9db9819..8fa1a1b5e5221d7b45ef7552840c83d7ac8e2adf 100644 (file)
@@ -208,7 +208,7 @@ The :mod:`locale` module defines the following exception and functions:
 
    .. data:: RADIXCHAR
 
-      Get the radix character (decimal dot, decimal comma, etc.)
+      Get the radix character (decimal dot, decimal comma, etc.).
 
    .. data:: THOUSEP
 
index 562388e022b630cf8649422c69ce102ce4569019..22d2316aba94bf14916ce769cd6a1ca51481dbdb 100644 (file)
@@ -280,12 +280,12 @@ Angular conversion
 
 .. function:: degrees(x)
 
-   Converts angle *x* from radians to degrees.
+   Convert angle *x* from radians to degrees.
 
 
 .. function:: radians(x)
 
-   Converts angle *x* from degrees to radians.
+   Convert angle *x* from degrees to radians.
 
 
 Hyperbolic functions
index 40bf60f1907f4aef215824a6c035dba75141436b..4acddd20659fea5bde5933dcca70535be2026110 100644 (file)
@@ -55,7 +55,7 @@ report of the imported modules will be printed.
    .. attribute:: modules
 
       A dictionary mapping module names to modules. See
-      :ref:`modulefinder-example`
+      :ref:`modulefinder-example`.
 
 
 .. _modulefinder-example:
index d7fd3fb770b223d553a7ec9a6cd02857dfb218aa..87b816679f3464b40e6bb307211ec4e8bbcef2db 100644 (file)
@@ -19,7 +19,7 @@ documentation.
 The module implements both the normal and wide char variants of the console I/O
 api. The normal API deals only with ASCII characters and is of limited use
 for internationalized applications. The wide char API should be used where
-ever possible
+ever possible.
 
 .. _msvcrt-files:
 
index 021e3c8e18fb467f27adf143b1f3fc571355e4c1..2c765f551c1b5ceb590314d95d0f412a20988e8c 100644 (file)
@@ -908,10 +908,16 @@ object -- see :ref:`multiprocessing-managers`.
 
 .. class:: BoundedSemaphore([value])
 
-   A bounded semaphore object: a clone of :class:`threading.BoundedSemaphore`.
+   A bounded semaphore object: a close analog of
+   :class:`threading.BoundedSemaphore`.
 
-   (On Mac OS X, this is indistinguishable from :class:`Semaphore` because
-   ``sem_getvalue()`` is not implemented on that platform).
+   A solitary difference from its close analog exists: its ``acquire`` method's
+   first argument is named *block* and it supports an optional second argument
+   *timeout*, as is consistent with :meth:`Lock.acquire`.
+
+   .. note::
+      On Mac OS X, this is indistinguishable from :class:`Semaphore` because
+      ``sem_getvalue()`` is not implemented on that platform.
 
 .. class:: Condition([lock])
 
@@ -930,17 +936,124 @@ object -- see :ref:`multiprocessing-managers`.
    .. versionchanged:: 2.7
       Previously, the method always returned ``None``.
 
+
 .. class:: Lock()
 
-   A non-recursive lock object: a clone of :class:`threading.Lock`.
+   A non-recursive lock object: a close analog of :class:`threading.Lock`.
+   Once a process or thread has acquired a lock, subsequent attempts to
+   acquire it from any process or thread will block until it is released;
+   any process or thread may release it.  The concepts and behaviors of
+   :class:`threading.Lock` as it applies to threads are replicated here in
+   :class:`multiprocessing.Lock` as it applies to either processes or threads,
+   except as noted.
+
+   Note that :class:`Lock` is actually a factory function which returns an
+   instance of ``multiprocessing.synchronize.Lock`` initialized with a
+   default context.
+
+   :class:`Lock` supports the :term:`context manager` protocol and thus may be
+   used in :keyword:`with` statements.
+
+   .. method:: acquire(block=True, timeout=None)
+
+      Acquire a lock, blocking or non-blocking.
+
+      With the *block* argument set to ``True`` (the default), the method call
+      will block until the lock is in an unlocked state, then set it to locked
+      and return ``True``.  Note that the name of this first argument differs
+      from that in :meth:`threading.Lock.acquire`.
+
+      With the *block* argument set to ``False``, the method call does not
+      block.  If the lock is currently in a locked state, return ``False``;
+      otherwise set the lock to a locked state and return ``True``.
+
+      When invoked with a positive, floating-point value for *timeout*, block
+      for at most the number of seconds specified by *timeout* as long as
+      the lock can not be acquired.  Invocations with a negative value for
+      *timeout* are equivalent to a *timeout* of zero.  Invocations with a
+      *timeout* value of ``None`` (the default) set the timeout period to
+      infinite.  The *timeout* argument has no practical implications if the
+      *block* argument is set to ``False`` and is thus ignored.  Returns
+      ``True`` if the lock has been acquired or ``False`` if the timeout period
+      has elapsed.  Note that the *timeout* argument does not exist in this
+      method's analog, :meth:`threading.Lock.acquire`.
+
+   .. method:: release()
+
+      Release a lock.  This can be called from any process or thread, not only
+      the process or thread which originally acquired the lock.
+
+      Behavior is the same as in :meth:`threading.Lock.release` except that
+      when invoked on an unlocked lock, a :exc:`ValueError` is raised.
+
 
 .. class:: RLock()
 
-   A recursive lock object: a clone of :class:`threading.RLock`.
+   A recursive lock object: a close analog of :class:`threading.RLock`.  A
+   recursive lock must be released by the process or thread that acquired it.
+   Once a process or thread has acquired a recursive lock, the same process
+   or thread may acquire it again without blocking; that process or thread
+   must release it once for each time it has been acquired.
+
+   Note that :class:`RLock` is actually a factory function which returns an
+   instance of ``multiprocessing.synchronize.RLock`` initialized with a
+   default context.
+
+   :class:`RLock` supports the :term:`context manager` protocol and thus may be
+   used in :keyword:`with` statements.
+
+
+   .. method:: acquire(block=True, timeout=None)
+
+      Acquire a lock, blocking or non-blocking.
+
+      When invoked with the *block* argument set to ``True``, block until the
+      lock is in an unlocked state (not owned by any process or thread) unless
+      the lock is already owned by the current process or thread.  The current
+      process or thread then takes ownership of the lock (if it does not
+      already have ownership) and the recursion level inside the lock increments
+      by one, resulting in a return value of ``True``.  Note that there are
+      several differences in this first argument's behavior compared to the
+      implementation of :meth:`threading.RLock.acquire`, starting with the name
+      of the argument itself.
+
+      When invoked with the *block* argument set to ``False``, do not block.
+      If the lock has already been acquired (and thus is owned) by another
+      process or thread, the current process or thread does not take ownership
+      and the recursion level within the lock is not changed, resulting in
+      a return value of ``False``.  If the lock is in an unlocked state, the
+      current process or thread takes ownership and the recursion level is
+      incremented, resulting in a return value of ``True``.
+
+      Use and behaviors of the *timeout* argument are the same as in
+      :meth:`Lock.acquire`.  Note that the *timeout* argument does
+      not exist in this method's analog, :meth:`threading.RLock.acquire`.
+
+
+   .. method:: release()
+
+      Release a lock, decrementing the recursion level.  If after the
+      decrement the recursion level is zero, reset the lock to unlocked (not
+      owned by any process or thread) and if any other processes or threads
+      are blocked waiting for the lock to become unlocked, allow exactly one
+      of them to proceed.  If after the decrement the recursion level is still
+      nonzero, the lock remains locked and owned by the calling process or
+      thread.
+
+      Only call this method when the calling process or thread owns the lock.
+      An :exc:`AssertionError` is raised if this method is called by a process
+      or thread other than the owner or if the lock is in an unlocked (unowned)
+      state.  Note that the type of exception raised in this situation
+      differs from the implemented behavior in :meth:`threading.RLock.release`.
+
 
 .. class:: Semaphore([value])
 
-   A semaphore object: a clone of :class:`threading.Semaphore`.
+   A semaphore object: a close analog of :class:`threading.Semaphore`.
+
+   A solitary difference from its close analog exists: its ``acquire`` method's
+   first argument is named *block* and it supports an optional second argument
+   *timeout*, as is consistent with :meth:`Lock.acquire`.
 
 .. note::
 
@@ -957,7 +1070,7 @@ object -- see :ref:`multiprocessing-managers`.
 
 .. note::
 
-   If the SIGINT signal generated by Ctrl-C arrives while the main thread is
+   If the SIGINT signal generated by :kbd:`Ctrl-C` arrives while the main thread is
    blocked by a call to :meth:`BoundedSemaphore.acquire`, :meth:`Lock.acquire`,
    :meth:`RLock.acquire`, :meth:`Semaphore.acquire`, :meth:`Condition.acquire`
    or :meth:`Condition.wait` then the call will be immediately interrupted and
@@ -1592,7 +1705,7 @@ itself.  This means, for example, that one shared object can contain a second:
       raised by :meth:`_callmethod`.
 
       Note in particular that an exception will be raised if *methodname* has
-      not been *exposed*
+      not been *exposed*.
 
       An example of the usage of :meth:`_callmethod`:
 
index 1ab039af08cc43b8a86c56195fff08dbc7977275..77f02ab374894b4dd09d0a4aa2c82e3750dd70d8 100644 (file)
@@ -1608,9 +1608,9 @@ Files and Directories
    recurse into the subdirectories whose names remain in *dirnames*; this can be
    used to prune the search, impose a specific order of visiting, or even to inform
    :func:`walk` about directories the caller creates or renames before it resumes
-   :func:`walk` again.  Modifying *dirnames* when *topdown* is ``False`` is
-   ineffective, because in bottom-up mode the directories in *dirnames* are
-   generated before *dirpath* itself is generated.
+   :func:`walk` again.  Modifying *dirnames* when *topdown* is ``False`` has
+   no effect on the behavior of the walk, because in bottom-up mode the directories
+   in *dirnames* are generated before *dirpath* itself is generated.
 
    By default, errors from the :func:`listdir` call are ignored.  If optional
    argument *onerror* is specified, it should be a function; it will be called with
index a42eabc25028a5c9cf111e0158c9236e60a417db..41be2c4eb60be6379f45efbfe7e0d15d9b13f39f 100644 (file)
@@ -27,9 +27,9 @@ This documentation describes both the :mod:`pickle` module and the
 
 .. warning::
 
-   The :mod:`pickle` module is not intended to be secure against erroneous or
-   maliciously constructed data.  Never unpickle data received from an untrusted
-   or unauthenticated source.
+   The :mod:`pickle` module is not secure against erroneous or maliciously
+   constructed data.  Never unpickle data received from an untrusted or
+   unauthenticated source.
 
 
 Relationship to other Python modules
index cb7144a64adb88f6fdbbb8b2378b470e20ebeefd..28b6f08914e32e005b4b21f1d3e98bb7dd62713a 100644 (file)
@@ -126,7 +126,7 @@ Cross Platform
 
 .. function:: python_version()
 
-   Returns the Python version as string ``'major.minor.patchlevel'``
+   Returns the Python version as string ``'major.minor.patchlevel'``.
 
    Note that unlike the Python ``sys.version``, the returned value will always
    include the patchlevel (it defaults to 0).
index c7007a6ccdeae5a6b08c2198b8234685656d5847..210e99c5babf1d7c6f2d0c6a7265957a3d5000f4 100644 (file)
@@ -35,7 +35,7 @@ profiling interface:
 2. :mod:`profile`, a pure Python module whose interface is imitated by
    :mod:`cProfile`, but which adds significant overhead to profiled programs.
    If you're trying to extend the profiler in some way, the task might be easier
-   with this module.
+   with this module.  Originally designed and written by Jim Roskind.
 
    .. versionchanged:: 2.4
       Now also reports the time spent in calls to built-in functions
index b353c4c67e3c53723f466ce11db5140eca4c298b..c4029c57d549eb0a1973ea2119e892804306d8a0 100644 (file)
@@ -514,13 +514,15 @@ form.
 .. data:: X
           VERBOSE
 
-   This flag allows you to write regular expressions that look nicer. Whitespace
-   within the pattern is ignored, except when in a character class or preceded by
-   an unescaped backslash, and, when a line contains a ``'#'`` neither in a
-   character class or preceded by an unescaped backslash, all characters from the
-   leftmost such ``'#'`` through the end of the line are ignored.
-
-   That means that the two following regular expression objects that match a
+   This flag allows you to write regular expressions that look nicer and are
+   more readable by allowing you to visually separate logical sections of the
+   pattern and add comments. Whitespace within the pattern is ignored, except
+   when in a character class or when preceded by an unescaped backslash.
+   When a line contains a ``#`` that is not in a character class and is not
+   preceded by an unescaped backslash, all characters from the leftmost such
+   ``#`` through the end of the line are ignored.
+
+   This means that the two following regular expression objects that match a
    decimal number are functionally equal::
 
       a = re.compile(r"""\d +  # the integral part
index 7ca45347f114a56fa352a204ed4848c07920f0db..f6d60588185a920f7bd65bcf1d940d201acb91ac 100644 (file)
@@ -223,10 +223,7 @@ These functions are used to retrieve resource usage information:
 .. function:: getpagesize()
 
    Returns the number of bytes in a system page. (This need not be the same as the
-   hardware page size.) This function is useful for determining the number of bytes
-   of memory a process is using. The third element of the tuple returned by
-   :func:`getrusage` describes memory usage in pages; multiplying by page size
-   produces number of bytes.
+   hardware page size.)
 
 The following :const:`RUSAGE_\*` symbols are passed to the :func:`getrusage`
 function to specify which processes information should be provided for.
index f350f5ea54463018bff20fcb9d7f2e4ee5c06ade..2bf9680e97110807c3b9e6440e3363df2ee5e040 100644 (file)
@@ -291,7 +291,7 @@ provided.  They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
 .. function:: get_archive_formats()
 
    Return a list of supported formats for archiving.
-   Each element of the returned sequence is a tuple ``(name, description)``
+   Each element of the returned sequence is a tuple ``(name, description)``.
 
    By default :mod:`shutil` provides these formats:
 
index 29d56fcea51c049918657c1c4530ba721d082bc9..fe7983b2d37dde0bd12f81f406220bff73c42c2b 100644 (file)
@@ -77,7 +77,7 @@ The variables defined in the :mod:`signal` module are:
 
 .. data:: CTRL_C_EVENT
 
-   The signal corresponding to the CTRL+C keystroke event. This signal can
+   The signal corresponding to the :kbd:`Ctrl+C` keystroke event. This signal can
    only be used with :func:`os.kill`.
 
    Availability: Windows.
@@ -87,7 +87,7 @@ The variables defined in the :mod:`signal` module are:
 
 .. data:: CTRL_BREAK_EVENT
 
-   The signal corresponding to the CTRL+BREAK keystroke event. This signal can
+   The signal corresponding to the :kbd:`Ctrl+Break` keystroke event. This signal can
    only be used with :func:`os.kill`.
 
    Availability: Windows.
index 4aafe38e3dfa126089131a1f81ab3685a658b399..d80ad579de67a00963a82acfbb6640cb5214c51b 100644 (file)
@@ -262,12 +262,12 @@ The module :mod:`socket` exports the following constants and functions:
    method.
 
    The following example fetches address information for a hypothetical TCP
-   connection to ``www.python.org`` on port 80 (results may differ on your
+   connection to ``example.org`` on port 80 (results may differ on your
    system if IPv6 isn't enabled)::
 
-      >>> socket.getaddrinfo("www.python.org", 80, 0, 0, socket.IPPROTO_TCP)
-      [(2, 1, 6, '', ('82.94.164.162', 80)),
-       (10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]
+      >>> socket.getaddrinfo("example.org", 80, 0, 0, socket.IPPROTO_TCP)
+      [(10, 1, 6, '', ('2606:2800:220:1:248:1893:25c8:1946', 80, 0, 0)),
+       (2, 1, 6, '', ('93.184.216.34', 80))]
 
    .. versionadded:: 2.2
 
index a9053d1419e7ed7a2dbfb50979484190698ea8e5..bb933a65b4a2690bc2885caac872290b7519c3fd 100644 (file)
@@ -39,9 +39,10 @@ Creating a server requires several steps.  First, you must create a request
 handler class by subclassing the :class:`BaseRequestHandler` class and
 overriding its :meth:`handle` method; this method will process incoming
 requests.  Second, you must instantiate one of the server classes, passing it
-the server's address and the request handler class.  Finally, call the
+the server's address and the request handler class.  Then call the
 :meth:`handle_request` or :meth:`serve_forever` method of the server object to
-process one or many requests.
+process one or many requests.  Finally, call :meth:`~BaseServer.server_close`
+to close the socket.
 
 When inheriting from :class:`ThreadingMixIn` for threaded connection behavior,
 you should explicitly declare how you want your threads to behave on an abrupt
@@ -170,6 +171,13 @@ Server Objects
    .. versionadded:: 2.6
 
 
+.. method:: BaseServer.server_close()
+
+   Clean up the server. May be overridden.
+
+   .. versionadded:: 2.6
+
+
 .. attribute:: BaseServer.address_family
 
    The family of protocols to which the server's socket belongs.
@@ -540,6 +548,7 @@ An example for the :class:`ThreadingMixIn` class::
        client(ip, port, "Hello World 3")
 
        server.shutdown()
+       server.server_close()
 
 
 The output of the example should look something like this::
index bc437a4ae45cdb95dc5a1156418e824c05fbd555..94bfac1ead2627fb90d187eca78bfc64fd58cabd 100644 (file)
@@ -736,8 +736,8 @@ In the table, *s* and *t* are sequences of the same type; *n*, *i* and *j* are i
 | ``s + t``        | the concatenation of *s* and   | \(6)     |
 |                  | *t*                            |          |
 +------------------+--------------------------------+----------+
-| ``s * n, n * s`` | *n* shallow copies of *s*      | \(2)     |
-|                  | concatenated                   |          |
+| ``s * n, n * s`` | equivalent to adding *s* to    | \(2)     |
+|                  | itself *n* times               |          |
 +------------------+--------------------------------+----------+
 | ``s[i]``         | *i*\ th item of *s*, origin 0  | \(3)     |
 +------------------+--------------------------------+----------+
@@ -789,9 +789,9 @@ Notes:
 
 (2)
    Values of *n* less than ``0`` are treated as ``0`` (which yields an empty
-   sequence of the same type as *s*).  Note also that the copies are shallow;
-   nested structures are not copied.  This often haunts new Python programmers;
-   consider:
+   sequence of the same type as *s*).  Note that items in the sequence *s*
+   are not copied; they are referenced multiple times.  This often haunts
+   new Python programmers; consider:
 
       >>> lists = [[]] * 3
       >>> lists
@@ -801,7 +801,7 @@ Notes:
       [[3], [3], [3]]
 
    What has happened is that ``[[]]`` is a one-element list containing an empty
-   list, so all three elements of ``[[]] * 3`` are (pointers to) this single empty
+   list, so all three elements of ``[[]] * 3`` are references to this single empty
    list.  Modifying any of the elements of ``lists`` modifies this single list.
    You can create a list of different lists this way:
 
@@ -812,6 +812,9 @@ Notes:
       >>> lists
       [[3], [5], [7]]
 
+   Further explanation is available in the FAQ entry
+   :ref:`faq-multidimensional-list`.
+
 (3)
    If *i* or *j* is negative, the index is relative to the end of the string:
    ``len(s) + i`` or ``len(s) + j`` is substituted.  But note that ``-0`` is still
@@ -1610,8 +1613,11 @@ an arbitrary object):
 | ``s.append(x)``              | same as ``s[len(s):len(s)] =   | \(2)                |
 |                              | [x]``                          |                     |
 +------------------------------+--------------------------------+---------------------+
-| ``s.extend(x)``              | same as ``s[len(s):len(s)] =   | \(3)                |
-|                              | x``                            |                     |
+| ``s.extend(x)`` or           | for the most part the same as  | \(3)                |
+| ``s += t``                   | ``s[len(s):len(s)] = x``       |                     |
++------------------------------+--------------------------------+---------------------+
+| ``s *= n``                   | updates *s* with its contents  | \(11)               |
+|                              | repeated *n* times             |                     |
 +------------------------------+--------------------------------+---------------------+
 | ``s.count(x)``               | return number of *i*'s for     |                     |
 |                              | which ``s[i] == x``            |                     |
@@ -1717,6 +1723,12 @@ Notes:
       :exc:`ValueError` if it can detect that the list has been mutated during a
       sort.
 
+(11)
+   The value *n* is an integer, or an object implementing
+   :meth:`~object.__index__`.  Zero and negative values of *n* clear
+   the sequence.  Items in the sequence are not copied; they are referenced
+   multiple times, as explained for ``s * n`` under :ref:`typesseq`.
+
 
 .. _types-set:
 
@@ -2230,6 +2242,9 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
 
       .. versionadded:: 2.7
 
+   Dictionaries compare equal if and only if they have the same ``(key,
+   value)`` pairs.
+
 
 .. _dict-views:
 
index 114907f583689afe0466d83e9f3042b087012c52..01a791c76cc2abdc9c09c3146868a7c7bb8d142a 100644 (file)
@@ -852,7 +852,7 @@ Return code handling translates as follows::
    if rc is not None and rc >> 8:
        print "There were some errors"
    ==>
-   process = Popen("cmd", 'w', shell=True, stdin=PIPE)
+   process = Popen("cmd", shell=True, stdin=PIPE)
    ...
    process.stdin.close()
    if process.wait() != 0:
index 8a625f8a5bb7bf7c4aa130cb275dc6be7791937e..f1cee24d8f362ac5faf0879e075bf7b2a99f3c86 100644 (file)
@@ -98,7 +98,8 @@ It defines the following constant and functions:
    Return the thread stack size used when creating new threads.  The optional
    *size* argument specifies the stack size to be used for subsequently created
    threads, and must be 0 (use platform or configured default) or a positive
-   integer value of at least 32,768 (32kB). If changing the thread stack size is
+   integer value of at least 32,768 (32kB). If *size* is not specified,
+   0 is used. If changing the thread stack size is
    unsupported, the :exc:`error` exception is raised.  If the specified stack size is
    invalid, a :exc:`ValueError` is raised and the stack size is unmodified.  32kB
    is currently the minimum supported stack size value to guarantee sufficient
index a24c3858dba6dfe36c9ffad728912480e6cddda0..ccb922b1bc885e02dfe2bf0d6e3c5c9affcd576b 100644 (file)
@@ -194,7 +194,8 @@ This module defines the following functions and objects:
    Return the thread stack size used when creating new threads.  The optional
    *size* argument specifies the stack size to be used for subsequently created
    threads, and must be 0 (use platform or configured default) or a positive
-   integer value of at least 32,768 (32kB). If changing the thread stack size is
+   integer value of at least 32,768 (32 KiB). If *size* is not specified,
+   0 is used.  If changing the thread stack size is
    unsupported, a :exc:`ThreadError` is raised.  If the specified stack size is
    invalid, a :exc:`ValueError` is raised and the stack size is unmodified.  32kB
    is currently the minimum supported stack size value to guarantee sufficient
@@ -710,8 +711,8 @@ This is one of the simplest mechanisms for communication between threads: one
 thread signals an event and other threads wait for it.
 
 An event object manages an internal flag that can be set to true with the
-:meth:`~Event.set` method and reset to false with the :meth:`clear` method.  The
-:meth:`wait` method blocks until the flag is true.
+:meth:`~Event.set` method and reset to false with the :meth:`~Event.clear`
+method.  The :meth:`~Event.wait` method blocks until the flag is true.
 
 
 .. class:: Event()
index be2dd157089f5a5103e198eb6e50f6ef47e257f8..c2ea83480616c8852887a184dec8f306ccc83ca8 100644 (file)
@@ -47,8 +47,6 @@ An explanation of some terminology and conventions is in order.
   years for all year input.  When 2-digit years are accepted, they are converted
   according to the POSIX or X/Open standard: values 69-99 are mapped to 1969-1999,
   and values 0--68 are mapped to 2000--2068. Values 100--1899 are always illegal.
-  Note that this is new as of Python 1.5.2(a2); earlier versions, up to Python
-  1.5.1 and 1.5.2a1, would add 1900 to year values below 1900.
 
 .. index::
    single: UTC
index 846f96e1a103d9e3a1ee11e9a920b9d9c295dd9d..fa60c154f6360a6738a7c53e18915ddcbf0a6387 100644 (file)
@@ -817,3 +817,53 @@ reference to the image. When the last Python reference to the image object is
 deleted, the image data is deleted as well, and Tk will display an empty box
 wherever the image was used.
 
+
+.. _tkinter-file-handlers:
+
+File Handlers
+-------------
+
+Tk allows you to register and unregister a callback function which will be
+called from the Tk mainloop when I/O is possible on a file descriptor.
+Only one handler may be registered per file descriptor. Example code::
+
+   import Tkinter
+   widget = Tkinter.Tk()
+   mask = Tkinter.READABLE | Tkinter.WRITABLE
+   widget.tk.createfilehandler(file, mask, callback)
+   ...
+   widget.tk.deletefilehandler(file)
+
+This feature is not available on Windows.
+
+Since you don't know how many bytes are available for reading, you may not
+want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase`
+:meth:`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods,
+since these will insist on reading a predefined number of bytes.
+For sockets, the :meth:`~socket.socket.recv` or
+:meth:`~socket.socket.recvfrom` methods will work fine; for other files,
+use raw reads or ``os.read(file.fileno(), maxbytecount)``.
+
+
+.. method:: Widget.tk.createfilehandler(file, mask, func)
+
+   Registers the file handler callback function *func*. The *file* argument
+   may either be an object with a :meth:`~io.IOBase.fileno` method (such as
+   a file or socket object), or an integer file descriptor. The *mask*
+   argument is an ORed combination of any of the three constants below.
+   The callback is called as follows::
+
+      callback(file, mask)
+
+
+.. method:: Widget.tk.deletefilehandler(file)
+
+   Unregisters a file handler.
+
+
+.. data:: READABLE
+          WRITABLE
+          EXCEPTION
+
+   Constants used in the *mask* arguments.
+
index 6cab3e026c74ad18bfd0fbedc5b56df071db7e15..ad4aa9263496c500a5333224f81789c5604f7d38 100644 (file)
@@ -544,9 +544,9 @@ ttk.Notebook
       This will extend the bindings for the toplevel window containing the
       notebook as follows:
 
-      * Control-Tab: selects the tab following the currently selected one.
-      * Shift-Control-Tab: selects the tab preceding the currently selected one.
-      * Alt-K: where K is the mnemonic (underlined) character of any tab, will
+      * :kbd:`Control-Tab`: selects the tab following the currently selected one.
+      * :kbd:`Shift-Control-Tab`: selects the tab preceding the currently selected one.
+      * :kbd:`Alt-K`: where *K* is the mnemonic (underlined) character of any tab, will
         select that tab.
 
       Multiple notebooks in a single toplevel may be enabled for traversal,
index bc3046acbd605ce9e110bac5311341567f3ea681..ca91cd7e00d4321256e234c7339170272cec1b84 100644 (file)
@@ -83,7 +83,7 @@ need to derive from a specific class.
       discovery. unittest2 allows you to use these features with earlier
       versions of Python.
 
-   `Simple Smalltalk Testing: With Patterns <http://www.XProgramming.com/testfram.htm>`_
+   `Simple Smalltalk Testing: With Patterns <https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.htm>`_
       Kent Beck's original paper on testing frameworks using the pattern shared
       by :mod:`unittest`.
 
@@ -226,8 +226,8 @@ Command-line options
 
 .. cmdoption:: -c, --catch
 
-   Control-C during the test run waits for the current test to end and then
-   reports all the results so far. A second control-C raises the normal
+   :kbd:`Control-C` during the test run waits for the current test to end and then
+   reports all the results so far. A second :kbd:`Control-C` raises the normal
    :exc:`KeyboardInterrupt` exception.
 
    See `Signal Handling`_ for the functions that provide this functionality.
@@ -286,8 +286,8 @@ The :option:`-s`, :option:`-p`, and :option:`-t` options can be passed in
 as positional arguments in that order. The following two command lines
 are equivalent::
 
-   python -m unittest discover -s project_directory -p '*_test.py'
-   python -m unittest discover project_directory '*_test.py'
+   python -m unittest discover -s project_directory -p "*_test.py"
+   python -m unittest discover project_directory "*_test.py"
 
 As well as being a path it is possible to pass a package name, for example
 ``myproject.subpackage.test``, as the start directory. The package name you
@@ -568,7 +568,7 @@ Skipping tests and expected failures
 .. versionadded:: 2.7
 
 Unittest supports skipping individual test methods and even whole classes of
-tests.  In addition, it supports marking a test as a "expected failure," a test
+tests.  In addition, it supports marking a test as an "expected failure," a test
 that is broken and will fail, but shouldn't be counted as a failure on a
 :class:`TestResult`.
 
index d0cc54865165cebd4f7d98d0d6e6c456ff509347..927696ae5f4bd053945753c0cfde774114be1f99 100644 (file)
@@ -296,7 +296,7 @@ Utility functions
 .. note::
     urllib also exposes certain utility functions like splittype, splithost and
     others parsing url into various components. But it is recommended to use
-    :mod:`urlparse` for parsing urls than using these functions directly.
+    :mod:`urlparse` for parsing urls rather than using these functions directly.
     Python 3 does not expose these helper functions from :mod:`urllib.parse`
     module.
 
index 87e08dd47f9c5b763fe4a80cebf4eb43bd81e875..c1191909255461e929b23f3c77d7da8afcdddf51 100644 (file)
@@ -93,7 +93,7 @@ The :mod:`urlparse` module defines the following functions:
    +------------------+-------+--------------------------+----------------------+
    | Attribute        | Index | Value                    | Value if not present |
    +==================+=======+==========================+======================+
-   | :attr:`scheme`   | 0     | URL scheme specifier     | empty string         |
+   | :attr:`scheme`   | 0     | URL scheme specifier     | *scheme* parameter   |
    +------------------+-------+--------------------------+----------------------+
    | :attr:`netloc`   | 1     | Network location part    | empty string         |
    +------------------+-------+--------------------------+----------------------+
@@ -197,7 +197,7 @@ The :mod:`urlparse` module defines the following functions:
    +------------------+-------+-------------------------+----------------------+
    | Attribute        | Index | Value                   | Value if not present |
    +==================+=======+=========================+======================+
-   | :attr:`scheme`   | 0     | URL scheme specifier    | empty string         |
+   | :attr:`scheme`   | 0     | URL scheme specifier    | *scheme* parameter   |
    +------------------+-------+-------------------------+----------------------+
    | :attr:`netloc`   | 1     | Network location part   | empty string         |
    +------------------+-------+-------------------------+----------------------+
index 0b0c7c2245efa70f5d9e59f211c47c419398377c..98989c34a0ef2753bab87ed4aa123db5d963a258 100644 (file)
@@ -479,7 +479,7 @@ input, output, and error streams.
 
    Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin
    servers.  If you are writing an HTTP server implementation, you will probably
-   want to subclass this instead of :class:`BaseCGIHandler`
+   want to subclass this instead of :class:`BaseCGIHandler`.
 
    This class is a subclass of :class:`BaseHandler`.  It overrides the
    :meth:`__init__`, :meth:`get_stdin`, :meth:`get_stderr`, :meth:`add_cgi_vars`,
index 5cde5e2d52e24dae9e356fe0e9300d13d1d6fba1..4e7cd5a6a5c056f8fcb6844c2e6409a3f5e4aca5 100644 (file)
@@ -18,7 +18,7 @@
 Model interface, with an API similar to that in other languages.  It is intended
 to be simpler than the full DOM and also significantly smaller.  Users who are
 not already proficient with the DOM should consider using the
-:mod:`xml.etree.ElementTree` module for their XML processing instead
+:mod:`xml.etree.ElementTree` module for their XML processing instead.
 
 
 .. warning::
index b496aa1713cdf966f924afb670a0aea3d5b7d8d0..6dba90035bb49c6656afd145ba83469cd9446e6b 100644 (file)
@@ -321,7 +321,7 @@ All of the components of an XML document are subclasses of :class:`Node`.
 .. attribute:: Node.prefix
 
    The part of the :attr:`tagName` preceding the colon if there is one, else the
-   empty string.  The value is a string, or ``None``
+   empty string.  The value is a string, or ``None``.
 
 
 .. attribute:: Node.namespaceURI
index 46396dde90687cfa44b31848046ed54452bd031f..212a9e1e7a94e728f8e8287ddf98e9f3c9d09a1f 100644 (file)
@@ -600,21 +600,29 @@ Element Objects
 
 
    .. attribute:: text
+                  tail
 
-      The *text* attribute can be used to hold additional data associated with
-      the element.  As the name implies this attribute is usually a string but
-      may be any application-specific object.  If the element is created from
-      an XML file the attribute will contain any text found between the element
-      tags.
+      These attributes can be used to hold additional data associated with
+      the element.  Their values are usually strings but may be any
+      application-specific object.  If the element is created from
+      an XML file, the *text* attribute holds either the text between
+      the element's start tag and its first child or end tag, or ``None``, and
+      the *tail* attribute holds either the text between the element's
+      end tag and the next tag, or ``None``.  For the XML data
 
+      .. code-block:: xml
 
-   .. attribute:: tail
+         <a><b>1<c>2<d/>3</c></b>4</a>
 
-      The *tail* attribute can be used to hold additional data associated with
-      the element.  This attribute is usually a string but may be any
-      application-specific object.  If the element is created from an XML file
-      the attribute will contain any text found after the element's end tag and
-      before the next tag.
+      the *a* element has ``None`` for both *text* and *tail* attributes,
+      the *b* element has *text* ``"1"`` and *tail* ``"4"``,
+      the *c* element has *text* ``"2"`` and *tail* ``None``,
+      and the *d* element has *text* ``None`` and *tail* ``"3"``.
+
+      To collect the inner text of an element, see :meth:`itertext`, for
+      example ``"".join(element.itertext())``.
+
+      Applications may store arbitrary objects in these attributes.
 
 
    .. attribute:: attrib
@@ -821,7 +829,7 @@ ElementTree Objects
 
       Creates and returns a tree iterator for the root element.  The iterator
       loops over all elements in this tree, in section order.  *tag* is the tag
-      to look for (default is to return all elements)
+      to look for (default is to return all elements).
 
 
    .. method:: iterfind(match)
index 192bd4dbec51a0184f977519f24ad00df9334eb7..96e723bfe54c88db540a5d5d9d972d96cf760a85 100644 (file)
@@ -31,7 +31,7 @@ The available exception and functions in this module are:
 
 .. function:: adler32(data[, value])
 
-   Computes a Adler-32 checksum of *data*.  (An Adler-32 checksum is almost as
+   Computes an Adler-32 checksum of *data*.  (An Adler-32 checksum is almost as
    reliable as a CRC32 but can be computed much more quickly.)  If *value* is
    present, it is used as the starting value of the checksum; otherwise, a fixed
    default value is used.  This allows computing a running checksum over the
@@ -221,7 +221,7 @@ Decompression objects support the following methods, and two attributes:
    :meth:`decompress` method.  Some of the input data may be preserved in internal
    buffers for later processing.
 
-   If the optional parameter *max_length* is supplied then the return value will be
+   If the optional parameter *max_length* is non-zero then the return value will be
    no longer than *max_length*. This may mean that not all of the compressed input
    can be processed; and unconsumed data will be stored in the attribute
    :attr:`unconsumed_tail`. This string must be passed to a subsequent call to
index 52a09a895c662248113a616b99c075d93eafa8d3..94b003c5c44cfd3e7195ed4fea70402afc9978f8 100644 (file)
@@ -109,7 +109,9 @@ Encoding declarations
 If a comment in the first or second line of the Python script matches the
 regular expression ``coding[=:]\s*([-\w.]+)``, this comment is processed as an
 encoding declaration; the first group of this expression names the encoding of
-the source code file. The recommended forms of this expression are ::
+the source code file. The encoding declaration must appear on a line of its
+own. If it is the second line, the first line must also be a comment-only line.
+The recommended forms of an encoding expression are ::
 
    # -*- coding: <encoding-name> -*-
 
@@ -126,8 +128,7 @@ If an encoding is declared, the encoding name must be recognized by Python. The
 encoding is used for all lexical analysis, in particular to find the end of a
 string, and to interpret the contents of Unicode literals. String literals are
 converted to Unicode for syntactical analysis, then converted back to their
-original encoding before interpretation starts. The encoding declaration must
-appear on a line of its own.
+original encoding before interpretation starts.
 
 .. XXX there should be a list of supported encodings.
 
index edb025b8abae6b3ff01e4ff251a8da89a10bbffc..7289a4d01ea2f6a0de6fe8760f9fea255e481e0e 100644 (file)
@@ -2,7 +2,8 @@
   'use strict';
 
   var all_versions = {
-    '3.5': 'dev (3.5)',
+    '3.6': 'dev (3.6)',
+    '3.5': '3.5',
     '3.4': '3.4',
     '3.3': '3.3',
     '3.2': '3.2',
index dc719e50061096b32c7ed3cb60962b2c393a7448..49d8275550ffec4bdf58daf817dda7de9242bcce 100644 (file)
@@ -7,7 +7,6 @@ extending/embedding,,:numargs,"if(!PyArg_ParseTuple(args, "":numargs""))"
 extending/extending,,:set,"if (PyArg_ParseTuple(args, ""O:set_callback"", &temp)) {"
 extending/extending,,:myfunction,"PyArg_ParseTuple(args, ""D:myfunction"", &c);"
 extending/newtypes,,:call,"if (!PyArg_ParseTuple(args, ""sss:call"", &arg1, &arg2, &arg3)) {"
-extending/windows,,:initspam,/export:initspam
 faq/programming,,:reduce,"print (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,"
 faq/programming,,:reduce,"Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,"
 faq/programming,,:chr,">=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr("
@@ -102,7 +101,6 @@ library/pyexpat,,:elem1,<py:elem1 />
 library/pyexpat,,:py,"xmlns:py = ""http://www.python.org/ns/"">"
 library/smtplib,,:port,method must support that as well as a regular host:port
 library/socket,,::,'5aef:2b::8'
-library/socket,,::,"(10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]"
 library/sqlite3,,:memory,
 library/sqlite3,,:who,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})"
 library/sqlite3,,:age,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})"
@@ -128,6 +126,16 @@ library/urllib,,:port,:port
 library/urllib2,,:password,"""joe:password@python.org"""
 library/urllib2,,:close,Connection:close
 library/uuid,,:uuid,urn:uuid:12345678-1234-5678-1234-567812345678
+library/xml.etree.elementtree,,:sometag,prefix:sometag
+library/xml.etree.elementtree,,:fictional,"<actors xmlns:fictional=""http://characters.example.com"""
+library/xml.etree.elementtree,,:character,<fictional:character>Lancelot</fictional:character>
+library/xml.etree.elementtree,,:character,<fictional:character>Archie Leach</fictional:character>
+library/xml.etree.elementtree,,:character,<fictional:character>Sir Robin</fictional:character>
+library/xml.etree.elementtree,,:character,<fictional:character>Gunther</fictional:character>
+library/xml.etree.elementtree,,:character,<fictional:character>Commander Clement</fictional:character>
+library/xml.etree.elementtree,,:actor,"for actor in root.findall('real_person:actor', ns):"
+library/xml.etree.elementtree,,:name,"name = actor.find('real_person:name', ns)"
+library/xml.etree.elementtree,,:character,"for char in actor.findall('role:character', ns):"
 library/xmlrpclib,,:pass,http://user:pass@host:port/path
 library/xmlrpclib,,:pass,user:pass
 library/xmlrpclib,,:port,http://user:pass@host:port/path
@@ -179,8 +187,8 @@ whatsnew/2.4,,:System,
 whatsnew/2.5,,:memory,:memory:
 whatsnew/2.5,,:step,[start:stop:step]
 whatsnew/2.5,,:stop,[start:stop:step]
-whatsnew/2.7,735,:Sunday,'2009:4:Sunday'
-whatsnew/2.7,862,::,"export PYTHONWARNINGS=all,error:::Cookie:0"
-whatsnew/2.7,862,:Cookie,"export PYTHONWARNINGS=all,error:::Cookie:0"
+whatsnew/2.7,,:Sunday,'2009:4:Sunday'
+whatsnew/2.7,,::,"export PYTHONWARNINGS=all,error:::Cookie:0"
+whatsnew/2.7,,:Cookie,"export PYTHONWARNINGS=all,error:::Cookie:0"
 whatsnew/2.7,,::,>>> urlparse.urlparse('http://[1080::8:800:200C:417A]/foo')
 whatsnew/2.7,,::,"ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]',"
index befb96ae5d65c6849848aac12466bdc254db7196..7ab588bbfd585f68aa9607c5a6a43b944d62b799 100644 (file)
@@ -25,7 +25,7 @@ some cases of running out of memory.  All error messages are written to the
 standard error stream; normal output from executed commands is written to
 standard output.
 
-Typing the interrupt character (usually Control-C or DEL) to the primary or
+Typing the interrupt character (usually :kbd:`Control-C` or :kbd:`Delete`) to the primary or
 secondary prompt cancels the input and returns to the primary prompt. [#]_
 Typing an interrupt while a command is executing raises the
 :exc:`KeyboardInterrupt` exception, which may be handled by a :keyword:`try`
index 89589bc02deb89405a3c9e5dfb2b522cd31a0fc5..48faa9cc436a36000380f94575ac1b9e3ac1b84b 100644 (file)
@@ -664,18 +664,18 @@ retrieved at the same time using the :meth:`iteritems` method. ::
    gallahad the pure
    robin the brave
 
-To change a sequence you are iterating over while inside the loop (for
-example to duplicate certain items), it is recommended that you first make
-a copy.  Looping over a sequence does not implicitly make a copy.  The slice
-notation makes this especially convenient::
-
-   >>> words = ['cat', 'window', 'defenestrate']
-   >>> for w in words[:]:  # Loop over a slice copy of the entire list.
-   ...     if len(w) > 6:
-   ...         words.insert(0, w)
+It is sometimes tempting to change a list while you are looping over it;
+however, it is often simpler and safer to create a new list instead. ::
+
+   >>> import math
+   >>> raw_data = [56.2, float('NaN'), 51.7, 55.3, 52.5, float('NaN'), 47.8]
+   >>> filtered_data = []
+   >>> for value in raw_data:
+   ...     if not math.isnan(value):
+   ...         filtered_data.append(value)
    ...
-   >>> words
-   ['defenestrate', 'cat', 'window', 'defenestrate']
+   >>> filtered_data
+   [56.2, 51.7, 55.3, 52.5, 47.8]
 
 
 .. _tut-conditions:
index 67f927fdf522c0c2df46a5c79defae4442d404f6..5f375048f0aae49b5c68b5f2b3eb1ed02021a7e1 100644 (file)
@@ -37,7 +37,7 @@ The interpreter's line-editing features usually aren't very sophisticated.  On
 Unix, whoever installed the interpreter may have enabled support for the GNU
 readline library, which adds more elaborate interactive editing and history
 features. Perhaps the quickest check to see whether command line editing is
-supported is typing Control-P to the first Python prompt you get.  If it beeps,
+supported is typing :kbd:`Control-P` to the first Python prompt you get.  If it beeps,
 you have command line editing; see Appendix :ref:`tut-interacting` for an
 introduction to the keys.  If nothing appears to happen, or if ``^P`` is echoed,
 command line editing isn't available; you'll only be able to use backspace to
index ce5e76fd4ceced5975bd96a4c52c4ba5d56035c6..3f314b7b3d497c69a542e01447f950f0dcceabc5 100644 (file)
@@ -41,7 +41,7 @@ additional methods of invocation:
 
 * When called with standard input connected to a tty device, it prompts for
   commands and executes them until an EOF (an end-of-file character, you can
-  produce that with *Ctrl-D* on UNIX or *Ctrl-Z, Enter* on Windows) is read.
+  produce that with :kbd:`Ctrl-D` on UNIX or :kbd:`Ctrl-Z, Enter` on Windows) is read.
 * When called with a file name argument or with a file as standard input, it
   reads and executes a script from that file.
 * When called with a directory name argument, it reads and executes an
index 9f47fb4db0c521e1f645c6c7da0547e76164c9e0..937a40ae0088a40a608d597db9dfe4be9aaa53f9 100644 (file)
@@ -109,8 +109,9 @@ Configuration
 Python on OS X honors all standard Unix environment variables such as
 :envvar:`PYTHONPATH`, but setting these variables for programs started from the
 Finder is non-standard as the Finder does not read your :file:`.profile` or
-:file:`.cshrc` at startup. You need to create a file :file:`~
-/.MacOSX/environment.plist`. See Apple's Technical Document QA1067 for details.
+:file:`.cshrc` at startup. You need to create a file
+:file:`~/.MacOSX/environment.plist`. See Apple's Technical Document QA1067 for
+details.
 
 For more information on installation Python packages in MacPython, see section
 :ref:`mac-package-manager`.
index b6c4fb960d5bd7ae049d22f6a9b784ec3d1c20b9..67e1fc712306d8ba531a55db681f1ae11bf836a3 100644 (file)
@@ -1174,8 +1174,8 @@ partial list:
 
 * In the editor window, there is now a line/column bar at the bottom.
 
-* Three new keystroke commands: Check module (Alt-F5), Import module (F5) and
-  Run script (Ctrl-F5).
+* Three new keystroke commands: Check module (:kbd:`Alt-F5`), Import module (:kbd:`F5`) and
+  Run script (:kbd:`Ctrl-F5`).
 
 .. ======================================================================
 
index 9d2e124f56f3e5076a2d68a5a83bfa7740a7d9d1..b0c0af0f82429caaa103aa9da1914907240ec6a3 100644 (file)
@@ -827,7 +827,7 @@ inheritance relationships are::
 This rearrangement was done because people often want to catch all exceptions
 that indicate program errors.  :exc:`KeyboardInterrupt` and :exc:`SystemExit`
 aren't errors, though, and usually represent an explicit action such as the user
-hitting Control-C or code calling :func:`sys.exit`.  A bare ``except:`` will
+hitting :kbd:`Control-C` or code calling :func:`sys.exit`.  A bare ``except:`` will
 catch all exceptions, so you commonly need to list :exc:`KeyboardInterrupt` and
 :exc:`SystemExit` in order to re-raise them.  The usual pattern is::
 
index 65eaf17bcc41c07d4e2e2dd646fa3d4e17001037..e2560c7f94cd52d188fe358e8516e8b83060f7e3 100644 (file)
@@ -1118,7 +1118,7 @@ changes, or look through the Subversion logs for all the details.
   (Fixed by Daniel Stutzbach; :issue:`8729`.)
 
 * Constructors for the parsing classes in the :mod:`ConfigParser` module now
-  take a *allow_no_value* parameter, defaulting to false; if true,
+  take an *allow_no_value* parameter, defaulting to false; if true,
   options without values will be allowed.  For example::
 
     >>> import ConfigParser, StringIO
@@ -2320,7 +2320,7 @@ Port-Specific Changes: Windows
 * The :func:`os.kill` function now works on Windows.  The signal value
   can be the constants :const:`CTRL_C_EVENT`,
   :const:`CTRL_BREAK_EVENT`, or any integer.  The first two constants
-  will send Control-C and Control-Break keystroke events to
+  will send :kbd:`Control-C` and :kbd:`Control-Break` keystroke events to
   subprocesses; any other value will use the :c:func:`TerminateProcess`
   API.  (Contributed by Miki Tebeka; :issue:`1220212`.)
 
index 0e8bd2ab1137d0c4c29cb149169d1ba70b66bed8..3735f009f93522606239e8a5ef0676b37cf703d1 100644 (file)
@@ -50,7 +50,7 @@ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
              _Py_CheckRecursiveCall(where))
 #define Py_LeaveRecursiveCall()                         \
             (--PyThreadState_GET()->recursion_depth)
-PyAPI_FUNC(int) _Py_CheckRecursiveCall(char *where);
+PyAPI_FUNC(int) _Py_CheckRecursiveCall(const char *where);
 PyAPI_DATA(int) _Py_CheckRecursionLimit;
 #ifdef USE_STACKCHECK
 #  define _Py_MakeRecCheck(x)  (++(x) > --_Py_CheckRecursionLimit)
index c038c6a92c698cfbd7fdf297ac7970ea43454eca..8a9041badf986bbd986ac34a4b7bbf306f7bbc02 100644 (file)
@@ -81,6 +81,51 @@ PyAPI_FUNC(PyObject *) PyCodec_Decode(
        const char *errors
        );
 
+/* Text codec specific encoding and decoding API.
+
+   Checks the encoding against a list of codecs which do not
+   implement a unicode<->bytes encoding before attempting the
+   operation.
+
+   Please note that these APIs are internal and should not
+   be used in Python C extensions.
+
+   XXX (ncoghlan): should we make these, or something like them, public
+   in Python 3.5+?
+
+ */
+PyAPI_FUNC(PyObject *) _PyCodec_LookupTextEncoding(
+       const char *encoding,
+       const char *alternate_command
+       );
+
+PyAPI_FUNC(PyObject *) _PyCodec_EncodeText(
+       PyObject *object,
+       const char *encoding,
+       const char *errors
+       );
+
+PyAPI_FUNC(PyObject *) _PyCodec_DecodeText(
+       PyObject *object,
+       const char *encoding,
+       const char *errors
+       );
+
+/* These two aren't actually text encoding specific, but _io.TextIOWrapper
+ * is the only current API consumer.
+ */
+PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalDecoder(
+       PyObject *codec_info,
+       const char *errors
+       );
+
+PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
+       PyObject *codec_info,
+       const char *errors
+       );
+
+
+
 /* --- Codec Lookup APIs -------------------------------------------------- 
 
    All APIs return a codec object with incremented refcount and are
index 9764109adb2966aec5bcb02122a272697dbd98fd..9ed548729e6e928fa8f22f3821fa40ad6e0a5506 100644 (file)
@@ -37,12 +37,21 @@ extern "C" {
 
 #define SLICE          30
 /* Also uses 31-33 */
+#define SLICE_1                31
+#define SLICE_2                32
+#define SLICE_3                33
 
 #define STORE_SLICE    40
 /* Also uses 41-43 */
+#define STORE_SLICE_1  41
+#define STORE_SLICE_2  42
+#define STORE_SLICE_3  43
 
 #define DELETE_SLICE   50
 /* Also uses 51-53 */
+#define DELETE_SLICE_1 51
+#define DELETE_SLICE_2 52
+#define DELETE_SLICE_3 53
 
 #define STORE_MAP      54
 #define INPLACE_ADD    55
index a71efde615f11f2f819d05e124315e3d39c5b5d2..35388313b17129f13b4de0f1d47952b2ce579752 100644 (file)
 /*--start constants--*/
 #define PY_MAJOR_VERSION       2
 #define PY_MINOR_VERSION       7
-#define PY_MICRO_VERSION       10
+#define PY_MICRO_VERSION       11
 #define PY_RELEASE_LEVEL       PY_RELEASE_LEVEL_FINAL
 #define PY_RELEASE_SERIAL      0
 
 /* Version as a string */
-#define PY_VERSION             "2.7.10"
+#define PY_VERSION             "2.7.11"
 /*--end constants--*/
 
 /* Subversion Revision number of this file (not of the repository). Empty
index e3cf22b823740e2046d8c0132d31cc9a993a86c7..d35c87c12c4b61c31930f032745210342752f701 100644 (file)
@@ -152,7 +152,29 @@ PyAPI_FUNC(void) _Py_set_387controlword(unsigned short);
  * doesn't support NaNs.
  */
 #if !defined(Py_NAN) && !defined(Py_NO_NAN)
-#define Py_NAN (Py_HUGE_VAL * 0.)
+#if !defined(__INTEL_COMPILER)
+    #define Py_NAN (Py_HUGE_VAL * 0.)
+#else /* __INTEL_COMPILER */
+    #if defined(ICC_NAN_STRICT)
+        #pragma float_control(push)
+        #pragma float_control(precise, on)
+        #pragma float_control(except,  on)
+        #if defined(_MSC_VER)
+            __declspec(noinline)
+        #else /* Linux */
+            __attribute__((noinline))
+        #endif /* _MSC_VER */
+        static double __icc_nan()
+        {
+            return sqrt(-1.0);
+        }
+        #pragma float_control (pop)
+        #define Py_NAN __icc_nan()
+    #else /* ICC_NAN_RELAXED as default for Intel Compiler */
+        static union { unsigned char buf[8]; double __icc_nan; } __nan_store = {0,0,0,0,0,0,0xf8,0x7f};
+        #define Py_NAN (__nan_store.__icc_nan)
+    #endif /* ICC_NAN_STRICT */
+#endif /* __INTEL_COMPILER */
 #endif
 
 /* Py_OVERFLOWED(X)
index 9ab724aa6e0b4ee024877fc8199d2100790cad40..1269bf67e0becebd59da702e88478a71684ee18b 100644 (file)
@@ -1307,7 +1307,7 @@ PyAPI_FUNC(PyObject *) PyUnicode_RichCompare(
     int op                      /* Operation: Py_EQ, Py_NE, Py_GT, etc. */
     );
 
-/* Apply a argument tuple or dictionary to a format string and return
+/* Apply an argument tuple or dictionary to a format string and return
    the resulting Unicode string. */
 
 PyAPI_FUNC(PyObject *) PyUnicode_Format(
index 8f8ae56c93bedbe6c8f950dbbac0c0db56a22af4..5620083c69347c084e1c0a97d5d6dc075d3d9bda 100644 (file)
@@ -84,7 +84,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
         path begins with one of the strings in self.cgi_directories
         (and the next character is a '/' or the end of the string).
         """
-        collapsed_path = _url_collapse_path(urllib.unquote(self.path))
+        collapsed_path = _url_collapse_path(self.path)
         dir_sep = collapsed_path.find('/', 1)
         head, tail = collapsed_path[:dir_sep], collapsed_path[dir_sep+1:]
         if head in self.cgi_directories:
@@ -120,11 +120,7 @@ class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
                 break
 
         # find an explicit query string, if present.
-        i = rest.rfind('?')
-        if i >= 0:
-            rest, query = rest[:i], rest[i+1:]
-        else:
-            query = ''
+        rest, _, query = rest.partition('?')
 
         # dissect the part after the directory name into a script name &
         # a possible additional path, to be stored in PATH_INFO.
@@ -308,13 +304,15 @@ def _url_collapse_path(path):
     The utility of this function is limited to is_cgi method and helps
     preventing some security attacks.
 
-    Returns: A tuple of (head, tail) where tail is everything after the final /
-    and head is everything before it.  Head will always start with a '/' and,
-    if it contains anything else, never have a trailing '/'.
+    Returns: The reconstituted URL, which will always start with a '/'.
 
     Raises: IndexError if too many '..' occur within the path.
 
     """
+    # Query component should not be involved.
+    path, _, query = path.partition('?')
+    path = urllib.unquote(path)
+
     # Similar to os.path.split(os.path.normpath(path)) but specific to URL
     # path semantics rather than local operating system semantics.
     path_parts = path.split('/')
@@ -335,6 +333,9 @@ def _url_collapse_path(path):
     else:
         tail_part = ''
 
+    if query:
+        tail_part = '?'.join((tail_part, query))
+
     splitpath = ('/' + '/'.join(head_parts), tail_part)
     collapsed_path = "/".join(splitpath)
 
index bb2218ab6ce5d808a4016105d69b7b637d1252a6..732b327c3ea4cfba489987f65238cd0ef29ab961 100644 (file)
@@ -1,7 +1,24 @@
 """A more or less complete user-defined wrapper around dictionary objects."""
 
 class UserDict:
-    def __init__(self, dict=None, **kwargs):
+    def __init__(*args, **kwargs):
+        if not args:
+            raise TypeError("descriptor '__init__' of 'UserDict' object "
+                            "needs an argument")
+        self = args[0]
+        args = args[1:]
+        if len(args) > 1:
+            raise TypeError('expected at most 1 arguments, got %d' % len(args))
+        if args:
+            dict = args[0]
+        elif 'dict' in kwargs:
+            dict = kwargs.pop('dict')
+            import warnings
+            warnings.warn("Passing 'dict' as keyword argument is "
+                          "deprecated", PendingDeprecationWarning,
+                          stacklevel=2)
+        else:
+            dict = None
         self.data = {}
         if dict is not None:
             self.update(dict)
@@ -43,7 +60,23 @@ class UserDict:
     def itervalues(self): return self.data.itervalues()
     def values(self): return self.data.values()
     def has_key(self, key): return key in self.data
-    def update(self, dict=None, **kwargs):
+    def update(*args, **kwargs):
+        if not args:
+            raise TypeError("descriptor 'update' of 'UserDict' object "
+                            "needs an argument")
+        self = args[0]
+        args = args[1:]
+        if len(args) > 1:
+            raise TypeError('expected at most 1 arguments, got %d' % len(args))
+        if args:
+            dict = args[0]
+        elif 'dict' in kwargs:
+            dict = kwargs.pop('dict')
+            import warnings
+            warnings.warn("Passing 'dict' as keyword argument is deprecated",
+                          PendingDeprecationWarning, stacklevel=2)
+        else:
+            dict = None
         if dict is None:
             pass
         elif isinstance(dict, UserDict):
index 03856277f07223e02af37c7cfd3679a555c95a83..b643692e39127b09802e2153539294a9451d4a16 100644 (file)
@@ -453,6 +453,7 @@ class KeysView(MappingView, Set):
         for key in self._mapping:
             yield key
 
+KeysView.register(type({}.viewkeys()))
 
 class ItemsView(MappingView, Set):
 
@@ -473,6 +474,7 @@ class ItemsView(MappingView, Set):
         for key in self._mapping:
             yield (key, self._mapping[key])
 
+ItemsView.register(type({}.viewitems()))
 
 class ValuesView(MappingView):
 
@@ -486,6 +488,7 @@ class ValuesView(MappingView):
         for key in self._mapping:
             yield self._mapping[key]
 
+ValuesView.register(type({}.viewvalues()))
 
 class MutableMapping(Mapping):
 
index a7f4301cc1d69695830a46da35114f53ff673ded..694b778cc5b37db3863424d80399a3906b7f9eb5 100644 (file)
@@ -7,6 +7,7 @@ from __future__ import (print_function, unicode_literals)
 import os
 import abc
 import codecs
+import sys
 import warnings
 import errno
 # Import thread instead of threading to reduce startup cost
@@ -1497,6 +1498,11 @@ class TextIOWrapper(TextIOBase):
         if not isinstance(encoding, basestring):
             raise ValueError("invalid encoding: %r" % encoding)
 
+        if sys.py3kwarning and not codecs.lookup(encoding)._is_text_encoding:
+            msg = ("%r is not a text encoding; "
+                   "use codecs.open() to handle arbitrary codecs")
+            warnings.warnpy3k(msg % encoding, stacklevel=2)
+
         if errors is None:
             errors = "strict"
         else:
index 85204dd022ab467e3b34d4cbdae1b6b0b05fea1b..82c112c56ac79aff8eaa8331ff8bed3624d073f8 100755 (executable)
@@ -7,6 +7,7 @@
 
 import re
 import struct
+import string
 import binascii
 
 
@@ -52,7 +53,7 @@ def b64encode(s, altchars=None):
     # Strip off the trailing newline
     encoded = binascii.b2a_base64(s)[:-1]
     if altchars is not None:
-        return _translate(encoded, {'+': altchars[0], '/': altchars[1]})
+        return encoded.translate(string.maketrans(b'+/', altchars[:2]))
     return encoded
 
 
@@ -68,7 +69,7 @@ def b64decode(s, altchars=None):
     string.
     """
     if altchars is not None:
-        s = _translate(s, {altchars[0]: '+', altchars[1]: '/'})
+        s = s.translate(string.maketrans(altchars[:2], '+/'))
     try:
         return binascii.a2b_base64(s)
     except binascii.Error, msg:
@@ -92,13 +93,16 @@ def standard_b64decode(s):
     """
     return b64decode(s)
 
+_urlsafe_encode_translation = string.maketrans(b'+/', b'-_')
+_urlsafe_decode_translation = string.maketrans(b'-_', b'+/')
+
 def urlsafe_b64encode(s):
     """Encode a string using a url-safe Base64 alphabet.
 
     s is the string to encode.  The encoded string is returned.  The alphabet
     uses '-' instead of '+' and '_' instead of '/'.
     """
-    return b64encode(s, '-_')
+    return b64encode(s).translate(_urlsafe_encode_translation)
 
 def urlsafe_b64decode(s):
     """Decode a string encoded with the standard Base64 alphabet.
@@ -109,7 +113,7 @@ def urlsafe_b64decode(s):
 
     The alphabet uses '-' instead of '+' and '_' instead of '/'.
     """
-    return b64decode(s, '-_')
+    return b64decode(s.translate(_urlsafe_decode_translation))
 
 
 \f
@@ -200,7 +204,7 @@ def b32decode(s, casefold=False, map01=None):
     # False, or the character to map the digit 1 (one) to.  It should be
     # either L (el) or I (eye).
     if map01:
-        s = _translate(s, {'0': 'O', '1': map01})
+        s = s.translate(string.maketrans(b'01', b'O' + map01))
     if casefold:
         s = s.upper()
     # Strip off pad characters from the right.  We need to count the pad
index 049a3f0fd1f3c65d795f5b5176212a2cb4345a39..3d9be35ce5a53e56141348ac24b294697f04dbef 100644 (file)
@@ -79,9 +79,19 @@ BOM64_BE = BOM_UTF32_BE
 ### Codec base classes (defining the API)
 
 class CodecInfo(tuple):
+    """Codec details when looking up the codec registry"""
+
+    # Private API to allow Python to blacklist the known non-Unicode
+    # codecs in the standard library. A more general mechanism to
+    # reliably distinguish test encodings from other codecs will hopefully
+    # be defined for Python 3.5
+    #
+    # See http://bugs.python.org/issue19619
+    _is_text_encoding = True # Assume codecs are text encodings by default
 
     def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
-        incrementalencoder=None, incrementaldecoder=None, name=None):
+        incrementalencoder=None, incrementaldecoder=None, name=None,
+        _is_text_encoding=None):
         self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter))
         self.name = name
         self.encode = encode
@@ -90,6 +100,8 @@ class CodecInfo(tuple):
         self.incrementaldecoder = incrementaldecoder
         self.streamwriter = streamwriter
         self.streamreader = streamreader
+        if _is_text_encoding is not None:
+            self._is_text_encoding = _is_text_encoding
         return self
 
     def __repr__(self):
@@ -126,8 +138,8 @@ class Codec:
             'strict' handling.
 
             The method may not store state in the Codec instance. Use
-            StreamCodec for codecs which have to keep state in order to
-            make encoding/decoding efficient.
+            StreamWriter for codecs which have to keep state in order to
+            make encoding efficient.
 
             The encoder must be able to handle zero length input and
             return an empty object of the output object type in this
@@ -149,8 +161,8 @@ class Codec:
             'strict' handling.
 
             The method may not store state in the Codec instance. Use
-            StreamCodec for codecs which have to keep state in order to
-            make encoding/decoding efficient.
+            StreamReader for codecs which have to keep state in order to
+            make decoding efficient.
 
             The decoder must be able to handle zero length input and
             return an empty object of the output object type in this
index f2df467787c778f634645e752ee75f8695cddcf0..eb9aec47117665b0449ada0bf328081096ccc61d 100644 (file)
@@ -1434,7 +1434,7 @@ class CookieJar:
                         break
                     # convert RFC 2965 Max-Age to seconds since epoch
                     # XXX Strictly you're supposed to follow RFC 2616
-                    #   age-calculation rules.  Remember that zero Max-Age is a
+                    #   age-calculation rules.  Remember that zero Max-Age
                     #   is a request to discard (old and new) cookie, though.
                     k = "expires"
                     v = self._now + v
index 991dbe862d1b3620eb73c2fecae8cbfcf8fe945b..a854d2b7d5ac20bcc2a87555b5f5b381967aec73 100644 (file)
@@ -259,5 +259,33 @@ class BitFieldTest(unittest.TestCase):
         x.a = 0xFEDCBA9876543211
         self.assertEqual(x.a, 0xFEDCBA9876543211)
 
+    @need_symbol('c_uint32')
+    def test_uint32_swap_little_endian(self):
+        # Issue #23319
+        class Little(LittleEndianStructure):
+            _fields_ = [("a", c_uint32, 24),
+                        ("b", c_uint32, 4),
+                        ("c", c_uint32, 4)]
+        b = bytearray(4)
+        x = Little.from_buffer(b)
+        x.a = 0xabcdef
+        x.b = 1
+        x.c = 2
+        self.assertEqual(b, b'\xef\xcd\xab\x21')
+
+    @need_symbol('c_uint32')
+    def test_uint32_swap_big_endian(self):
+        # Issue #23319
+        class Big(BigEndianStructure):
+            _fields_ = [("a", c_uint32, 24),
+                        ("b", c_uint32, 4),
+                        ("c", c_uint32, 4)]
+        b = bytearray(4)
+        x = Big.from_buffer(b)
+        x.a = 0xabcdef
+        x.b = 1
+        x.c = 2
+        self.assertEqual(b, b'\xab\xcd\xef\x12')
+
 if __name__ == "__main__":
     unittest.main()
index 5cdde6813ec9677e8a684fd801747648d7636828..6915cda2bd1e156f475f79b2f11d3a590060af9f 100644 (file)
@@ -192,9 +192,19 @@ class PointersTestCase(unittest.TestCase):
         LargeNamedType = type('T' * 2 ** 25, (Structure,), {})
         self.assertTrue(POINTER(LargeNamedType))
 
+        # to not leak references, we must clean _pointer_type_cache
+        from ctypes import _pointer_type_cache
+        del _pointer_type_cache[LargeNamedType]
+
     def test_pointer_type_str_name(self):
         large_string = 'T' * 2 ** 25
-        self.assertTrue(POINTER(large_string))
+        P = POINTER(large_string)
+        self.assertTrue(P)
+
+        # to not leak references, we must clean _pointer_type_cache
+        from ctypes import _pointer_type_cache
+        del _pointer_type_cache[id(P)]
+
 
 if __name__ == '__main__':
     unittest.main()
index 0caffe37c503293cbee08be6e7247fe9f129f62a..d72b7c896893d87fe0733a9bb291491191cb3c48 100644 (file)
@@ -30,7 +30,7 @@ class CallbackTracbackTestCase(unittest.TestCase):
     # value is printed correctly.
     #
     # Changed in 0.9.3: No longer is '(in callback)' prepended to the
-    # error message - instead a additional frame for the C code is
+    # error message - instead an additional frame for the C code is
     # created, then a full traceback printed.  When SystemExit is
     # raised in a callback function, the interpreter exits.
 
index ff083862ccf544cdf084758fe1222bf15ac99e4f..d22e139a3f9782bf440ec4aa0a3e1b5c7a9aa4ba 100644 (file)
@@ -114,5 +114,9 @@ class Structures(unittest.TestCase):
             self.assertEqual(ret.top, top.value)
             self.assertEqual(ret.bottom, bottom.value)
 
+        # to not leak references, we must clean _pointer_type_cache
+        from ctypes import _pointer_type_cache
+        del _pointer_type_cache[RECT]
+
 if __name__ == '__main__':
     unittest.main()
index 037089633f9d3626a73ea434e50f55938923c713..d823d040a1c1e6d64838e8ccacc9c7337c732749 100644 (file)
@@ -8,12 +8,6 @@ used from a setup script as
    setup (...)
 """
 
-__revision__ = "$Id$"
+import sys
 
-# Distutils version
-#
-# Updated automatically by the Python release process.
-#
-#--start constants--
-__version__ = "2.7.10"
-#--end constants--
+__version__ = sys.version[:sys.version.index(' ')]
index 4907a0aa5adc012b20351194bc045e8b627f3d55..c0c446f220a52343664e65cdb9ae4b528f1acf24 100644 (file)
@@ -718,7 +718,7 @@ class CCompiler:
         raise NotImplementedError
 
     def library_option(self, lib):
-        """Return the compiler option to add 'dir' to the list of libraries
+        """Return the compiler option to add 'lib' to the list of libraries
         linked into the shared library or executable.
         """
         raise NotImplementedError
index 2ab73aad0cc546ae7fa15c5ce7cf1e199ab68cff..3a49454a4a437abdce3196787e66034a008735f4 100644 (file)
@@ -199,10 +199,12 @@ class build_ext (Command):
                 else:
                     # win-amd64 or win-ia64
                     suffix = self.plat_name[4:]
-                new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
-                if suffix:
-                    new_lib = os.path.join(new_lib, suffix)
-                self.library_dirs.append(new_lib)
+                # We could have been built in one of two places; add both
+                for d in ('PCbuild',), ('PC', 'VS9.0'):
+                    new_lib = os.path.join(sys.exec_prefix, *d)
+                    if suffix:
+                        new_lib = os.path.join(new_lib, suffix)
+                    self.library_dirs.append(new_lib)
 
             elif MSVC_VERSION == 8:
                 self.library_dirs.append(os.path.join(sys.exec_prefix,
index 7ec9b92a5dcbd0656c3bc4ecf32269d3a9e82202..22de4baecde21066a00f6b63dc82a746e980631a 100644 (file)
@@ -426,7 +426,7 @@ class MSVCCompiler(CCompiler) :
         self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
         if self.__version >= 7:
             self.ldflags_shared_debug = [
-                '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None'
+                '/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG'
                 ]
         self.ldflags_static = [ '/nologo']
 
index 0d979bcde9ebed887e90b57b63517f93c7405425..e6d4c9b3608ae4d2b2e477e2e0300af1cf5cd3d9 100644 (file)
@@ -9,6 +9,7 @@ import test.test_support
 from test.test_support import captured_stdout, run_unittest
 import unittest
 from distutils.tests import support
+from distutils import log
 
 # setup script that uses __file__
 setup_using___file__ = """\
@@ -36,6 +37,7 @@ class CoreTestCase(support.EnvironGuard, unittest.TestCase):
         self.old_stdout = sys.stdout
         self.cleanup_testfn()
         self.old_argv = sys.argv, sys.argv[:]
+        self.addCleanup(log.set_threshold, log._global_log.threshold)
 
     def tearDown(self):
         sys.stdout = self.old_stdout
index eb9b0ef262f46095688db75bc99003bd843143e5..378fe432b466bea1d102abe5de708e4012029ee5 100644 (file)
@@ -13,6 +13,7 @@ from distutils.cmd import Command
 import distutils.dist
 from test.test_support import TESTFN, captured_stdout, run_unittest, unlink
 from distutils.tests import support
+from distutils import log
 
 
 class test_dist(Command):
@@ -397,6 +398,7 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
 
     def test_show_help(self):
         # smoke test, just makes sure some help is displayed
+        self.addCleanup(log.set_threshold, log._global_log.threshold)
         dist = Distribution()
         sys.argv = []
         dist.help = 1
index c11e84b7513859660f48571ca8198a02e66e4905..160306c5ee8cb84e3f0ce0ec0345be29ba4b080e 100644 (file)
@@ -12,6 +12,10 @@ import warnings
 import textwrap
 from cStringIO import StringIO
 from random import choice
+try:
+    from threading import Thread
+except ImportError:
+    from dummy_threading import Thread
 
 import email
 
@@ -33,7 +37,7 @@ from email import Iterators
 from email import base64MIME
 from email import quopriMIME
 
-from test.test_support import findfile, run_unittest
+from test.test_support import findfile, run_unittest, start_threads
 from email.test import __file__ as landmark
 
 
@@ -2412,6 +2416,25 @@ Foo
         addrs = Utils.getaddresses(['User ((nested comment)) <foo@bar.com>'])
         eq(addrs[0][1], 'foo@bar.com')
 
+    def test_make_msgid_collisions(self):
+        # Test make_msgid uniqueness, even with multiple threads
+        class MsgidsThread(Thread):
+            def run(self):
+                # generate msgids for 3 seconds
+                self.msgids = []
+                append = self.msgids.append
+                make_msgid = Utils.make_msgid
+                clock = time.time
+                tfin = clock() + 3.0
+                while clock() < tfin:
+                    append(make_msgid())
+
+        threads = [MsgidsThread() for i in range(5)]
+        with start_threads(threads):
+            pass
+        all_ids = sum([t.msgids for t in threads], [])
+        self.assertEqual(len(set(all_ids)), len(all_ids))
+
     def test_utils_quote_unquote(self):
         eq = self.assertEqual
         msg = Message()
index c976021e0e0584c6ee56d5aa32b0034c531349c5..ac13f49d599df9b63c7ca5a205eea5491b14d7cb 100644 (file)
@@ -177,21 +177,20 @@ def formatdate(timeval=None, localtime=False, usegmt=False):
 def make_msgid(idstring=None):
     """Returns a string suitable for RFC 2822 compliant Message-ID, e.g:
 
-    <20020201195627.33539.96671@nightshade.la.mastaler.com>
+    <142480216486.20800.16526388040877946887@nightshade.la.mastaler.com>
 
     Optional idstring if given is a string used to strengthen the
     uniqueness of the message id.
     """
-    timeval = time.time()
-    utcdate = time.strftime('%Y%m%d%H%M%S', time.gmtime(timeval))
+    timeval = int(time.time()*100)
     pid = os.getpid()
-    randint = random.randrange(100000)
+    randint = random.getrandbits(64)
     if idstring is None:
         idstring = ''
     else:
         idstring = '.' + idstring
     idhost = socket.getfqdn()
-    msgid = '<%s.%s.%s%s@%s>' % (utcdate, pid, randint, idstring, idhost)
+    msgid = '<%d.%d.%d%s@%s>' % (timeval, pid, randint, idstring, idhost)
     return msgid
 
 
index f84e7808e99433f8666b986d5abb35d446047065..34ac55542881981c827cb25775f500b42802e19f 100644 (file)
@@ -76,4 +76,5 @@ def getregentry():
         incrementaldecoder=IncrementalDecoder,
         streamwriter=StreamWriter,
         streamreader=StreamReader,
+        _is_text_encoding=False,
     )
index 054b36b401a66e54ba39c6a96485a9d0f19c9713..136503ac1e5e907270a53fa2e615d61f279b1c90 100644 (file)
@@ -99,4 +99,5 @@ def getregentry():
         incrementaldecoder=IncrementalDecoder,
         streamwriter=StreamWriter,
         streamreader=StreamReader,
+        _is_text_encoding=False,
     )
index 91b38d952e1f9e638e34b867ec74fa4eb2323e9f..154488cd0ab12378e3ebab2b71a2d269ee38d09c 100644 (file)
@@ -76,4 +76,5 @@ def getregentry():
         incrementaldecoder=IncrementalDecoder,
         streamwriter=StreamWriter,
         streamreader=StreamReader,
+        _is_text_encoding=False,
     )
index d8683fd56d325415a25116c129ab41ae45126016..e4965da86c2adc4f38d6574dfe98726bab477d92 100644 (file)
@@ -21,7 +21,7 @@ def quopri_encode(input, errors='strict'):
     # using str() because of cStringIO's Unicode undesired Unicode behavior.
     f = StringIO(str(input))
     g = StringIO()
-    quopri.encode(f, g, 1)
+    quopri.encode(f, g, quotetabs=True)
     output = g.getvalue()
     return (output, len(input))
 
@@ -72,4 +72,5 @@ def getregentry():
         incrementaldecoder=IncrementalDecoder,
         streamwriter=StreamWriter,
         streamreader=StreamReader,
+        _is_text_encoding=False,
     )
index 52b6431cf30d5edcc7454352cce4a8f7fe2581fe..4eaf4338f9c915f36ac0f93111a49c3e739885e2 100755 (executable)
@@ -44,6 +44,7 @@ def getregentry():
         incrementaldecoder=IncrementalDecoder,
         streamwriter=StreamWriter,
         streamreader=StreamReader,
+        _is_text_encoding=False,
     )
 
 ### Decoding Map
index 4b137a5474ed0fc5d21d4904605ccbb229c990e6..5cb0d2b13e07127532dd47d755f0a1d187de917a 100644 (file)
@@ -126,4 +126,5 @@ def getregentry():
         incrementaldecoder=IncrementalDecoder,
         streamreader=StreamReader,
         streamwriter=StreamWriter,
+        _is_text_encoding=False,
     )
index 3419f9f48f5efbf1be4802f562536ca235e2748e..0c2599d401c2396c086da6342e81e66fe5faf01b 100644 (file)
@@ -99,4 +99,5 @@ def getregentry():
         incrementaldecoder=IncrementalDecoder,
         streamreader=StreamReader,
         streamwriter=StreamWriter,
+        _is_text_encoding=False,
     )
index e7df79af847ecb75d633e3342ace583b0be2ed2c..de0fbfbfa50534923fd9ebbe6fe6d05c9a85cbd5 100644 (file)
@@ -12,9 +12,9 @@ import tempfile
 __all__ = ["version", "bootstrap"]
 
 
-_SETUPTOOLS_VERSION = "15.2"
+_SETUPTOOLS_VERSION = "18.2"
 
-_PIP_VERSION = "6.1.1"
+_PIP_VERSION = "7.1.2"
 
 # pip currently requires ssl support, so we try to provide a nicer
 # error message when that is missing (http://bugs.python.org/issue19744)
@@ -147,7 +147,7 @@ def _uninstall_helper(verbosity=0):
     _disable_pip_configuration_settings()
 
     # Construct the arguments to be passed to the pip command
-    args = ["uninstall", "-y"]
+    args = ["uninstall", "-y", "--disable-pip-version-check"]
     if verbosity:
         args += ["-" + "v" * verbosity]
 
diff --git a/Lib/ensurepip/_bundled/pip-6.1.1-py2.py3-none-any.whl b/Lib/ensurepip/_bundled/pip-6.1.1-py2.py3-none-any.whl
deleted file mode 100644 (file)
index e59694a..0000000
Binary files a/Lib/ensurepip/_bundled/pip-6.1.1-py2.py3-none-any.whl and /dev/null differ
diff --git a/Lib/ensurepip/_bundled/pip-7.1.2-py2.py3-none-any.whl b/Lib/ensurepip/_bundled/pip-7.1.2-py2.py3-none-any.whl
new file mode 100644 (file)
index 0000000..5e49015
Binary files /dev/null and b/Lib/ensurepip/_bundled/pip-7.1.2-py2.py3-none-any.whl differ
diff --git a/Lib/ensurepip/_bundled/setuptools-15.2-py2.py3-none-any.whl b/Lib/ensurepip/_bundled/setuptools-15.2-py2.py3-none-any.whl
deleted file mode 100644 (file)
index f153ed3..0000000
Binary files a/Lib/ensurepip/_bundled/setuptools-15.2-py2.py3-none-any.whl and /dev/null differ
diff --git a/Lib/ensurepip/_bundled/setuptools-18.2-py2.py3-none-any.whl b/Lib/ensurepip/_bundled/setuptools-18.2-py2.py3-none-any.whl
new file mode 100644 (file)
index 0000000..f4288d6
Binary files /dev/null and b/Lib/ensurepip/_bundled/setuptools-18.2-py2.py3-none-any.whl differ
index 9f1e088e8ed75c10cb025379e9bbb5dc8fc7d244..7223ba151271f16d0eedad83b49a0961b59fc674 100644 (file)
@@ -772,8 +772,7 @@ class HTTPConnection:
         if self.sock:
             raise RuntimeError("Can't setup tunnel for established connection.")
 
-        self._tunnel_host = host
-        self._tunnel_port = port
+        self._tunnel_host, self._tunnel_port = self._get_hostport(host, port)
         if headers:
             self._tunnel_headers = headers
         else:
@@ -802,8 +801,8 @@ class HTTPConnection:
         self.debuglevel = level
 
     def _tunnel(self):
-        (host, port) = self._get_hostport(self._tunnel_host, self._tunnel_port)
-        self.send("CONNECT %s:%d HTTP/1.0\r\n" % (host, port))
+        self.send("CONNECT %s:%d HTTP/1.0\r\n" % (self._tunnel_host,
+            self._tunnel_port))
         for header, value in self._tunnel_headers.iteritems():
             self.send("%s: %s\r\n" % (header, value))
         self.send("\r\n")
@@ -811,6 +810,11 @@ class HTTPConnection:
                                        method = self._method)
         (version, code, message) = response._read_status()
 
+        if version == "HTTP/0.9":
+            # HTTP/0.9 doesn't support the CONNECT verb, so if httplib has
+            # concluded HTTP/0.9 is being used something has gone wrong.
+            self.close()
+            raise socket.error("Invalid response from tunnel request")
         if code != 200:
             self.close()
             raise socket.error("Tunnel connection failed: %d %s" % (code,
@@ -1063,7 +1067,7 @@ class HTTPConnection:
         elif body is not None:
             try:
                 thelen = str(len(body))
-            except TypeError:
+            except (TypeError, AttributeError):
                 # If this is a file-like object, try to
                 # fstat its file descriptor
                 try:
index 27b0e56bd58c5f36de8f50819e5bc24cee97210f..205a29be6cecf542fceeef1278247216f258a5af 100644 (file)
@@ -192,6 +192,7 @@ class AutoCompleteWindow:
         scrollbar.config(command=listbox.yview)
         scrollbar.pack(side=RIGHT, fill=Y)
         listbox.pack(side=LEFT, fill=BOTH, expand=True)
+        acw.lift()  # work around bug in Tk 8.5.18+ (issue #24570)
 
         # Initialize the listbox selection
         self.listbox.select_set(self._binary_search(self.start))
index 2072c7e5a270d126ce3dc16cbdbfa91d9975e2a7..862e6ab561e3d90388d2bd837cbd42b9ed553cf2 100644 (file)
@@ -76,7 +76,6 @@ menudefs = [
    ]),
  ('options', [
    ('Configure _IDLE', '<<open-config-dialog>>'),
-   ('Configure _Extensions', '<<open-config-extensions-dialog>>'),
    None,
    ]),
  ('help', [
index 77384a0dd45340f49f9f35f50ccb2bcc05251f45..90c2d7ceb83ba3ca03c08ab25a3cb84a99af662b 100644 (file)
@@ -72,6 +72,7 @@ class CallTip:
                            background="#ffffe0", relief=SOLID, borderwidth=1,
                            font = self.widget['font'])
         self.label.pack()
+        tw.lift()  # work around bug in Tk 8.5.18+ (issue #24570)
 
         self.checkhideid = self.widget.bind(CHECKHIDE_VIRTUAL_EVENT_NAME,
                                             self.checkhide_event)
index 5be65efb9bc0ead58fe684a9c5d3c5dbfac1a6bb..d09c52fe4d75f4d35daf828d30f083d0262be6e6 100644 (file)
@@ -56,7 +56,7 @@ class ClassBrowser:
         self.settitle()
         top.focus_set()
         # create scrolled canvas
-        theme = idleConf.GetOption('main','Theme','name')
+        theme = idleConf.CurrentTheme()
         background = idleConf.GetHighlight(theme, 'normal')['background']
         sc = ScrolledCanvas(top, bg=background, highlightthickness=0, takefocus=1)
         sc.frame.pack(expand=1, fill="both")
index 96c1fab0239f7265a28f2f06b2a3ac83a7793ec8..fec2670e792dec7903a0254005ec1c5512164331 100644 (file)
@@ -62,7 +62,7 @@ class ColorDelegator(Delegator):
         self.tag_raise('sel')
 
     def LoadTagDefs(self):
-        theme = idleConf.GetOption('main','Theme','name')
+        theme = idleConf.CurrentTheme()
         self.tagdefs = {
             "COMMENT": idleConf.GetHighlight(theme, "comment"),
             "KEYWORD": idleConf.GetHighlight(theme, "keyword"),
index 71045dde55089049a4b3bf7e926b9a9f171f22a7..7fbe4a7d199d6704ef98aa26d4c425bc7ad68e63 100644 (file)
@@ -17,7 +17,10 @@ class Idb(bdb.Bdb):
             self.set_step()
             return
         message = self.__frame2message(frame)
-        self.gui.interaction(message, frame)
+        try:
+            self.gui.interaction(message, frame)
+        except TclError:  # When closing debugger window with [x] in 3.x
+            pass
 
     def user_exception(self, frame, info):
         if self.in_rpc_code(frame):
@@ -59,8 +62,42 @@ class Debugger:
         self.frame = None
         self.make_gui()
         self.interacting = 0
+        self.nesting_level = 0
 
     def run(self, *args):
+        # Deal with the scenario where we've already got a program running
+        # in the debugger and we want to start another. If that is the case,
+        # our second 'run' was invoked from an event dispatched not from
+        # the main event loop, but from the nested event loop in 'interaction'
+        # below. So our stack looks something like this:
+        #       outer main event loop
+        #         run()
+        #           <running program with traces>
+        #             callback to debugger's interaction()
+        #               nested event loop
+        #                 run() for second command
+        #
+        # This kind of nesting of event loops causes all kinds of problems
+        # (see e.g. issue #24455) especially when dealing with running as a
+        # subprocess, where there's all kinds of extra stuff happening in
+        # there - insert a traceback.print_stack() to check it out.
+        #
+        # By this point, we've already called restart_subprocess() in
+        # ScriptBinding. However, we also need to unwind the stack back to
+        # that outer event loop.  To accomplish this, we:
+        #   - return immediately from the nested run()
+        #   - abort_loop ensures the nested event loop will terminate
+        #   - the debugger's interaction routine completes normally
+        #   - the restart_subprocess() will have taken care of stopping
+        #     the running program, which will also let the outer run complete
+        #
+        # That leaves us back at the outer main event loop, at which point our
+        # after event can fire, and we'll come back to this routine with a
+        # clean stack.
+        if self.nesting_level > 0:
+            self.abort_loop()
+            self.root.after(100, lambda: self.run(*args))
+            return
         try:
             self.interacting = 1
             return self.idb.run(*args)
@@ -68,6 +105,10 @@ class Debugger:
             self.interacting = 0
 
     def close(self, event=None):
+        try:
+            self.quit()
+        except Exception:
+            pass
         if self.interacting:
             self.top.bell()
             return
@@ -191,7 +232,12 @@ class Debugger:
             b.configure(state="normal")
         #
         self.top.wakeup()
-        self.root.mainloop()
+        # Nested main loop: Tkinter's main loop is not reentrant, so use
+        # Tcl's vwait facility, which reenters the event loop until an
+        # event handler sets the variable we're waiting on
+        self.nesting_level += 1
+        self.root.tk.call('vwait', '::idledebugwait')
+        self.nesting_level -= 1
         #
         for b in self.buttons:
             b.configure(state="disabled")
@@ -215,23 +261,26 @@ class Debugger:
 
     def cont(self):
         self.idb.set_continue()
-        self.root.quit()
+        self.abort_loop()
 
     def step(self):
         self.idb.set_step()
-        self.root.quit()
+        self.abort_loop()
 
     def next(self):
         self.idb.set_next(self.frame)
-        self.root.quit()
+        self.abort_loop()
 
     def ret(self):
         self.idb.set_return(self.frame)
-        self.root.quit()
+        self.abort_loop()
 
     def quit(self):
         self.idb.set_quit()
-        self.root.quit()
+        self.abort_loop()
+
+    def abort_loop(self):
+        self.root.tk.call('set', '::idledebugwait', '1')
 
     stackviewer = None
 
index d34fc62aa4b9646c698438d681a7f2aa82058672..0c5b7139ded393ec2043e72c8a15e88a733fc050 100644 (file)
@@ -9,7 +9,6 @@ import tkMessageBox
 import webbrowser
 
 from idlelib.MultiCall import MultiCallCreator
-from idlelib import idlever
 from idlelib import WindowList
 from idlelib import SearchDialog
 from idlelib import GrepDialog
@@ -18,6 +17,7 @@ from idlelib import PyParse
 from idlelib.configHandler import idleConf
 from idlelib import aboutDialog, textView, configDialog
 from idlelib import macosxSupport
+from idlelib import help
 
 # The default tab setting for a Text widget, in average-width characters.
 TK_TABWIDTH_DEFAULT = 8
@@ -83,6 +83,11 @@ class HelpDialog(object):
             near - a Toplevel widget (e.g. EditorWindow or PyShell)
                    to use as a reference for placing the help window
         """
+        import warnings as w
+        w.warn("EditorWindow.HelpDialog is no longer used by Idle.\n"
+               "It will be removed in 3.6 or later.\n"
+               "It has been replaced by private help.HelpWindow\n",
+               DeprecationWarning, stacklevel=2)
         if self.dlg is None:
             self.show_dialog(parent)
         if near:
@@ -109,9 +114,7 @@ class HelpDialog(object):
         self.dlg = None
         self.parent = None
 
-helpDialog = HelpDialog()  # singleton instance
-def _help_dialog(parent):  # wrapper for htest
-    helpDialog.show_dialog(parent)
+helpDialog = HelpDialog()  # singleton instance, no longer used
 
 
 class EditorWindow(object):
@@ -154,7 +157,6 @@ class EditorWindow(object):
                     EditorWindow.help_url = 'file://' + EditorWindow.help_url
             else:
                 EditorWindow.help_url = "https://docs.python.org/%d.%d/" % sys.version_info[:2]
-        currentTheme=idleConf.CurrentTheme()
         self.flist = flist
         root = root or flist.root
         self.root = root
@@ -182,6 +184,7 @@ class EditorWindow(object):
                 'name': 'text',
                 'padx': 5,
                 'wrap': 'none',
+                'highlightthickness': 0,
                 'width': self.width,
                 'height': idleConf.GetOption('main', 'EditorWindow', 'height', type='int')}
         if TkVersion >= 8.5:
@@ -200,13 +203,13 @@ class EditorWindow(object):
         if macosxSupport.isAquaTk():
             # Command-W on editorwindows doesn't work without this.
             text.bind('<<close-window>>', self.close_event)
-            # Some OS X systems have only one mouse button,
-            # so use control-click for pulldown menus there.
-            #  (Note, AquaTk defines <2> as the right button if
-            #   present and the Tk Text widget already binds <2>.)
+            # Some OS X systems have only one mouse button, so use
+            # control-click for popup context menus there. For two
+            # buttons, AquaTk defines <2> as the right button, not <3>.
             text.bind("<Control-Button-1>",self.right_menu_event)
+            text.bind("<2>", self.right_menu_event)
         else:
-            # Elsewhere, use right-click for pulldown menus.
+            # Elsewhere, use right-click for popup menus.
             text.bind("<3>",self.right_menu_event)
         text.bind("<<cut>>", self.cut)
         text.bind("<<copy>>", self.copy)
@@ -216,8 +219,6 @@ class EditorWindow(object):
         text.bind("<<python-docs>>", self.python_docs)
         text.bind("<<about-idle>>", self.about_dialog)
         text.bind("<<open-config-dialog>>", self.config_dialog)
-        text.bind("<<open-config-extensions-dialog>>",
-                  self.config_extensions_dialog)
         text.bind("<<open-module>>", self.open_module)
         text.bind("<<do-nothing>>", lambda event: "break")
         text.bind("<<select-all>>", self.select_all)
@@ -258,13 +259,7 @@ class EditorWindow(object):
         vbar['command'] = text.yview
         vbar.pack(side=RIGHT, fill=Y)
         text['yscrollcommand'] = vbar.set
-        fontWeight = 'normal'
-        if idleConf.GetOption('main', 'EditorWindow', 'font-bold', type='bool'):
-            fontWeight='bold'
-        text.config(font=(idleConf.GetOption('main', 'EditorWindow', 'font'),
-                          idleConf.GetOption('main', 'EditorWindow',
-                                             'font-size', type='int'),
-                          fontWeight))
+        text['font'] = idleConf.GetFont(self.root, 'main', 'EditorWindow')
         text_frame.pack(side=LEFT, fill=BOTH, expand=1)
         text.pack(side=TOP, fill=BOTH, expand=1)
         text.focus_set()
@@ -318,7 +313,7 @@ class EditorWindow(object):
         io.set_filename_change_hook(self.filename_change_hook)
 
         # Create the recent files submenu
-        self.recent_files_menu = Menu(self.menubar)
+        self.recent_files_menu = Menu(self.menubar, tearoff=0)
         self.menudict['file'].insert_cascade(3, label='Recent Files',
                                              underline=0,
                                              menu=self.recent_files_menu)
@@ -353,36 +348,6 @@ class EditorWindow(object):
         self.askinteger = tkSimpleDialog.askinteger
         self.showerror = tkMessageBox.showerror
 
-        self._highlight_workaround()  # Fix selection tags on Windows
-
-    def _highlight_workaround(self):
-        # On Windows, Tk removes painting of the selection
-        # tags which is different behavior than on Linux and Mac.
-        # See issue14146 for more information.
-        if not sys.platform.startswith('win'):
-            return
-
-        text = self.text
-        text.event_add("<<Highlight-FocusOut>>", "<FocusOut>")
-        text.event_add("<<Highlight-FocusIn>>", "<FocusIn>")
-        def highlight_fix(focus):
-            sel_range = text.tag_ranges("sel")
-            if sel_range:
-                if focus == 'out':
-                    HILITE_CONFIG = idleConf.GetHighlight(
-                            idleConf.CurrentTheme(), 'hilite')
-                    text.tag_config("sel_fix", HILITE_CONFIG)
-                    text.tag_raise("sel_fix")
-                    text.tag_add("sel_fix", *sel_range)
-                elif focus == 'in':
-                    text.tag_remove("sel_fix", "1.0", "end")
-
-        text.bind("<<Highlight-FocusOut>>",
-                lambda ev: highlight_fix("out"))
-        text.bind("<<Highlight-FocusIn>>",
-                lambda ev: highlight_fix("in"))
-
-
     def _filename_to_unicode(self, filename):
         """convert filename to unicode in order to display it in Tk"""
         if isinstance(filename, unicode) or not filename:
@@ -446,6 +411,7 @@ class EditorWindow(object):
 
     def set_status_bar(self):
         self.status_bar = self.MultiStatusBar(self.top)
+        sep = Frame(self.top, height=1, borderwidth=1, background='grey75')
         if sys.platform == "darwin":
             # Insert some padding to avoid obscuring some of the statusbar
             # by the resize widget.
@@ -453,6 +419,7 @@ class EditorWindow(object):
         self.status_bar.set_label('column', 'Col: ?', side=RIGHT)
         self.status_bar.set_label('line', 'Ln: ?', side=RIGHT)
         self.status_bar.pack(side=BOTTOM, fill=X)
+        sep.pack(side=BOTTOM, fill=X)
         self.text.bind("<<set-line-and-column>>", self.set_line_and_column)
         self.text.event_add("<<set-line-and-column>>",
                             "<KeyRelease>", "<ButtonRelease>")
@@ -479,12 +446,13 @@ class EditorWindow(object):
         self.menudict = menudict = {}
         for name, label in self.menu_specs:
             underline, label = prepstr(label)
-            menudict[name] = menu = Menu(mbar, name=name)
+            menudict[name] = menu = Menu(mbar, name=name, tearoff=0)
             mbar.add_cascade(label=label, menu=menu, underline=underline)
 
         if macosxSupport.isCarbonTk():
             # Insert the application menu
-            menudict['application'] = menu = Menu(mbar, name='apple')
+            menudict['application'] = menu = Menu(mbar, name='apple',
+                                                tearoff=0)
             mbar.add_cascade(label='IDLE', menu=menu)
 
         self.fill_menus()
@@ -565,19 +533,23 @@ class EditorWindow(object):
             return 'normal'
 
     def about_dialog(self, event=None):
+        "Handle Help 'About IDLE' event."
+        # Synchronize with macosxSupport.overrideRootMenu.about_dialog.
         aboutDialog.AboutDialog(self.top,'About IDLE')
 
     def config_dialog(self, event=None):
+        "Handle Options 'Configure IDLE' event."
+        # Synchronize with macosxSupport.overrideRootMenu.config_dialog.
         configDialog.ConfigDialog(self.top,'Settings')
-    def config_extensions_dialog(self, event=None):
-        configDialog.ConfigExtensionsDialog(self.top)
 
     def help_dialog(self, event=None):
+        "Handle Help 'IDLE Help' event."
+        # Synchronize with macosxSupport.overrideRootMenu.help_dialog.
         if self.root:
             parent = self.root
         else:
             parent = self.top
-        helpDialog.display(parent, near=self.top)
+        help.show_idlehelp(parent)
 
     def python_docs(self, event=None):
         if sys.platform[:3] == 'win':
@@ -785,7 +757,7 @@ class EditorWindow(object):
         # Called from self.filename_change_hook and from configDialog.py
         self._rmcolorizer()
         self._addcolorizer()
-        theme = idleConf.GetOption('main','Theme','name')
+        theme = idleConf.CurrentTheme()
         normal_colors = idleConf.GetHighlight(theme, 'normal')
         cursor_color = idleConf.GetHighlight(theme, 'cursor', fgBg='fg')
         select_colors = idleConf.GetHighlight(theme, 'hilite')
@@ -796,17 +768,15 @@ class EditorWindow(object):
             selectforeground=select_colors['foreground'],
             selectbackground=select_colors['background'],
             )
+        if TkVersion >= 8.5:
+            self.text.config(
+                inactiveselectbackground=select_colors['background'])
 
     def ResetFont(self):
         "Update the text widgets' font if it is changed"
         # Called from configDialog.py
-        fontWeight='normal'
-        if idleConf.GetOption('main','EditorWindow','font-bold',type='bool'):
-            fontWeight='bold'
-        self.text.config(font=(idleConf.GetOption('main','EditorWindow','font'),
-                idleConf.GetOption('main','EditorWindow','font-size',
-                                   type='int'),
-                fontWeight))
+
+        self.text['font'] = idleConf.GetFont(self.root, 'main','EditorWindow')
 
     def RemoveKeybindings(self):
         "Remove the keybindings before they are changed."
@@ -920,8 +890,10 @@ class EditorWindow(object):
         except IOError as err:
             if not getattr(self.root, "recentfilelist_error_displayed", False):
                 self.root.recentfilelist_error_displayed = True
-                tkMessageBox.showerror(title='IDLE Error',
-                    message='Unable to update Recent Files list:\n%s'
+                tkMessageBox.showwarning(title='IDLE Warning',
+                    message="Cannot update File menu Recent Files list. "
+                            "Your operating system says:\n%s\n"
+                            "Select OK and IDLE will continue without updating."
                         % str(err),
                     parent=self.text)
         # for each edit window instance, construct the recent files menu
@@ -1729,4 +1701,4 @@ def _editor_window(parent):  # htest #
 
 if __name__ == '__main__':
     from idlelib.idle_test.htest import run
-    run(_help_dialog, _editor_window)
+    run(_editor_window)
index afb9a219f993f41a05de4f9c88f5485921b3da6e..d86d50d360c1915d57b1a6b50450e6641a34a5c1 100644 (file)
@@ -1,3 +1,4 @@
+from __future__ import print_function
 import os
 import fnmatch
 import re  # for htest
@@ -5,7 +6,6 @@ import sys
 from Tkinter import StringVar, BooleanVar, Checkbutton  # for GrepDialog
 from Tkinter import Tk, Text, Button, SEL, END  # for htest
 from idlelib import SearchEngine
-import itertools
 from idlelib.SearchDialogBase import SearchDialogBase
 # Importing OutputWindow fails due to import loop
 # EditorWindow -> GrepDialop -> OutputWindow -> EditorWindow
index e7d747c377b2c35cbd2c1bfbff446ed0a943c3c0..3b39606d9d9a4f3d854788c93f75c39b039443ba 100644 (file)
@@ -5,22 +5,18 @@
 #     end-of-line conventions, instead of relying on the standard library,
 #     which will only understand the local convention.
 
+import codecs
+from codecs import BOM_UTF8
 import os
-import types
 import pipes
+import re
 import sys
-import codecs
 import tempfile
+
 import tkFileDialog
 import tkMessageBox
-import re
-from Tkinter import *
 from SimpleDialog import SimpleDialog
 
-from idlelib.configHandler import idleConf
-
-from codecs import BOM_UTF8
-
 # Try setting the locale, so that we can find out
 # what encoding to use
 try:
@@ -251,7 +247,7 @@ class IOBinding:
             with open(filename, 'rb') as f:
                 chars = f.read()
         except IOError as msg:
-            tkMessageBox.showerror("I/O Error", str(msg), master=self.text)
+            tkMessageBox.showerror("I/O Error", str(msg), parent=self.text)
             return False
 
         chars = self.decode(chars)
@@ -298,7 +294,7 @@ class IOBinding:
                 title="Error loading the file",
                 message="The encoding '%s' is not known to this Python "\
                 "installation. The file may not display correctly" % name,
-                master = self.text)
+                parent = self.text)
             enc = None
         if enc:
             try:
@@ -328,7 +324,7 @@ class IOBinding:
                   title="Save On Close",
                   message=message,
                   default=tkMessageBox.YES,
-                  master=self.text)
+                  parent=self.text)
         if confirm:
             reply = "yes"
             self.save(None)
@@ -387,11 +383,11 @@ class IOBinding:
             return True
         except IOError as msg:
             tkMessageBox.showerror("I/O Error", str(msg),
-                                   master=self.text)
+                                   parent=self.text)
             return False
 
     def encode(self, chars):
-        if isinstance(chars, types.StringType):
+        if isinstance(chars, str):
             # This is either plain ASCII, or Tk was returning mixed-encoding
             # text to us. Don't try to guess further.
             return chars
@@ -417,7 +413,7 @@ class IOBinding:
             tkMessageBox.showerror(
                 "I/O Error",
                 "%s. Saving as UTF-8" % failed,
-                master = self.text)
+                parent = self.text)
         # If there was a UTF-8 signature, use that. This should not fail
         if self.fileencoding == BOM_UTF8 or failed:
             return BOM_UTF8 + chars.encode("utf-8")
@@ -430,7 +426,7 @@ class IOBinding:
                     "I/O Error",
                     "Cannot save this as '%s' anymore. Saving as UTF-8" \
                     % self.fileencoding,
-                    master = self.text)
+                    parent = self.text)
                 return BOM_UTF8 + chars.encode("utf-8")
         # Nothing was declared, and we had not determined an encoding
         # on loading. Recommend an encoding line.
@@ -474,7 +470,7 @@ class IOBinding:
                   title="Print",
                   message="Print to Default Printer",
                   default=tkMessageBox.OK,
-                  master=self.text)
+                  parent=self.text)
         if not confirm:
             self.text.focus_set()
             return "break"
@@ -511,10 +507,10 @@ class IOBinding:
                          status + output
             if output:
                 output = "Printing command: %s\n" % repr(command) + output
-                tkMessageBox.showerror("Print status", output, master=self.text)
+                tkMessageBox.showerror("Print status", output, parent=self.text)
         else:  #no printing for this platform
             message = "Printing is not enabled for this platform: %s" % platform
-            tkMessageBox.showinfo("Print status", message, master=self.text)
+            tkMessageBox.showinfo("Print status", message, parent=self.text)
         if tempfilename:
             os.unlink(tempfilename)
         return "break"
@@ -533,7 +529,7 @@ class IOBinding:
     def askopenfile(self):
         dir, base = self.defaultfilename("open")
         if not self.opendialog:
-            self.opendialog = tkFileDialog.Open(master=self.text,
+            self.opendialog = tkFileDialog.Open(parent=self.text,
                                                 filetypes=self.filetypes)
         filename = self.opendialog.show(initialdir=dir, initialfile=base)
         if isinstance(filename, unicode):
@@ -556,7 +552,7 @@ class IOBinding:
         dir, base = self.defaultfilename("save")
         if not self.savedialog:
             self.savedialog = tkFileDialog.SaveAs(
-                    master=self.text,
+                    parent=self.text,
                     filetypes=self.filetypes,
                     defaultextension=self.defaultextension)
         filename = self.savedialog.show(initialdir=dir, initialfile=base)
@@ -568,8 +564,12 @@ class IOBinding:
         "Update recent file list on all editor windows"
         self.editwin.update_recent_files_list(filename)
 
-def _io_binding(parent):
-    root = Tk()
+
+def _io_binding(parent):  # htest #
+    from Tkinter import Toplevel, Text
+    from idlelib.configHandler import idleConf
+
+    root = Toplevel(parent)
     root.title("Test IOBinding")
     width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
     root.geometry("+%d+%d"%(x, y + 150))
@@ -586,12 +586,13 @@ def _io_binding(parent):
             self.text.event_generate("<<open-window-from-file>>")
         def save(self, event):
             self.text.event_generate("<<save-window>>")
+        def update_recent_files_list(s, f): pass
 
     text = Text(root)
     text.pack()
     text.focus_set()
     editwin = MyEditWin(text)
-    io = IOBinding(editwin)
+    IOBinding(editwin)
 
 if __name__ == "__main__":
     from idlelib.idle_test.htest import run
index df136b82088ef88cc6c6373351bc441babcf3783..e3d59ee8c10ef358862ed13cc6fb583c849efeb2 100644 (file)
@@ -8,13 +8,15 @@ class MultiStatusBar(Frame):
         Frame.__init__(self, master, **kw)
         self.labels = {}
 
-    def set_label(self, name, text='', side=LEFT):
+    def set_label(self, name, text='', side=LEFT, width=0):
         if name not in self.labels:
-            label = Label(self, bd=1, relief=SUNKEN, anchor=W)
-            label.pack(side=side)
+            label = Label(self, borderwidth=0, anchor=W)
+            label.pack(side=side, pady=0, padx=4)
             self.labels[name] = label
         else:
             label = self.labels[name]
+        if width != 0:
+            label.config(width=width)
         label.config(text=text)
 
 def _multistatus_bar(parent):
index 68d4e937404fcb73cd4ffba8633db440ede26f72..e9e95fd8d2e19ebdafd03728120b647ff329d3df 100644 (file)
@@ -1,7 +1,139 @@
-What's New in IDLE 2.7.9?
+What's New in IDLE 2.7.11?
+==========================
+*Release date: 2015-12-06*
+
+- Issue 15348: Stop the debugger engine (normally in a user process)
+  before closing the debugger window (running in the IDLE process).
+  This prevents the RuntimeErrors that were being caught and ignored.
+
+- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
+  debugger is active (15347); b) closing the debugger with the [X] button
+  (15348); and c) activating the debugger when already active (24455).
+  The patch by Mark Roseman does this by making two changes.
+  1. Suspend and resume the gui.interaction method with the tcl vwait
+  mechanism intended for this purpose (instead of root.mainloop & .quit).
+  2. In gui.run, allow any existing interaction to terminate first.
+
+- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
+  to make it clearer that the program referred to is the currently running
+  user program, not IDLE itself.
+
+- Issue #24750: Improve the appearance of the IDLE editor window status bar.
+  Patch by Mark Roseman.
+
+- Issue #25313: Change the handling of new built-in text color themes to better
+  address the compatibility problem introduced by the addition of IDLE Dark.
+  Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
+
+- Issue #24782: Extension configuration is now a tab in the IDLE Preferences
+  dialog rather than a separate dialog.   The former tabs are now a sorted
+  list.  Patch by Mark Roseman.
+
+- Issue #22726: Re-activate the config dialog help button with some content
+  about the other buttons and the new IDLE Dark theme.
+
+- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
+  It is more or less IDLE Classic inverted, with a cobalt blue background.
+  Strings, comments, keywords, ... are still green, red, orange, ... .
+  To use it with IDLEs released before November 2015, hit the
+  'Save as New Custom Theme' button and enter a new name,
+  such as 'Custom Dark'.  The custom theme will work with any IDLE
+  release, and can be modified.
+
+- Issue #25224: README.txt is now an idlelib index for IDLE developers and
+  curious users.  The previous user content is now in the IDLE doc chapter.
+  'IDLE' now means 'Integrated Development and Learning Environment'.
+
+- Issue #24820: Users can now set breakpoint colors in
+  Settings -> Custom Highlighting.  Original patch by Mark Roseman.
+
+- Issue #24972: Inactive selection background now matches active selection
+  background, as configured by users, on all systems.  Found items are now
+  always highlighted on Windows.  Initial patch by Mark Roseman.
+
+- Issue #24570: Idle: make calltip and completion boxes appear on Macs
+  affected by a tk regression.  Initial patch by Mark Roseman.
+
+- Issue #24988: Idle ScrolledList context menus (used in debugger)
+  now work on Mac Aqua.  Patch by Mark Roseman.
+
+- Issue #24801: Make right-click for context menu work on Mac Aqua.
+  Patch by Mark Roseman.
+
+- Issue #25173: Associate tkinter messageboxes with a specific widget.
+  For Mac OSX, make them a 'sheet'.  Patch by Mark Roseman.
+
+- Issue #25198: Enhance the initial html viewer now used for Idle Help.
+  * Properly indent fixed-pitch text (patch by Mark Roseman).
+  * Give code snippet a very Sphinx-like light blueish-gray background.
+  * Re-use initial width and height set by users for shell and editor.
+  * When the Table of Contents (TOC) menu is used, put the section header
+  at the top of the screen.
+
+- Issue #25225: Condense and rewrite Idle doc section on text colors.
+
+- Issue #21995: Explain some differences between IDLE and console Python.
+
+- Issue #22820: Explain need for *print* when running file from Idle editor.
+
+- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
+
+- Issue #25219: Update doc for Idle command line options.
+  Some were missing and notes were not correct.
+
+- Issue #24861: Most of idlelib is private and subject to change.
+  Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
+
+- Issue #25199: Idle: add synchronization comments for future maintainers.
+
+- Issue #16893: Replace help.txt with help.html for Idle doc display.
+  The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
+  It looks better than help.txt and will better document Idle as released.
+  The tkinter html viewer that works for this file was written by Mark Roseman.
+  The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
+
+- Issue #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
+
+- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
+
+- Issue #23672: Allow Idle to edit and run files with astral chars in name.
+  Patch by Mohd Sanad Zaki Rizvi.
+
+- Issue 24745: Idle editor default font. Switch from Courier to
+  platform-sensitive TkFixedFont.  This should not affect current customized
+  font selections.  If there is a problem, edit $HOME/.idlerc/config-main.cfg
+  and remove 'fontxxx' entries from [Editor Window].  Patch by Mark Roseman.
+
+- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
+  Do not print false prompts. Original patch by Adnan Umer.
+
+- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
+
+- Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
+  decoding unicode literals.
+
+
+What's New in IDLE 2.7.10?
 =========================
+*Release date: 2015-05-23*
+
+- Issue #23583: Fixed writing unicode to standard output stream in IDLE.
 
-*Release data: 2014-12-07* (projected)
+- Issue #20577: Configuration of the max line length for the FormatParagraph
+  extension has been moved from the General tab of the Idle preferences dialog
+  to the FormatParagraph tab of the Config Extensions dialog.
+  Patch by Tal Einat.
+
+- Issue #16893: Update Idle doc chapter to match current Idle and add new
+  information.
+
+- Issue #23180: Rename IDLE "Windows" menu item to "Window".
+  Patch by Al Sweigart.
+
+
+What's New in IDLE 2.7.9?
+=========================
+*Release date: 2014-12-10*
 
 - Issue #16893: Update Idle doc chapter to match current Idle and add new
   information.
@@ -35,7 +167,6 @@ What's New in IDLE 2.7.9?
 
 What's New in IDLE 2.7.8?
 =========================
-
 *Release date: 2014-06-29*
 
 - Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
@@ -63,7 +194,6 @@ What's New in IDLE 2.7.8?
 
 What's New in IDLE 2.7.7?
 =========================
-
 *Release date: 2014-05-31*
 
 - Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
@@ -101,7 +231,6 @@ What's New in IDLE 2.7.7?
 
 What's New in IDLE 2.7.6?
 =========================
-
 *Release date: 2013-11-10*
 
 - Issue #19426: Fixed the opening of Python source file with specified encoding.
@@ -149,7 +278,6 @@ What's New in IDLE 2.7.6?
 
 What's New in IDLE 2.7.5?
 =========================
-
 *Release date: 2013-05-12*
 
 - Issue #17838: Allow sys.stdin to be reassigned.
@@ -184,7 +312,6 @@ What's New in IDLE 2.7.5?
 
 What's New in IDLE 2.7.4?
 =========================
-
 *Release date: 2013-04-06*
 
 - Issue #17625: In IDLE, close the replace dialog after it is used.
@@ -255,7 +382,6 @@ What's New in IDLE 2.7.4?
 
 What's New in IDLE 2.7.3?
 =========================
-
 *Release date: 2012-04-09*
 
 - Issue #964437 Make IDLE help window non-modal.
@@ -288,7 +414,6 @@ What's New in IDLE 2.7.3?
 
 What's New in IDLE 2.7.2?
 =========================
-
 *Release date: 2011-06-11*
 
 - Issue #11718: IDLE's open module dialog couldn't find the __init__.py
@@ -333,7 +458,6 @@ What's New in IDLE 2.7.2?
 
 What's New in Python 2.7.1?
 ===========================
-
 *Release date: 2010-11-27*
 
 - Issue #6378: idle.bat now runs with the appropriate Python version rather than
@@ -342,7 +466,6 @@ What's New in Python 2.7.1?
 
 What's New in IDLE 2.7?
 =======================
-
 *Release date: 2010-07-03*
 
 - Issue #5150: IDLE's format menu now has an option to strip trailing
@@ -374,7 +497,6 @@ What's New in IDLE 2.7?
 
 What's New in IDLE 2.6?
 =======================
-
 *Release date: 01-Oct-2008*
 
 - Issue #2665: On Windows, an IDLE installation upgraded from an old version
@@ -388,11 +510,6 @@ What's New in IDLE 2.6?
 - Autocompletion of filenames now support alternate separators, e.g. the
   '/' char on Windows.  Patch 2061 Tal Einat.
 
-What's New in IDLE 2.6a1?
-=========================
-
-*Release date: 29-Feb-2008*
-
 - Configured selection highlighting colors were ignored; updating highlighting
   in the config dialog would cause non-Python files to be colored as if they
   were Python source; improve use of ColorDelagator.  Patch 1334. Tal Einat.
@@ -464,15 +581,8 @@ What's New in IDLE 2.6a1?
 
 What's New in IDLE 1.2?
 =======================
-
 *Release date: 19-SEP-2006*
 
-
-What's New in IDLE 1.2c1?
-=========================
-
-*Release date: 17-AUG-2006*
-
 - File menu hotkeys: there were three 'p' assignments.  Reassign the
   'Save Copy As' and 'Print' hotkeys to 'y' and 't'.  Change the
   Shell hotkey from 's' to 'l'.
@@ -493,11 +603,6 @@ What's New in IDLE 1.2c1?
 - When used w/o subprocess, all exceptions were preceded by an error
   message claiming they were IDLE internal errors (since 1.2a1).
 
-What's New in IDLE 1.2b3?
-=========================
-
-*Release date: 03-AUG-2006*
-
 - Bug #1525817: Don't truncate short lines in IDLE's tool tips.
 
 - Bug #1517990: IDLE keybindings on MacOS X now work correctly
@@ -521,26 +626,6 @@ What's New in IDLE 1.2b3?
   'as' keyword in comment directly following import command. Closes 1325071.
   Patch 1479219 Tal Einat
 
-What's New in IDLE 1.2b2?
-=========================
-
-*Release date: 11-JUL-2006*
-
-What's New in IDLE 1.2b1?
-=========================
-
-*Release date: 20-JUN-2006*
-
-What's New in IDLE 1.2a2?
-=========================
-
-*Release date: 27-APR-2006*
-
-What's New in IDLE 1.2a1?
-=========================
-
-*Release date: 05-APR-2006*
-
 - Patch #1162825: Support non-ASCII characters in IDLE window titles.
 
 - Source file f.flush() after writing; trying to avoid lossage if user
@@ -620,19 +705,14 @@ What's New in IDLE 1.2a1?
 - The remote procedure call module rpc.py can now access data attributes of
   remote registered objects.  Changes to these attributes are local, however.
 
+
 What's New in IDLE 1.1?
 =======================
-
 *Release date: 30-NOV-2004*
 
 - On OpenBSD, terminating IDLE with ctrl-c from the command line caused a
   stuck subprocess MainThread because only the SocketThread was exiting.
 
-What's New in IDLE 1.1b3/rc1?
-=============================
-
-*Release date: 18-NOV-2004*
-
 - Saving a Keyset w/o making changes (by using the "Save as New Custom Key Set"
   button) caused IDLE to fail on restart (no new keyset was created in
   config-keys.cfg).  Also true for Theme/highlights.  Python Bug 1064535.
@@ -640,28 +720,12 @@ What's New in IDLE 1.1b3/rc1?
 - A change to the linecache.py API caused IDLE to exit when an exception was
   raised while running without the subprocess (-n switch).  Python Bug 1063840.
 
-What's New in IDLE 1.1b2?
-=========================
-
-*Release date: 03-NOV-2004*
-
 - When paragraph reformat width was made configurable, a bug was
   introduced that caused reformatting of comment blocks to ignore how
   far the block was indented, effectively adding the indentation width
   to the reformat width.  This has been repaired, and the reformat
   width is again a bound on the total width of reformatted lines.
 
-What's New in IDLE 1.1b1?
-=========================
-
-*Release date: 15-OCT-2004*
-
-
-What's New in IDLE 1.1a3?
-=========================
-
-*Release date: 02-SEP-2004*
-
 - Improve keyboard focus binding, especially in Windows menu.  Improve
   window raising, especially in the Windows menu and in the debugger.
   IDLEfork 763524.
@@ -669,24 +733,12 @@ What's New in IDLE 1.1a3?
 - If user passes a non-existent filename on the commandline, just
   open a new file, don't raise a dialog.  IDLEfork 854928.
 
-
-What's New in IDLE 1.1a2?
-=========================
-
-*Release date: 05-AUG-2004*
-
 - EditorWindow.py was not finding the .chm help file on Windows.  Typo
   at Rev 1.54.  Python Bug 990954
 
 - checking sys.platform for substring 'win' was breaking IDLE docs on Mac
   (darwin).  Also, Mac Safari browser requires full file:// URIs.  SF 900580.
 
-
-What's New in IDLE 1.1a1?
-=========================
-
-*Release date: 08-JUL-2004*
-
 - Redirect the warning stream to the shell during the ScriptBinding check of
   user code and format the warning similarly to an exception for both that
   check and for runtime warnings raised in the subprocess.
@@ -749,26 +801,10 @@ What's New in IDLE 1.1a1?
 
 What's New in IDLE 1.0?
 =======================
-
 *Release date: 29-Jul-2003*
 
-- Added a banner to the shell discussing warnings possibly raised by personal
-  firewall software.  Added same comment to README.txt.
-
-
-What's New in IDLE 1.0 release candidate 2?
-===========================================
-
-*Release date: 24-Jul-2003*
-
 - Calltip error when docstring was None  Python Bug 775541
 
-
-What's New in IDLE 1.0 release candidate 1?
-===========================================
-
-*Release date: 18-Jul-2003*
-
 - Updated extend.txt, help.txt, and config-extensions.def to correctly
   reflect the current status of the configuration system.  Python Bug 768469
 
@@ -784,12 +820,6 @@ What's New in IDLE 1.0 release candidate 1?
   sys.std{in|out|err}.encoding, for both the local and the subprocess case.
   SF IDLEfork patch 682347.
 
-
-What's New in IDLE 1.0b2?
-=========================
-
-*Release date: 29-Jun-2003*
-
 - Extend AboutDialog.ViewFile() to support file encodings.  Make the CREDITS
   file Latin-1.
 
@@ -828,7 +858,6 @@ What's New in IDLE 1.0b2?
 
 What's New in IDLEfork 0.9b1?
 =============================
-
 *Release date: 02-Jun-2003*
 
 - The current working directory of the execution environment (and shell
@@ -930,10 +959,8 @@ What's New in IDLEfork 0.9b1?
   exception formatting to the subprocess.
 
 
-
 What's New in IDLEfork 0.9 Alpha 2?
 ===================================
-
 *Release date: 27-Jan-2003*
 
 - Updated INSTALL.txt to claify use of the python2 rpm.
@@ -1037,7 +1064,6 @@ What's New in IDLEfork 0.9 Alpha 2?
 
 What's New in IDLEfork 0.9 Alpha 1?
 ===================================
-
 *Release date: 31-Dec-2002*
 
 - First release of major new functionality.  For further details refer to
index e18d846d8def36464478c9059cfc5586b3986ef2..63dc7376bcbbe75fdb88c5549b0692cc8b747c41 100644 (file)
@@ -96,7 +96,7 @@ class OutputWindow(EditorWindow):
                     "No special line",
                     "The line you point at doesn't look like "
                     "a valid file name followed by a line number.",
-                    master=self.text)
+                    parent=self.text)
                 return
         filename, lineno = result
         edit = self.flist.open(filename)
index ef7f8ff3c5839b31702f2ab60aacab5bd2412d35..ae26714fd5970bf919c17efa5003bdaf87a08fb3 100644 (file)
@@ -17,6 +17,7 @@ class PathBrowser(ClassBrowser):
         self.init(flist)
 
     def settitle(self):
+        "Set window titles."
         self.top.wm_title("Path Browser")
         self.top.wm_iconname("Path Browser")
 
@@ -70,7 +71,7 @@ class DirBrowserTreeItem(TreeItem):
 
     def ispackagedir(self, file):
         if not os.path.isdir(file):
-            return 0
+            return False
         init = os.path.join(file, "__init__.py")
         return os.path.exists(init)
 
@@ -91,7 +92,7 @@ class DirBrowserTreeItem(TreeItem):
         sorted.sort()
         return sorted
 
-def _path_browser(parent):
+def _path_browser(parent):  # htest #
     flist = PyShellFileList(parent)
     PathBrowser(flist, _htest=True)
     parent.mainloop()
index 79db883e81884bf2473ba21122c83cd6abab55ca..ea0d7de9ef99d44dfcec2326c3de364bff9fe922 100755 (executable)
@@ -10,8 +10,6 @@ import re
 import socket
 import time
 import threading
-import traceback
-import types
 import io
 
 import linecache
@@ -32,11 +30,11 @@ from idlelib.ColorDelegator import ColorDelegator
 from idlelib.UndoDelegator import UndoDelegator
 from idlelib.OutputWindow import OutputWindow
 from idlelib.configHandler import idleConf
-from idlelib import idlever
 from idlelib import rpc
 from idlelib import Debugger
 from idlelib import RemoteDebugger
 from idlelib import macosxSupport
+from idlelib import IOBinding
 
 IDENTCHARS = string.ascii_letters + string.digits + "_"
 HOST = '127.0.0.1' # python execution server on localhost loopback
@@ -160,7 +158,7 @@ class PyShellEditorWindow(EditorWindow):
             # possible due to update in restore_file_breaks
             return
         if color:
-            theme = idleConf.GetOption('main','Theme','name')
+            theme = idleConf.CurrentTheme()
             cfg = idleConf.GetHighlight(theme, "break")
         else:
             cfg = {'foreground': '', 'background': ''}
@@ -171,7 +169,7 @@ class PyShellEditorWindow(EditorWindow):
         filename = self.io.filename
         text.tag_add("BREAK", "%d.0" % lineno, "%d.0" % (lineno+1))
         try:
-            i = self.breakpoints.index(lineno)
+            self.breakpoints.index(lineno)
         except ValueError:  # only add if missing, i.e. do once
             self.breakpoints.append(lineno)
         try:    # update the subprocess debugger
@@ -345,7 +343,7 @@ class ModifiedColorDelegator(ColorDelegator):
 
     def LoadTagDefs(self):
         ColorDelegator.LoadTagDefs(self)
-        theme = idleConf.GetOption('main','Theme','name')
+        theme = idleConf.CurrentTheme()
         self.tagdefs.update({
             "stdin": {'background':None,'foreground':None},
             "stdout": idleConf.GetHighlight(theme, "stdout"),
@@ -439,7 +437,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
             try:
                 self.rpcclt = MyRPCClient(addr)
                 break
-            except socket.error as err:
+            except socket.error:
                 pass
         else:
             self.display_port_binding_error()
@@ -460,7 +458,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
         self.rpcclt.listening_sock.settimeout(10)
         try:
             self.rpcclt.accept()
-        except socket.timeout as err:
+        except socket.timeout:
             self.display_no_subprocess_error()
             return None
         self.rpcclt.register("console", self.tkconsole)
@@ -474,7 +472,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
         self.poll_subprocess()
         return self.rpcclt
 
-    def restart_subprocess(self, with_cwd=False):
+    def restart_subprocess(self, with_cwd=False, filename=''):
         if self.restarting:
             return self.rpcclt
         self.restarting = True
@@ -495,25 +493,24 @@ class ModifiedInterpreter(InteractiveInterpreter):
         self.spawn_subprocess()
         try:
             self.rpcclt.accept()
-        except socket.timeout as err:
+        except socket.timeout:
             self.display_no_subprocess_error()
             return None
         self.transfer_path(with_cwd=with_cwd)
         console.stop_readline()
         # annotate restart in shell window and mark it
         console.text.delete("iomark", "end-1c")
-        if was_executing:
-            console.write('\n')
-            console.showprompt()
-        halfbar = ((int(console.width) - 16) // 2) * '='
-        console.write(halfbar + ' RESTART ' + halfbar)
+        tag = 'RESTART: ' + (filename if filename else 'Shell')
+        halfbar = ((int(console.width) -len(tag) - 4) // 2) * '='
+        console.write("\n{0} {1} {0}".format(halfbar, tag))
         console.text.mark_set("restart", "end-1c")
         console.text.mark_gravity("restart", "left")
-        console.showprompt()
+        if not filename:
+            console.showprompt()
         # restart subprocess debugger
         if debug:
             # Restarted debugger connects to current instance of debug GUI
-            gui = RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
+            RemoteDebugger.restart_subprocess_debugger(self.rpcclt)
             # reload remote debugger breakpoints for all PyShellEditWindows
             debug.load_breakpoints()
         self.compile.compiler.flags = self.original_compiler_flags
@@ -634,7 +631,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
         item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid)
         from idlelib.TreeWidget import ScrolledCanvas, TreeNode
         top = Toplevel(self.tkconsole.root)
-        theme = idleConf.GetOption('main','Theme','name')
+        theme = idleConf.CurrentTheme()
         background = idleConf.GetHighlight(theme, 'normal')['background']
         sc = ScrolledCanvas(top, bg=background, highlightthickness=0)
         sc.frame.pack(expand=1, fill="both")
@@ -654,7 +651,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
         if source is None:
             source = open(filename, "r").read()
         try:
-            code = compile(source, filename, "exec")
+            code = compile(source, filename, "exec", dont_inherit=True)
         except (OverflowError, SyntaxError):
             self.tkconsole.resetoutput()
             print('*** Error in script or command!\n'
@@ -671,10 +668,11 @@ class ModifiedInterpreter(InteractiveInterpreter):
         self.more = 0
         self.save_warnings_filters = warnings.filters[:]
         warnings.filterwarnings(action="error", category=SyntaxWarning)
-        if isinstance(source, types.UnicodeType):
-            from idlelib import IOBinding
+        if isinstance(source, unicode) and IOBinding.encoding != 'utf-8':
             try:
-                source = source.encode(IOBinding.encoding)
+                source = '# -*- coding: %s -*-\n%s' % (
+                        IOBinding.encoding,
+                        source.encode(IOBinding.encoding))
             except UnicodeError:
                 self.tkconsole.resetoutput()
                 self.write("Unsupported characters in input\n")
@@ -801,7 +799,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
                     "Exit?",
                     "Do you want to exit altogether?",
                     default="yes",
-                    master=self.tkconsole.text):
+                    parent=self.tkconsole.text):
                     raise
                 else:
                     self.showtraceback()
@@ -839,7 +837,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
             "Run IDLE with the -n command line switch to start without a "
             "subprocess and refer to Help/IDLE Help 'Running without a "
             "subprocess' for further details.",
-            master=self.tkconsole.text)
+            parent=self.tkconsole.text)
 
     def display_no_subprocess_error(self):
         tkMessageBox.showerror(
@@ -847,14 +845,14 @@ class ModifiedInterpreter(InteractiveInterpreter):
             "IDLE's subprocess didn't make connection.  Either IDLE can't "
             "start a subprocess or personal firewall software is blocking "
             "the connection.",
-            master=self.tkconsole.text)
+            parent=self.tkconsole.text)
 
     def display_executing_dialog(self):
         tkMessageBox.showerror(
             "Already executing",
             "The Python Shell window is already executing a command; "
             "please wait until it is finished.",
-            master=self.tkconsole.text)
+            parent=self.tkconsole.text)
 
 
 class PyShell(OutputWindow):
@@ -950,7 +948,7 @@ class PyShell(OutputWindow):
         if self.executing:
             tkMessageBox.showerror("Don't debug now",
                 "You can only toggle the debugger when idle",
-                master=self.text)
+                parent=self.text)
             self.set_debugger_indicator()
             return "break"
         else:
@@ -1008,7 +1006,7 @@ class PyShell(OutputWindow):
         if self.executing:
             response = tkMessageBox.askokcancel(
                 "Kill?",
-                "The program is still running!\n Do you want to kill it?",
+                "Your program is still running!\n Do you want to kill it?",
                 default="ok",
                 parent=self.text)
             if response is False:
@@ -1056,6 +1054,7 @@ class PyShell(OutputWindow):
             nosub = "==== No Subprocess ===="
         self.write("Python %s on %s\n%s\n%s" %
                    (sys.version, sys.platform, self.COPYRIGHT, nosub))
+        self.text.focus_force()
         self.showprompt()
         import Tkinter
         Tkinter._default_root = None # 03Jan04 KBK What's this?
@@ -1246,7 +1245,7 @@ class PyShell(OutputWindow):
         while i > 0 and line[i-1] in " \t":
             i = i-1
         line = line[:i]
-        more = self.interp.runsource(line)
+        self.interp.runsource(line)
 
     def open_stack_viewer(self, event=None):
         if self.interp.rpcclt:
@@ -1257,10 +1256,10 @@ class PyShell(OutputWindow):
             tkMessageBox.showerror("No stack trace",
                 "There is no stack trace yet.\n"
                 "(sys.last_traceback is not defined)",
-                master=self.text)
+                parent=self.text)
             return
         from idlelib.StackViewer import StackBrowser
-        sv = StackBrowser(self.root, self.flist)
+        StackBrowser(self.root, self.flist)
 
     def view_restart_mark(self, event=None):
         self.text.see("iomark")
@@ -1558,6 +1557,14 @@ def main():
     flist = PyShellFileList(root)
     macosxSupport.setupApp(root, flist)
 
+    if macosxSupport.isAquaTk():
+        # There are some screwed up <2> class bindings for text
+        # widgets defined in Tk which we need to do away with.
+        # See issue #24801.
+        root.unbind_class('Text', '<B2>')
+        root.unbind_class('Text', '<B2-Motion>')
+        root.unbind_class('Text', '<<PasteSelection>>')
+
     if enable_edit:
         if not (cmd or script):
             for filename in args[:]:
index 101f7eba167c9df531319f3b6c4acd3d3dd1eec8..b5663c25cfeb66240373835857e37c128b518d88 100644 (file)
-IDLE is Python's Tkinter-based Integrated DeveLopment Environment.
-
-IDLE emphasizes a lightweight, clean design with a simple user interface.
-Although it is suitable for beginners, even advanced users will find that
-IDLE has everything they really need to develop pure Python code.
-
-IDLE features a multi-window text editor with multiple undo, Python colorizing,
-and many other capabilities, e.g. smart indent, call tips, and autocompletion.
-
-The editor has comprehensive search functions, including searching through
-multiple files.  Class browsers and path browsers provide fast access to
-code objects from a top level viewpoint without dealing with code folding.
-
-There is a Python Shell window which features colorizing and command recall.
-
-IDLE executes Python code in a separate process, which is restarted for each
-Run (F5) initiated from an editor window.  The environment can also be 
-restarted from the Shell window without restarting IDLE.
-
-This enhancement has often been requested, and is now finally available.  The
-magic "reload/import *" incantations are no longer required when editing and
-testing a module two or three steps down the import chain.
-
-(Personal firewall software may warn about the connection IDLE makes to its
-subprocess using this computer's internal loopback interface.  This connection
-is not visible on any external interface and no data is sent to or received
-from the Internet.)
-
-It is possible to interrupt tightly looping user code, even on Windows.
-
-Applications which cannot support subprocesses and/or sockets can still run
-IDLE in a single process.
-
-IDLE has an integrated debugger with stepping, persistent breakpoints, and call
-stack visibility.
-
-There is a GUI configuration manager which makes it easy to select fonts,
-colors, keybindings, and startup options.  This facility includes a feature
-which allows the user to specify additional help sources, either locally or on
-the web.
-
-IDLE is coded in 100% pure Python, using the Tkinter GUI toolkit (Tk/Tcl)
-and is cross-platform, working on Unix, Mac, and Windows.
-
-IDLE accepts command line arguments.  Try idle -h to see the options.
-
-
-If you find bugs or have suggestions, let us know about them by using the
-Python Bug Tracker:
-
-http://sourceforge.net/projects/python
-
-Patches are always appreciated at the Python Patch Tracker, and change
-requests should be posted to the RFE Tracker.
-
-For further details and links, read the Help files and check the IDLE home
-page at
-
-http://www.python.org/idle/
-
-There is a mail list for IDLE: idle-dev@python.org.  You can join at
-
-http://mail.python.org/mailman/listinfo/idle-dev
+README.txt: an index to idlelib files and the IDLE menu.
+
+IDLE is Python\92s Integrated Development and Learning
+Environment.  The user documentation is part of the Library Reference and
+is available in IDLE by selecting Help => IDLE Help.  This README documents
+idlelib for IDLE developers and curious users.
+
+IDLELIB FILES lists files alphabetically by category,
+with a short description of each.
+
+IDLE MENU show the menu tree, annotated with the module
+or module object that implements the corresponding function.
+
+This file is descriptive, not prescriptive, and may have errors
+and omissions and lag behind changes in idlelib.
+
+
+IDLELIB FILES
+Implemetation files not in IDLE MENU are marked (nim).
+Deprecated files and objects are listed separately as the end.
+
+Startup
+-------
+__init__.py  # import, does nothing
+__main__.py  # -m, starts IDLE
+idle.bat
+idle.py
+idle.pyw
+
+Implementation
+--------------
+AutoComplete.py   # Complete attribute names or filenames.
+AutoCompleteWindow.py  # Display completions.
+AutoExpand.py     # Expand word with previous word in file.
+Bindings.py       # Define most of IDLE menu.
+CallTipWindow.py  # Display calltip.
+CallTips.py       # Create calltip text.
+ClassBrowser.py   # Create module browser window.
+CodeContext.py    # Show compound statement headers otherwise not visible.
+ColorDelegator.py # Colorize text (nim).
+Debugger.py       # Debug code run from editor; show window.
+Delegator.py      # Define base class for delegators (nim).
+EditorWindow.py   # Define most of editor and utility functions.
+FileList.py       # Open files and manage list of open windows (nim).
+FormatParagraph.py# Re-wrap multiline strings and comments.
+GrepDialog.py     # Find all occurrences of pattern in multiple files.
+HyperParser.py    # Parse code around a given index.
+IOBinding.py      # Open, read, and write files
+IdleHistory.py    # Get previous or next user input in shell (nim)
+MultiCall.py      # Wrap tk widget to allow multiple calls per event (nim).
+MultiStatusBar.py # Define status bar for windows (nim).
+ObjectBrowser.py  # Define class used in StackViewer (nim).
+OutputWindow.py   # Create window for grep output.
+ParenMatch.py     # Match fenceposts: (), [], and {}.
+PathBrowser.py    # Create path browser window.
+Percolator.py     # Manage delegator stack (nim).
+PyParse.py        # Give information on code indentation
+PyShell.py        # Start IDLE, manage shell, complete editor window
+RemoteDebugger.py # Debug code run in remote process.
+RemoteObjectBrowser.py # Communicate objects between processes with rpc (nim).
+ReplaceDialog.py  # Search and replace pattern in text.
+RstripExtension.py# Strip trailing whitespace
+ScriptBinding.py  # Check and run user code.
+ScrolledList.py   # Define ScrolledList widget for IDLE (nim).
+SearchDialog.py   # Search for pattern in text.
+SearchDialogBase.py  # Define base for search, replace, and grep dialogs.
+SearchEngine.py   # Define engine for all 3 search dialogs.
+StackViewer.py    # View stack after exception.
+TreeWidget.py     # Define tree widger, used in browsers (nim).
+UndoDelegator.py  # Manage undo stack.
+WidgetRedirector.py # Intercept widget subcommands (for percolator) (nim).
+WindowList.py     # Manage window list and define listed top level.
+ZoomHeight.py     # Zoom window to full height of screen.
+aboutDialog.py    # Display About IDLE dialog.
+configDialog.py   # Display user configuration dialogs.
+configHandler.py  # Load, fetch, and save configuration (nim).
+configHelpSourceEdit.py  # Specify help source.
+configSectionNameDialog.py  # Spefify user config section name
+dynOptionMenuWidget.py  # define mutable OptionMenu widget (nim).
+help.py           # Display IDLE's html doc.
+keybindingDialog.py  # Change keybindings.
+macosxSupport.py  # Help IDLE run on Macs (nim).
+rpc.py            # Commuicate between idle and user processes (nim).
+run.py            # Manage user code execution subprocess.
+tabbedpages.py    # Define tabbed pages widget (nim).
+textView.py       # Define read-only text widget (nim).
+
+Configuration
+-------------
+config-extensions.def # Defaults for extensions
+config-highlight.def  # Defaults for colorizing
+config-keys.def       # Defaults for key bindings
+config-main.def       # Defai;ts fpr font and geneal
+
+Text
+----
+CREDITS.txt  # not maintained, displayed by About IDLE
+HISTORY.txt  # NEWS up to July 2001
+NEWS.txt     # commits, displayed by About IDLE
+README.txt   # this file, displeyed by About IDLE
+TODO.txt     # needs review
+extend.txt   # about writing extensions
+help.html    # copy of idle.html in docs, displayed by IDLE Help
+
+Subdirectories
+--------------
+Icons  # small image files
+idle_test  # files for human test and automated unit tests
+
+Unused and Deprecated files and objects (nim)
+---------------------------------------------
+EditorWindow.py: Helpdialog and helpDialog
+ToolTip.py: unused.
+help.txt
+idlever.py
+
+
+IDLE MENUS
+Top level items and most submenu items are defined in Bindings.
+Extenstions add submenu items when active.  The names given are
+found, quoted, in one of these modules, paired with a '<<pseudoevent>>'.
+Each pseudoevent is bound to an event handler.  Some event handlers
+call another function that does the actual work.  The annotations below
+are intended to at least give the module where the actual work is done.
+
+File  # IOBindig except as noted
+  New File
+  Open...  # IOBinding.open
+  Open Module
+  Recent Files
+  Class Browser  # Class Browser
+  Path Browser  # Path Browser
+  ---
+  Save  # IDBinding.save
+  Save As...  # IOBinding.save_as
+  Save Copy As...  # IOBindling.save_a_copy
+  ---
+  Print Window  # IOBinding.print_window
+  ---
+  Close
+  Exit
+
+Edit
+  Undo  # undoDelegator
+  Redo  # undoDelegator
+  ---
+  Cut
+  Copy
+  Paste
+  Select All
+  ---  # Next 5 items use SearchEngine; dialogs use SearchDialogBase
+  Find  # Search Dialog
+  Find Again
+  Find Selection
+  Find in Files...  # GrepDialog
+  Replace...  # ReplaceDialog
+  Go to Line
+  Show Completions  # AutoComplete extension and AutoCompleteWidow (&HP)
+  Expand Word  # AutoExpand extension
+  Show call tip  # Calltips extension and CalltipWindow (& Hyperparser)
+  Show surrounding parens  # ParenMatch (& Hyperparser)
+
+Shell  # PyShell
+  View Last Restart  # PyShell.?
+  Restart Shell  # PyShell.?
+
+Debug (Shell only)
+  Go to File/Line
+  Debugger  # Debugger, RemoteDebugger
+  Stack Viewer  # StackViewer
+  Auto-open Stack Viewer  # StackViewer
+
+Format (Editor only)
+  Indent Region
+  Dedent Region
+  Comment Out Region
+  Uncomment Region
+  Tabify Region
+  Untabify Region
+  Toggle Tabs
+  New Indent Width
+  Format Paragraph  # FormatParagraph extension
+  ---
+  Strip tailing whitespace  # RstripExtension extension
+
+Run (Editor only)
+  Python Shell  # PyShell
+  ---
+  Check Module  # ScriptBinding
+  Run Module  # ScriptBinding
+
+Options
+  Configure IDLE  # configDialog
+    (tabs in the dialog)
+    Font tab  # onfig-main.def
+    Highlight tab  # configSectionNameDialog, config-highlight.def
+    Keys tab  # keybindingDialog, configSectionNameDialog, onfig-keus.def
+    General tab  # configHelpSourceEdit, config-main.def
+  Configure Extensions  # configDialog
+    Xyz tab  # xyz.py, config-extensions.def
+  ---
+  Code Context (editor only)  # CodeContext extension
+
+Window
+  Zoomheight  # ZoomHeight extension
+  ---
+  <open windows>  # WindowList
+
+Help
+  About IDLE  # aboutDialog
+  ---
+  IDLE Help  # help
+  Python Doc
+  Turtle Demo
+  ---
+  <other help sources>
+
+<Context Menu> (right click)
+Defined in EditorWindow, PyShell, Output
+   Cut
+   Copy
+   Paste
+   ---
+   Go to file/line (shell and output only)
+   Set Breakpoint (editor only)
+   Clear Breakpoint (editor only)
+ Defined in Debugger
+   Go to source line
+   Show stack frame
index 647285fe4e58cd458287cacb07a3a7cd9d061776..8c71a217461baec17a8d1f8d331714d9b906b961 100644 (file)
@@ -21,7 +21,6 @@ barrier, in particular frame and traceback objects.
 """
 
 import types
-from idlelib import rpc
 from idlelib import Debugger
 
 debugging = 0
@@ -101,7 +100,7 @@ class IdbAdapter:
             tb = tracebacktable[tbid]
         stack, i = self.idb.get_stack(frame, tb)
         ##print >>sys.__stderr__, "get_stack() ->", stack
-        stack = [(wrap_frame(frame), k) for frame, k in stack]
+        stack = [(wrap_frame(frame2), k) for frame2, k in stack]
         ##print >>sys.__stderr__, "get_stack() ->", stack
         return stack, i
 
index ab2a3f29b994b3b97f1fca25abf3606946acfed5..0309a8a8e2030ac73dc3bd2ca26149141078a73f 100644 (file)
@@ -71,7 +71,7 @@ class ScriptBinding:
         try:
             tabnanny.process_tokens(tokenize.generate_tokens(f.readline))
         except tokenize.TokenError as msg:
-            msgtxt, (lineno, start) = msg
+            msgtxt, (lineno, start) = msg.args
             self.editwin.gotoline(lineno)
             self.errorbox("Tabnanny Tokenizing Error",
                           "Token Error: %s" % msgtxt)
@@ -147,7 +147,7 @@ class ScriptBinding:
             return 'break'
         interp = self.shell.interp
         if PyShell.use_subprocess:
-            interp.restart_subprocess(with_cwd=False)
+            interp.restart_subprocess(with_cwd=False, filename=code.co_filename)
         dirname = os.path.dirname(filename)
         # XXX Too often this discards arguments the user just set...
         interp.runcommand("""if 1:
@@ -213,10 +213,10 @@ class ScriptBinding:
         confirm = tkMessageBox.askokcancel(title="Save Before Run or Check",
                                            message=msg,
                                            default=tkMessageBox.OK,
-                                           master=self.editwin.text)
+                                           parent=self.editwin.text)
         return confirm
 
     def errorbox(self, title, message):
         # XXX This should really be a function of EditorWindow...
-        tkMessageBox.showerror(title, message, master=self.editwin.text)
+        tkMessageBox.showerror(title, message, parent=self.editwin.text)
         self.editwin.text.focus_set()
index e235661cf9bdd2566193ed57660090cc67d03c77..fd9f0ff5e26ebc4ef16a66978b9eb4dbb4dfc518 100644 (file)
@@ -1,4 +1,5 @@
 from Tkinter import *
+from idlelib import macosxSupport
 
 class ScrolledList:
 
@@ -22,7 +23,11 @@ class ScrolledList:
         # Bind events to the list box
         listbox.bind("<ButtonRelease-1>", self.click_event)
         listbox.bind("<Double-ButtonRelease-1>", self.double_click_event)
-        listbox.bind("<ButtonPress-3>", self.popup_event)
+        if macosxSupport.isAquaTk():
+            listbox.bind("<ButtonPress-2>", self.popup_event)
+            listbox.bind("<Control-Button-1>", self.popup_event)
+        else:
+            listbox.bind("<ButtonPress-3>", self.popup_event)
         listbox.bind("<Key-Up>", self.up_event)
         listbox.bind("<Key-Down>", self.down_event)
         # Mark as empty
index 2aadb8431fd1f76fa7c656d98483be31d03c120d..043168af002bb51c7a39eecb11a1977c783a6e60 100644 (file)
@@ -23,7 +23,7 @@ def find_selection(text):
 class SearchDialog(SearchDialogBase):
 
     def create_widgets(self):
-        f = SearchDialogBase.create_widgets(self)
+        SearchDialogBase.create_widgets(self)
         self.make_button("Find Next", self.default_command, 1)
 
     def default_command(self, event=None):
index ccf62838c3f094e8c610726ce6b7ef4cfbfb7bb5..555a08c2c001ff633c66ccbe0c27f7113fe363a8 100644 (file)
@@ -10,8 +10,7 @@ from idlelib.PyShell import PyShellFileList
 
 def StackBrowser(root, flist=None, tb=None, top=None):
     if top is None:
-        from Tkinter import Toplevel
-        top = Toplevel(root)
+        top = tk.Toplevel(root)
     sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
     sc.frame.pack(expand=1, fill="both")
     item = StackTreeItem(flist, tb)
@@ -108,12 +107,9 @@ class VariablesTreeItem(ObjectTreeItem):
     def IsExpandable(self):
         return len(self.object) > 0
 
-    def keys(self):
-        return self.object.keys()
-
     def GetSubList(self):
         sublist = []
-        for key in self.keys():
+        for key in self.object.keys():
             try:
                 value = self.object[key]
             except KeyError:
@@ -124,7 +120,10 @@ class VariablesTreeItem(ObjectTreeItem):
             sublist.append(item)
         return sublist
 
-def _stack_viewer(parent):
+    def keys(self):  # unused, left for possible 3rd party use
+        return self.object.keys()
+
+def _stack_viewer(parent):  # htest #
     root = tk.Tk()
     root.title("Test StackViewer")
     width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
index 1e56e86b0cc878f97c13077ef7488e42887d7cd4..9d9d4d9529fe121c4c9ddd2119c1fca6e06332f6 100644 (file)
@@ -246,11 +246,11 @@ class TreeNode:
         else:
             self.edit_finish()
         try:
-            label = self.label
+            self.label
         except AttributeError:
             # padding carefully selected (on Windows) to match Entry widget:
             self.label = Label(self.canvas, text=text, bd=0, padx=2, pady=2)
-        theme = idleConf.GetOption('main','Theme','name')
+        theme = idleConf.CurrentTheme()
         if self.selected:
             self.label.configure(idleConf.GetHighlight(theme, 'hilite'))
         else:
index 103bfd0bc46250c47e16995fb469b25ea5c1632c..2cb939882bc08ee32719b8c6ed484091f2f9f2ea 100644 (file)
@@ -1,3 +1,4 @@
+from __future__ import print_function
 from Tkinter import TclError
 
 class WidgetRedirector:
@@ -161,7 +162,7 @@ def _widget_redirector(parent):  # htest #
     text.focus_set()
     redir = WidgetRedirector(text)
     def my_insert(*args):
-        print "insert", args
+        print("insert", args)
         original_insert(*args)
     original_insert = redir.register("insert", my_insert)
     root.mainloop()
index 7a83ddea76ca8d00b438223c6130fc9a903b3669..32b7eacd1eac93f43b870bd91a337d7138e0bdec 100644 (file)
@@ -1 +1,8 @@
-# Dummy file to make this a package.
+"""The idlelib package implements the Idle application.
+
+Idle includes an interactive shell and editor.
+Use the files named idle.* to start Idle.
+
+The other files are private implementations.  Their details are subject
+to change.  See PEP 434 for more.  Import them at your own risk.
+"""
index 1c3eba13da06e644c32c86598cdc0ded3557d779..ef8e2decc31e5d124a485d855f5a6647accb24f6 100644 (file)
@@ -1,12 +1,10 @@
 """About Dialog for IDLE
 
 """
-
-from Tkinter import *
 import os
-
+from sys import version
+from Tkinter import *
 from idlelib import textView
-from idlelib import idlever
 
 class AboutDialog(Toplevel):
     """Modal about dialog for idle
@@ -37,6 +35,7 @@ class AboutDialog(Toplevel):
         self.wait_window()
 
     def CreateWidgets(self):
+        release = version[:version.index(' ')]
         frameMain = Frame(self, borderwidth=2, relief=SUNKEN)
         frameButtons = Frame(self)
         frameButtons.pack(side=BOTTOM, fill=X)
@@ -63,14 +62,14 @@ class AboutDialog(Toplevel):
         labelEmail.grid(row=6, column=0, columnspan=2,
                         sticky=W, padx=10, pady=0)
         labelWWW = Label(frameBg, text='https://docs.python.org/' +
-                         sys.version[:3] + '/library/idle.html',
+                         version[:3] + '/library/idle.html',
                          justify=LEFT, fg=self.fg, bg=self.bg)
         labelWWW.grid(row=7, column=0, columnspan=2, sticky=W, padx=10, pady=0)
         Frame(frameBg, borderwidth=1, relief=SUNKEN,
               height=2, bg=self.bg).grid(row=8, column=0, sticky=EW,
                                          columnspan=3, padx=5, pady=5)
-        labelPythonVer = Label(frameBg, text='Python version:  ' + \
-                               sys.version.split()[0], fg=self.fg, bg=self.bg)
+        labelPythonVer = Label(frameBg, text='Python version:  ' +
+                               release, fg=self.fg, bg=self.bg)
         labelPythonVer.grid(row=9, column=0, sticky=W, padx=10, pady=0)
         tkVer = self.tk.call('info', 'patchlevel')
         labelTkVer = Label(frameBg, text='Tk version:  '+
@@ -93,7 +92,7 @@ class AboutDialog(Toplevel):
         Frame(frameBg, borderwidth=1, relief=SUNKEN,
               height=2, bg=self.bg).grid(row=11, column=0, sticky=EW,
                                          columnspan=3, padx=5, pady=5)
-        idle_v = Label(frameBg, text='IDLE version:   ' + idlever.IDLE_VERSION,
+        idle_v = Label(frameBg, text='IDLE version:   ' + release,
                        fg=self.fg, bg=self.bg)
         idle_v.grid(row=12, column=0, sticky=W, padx=10, pady=0)
         idle_button_f = Frame(frameBg, bg=self.bg)
index 7d20f782407776aa251a2aa4125e4697ece112f0..4146e28c4eda1f4a478a3466bec379b37b5cf2a9 100644 (file)
@@ -62,3 +62,32 @@ stderr-foreground= red
 stderr-background= #ffffff
 console-foreground= #770000
 console-background= #ffffff
+
+[IDLE Dark]
+comment-foreground = #dd0000
+console-foreground = #ff4d4d
+error-foreground = #FFFFFF
+hilite-background = #7e7e7e
+string-foreground = #02ff02
+stderr-background = #002240
+stderr-foreground = #ffb3b3
+console-background = #002240
+hit-background = #fbfbfb
+string-background = #002240
+normal-background = #002240
+hilite-foreground = #FFFFFF
+keyword-foreground = #ff8000
+error-background = #c86464
+keyword-background = #002240
+builtin-background = #002240
+break-background = #808000
+builtin-foreground = #ff00ff
+definition-foreground = #5e5eff
+stdout-foreground = #c2d1fa
+definition-background = #002240
+normal-foreground = #FFFFFF
+cursor-foreground = #ffffff
+stdout-background = #002240
+hit-foreground = #002240
+comment-background = #002240
+break-foreground = #FFFFFF
index d7ad59f49c469416c441afd18c359026dee6e4ca..f2411996b77ed0794b0be3b72e192f669548625a 100644 (file)
@@ -53,7 +53,7 @@ delete-exitfunc= 1
 [EditorWindow]
 width= 80
 height= 40
-font= courier
+font= TkFixedFont
 font-size= 10
 font-bold= 0
 encoding= none
@@ -65,6 +65,8 @@ num-spaces= 4
 [Theme]
 default= 1
 name= IDLE Classic
+name2=
+# name2 set in user config-main.cfg for themes added after 2015 Oct 1
 
 [Keys]
 default= 1
index c416151d9d5869f8886a00da66aa24a4fea71729..585a87148780d11730c7d9794f2df0bc83ca7288 100644 (file)
@@ -14,12 +14,13 @@ import tkMessageBox, tkColorChooser, tkFont
 
 from idlelib.configHandler import idleConf
 from idlelib.dynOptionMenuWidget import DynOptionMenu
-from idlelib.tabbedpages import TabbedPageSet
 from idlelib.keybindingDialog import GetKeysDialog
 from idlelib.configSectionNameDialog import GetCfgSectionNameDialog
 from idlelib.configHelpSourceEdit import GetHelpSourceDialog
 from idlelib.tabbedpages import TabbedPageSet
+from idlelib.textView import view_text
 from idlelib import macosxSupport
+
 class ConfigDialog(Toplevel):
 
     def __init__(self, parent, title='', _htest=False, _utest=False):
@@ -42,19 +43,20 @@ class ConfigDialog(Toplevel):
         #The first value of the tuple is the sample area tag name.
         #The second value is the display name list sort index.
         self.themeElements={
-            'Normal Text':('normal', '00'),
-            'Python Keywords':('keyword', '01'),
-            'Python Definitions':('definition', '02'),
-            'Python Builtins':('builtin', '03'),
-            'Python Comments':('comment', '04'),
-            'Python Strings':('string', '05'),
-            'Selected Text':('hilite', '06'),
-            'Found Text':('hit', '07'),
-            'Cursor':('cursor', '08'),
-            'Error Text':('error', '09'),
-            'Shell Normal Text':('console', '10'),
-            'Shell Stdout Text':('stdout', '11'),
-            'Shell Stderr Text':('stderr', '12'),
+            'Normal Text': ('normal', '00'),
+            'Python Keywords': ('keyword', '01'),
+            'Python Definitions': ('definition', '02'),
+            'Python Builtins': ('builtin', '03'),
+            'Python Comments': ('comment', '04'),
+            'Python Strings': ('string', '05'),
+            'Selected Text': ('hilite', '06'),
+            'Found Text': ('hit', '07'),
+            'Cursor': ('cursor', '08'),
+            'Editor Breakpoint': ('break', '09'),
+            'Shell Normal Text': ('console', '10'),
+            'Shell Error Text': ('error', '11'),
+            'Shell Stdout Text': ('stdout', '12'),
+            'Shell Stderr Text': ('stderr', '13'),
             }
         self.ResetChangedItems() #load initial values in changed items dict
         self.CreateWidgets()
@@ -76,13 +78,16 @@ class ConfigDialog(Toplevel):
 
     def CreateWidgets(self):
         self.tabPages = TabbedPageSet(self,
-                page_names=['Fonts/Tabs', 'Highlighting', 'Keys', 'General'])
+                page_names=['Fonts/Tabs', 'Highlighting', 'Keys', 'General',
+                            'Extensions'])
         self.tabPages.pack(side=TOP, expand=TRUE, fill=BOTH)
         self.CreatePageFontTab()
         self.CreatePageHighlight()
         self.CreatePageKeys()
         self.CreatePageGeneral()
+        self.CreatePageExtensions()
         self.create_action_buttons().pack(side=BOTTOM)
+
     def create_action_buttons(self):
         if macosxSupport.isAquaTk():
             # Changing the default padding on OSX results in unreadable
@@ -92,28 +97,18 @@ class ConfigDialog(Toplevel):
             paddingArgs = {'padx':6, 'pady':3}
         outer = Frame(self, pady=2)
         buttons = Frame(outer, pady=2)
-        self.buttonOk = Button(
-                buttons, text='Ok', command=self.Ok,
-                takefocus=FALSE, **paddingArgs)
-        self.buttonApply = Button(
-                buttons, text='Apply', command=self.Apply,
-                takefocus=FALSE, **paddingArgs)
-        self.buttonCancel = Button(
-                buttons, text='Cancel', command=self.Cancel,
-                takefocus=FALSE, **paddingArgs)
-        self.buttonOk.pack(side=LEFT, padx=5)
-        self.buttonApply.pack(side=LEFT, padx=5)
-        self.buttonCancel.pack(side=LEFT, padx=5)
-# Comment out Help button creation and packing until implement self.Help
-##        self.buttonHelp = Button(
-##                buttons, text='Help', command=self.Help,
-##                takefocus=FALSE, **paddingArgs)
-##        self.buttonHelp.pack(side=RIGHT, padx=5)
-
+        for txt, cmd in (
+            ('Ok', self.Ok),
+            ('Apply', self.Apply),
+            ('Cancel', self.Cancel),
+            ('Help', self.Help)):
+            Button(buttons, text=txt, command=cmd, takefocus=FALSE,
+                   **paddingArgs).pack(side=LEFT, padx=5)
         # add space above buttons
         Frame(outer, height=2, borderwidth=0).pack(side=TOP)
         buttons.pack(side=BOTTOM)
         return outer
+
     def CreatePageFontTab(self):
         parent = self.parent
         self.fontSize = StringVar(parent)
@@ -218,7 +213,8 @@ class ConfigDialog(Toplevel):
             ("'selected'", 'hilite'), ('\n  var2 = ', 'normal'),
             ("'found'", 'hit'), ('\n  var3 = ', 'normal'),
             ('list', 'builtin'), ('(', 'normal'),
-            ('None', 'builtin'), (')\n\n', 'normal'),
+            ('None', 'builtin'), (')\n', 'normal'),
+            ('  breakpoint("line")', 'break'), ('\n\n', 'normal'),
             (' error ', 'error'), (' ', 'normal'),
             ('cursor |', 'cursor'), ('\n ', 'normal'),
             ('shell', 'console'), (' ', 'normal'),
@@ -265,6 +261,7 @@ class ConfigDialog(Toplevel):
         self.buttonDeleteCustomTheme=Button(
                 frameTheme, text='Delete Custom Theme',
                 command=self.DeleteCustomTheme)
+        self.new_custom_theme = Label(frameTheme, bd=2)
 
         ##widget packing
         #body
@@ -288,6 +285,7 @@ class ConfigDialog(Toplevel):
         self.optMenuThemeBuiltin.pack(side=TOP, fill=X, padx=5, pady=5)
         self.optMenuThemeCustom.pack(side=TOP, fill=X, anchor=W, padx=5, pady=5)
         self.buttonDeleteCustomTheme.pack(side=TOP, fill=X, padx=5, pady=5)
+        self.new_custom_theme.pack(side=TOP, fill=X, pady=5)
         return frame
 
     def CreatePageKeys(self):
@@ -483,9 +481,9 @@ class ConfigDialog(Toplevel):
         return frame
 
     def AttachVarCallbacks(self):
-        self.fontSize.trace_variable('w', self.VarChanged_fontSize)
-        self.fontName.trace_variable('w', self.VarChanged_fontName)
-        self.fontBold.trace_variable('w', self.VarChanged_fontBold)
+        self.fontSize.trace_variable('w', self.VarChanged_font)
+        self.fontName.trace_variable('w', self.VarChanged_font)
+        self.fontBold.trace_variable('w', self.VarChanged_font)
         self.spaceNum.trace_variable('w', self.VarChanged_spaceNum)
         self.colour.trace_variable('w', self.VarChanged_colour)
         self.builtinTheme.trace_variable('w', self.VarChanged_builtinTheme)
@@ -502,15 +500,15 @@ class ConfigDialog(Toplevel):
         self.autoSave.trace_variable('w', self.VarChanged_autoSave)
         self.encoding.trace_variable('w', self.VarChanged_encoding)
 
-    def VarChanged_fontSize(self, *params):
-        value = self.fontSize.get()
-        self.AddChangedItem('main', 'EditorWindow', 'font-size', value)
-
-    def VarChanged_fontName(self, *params):
+    def VarChanged_font(self, *params):
+        '''When one font attribute changes, save them all, as they are
+        not independent from each other. In particular, when we are
+        overriding the default font, we need to write out everything.
+        '''
         value = self.fontName.get()
         self.AddChangedItem('main', 'EditorWindow', 'font', value)
-
-    def VarChanged_fontBold(self, *params):
+        value = self.fontSize.get()
+        self.AddChangedItem('main', 'EditorWindow', 'font-size', value)
         value = self.fontBold.get()
         self.AddChangedItem('main', 'EditorWindow', 'font-bold', value)
 
@@ -523,7 +521,16 @@ class ConfigDialog(Toplevel):
 
     def VarChanged_builtinTheme(self, *params):
         value = self.builtinTheme.get()
-        self.AddChangedItem('main', 'Theme', 'name', value)
+        if value == 'IDLE Dark':
+            if idleConf.GetOption('main', 'Theme', 'name') != 'IDLE New':
+                self.AddChangedItem('main', 'Theme', 'name', 'IDLE Classic')
+            self.AddChangedItem('main', 'Theme', 'name2', value)
+            self.new_custom_theme.config(text='New theme, see Help',
+                                         fg='#500000')
+        else:
+            self.AddChangedItem('main', 'Theme', 'name', value)
+            self.AddChangedItem('main', 'Theme', 'name2', '')
+            self.new_custom_theme.config(text='', fg='black')
         self.PaintThemeSample()
 
     def VarChanged_customTheme(self, *params):
@@ -976,24 +983,24 @@ class ConfigDialog(Toplevel):
         fonts.sort()
         for font in fonts:
             self.listFontName.insert(END, font)
-        configuredFont = idleConf.GetOption(
-                'main', 'EditorWindow', 'font', default='courier')
-        lc_configuredFont = configuredFont.lower()
-        self.fontName.set(lc_configuredFont)
+        configuredFont = idleConf.GetFont(self, 'main', 'EditorWindow')
+        fontName = configuredFont[0].lower()
+        fontSize = configuredFont[1]
+        fontBold  = configuredFont[2]=='bold'
+        self.fontName.set(fontName)
         lc_fonts = [s.lower() for s in fonts]
-        if lc_configuredFont in lc_fonts:
-            currentFontIndex = lc_fonts.index(lc_configuredFont)
+        try:
+            currentFontIndex = lc_fonts.index(fontName)
             self.listFontName.see(currentFontIndex)
             self.listFontName.select_set(currentFontIndex)
             self.listFontName.select_anchor(currentFontIndex)
+        except ValueError:
+            pass
         ##font size dropdown
-        fontSize = idleConf.GetOption(
-                'main', 'EditorWindow', 'font-size', type='int', default='10')
         self.optMenuFontSize.SetMenu(('7', '8', '9', '10', '11', '12', '13',
                                       '14', '16', '18', '20', '22'), fontSize )
         ##fontWeight
-        self.fontBold.set(idleConf.GetOption(
-                'main', 'EditorWindow', 'font-bold', default=0, type='bool'))
+        self.fontBold.set(fontBold)
         ##font sample
         self.SetFontSample()
 
@@ -1101,6 +1108,7 @@ class ConfigDialog(Toplevel):
         self.LoadKeyCfg()
         ### general page
         self.LoadGeneralCfg()
+        # note: extension page handled separately
 
     def SaveNewKeySet(self, keySetName, keySet):
         """
@@ -1154,6 +1162,7 @@ class ConfigDialog(Toplevel):
             # save these even if unchanged!
             idleConf.userCfg[configType].Save()
         self.ResetChangedItems() #clear the changed items dict
+        self.save_all_changed_extensions()  # uses a different mechanism
 
     def DeactivateCurrentConfig(self):
         #Before a config is saved, some cleanup of current
@@ -1185,114 +1194,62 @@ class ConfigDialog(Toplevel):
         self.ActivateConfigChanges()
 
     def Help(self):
-        pass
-
-class VerticalScrolledFrame(Frame):
-    """A pure Tkinter vertically scrollable frame.
-
-    * Use the 'interior' attribute to place widgets inside the scrollable frame
-    * Construct and pack/place/grid normally
-    * This frame only allows vertical scrolling
-    """
-    def __init__(self, parent, *args, **kw):
-        Frame.__init__(self, parent, *args, **kw)
-
-        # create a canvas object and a vertical scrollbar for scrolling it
-        vscrollbar = Scrollbar(self, orient=VERTICAL)
-        vscrollbar.pack(fill=Y, side=RIGHT, expand=FALSE)
-        canvas = Canvas(self, bd=0, highlightthickness=0,
-                        yscrollcommand=vscrollbar.set)
-        canvas.pack(side=LEFT, fill=BOTH, expand=TRUE)
-        vscrollbar.config(command=canvas.yview)
-
-        # reset the view
-        canvas.xview_moveto(0)
-        canvas.yview_moveto(0)
-
-        # create a frame inside the canvas which will be scrolled with it
-        self.interior = interior = Frame(canvas)
-        interior_id = canvas.create_window(0, 0, window=interior, anchor=NW)
+        page = self.tabPages._current_page
+        view_text(self, title='Help for IDLE preferences',
+                 text=help_common+help_pages.get(page, ''))
 
-        # track changes to the canvas and frame width and sync them,
-        # also updating the scrollbar
-        def _configure_interior(event):
-            # update the scrollbars to match the size of the inner frame
-            size = (interior.winfo_reqwidth(), interior.winfo_reqheight())
-            canvas.config(scrollregion="0 0 %s %s" % size)
-            if interior.winfo_reqwidth() != canvas.winfo_width():
-                # update the canvas's width to fit the inner frame
-                canvas.config(width=interior.winfo_reqwidth())
-        interior.bind('<Configure>', _configure_interior)
+    def CreatePageExtensions(self):
+        """Part of the config dialog used for configuring IDLE extensions.
 
-        def _configure_canvas(event):
-            if interior.winfo_reqwidth() != canvas.winfo_width():
-                # update the inner frame's width to fill the canvas
-                canvas.itemconfigure(interior_id, width=canvas.winfo_width())
-        canvas.bind('<Configure>', _configure_canvas)
+        This code is generic - it works for any and all IDLE extensions.
 
-        return
+        IDLE extensions save their configuration options using idleConf.
+        This code reads the current configuration using idleConf, supplies a
+        GUI interface to change the configuration values, and saves the
+        changes using idleConf.
 
-def is_int(s):
-    "Return 's is blank or represents an int'"
-    if not s:
-        return True
-    try:
-        int(s)
-        return True
-    except ValueError:
-        return False
-
-# TODO:
-# * Revert to default(s)? Per option or per extension?
-# * List options in their original order (possible??)
-class ConfigExtensionsDialog(Toplevel):
-    """A dialog for configuring IDLE extensions.
-
-    This dialog is generic - it works for any and all IDLE extensions.
-
-    IDLE extensions save their configuration options using idleConf.
-    ConfigExtensionsDialog reads the current configuration using idleConf,
-    supplies a GUI interface to change the configuration values, and saves the
-    changes using idleConf.
-
-    Not all changes take effect immediately - some may require restarting IDLE.
-    This depends on each extension's implementation.
-
-    All values are treated as text, and it is up to the user to supply
-    reasonable values. The only exception to this are the 'enable*' options,
-    which are boolean, and can be toggled with an True/False button.
-    """
-    def __init__(self, parent, title=None, _htest=False):
-        Toplevel.__init__(self, parent)
-        self.wm_withdraw()
-
-        self.configure(borderwidth=5)
-        self.geometry(
-                "+%d+%d" % (parent.winfo_rootx() + 20,
-                parent.winfo_rooty() + (30 if not _htest else 150)))
-        self.wm_title(title or 'IDLE Extensions Configuration')
+        Not all changes take effect immediately - some may require restarting IDLE.
+        This depends on each extension's implementation.
 
-        self.defaultCfg = idleConf.defaultCfg['extensions']
-        self.userCfg = idleConf.userCfg['extensions']
+        All values are treated as text, and it is up to the user to supply
+        reasonable values. The only exception to this are the 'enable*' options,
+        which are boolean, and can be toggled with an True/False button.
+        """
+        parent = self.parent
+        frame = self.tabPages.pages['Extensions'].frame
+        self.ext_defaultCfg = idleConf.defaultCfg['extensions']
+        self.ext_userCfg = idleConf.userCfg['extensions']
         self.is_int = self.register(is_int)
         self.load_extensions()
-        self.create_widgets()
-
-        self.resizable(height=FALSE, width=FALSE) # don't allow resizing yet
-        self.transient(parent)
-        self.protocol("WM_DELETE_WINDOW", self.Cancel)
-        self.tabbed_page_set.focus_set()
-        # wait for window to be generated
-        self.update()
-        # set current width as the minimum width
-        self.wm_minsize(self.winfo_width(), 1)
-        # now allow resizing
-        self.resizable(height=TRUE, width=TRUE)
-
-        self.wm_deiconify()
-        if not _htest:
-            self.grab_set()
-            self.wait_window()
+        # create widgets - a listbox shows all available extensions, with the
+        # controls for the extension selected in the listbox to the right
+        self.extension_names = StringVar(self)
+        frame.rowconfigure(0, weight=1)
+        frame.columnconfigure(2, weight=1)
+        self.extension_list = Listbox(frame, listvariable=self.extension_names,
+                                      selectmode='browse')
+        self.extension_list.bind('<<ListboxSelect>>', self.extension_selected)
+        scroll = Scrollbar(frame, command=self.extension_list.yview)
+        self.extension_list.yscrollcommand=scroll.set
+        self.details_frame = LabelFrame(frame, width=250, height=250)
+        self.extension_list.grid(column=0, row=0, sticky='nws')
+        scroll.grid(column=1, row=0, sticky='ns')
+        self.details_frame.grid(column=2, row=0, sticky='nsew', padx=[10, 0])
+        frame.configure(padx=10, pady=10)
+        self.config_frame = {}
+        self.current_extension = None
+
+        self.outerframe = self                      # TEMPORARY
+        self.tabbed_page_set = self.extension_list  # TEMPORARY
+
+        # create the frame holding controls for each extension
+        ext_names = ''
+        for ext_name in sorted(self.extensions):
+            self.create_extension_frame(ext_name)
+            ext_names = ext_names + '{' + ext_name + '} '
+        self.extension_names.set(ext_names)
+        self.extension_list.selection_set(0)
+        self.extension_selected(None)
 
     def load_extensions(self):
         "Fill self.extensions with data from the default and user configs."
@@ -1301,7 +1258,7 @@ class ConfigExtensionsDialog(Toplevel):
             self.extensions[ext_name] = []
 
         for ext_name in self.extensions:
-            opt_list = sorted(self.defaultCfg.GetOptionList(ext_name))
+            opt_list = sorted(self.ext_defaultCfg.GetOptionList(ext_name))
 
             # bring 'enable' options to the beginning of the list
             enables = [opt_name for opt_name in opt_list
@@ -1311,7 +1268,7 @@ class ConfigExtensionsDialog(Toplevel):
             opt_list = enables + opt_list
 
             for opt_name in opt_list:
-                def_str = self.defaultCfg.Get(
+                def_str = self.ext_defaultCfg.Get(
                         ext_name, opt_name, raw=True)
                 try:
                     def_obj = {'True':True, 'False':False}[def_str]
@@ -1324,7 +1281,7 @@ class ConfigExtensionsDialog(Toplevel):
                         def_obj = def_str
                         opt_type = None
                 try:
-                    value = self.userCfg.Get(
+                    value = self.ext_userCfg.Get(
                             ext_name, opt_name, type=opt_type, raw=True,
                             default=def_obj)
                 except ValueError:  # Need this until .Get fixed
@@ -1339,40 +1296,25 @@ class ConfigExtensionsDialog(Toplevel):
                                                   'var': var,
                                                  })
 
-    def create_widgets(self):
-        """Create the dialog's widgets."""
-        self.rowconfigure(0, weight=1)
-        self.rowconfigure(1, weight=0)
-        self.columnconfigure(0, weight=1)
-
-        # create the tabbed pages
-        self.tabbed_page_set = TabbedPageSet(
-                self, page_names=self.extensions.keys(),
-                n_rows=None, max_tabs_per_row=5,
-                page_class=TabbedPageSet.PageRemove)
-        self.tabbed_page_set.grid(row=0, column=0, sticky=NSEW)
-        for ext_name in self.extensions:
-            self.create_tab_page(ext_name)
-
-        self.create_action_buttons().grid(row=1)
-
-    create_action_buttons = ConfigDialog.create_action_buttons.im_func
-
-    def create_tab_page(self, ext_name):
-        """Create the page for an extension."""
-
-        page = LabelFrame(self.tabbed_page_set.pages[ext_name].frame,
-                          border=2, padx=2, relief=GROOVE,
-                          text=' %s ' % ext_name)
-        page.pack(fill=BOTH, expand=True, padx=12, pady=2)
-
-        # create the scrollable frame which will contain the entries
-        scrolled_frame = VerticalScrolledFrame(page, pady=2, height=250)
-        scrolled_frame.pack(side=BOTTOM, fill=BOTH, expand=TRUE)
-        entry_area = scrolled_frame.interior
-        entry_area.columnconfigure(0, weight=0)
-        entry_area.columnconfigure(1, weight=1)
-
+    def extension_selected(self, event):
+        newsel = self.extension_list.curselection()
+        if newsel:
+            newsel = self.extension_list.get(newsel)
+        if newsel is None or newsel != self.current_extension:
+            if self.current_extension:
+                self.details_frame.config(text='')
+                self.config_frame[self.current_extension].grid_forget()
+                self.current_extension = None
+        if newsel:
+            self.details_frame.config(text=newsel)
+            self.config_frame[newsel].grid(column=0, row=0, sticky='nsew')
+            self.current_extension = newsel
+
+    def create_extension_frame(self, ext_name):
+        """Create a frame holding the widgets to configure one extension"""
+        f = VerticalScrolledFrame(self.details_frame, height=250, width=250)
+        self.config_frame[ext_name] = f
+        entry_area = f.interior
         # create an entry for each configuration option
         for row, opt in enumerate(self.extensions[ext_name]):
             # create a row with a label and entry/checkbutton
@@ -1383,30 +1325,18 @@ class ConfigExtensionsDialog(Toplevel):
                 Checkbutton(entry_area, textvariable=var, variable=var,
                             onvalue='True', offvalue='False',
                             indicatoron=FALSE, selectcolor='', width=8
-                    ).grid(row=row, column=1, sticky=W, padx=7)
+                            ).grid(row=row, column=1, sticky=W, padx=7)
             elif opt['type'] == 'int':
                 Entry(entry_area, textvariable=var, validate='key',
-                    validatecommand=(self.is_int, '%P')
-                    ).grid(row=row, column=1, sticky=NSEW, padx=7)
+                      validatecommand=(self.is_int, '%P')
+                      ).grid(row=row, column=1, sticky=NSEW, padx=7)
 
             else:
                 Entry(entry_area, textvariable=var
-                    ).grid(row=row, column=1, sticky=NSEW, padx=7)
+                      ).grid(row=row, column=1, sticky=NSEW, padx=7)
         return
 
-
-    Ok = ConfigDialog.Ok.im_func
-
-    def Apply(self):
-        self.save_all_changed_configs()
-        pass
-
-    Cancel = ConfigDialog.Cancel.im_func
-
-    def Help(self):
-        pass
-
-    def set_user_value(self, section, opt):
+    def set_extension_value(self, section, opt):
         name = opt['name']
         default = opt['default']
         value = opt['var'].get().strip() or default
@@ -1414,20 +1344,92 @@ class ConfigExtensionsDialog(Toplevel):
         # if self.defaultCfg.has_section(section):
         # Currently, always true; if not, indent to return
         if (value == default):
-            return self.userCfg.RemoveOption(section, name)
+            return self.ext_userCfg.RemoveOption(section, name)
         # set the option
-        return self.userCfg.SetOption(section, name, value)
+        return self.ext_userCfg.SetOption(section, name, value)
 
-    def save_all_changed_configs(self):
+    def save_all_changed_extensions(self):
         """Save configuration changes to the user config file."""
         has_changes = False
         for ext_name in self.extensions:
             options = self.extensions[ext_name]
             for opt in options:
-                if self.set_user_value(ext_name, opt):
+                if self.set_extension_value(ext_name, opt):
                     has_changes = True
         if has_changes:
-            self.userCfg.Save()
+            self.ext_userCfg.Save()
+
+
+help_common = '''\
+When you click either the Apply or Ok buttons, settings in this
+dialog that are different from IDLE's default are saved in
+a .idlerc directory in your home directory. Except as noted,
+these changes apply to all versions of IDLE installed on this
+machine. Some do not take affect until IDLE is restarted.
+[Cancel] only cancels changes made since the last save.
+'''
+help_pages = {
+    'Highlighting':'''
+Highlighting:
+The IDLE Dark color theme is new in October 2015.  It can only
+be used with older IDLE releases if it is saved as a custom
+theme, with a different name.
+'''
+}
+
+
+def is_int(s):
+    "Return 's is blank or represents an int'"
+    if not s:
+        return True
+    try:
+        int(s)
+        return True
+    except ValueError:
+        return False
+
+
+class VerticalScrolledFrame(Frame):
+    """A pure Tkinter vertically scrollable frame.
+
+    * Use the 'interior' attribute to place widgets inside the scrollable frame
+    * Construct and pack/place/grid normally
+    * This frame only allows vertical scrolling
+    """
+    def __init__(self, parent, *args, **kw):
+        Frame.__init__(self, parent, *args, **kw)
+
+        # create a canvas object and a vertical scrollbar for scrolling it
+        vscrollbar = Scrollbar(self, orient=VERTICAL)
+        vscrollbar.pack(fill=Y, side=RIGHT, expand=FALSE)
+        canvas = Canvas(self, bd=0, highlightthickness=0,
+                        yscrollcommand=vscrollbar.set, width=240)
+        canvas.pack(side=LEFT, fill=BOTH, expand=TRUE)
+        vscrollbar.config(command=canvas.yview)
+
+        # reset the view
+        canvas.xview_moveto(0)
+        canvas.yview_moveto(0)
+
+        # create a frame inside the canvas which will be scrolled with it
+        self.interior = interior = Frame(canvas)
+        interior_id = canvas.create_window(0, 0, window=interior, anchor=NW)
+
+        # track changes to the canvas and frame width and sync them,
+        # also updating the scrollbar
+        def _configure_interior(event):
+            # update the scrollbars to match the size of the inner frame
+            size = (interior.winfo_reqwidth(), interior.winfo_reqheight())
+            canvas.config(scrollregion="0 0 %s %s" % size)
+        interior.bind('<Configure>', _configure_interior)
+
+        def _configure_canvas(event):
+            if interior.winfo_reqwidth() != canvas.winfo_width():
+                # update the inner frame's width to fill the canvas
+                canvas.itemconfigure(interior_id, width=canvas.winfo_width())
+        canvas.bind('<Configure>', _configure_canvas)
+
+        return
 
 
 if __name__ == '__main__':
@@ -1435,4 +1437,4 @@ if __name__ == '__main__':
     unittest.main('idlelib.idle_test.test_configdialog',
                   verbosity=2, exit=False)
     from idlelib.idle_test.htest import run
-    run(ConfigDialog, ConfigExtensionsDialog)
+    run(ConfigDialog)
index 646660a0f4651c0f958665bff879db06b82438f6..efd5f3ce4f7d16ce2e4213da538f2311ab63c0c1 100644 (file)
@@ -23,6 +23,8 @@ import os
 import sys
 
 from ConfigParser import ConfigParser
+from Tkinter import TkVersion
+from tkFont import Font, nametofont
 
 class InvalidConfigType(Exception): pass
 class InvalidConfigSet(Exception): pass
@@ -371,8 +373,32 @@ class IdleConf:
         return theme
 
     def CurrentTheme(self):
-        "Return the name of the currently active theme."
-        return self.GetOption('main', 'Theme', 'name', default='')
+        """Return the name of the currently active text color theme.
+
+        idlelib.config-main.def includes this section
+        [Theme]
+        default= 1
+        name= IDLE Classic
+        name2=
+        # name2 set in user config-main.cfg for themes added after 2015 Oct 1
+
+        Item name2 is needed because setting name to a new builtin
+        causes older IDLEs to display multiple error messages or quit.
+        See https://bugs.python.org/issue25313.
+        When default = True, name2 takes precedence over name,
+        while older IDLEs will just use name.
+        """
+        default = self.GetOption('main', 'Theme', 'default',
+                                 type='bool', default=True)
+        if default:
+            theme = self.GetOption('main', 'Theme', 'name2', default='')
+        if default and not theme or not default:
+            theme = self.GetOption('main', 'Theme', 'name', default='')
+        source = self.defaultCfg if default else self.userCfg
+        if source['highlight'].has_section(theme):
+            return theme
+        else:
+            return "IDLE Classic"
 
     def CurrentKeys(self):
         "Return the name of the currently active key set."
@@ -671,6 +697,35 @@ class IdleConf:
                 self.GetExtraHelpSourceList('user') )
         return allHelpSources
 
+    def GetFont(self, root, configType, section):
+        """Retrieve a font from configuration (font, font-size, font-bold)
+        Intercept the special value 'TkFixedFont' and substitute
+        the actual font, factoring in some tweaks if needed for
+        appearance sakes.
+
+        The 'root' parameter can normally be any valid Tkinter widget.
+
+        Return a tuple (family, size, weight) suitable for passing
+        to tkinter.Font
+        """
+        family = self.GetOption(configType, section, 'font', default='courier')
+        size = self.GetOption(configType, section, 'font-size', type='int',
+                              default='10')
+        bold = self.GetOption(configType, section, 'font-bold', default=0,
+                              type='bool')
+        if (family == 'TkFixedFont'):
+            if TkVersion < 8.5:
+                family = 'Courier'
+            else:
+                f = Font(name='TkFixedFont', exists=True, root=root)
+                actualFont = Font.actual(f)
+                family = actualFont['family']
+                size = actualFont['size']
+                if size < 0:
+                    size = 10  # if font in pixels, ignore actual size
+                bold = actualFont['weight']=='bold'
+        return (family, size, 'bold' if bold else 'normal')
+
     def LoadCfgFiles(self):
         "Load all configuration files."
         for key in self.defaultCfg:
diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html
new file mode 100644 (file)
index 0000000..9e0eba0
--- /dev/null
@@ -0,0 +1,709 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+    <title>24.6. IDLE &mdash; Python 2.7.10 documentation</title>
+
+    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.7.10',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <script type="text/javascript" src="../_static/sidebar.js"></script>
+    <link rel="search" type="application/opensearchdescription+xml"
+          title="Search within Python 2.7.10 documentation"
+          href="../_static/opensearch.xml"/>
+    <link rel="author" title="About these documents" href="../about.html" />
+    <link rel="copyright" title="Copyright" href="../copyright.html" />
+    <link rel="top" title="Python 2.7.10 documentation" href="../index.html" />
+    <link rel="up" title="24. Graphical User Interfaces with Tk" href="tk.html" />
+    <link rel="next" title="24.7. Other Graphical User Interface Packages" href="othergui.html" />
+    <link rel="prev" title="24.5. turtle — Turtle graphics for Tk" href="turtle.html" />
+    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
+    <script type="text/javascript" src="../_static/copybutton.js"></script>
+
+
+
+
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="othergui.html" title="24.7. Other Graphical User Interface Packages"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="turtle.html" title="24.5. turtle — Turtle graphics for Tk"
+             accesskey="P">previous</a> |</li>
+        <li><img src="../_static/py.png" alt=""
+                 style="vertical-align: middle; margin-top: -1px"/></li>
+        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
+        <li>
+          <a href="../index.html">Python 2.7.10 documentation</a> &raquo;
+        </li>
+
+          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
+          <li><a href="tk.html" accesskey="U">24. Graphical User Interfaces with Tk</a> &raquo;</li>
+      </ul>
+    </div>
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+
+  <div class="section" id="idle">
+<span id="id1"></span><h1>24.6. IDLE<a class="headerlink" href="#idle" title="Permalink to this headline">¶</a></h1>
+<p id="index-0">IDLE is Python&#8217;s Integrated Development and Learning Environment.</p>
+<p>IDLE has the following features:</p>
+<ul class="simple">
+<li>coded in 100% pure Python, using the <tt class="xref py py-mod docutils literal"><span class="pre">tkinter</span></tt> GUI toolkit</li>
+<li>cross-platform: works mostly the same on Windows, Unix, and Mac OS X</li>
+<li>Python shell window (interactive interpreter) with colorizing
+of code input, output, and error messages</li>
+<li>multi-window text editor with multiple undo, Python colorizing,
+smart indent, call tips, auto completion, and other features</li>
+<li>search within any window, replace within editor windows, and search
+through multiple files (grep)</li>
+<li>debugger with persistent breakpoints, stepping, and viewing
+of global and local namespaces</li>
+<li>configuration, browsers, and other dialogs</li>
+</ul>
+<div class="section" id="menus">
+<h2>24.6.1. Menus<a class="headerlink" href="#menus" title="Permalink to this headline">¶</a></h2>
+<p>IDLE has two main window types, the Shell window and the Editor window.  It is
+possible to have multiple editor windows simultaneously.  Output windows, such
+as used for Edit / Find in Files, are a subtype of edit window.  They currently
+have the same top menu as Editor windows but a different default title and
+context menu.</p>
+<p>IDLE&#8217;s menus dynamically change based on which window is currently selected.
+Each menu documented below indicates which window type it is associated with.</p>
+<div class="section" id="file-menu-shell-and-editor">
+<h3>24.6.1.1. File menu (Shell and Editor)<a class="headerlink" href="#file-menu-shell-and-editor" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>New File</dt>
+<dd>Create a new file editing window.</dd>
+<dt>Open...</dt>
+<dd>Open an existing file with an Open dialog.</dd>
+<dt>Recent Files</dt>
+<dd>Open a list of recent files.  Click one to open it.</dd>
+<dt>Open Module...</dt>
+<dd>Open an existing module (searches sys.path).</dd>
+</dl>
+<dl class="docutils" id="index-1">
+<dt>Class Browser</dt>
+<dd>Show functions, classes, and methods in the current Editor file in a
+tree structure.  In the shell, open a module first.</dd>
+<dt>Path Browser</dt>
+<dd>Show sys.path directories, modules, functions, classes and methods in a
+tree structure.</dd>
+<dt>Save</dt>
+<dd>Save the current window to the associated file, if there is one.  Windows
+that have been changed since being opened or last saved have a * before
+and after the window title.  If there is no associated file,
+do Save As instead.</dd>
+<dt>Save As...</dt>
+<dd>Save the current window with a Save As dialog.  The file saved becomes the
+new associated file for the window.</dd>
+<dt>Save Copy As...</dt>
+<dd>Save the current window to different file without changing the associated
+file.</dd>
+<dt>Print Window</dt>
+<dd>Print the current window to the default printer.</dd>
+<dt>Close</dt>
+<dd>Close the current window (ask to save if unsaved).</dd>
+<dt>Exit</dt>
+<dd>Close all windows and quit IDLE (ask to save unsaved windows).</dd>
+</dl>
+</div>
+<div class="section" id="edit-menu-shell-and-editor">
+<h3>24.6.1.2. Edit menu (Shell and Editor)<a class="headerlink" href="#edit-menu-shell-and-editor" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>Undo</dt>
+<dd>Undo the last change to the current window.  A maximum of 1000 changes may
+be undone.</dd>
+<dt>Redo</dt>
+<dd>Redo the last undone change to the current window.</dd>
+<dt>Cut</dt>
+<dd>Copy selection into the system-wide clipboard; then delete the selection.</dd>
+<dt>Copy</dt>
+<dd>Copy selection into the system-wide clipboard.</dd>
+<dt>Paste</dt>
+<dd>Insert contents of the system-wide clipboard into the current window.</dd>
+</dl>
+<p>The clipboard functions are also available in context menus.</p>
+<dl class="docutils">
+<dt>Select All</dt>
+<dd>Select the entire contents of the current window.</dd>
+<dt>Find...</dt>
+<dd>Open a search dialog with many options</dd>
+<dt>Find Again</dt>
+<dd>Repeat the last search, if there is one.</dd>
+<dt>Find Selection</dt>
+<dd>Search for the currently selected string, if there is one.</dd>
+<dt>Find in Files...</dt>
+<dd>Open a file search dialog.  Put results in an new output window.</dd>
+<dt>Replace...</dt>
+<dd>Open a search-and-replace dialog.</dd>
+<dt>Go to Line</dt>
+<dd>Move cursor to the line number requested and make that line visible.</dd>
+<dt>Show Completions</dt>
+<dd>Open a scrollable list allowing selection of keywords and attributes. See
+Completions in the Tips sections below.</dd>
+<dt>Expand Word</dt>
+<dd>Expand a prefix you have typed to match a full word in the same window;
+repeat to get a different expansion.</dd>
+<dt>Show call tip</dt>
+<dd>After an unclosed parenthesis for a function, open a small window with
+function parameter hints.</dd>
+<dt>Show surrounding parens</dt>
+<dd>Highlight the surrounding parenthesis.</dd>
+</dl>
+</div>
+<div class="section" id="format-menu-editor-window-only">
+<h3>24.6.1.3. Format menu (Editor window only)<a class="headerlink" href="#format-menu-editor-window-only" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>Indent Region</dt>
+<dd>Shift selected lines right by the indent width (default 4 spaces).</dd>
+<dt>Dedent Region</dt>
+<dd>Shift selected lines left by the indent width (default 4 spaces).</dd>
+<dt>Comment Out Region</dt>
+<dd>Insert ## in front of selected lines.</dd>
+<dt>Uncomment Region</dt>
+<dd>Remove leading # or ## from selected lines.</dd>
+<dt>Tabify Region</dt>
+<dd>Turn <em>leading</em> stretches of spaces into tabs. (Note: We recommend using
+4 space blocks to indent Python code.)</dd>
+<dt>Untabify Region</dt>
+<dd>Turn <em>all</em> tabs into the correct number of spaces.</dd>
+<dt>Toggle Tabs</dt>
+<dd>Open a dialog to switch between indenting with spaces and tabs.</dd>
+<dt>New Indent Width</dt>
+<dd>Open a dialog to change indent width. The accepted default by the Python
+community is 4 spaces.</dd>
+<dt>Format Paragraph</dt>
+<dd>Reformat the current blank-line-delimited paragraph in comment block or
+multiline string or selected line in a string.  All lines in the
+paragraph will be formatted to less than N columns, where N defaults to 72.</dd>
+<dt>Strip trailing whitespace</dt>
+<dd>Remove any space characters after the last non-space character of a line.</dd>
+</dl>
+</div>
+<div class="section" id="run-menu-editor-window-only">
+<span id="index-2"></span><h3>24.6.1.4. Run menu (Editor window only)<a class="headerlink" href="#run-menu-editor-window-only" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>Python Shell</dt>
+<dd>Open or wake up the Python Shell window.</dd>
+<dt>Check Module</dt>
+<dd>Check the syntax of the module currently open in the Editor window. If the
+module has not been saved IDLE will either prompt the user to save or
+autosave, as selected in the General tab of the Idle Settings dialog.  If
+there is a syntax error, the approximate location is indicated in the
+Editor window.</dd>
+<dt>Run Module</dt>
+<dd>Do Check Module (above).  If no error, restart the shell to clean the
+environment, then execute the module.  Output is displayed in the Shell
+window.  Note that output requires use of <tt class="docutils literal"><span class="pre">print</span></tt> or <tt class="docutils literal"><span class="pre">write</span></tt>.
+When execution is complete, the Shell retains focus and displays a prompt.
+At this point, one may interactively explore the result of execution.
+This is similar to executing a file with <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-i</span> <span class="pre">file</span></tt> at a command
+line.</dd>
+</dl>
+</div>
+<div class="section" id="shell-menu-shell-window-only">
+<h3>24.6.1.5. Shell menu (Shell window only)<a class="headerlink" href="#shell-menu-shell-window-only" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>View Last Restart</dt>
+<dd>Scroll the shell window to the last Shell restart.</dd>
+<dt>Restart Shell</dt>
+<dd>Restart the shell to clean the environment.</dd>
+</dl>
+</div>
+<div class="section" id="debug-menu-shell-window-only">
+<h3>24.6.1.6. Debug menu (Shell window only)<a class="headerlink" href="#debug-menu-shell-window-only" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>Go to File/Line</dt>
+<dd>Look on the current line. with the cursor, and the line above for a filename
+and line number.  If found, open the file if not already open, and show the
+line.  Use this to view source lines referenced in an exception traceback
+and lines found by Find in Files. Also available in the context menu of
+the Shell window and Output windows.</dd>
+</dl>
+<dl class="docutils" id="index-3">
+<dt>Debugger (toggle)</dt>
+<dd>When actived, code entered in the Shell or run from an Editor will run
+under the debugger.  In the Editor, breakpoints can be set with the context
+menu.  This feature is still incomplete and somewhat experimental.</dd>
+<dt>Stack Viewer</dt>
+<dd>Show the stack traceback of the last exception in a tree widget, with
+access to locals and globals.</dd>
+<dt>Auto-open Stack Viewer</dt>
+<dd>Toggle automatically opening the stack viewer on an unhandled exception.</dd>
+</dl>
+</div>
+<div class="section" id="options-menu-shell-and-editor">
+<h3>24.6.1.7. Options menu (Shell and Editor)<a class="headerlink" href="#options-menu-shell-and-editor" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>Configure IDLE</dt>
+<dd><p class="first">Open a configuration dialog and change preferences for the following:
+fonts, indentation, keybindings, text color themes, startup windows and
+size, additional help sources, and extensions (see below).  On OS X,
+open the configuration dialog by selecting Preferences in the application
+menu.  To use a new built-in color theme (IDLE Dark) with older IDLEs,
+save it as a new custom theme.</p>
+<p class="last">Non-default user settings are saved in a .idlerc directory in the user&#8217;s
+home directory.  Problems caused by bad user configuration files are solved
+by editing or deleting one or more of the files in .idlerc.</p>
+</dd>
+<dt>Code Context (toggle)(Editor Window only)</dt>
+<dd>Open a pane at the top of the edit window which shows the block context
+of the code which has scrolled above the top of the window.</dd>
+</dl>
+</div>
+<div class="section" id="window-menu-shell-and-editor">
+<h3>24.6.1.8. Window menu (Shell and Editor)<a class="headerlink" href="#window-menu-shell-and-editor" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>Zoom Height</dt>
+<dd>Toggles the window between normal size and maximum height. The initial size
+defaults to 40 lines by 80 chars unless changed on the General tab of the
+Configure IDLE dialog.</dd>
+</dl>
+<p>The rest of this menu lists the names of all open windows; select one to bring
+it to the foreground (deiconifying it if necessary).</p>
+</div>
+<div class="section" id="help-menu-shell-and-editor">
+<h3>24.6.1.9. Help menu (Shell and Editor)<a class="headerlink" href="#help-menu-shell-and-editor" title="Permalink to this headline">¶</a></h3>
+<dl class="docutils">
+<dt>About IDLE</dt>
+<dd>Display version, copyright, license, credits, and more.</dd>
+<dt>IDLE Help</dt>
+<dd>Display a help file for IDLE detailing the menu options, basic editing and
+navigation, and other tips.</dd>
+<dt>Python Docs</dt>
+<dd>Access local Python documentation, if installed, or start a web browser
+and open docs.python.org showing the latest Python documentation.</dd>
+<dt>Turtle Demo</dt>
+<dd>Run the turtledemo module with example python code and turtle drawings.</dd>
+</dl>
+<p>Additional help sources may be added here with the Configure IDLE dialog under
+the General tab.</p>
+</div>
+<div class="section" id="context-menus">
+<span id="index-4"></span><h3>24.6.1.10. Context Menus<a class="headerlink" href="#context-menus" title="Permalink to this headline">¶</a></h3>
+<p>Open a context menu by right-clicking in a window (Control-click on OS X).
+Context menus have the standard clipboard functions also on the Edit menu.</p>
+<dl class="docutils">
+<dt>Cut</dt>
+<dd>Copy selection into the system-wide clipboard; then delete the selection.</dd>
+<dt>Copy</dt>
+<dd>Copy selection into the system-wide clipboard.</dd>
+<dt>Paste</dt>
+<dd>Insert contents of the system-wide clipboard into the current window.</dd>
+</dl>
+<p>Editor windows also have breakpoint functions.  Lines with a breakpoint set are
+specially marked.  Breakpoints only have an effect when running under the
+debugger.  Breakpoints for a file are saved in the user&#8217;s .idlerc directory.</p>
+<dl class="docutils">
+<dt>Set Breakpoint</dt>
+<dd>Set a breakpoint on the current line.</dd>
+<dt>Clear Breakpoint</dt>
+<dd>Clear the breakpoint on that line.</dd>
+</dl>
+<p>Shell and Output windows have the following.</p>
+<dl class="docutils">
+<dt>Go to file/line</dt>
+<dd>Same as in Debug menu.</dd>
+</dl>
+</div>
+</div>
+<div class="section" id="editing-and-navigation">
+<h2>24.6.2. Editing and navigation<a class="headerlink" href="#editing-and-navigation" title="Permalink to this headline">¶</a></h2>
+<p>In this section, &#8216;C&#8217; refers to the <tt class="kbd docutils literal"><span class="pre">Control</span></tt> key on Windows and Unix and
+the <tt class="kbd docutils literal"><span class="pre">Command</span></tt> key on Mac OSX.</p>
+<ul>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">Backspace</span></tt> deletes to the left; <tt class="kbd docutils literal"><span class="pre">Del</span></tt> deletes to the right</p>
+</li>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-Backspace</span></tt> delete word left; <tt class="kbd docutils literal"><span class="pre">C-Del</span></tt> delete word to the right</p>
+</li>
+<li><p class="first">Arrow keys and <tt class="kbd docutils literal"><span class="pre">Page</span> <span class="pre">Up</span></tt>/<tt class="kbd docutils literal"><span class="pre">Page</span> <span class="pre">Down</span></tt> to move around</p>
+</li>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-LeftArrow</span></tt> and <tt class="kbd docutils literal"><span class="pre">C-RightArrow</span></tt> moves by words</p>
+</li>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">Home</span></tt>/<tt class="kbd docutils literal"><span class="pre">End</span></tt> go to begin/end of line</p>
+</li>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-Home</span></tt>/<tt class="kbd docutils literal"><span class="pre">C-End</span></tt> go to begin/end of file</p>
+</li>
+<li><p class="first">Some useful Emacs bindings are inherited from Tcl/Tk:</p>
+<blockquote>
+<div><ul class="simple">
+<li><tt class="kbd docutils literal"><span class="pre">C-a</span></tt> beginning of line</li>
+<li><tt class="kbd docutils literal"><span class="pre">C-e</span></tt> end of line</li>
+<li><tt class="kbd docutils literal"><span class="pre">C-k</span></tt> kill line (but doesn&#8217;t put it in clipboard)</li>
+<li><tt class="kbd docutils literal"><span class="pre">C-l</span></tt> center window around the insertion point</li>
+<li><tt class="kbd docutils literal"><span class="pre">C-b</span></tt> go backwards one character without deleting (usually you can
+also use the cursor key for this)</li>
+<li><tt class="kbd docutils literal"><span class="pre">C-f</span></tt> go forward one character without deleting (usually you can
+also use the cursor key for this)</li>
+<li><tt class="kbd docutils literal"><span class="pre">C-p</span></tt> go up one line (usually you can also use the cursor key for
+this)</li>
+<li><tt class="kbd docutils literal"><span class="pre">C-d</span></tt> delete next character</li>
+</ul>
+</div></blockquote>
+</li>
+</ul>
+<p>Standard keybindings (like <tt class="kbd docutils literal"><span class="pre">C-c</span></tt> to copy and <tt class="kbd docutils literal"><span class="pre">C-v</span></tt> to paste)
+may work.  Keybindings are selected in the Configure IDLE dialog.</p>
+<div class="section" id="automatic-indentation">
+<h3>24.6.2.1. Automatic indentation<a class="headerlink" href="#automatic-indentation" title="Permalink to this headline">¶</a></h3>
+<p>After a block-opening statement, the next line is indented by 4 spaces (in the
+Python Shell window by one tab).  After certain keywords (break, return etc.)
+the next line is dedented.  In leading indentation, <tt class="kbd docutils literal"><span class="pre">Backspace</span></tt> deletes up
+to 4 spaces if they are there. <tt class="kbd docutils literal"><span class="pre">Tab</span></tt> inserts spaces (in the Python
+Shell window one tab), number depends on Indent width. Currently tabs
+are restricted to four spaces due to Tcl/Tk limitations.</p>
+<p>See also the indent/dedent region commands in the edit menu.</p>
+</div>
+<div class="section" id="completions">
+<h3>24.6.2.2. Completions<a class="headerlink" href="#completions" title="Permalink to this headline">¶</a></h3>
+<p>Completions are supplied for functions, classes, and attributes of classes,
+both built-in and user-defined. Completions are also provided for
+filenames.</p>
+<p>The AutoCompleteWindow (ACW) will open after a predefined delay (default is
+two seconds) after a &#8216;.&#8217; or (in a string) an os.sep is typed. If after one
+of those characters (plus zero or more other characters) a tab is typed
+the ACW will open immediately if a possible continuation is found.</p>
+<p>If there is only one possible completion for the characters entered, a
+<tt class="kbd docutils literal"><span class="pre">Tab</span></tt> will supply that completion without opening the ACW.</p>
+<p>&#8216;Show Completions&#8217; will force open a completions window, by default the
+<tt class="kbd docutils literal"><span class="pre">C-space</span></tt> will open a completions window. In an empty
+string, this will contain the files in the current directory. On a
+blank line, it will contain the built-in and user-defined functions and
+classes in the current name spaces, plus any modules imported. If some
+characters have been entered, the ACW will attempt to be more specific.</p>
+<p>If a string of characters is typed, the ACW selection will jump to the
+entry most closely matching those characters.  Entering a <tt class="kbd docutils literal"><span class="pre">tab</span></tt> will
+cause the longest non-ambiguous match to be entered in the Editor window or
+Shell.  Two <tt class="kbd docutils literal"><span class="pre">tab</span></tt> in a row will supply the current ACW selection, as
+will return or a double click.  Cursor keys, Page Up/Down, mouse selection,
+and the scroll wheel all operate on the ACW.</p>
+<p>&#8220;Hidden&#8221; attributes can be accessed by typing the beginning of hidden
+name after a &#8216;.&#8217;, e.g. &#8216;_&#8217;. This allows access to modules with
+<tt class="docutils literal"><span class="pre">__all__</span></tt> set, or to class-private attributes.</p>
+<p>Completions and the &#8216;Expand Word&#8217; facility can save a lot of typing!</p>
+<p>Completions are currently limited to those in the namespaces. Names in
+an Editor window which are not via <tt class="docutils literal"><span class="pre">__main__</span></tt> and <a class="reference internal" href="sys.html#sys.modules" title="sys.modules"><tt class="xref py py-data docutils literal"><span class="pre">sys.modules</span></tt></a> will
+not be found.  Run the module once with your imports to correct this situation.
+Note that IDLE itself places quite a few modules in sys.modules, so
+much can be found by default, e.g. the re module.</p>
+<p>If you don&#8217;t like the ACW popping up unbidden, simply make the delay
+longer or disable the extension.</p>
+</div>
+<div class="section" id="calltips">
+<h3>24.6.2.3. Calltips<a class="headerlink" href="#calltips" title="Permalink to this headline">¶</a></h3>
+<p>A calltip is shown when one types <tt class="kbd docutils literal"><span class="pre">(</span></tt> after the name of an <em>acccessible</em>
+function.  A name expression may include dots and subscripts.  A calltip
+remains until it is clicked, the cursor is moved out of the argument area,
+or <tt class="kbd docutils literal"><span class="pre">)</span></tt> is typed.  When the cursor is in the argument part of a definition,
+the menu or shortcut display a calltip.</p>
+<p>A calltip consists of the function signature and the first line of the
+docstring.  For builtins without an accessible signature, the calltip
+consists of all lines up the fifth line or the first blank line.  These
+details may change.</p>
+<p>The set of <em>accessible</em> functions depends on what modules have been imported
+into the user process, including those imported by Idle itself,
+and what definitions have been run, all since the last restart.</p>
+<p>For example, restart the Shell and enter <tt class="docutils literal"><span class="pre">itertools.count(</span></tt>.  A calltip
+appears because Idle imports itertools into the user process for its own use.
+(This could change.)  Enter <tt class="docutils literal"><span class="pre">turtle.write(</span></tt> and nothing appears.  Idle does
+not import turtle.  The menu or shortcut do nothing either.  Enter
+<tt class="docutils literal"><span class="pre">import</span> <span class="pre">turtle</span></tt> and then <tt class="docutils literal"><span class="pre">turtle.write(</span></tt> will work.</p>
+<p>In an editor, import statements have no effect until one runs the file.  One
+might want to run a file after writing the import statements at the top,
+or immediately run an existing file before editing.</p>
+</div>
+<div class="section" id="python-shell-window">
+<h3>24.6.2.4. Python Shell window<a class="headerlink" href="#python-shell-window" title="Permalink to this headline">¶</a></h3>
+<ul>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-c</span></tt> interrupts executing command</p>
+</li>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-d</span></tt> sends end-of-file; closes window if typed at a <tt class="docutils literal"><span class="pre">&gt;&gt;&gt;</span></tt> prompt</p>
+</li>
+<li><p class="first"><tt class="kbd docutils literal"><span class="pre">Alt-/</span></tt> (Expand word) is also useful to reduce typing</p>
+<p>Command history</p>
+<ul class="simple">
+<li><tt class="kbd docutils literal"><span class="pre">Alt-p</span></tt> retrieves previous command matching what you have typed. On
+OS X use <tt class="kbd docutils literal"><span class="pre">C-p</span></tt>.</li>
+<li><tt class="kbd docutils literal"><span class="pre">Alt-n</span></tt> retrieves next. On OS X use <tt class="kbd docutils literal"><span class="pre">C-n</span></tt>.</li>
+<li><tt class="kbd docutils literal"><span class="pre">Return</span></tt> while on any previous command retrieves that command</li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="section" id="text-colors">
+<h3>24.6.2.5. Text colors<a class="headerlink" href="#text-colors" title="Permalink to this headline">¶</a></h3>
+<p>Idle defaults to black on white text, but colors text with special meanings.
+For the shell, these are shell output, shell error, user output, and
+user error.  For Python code, at the shell prompt or in an editor, these are
+keywords, builtin class and function names, names following <tt class="docutils literal"><span class="pre">class</span></tt> and
+<tt class="docutils literal"><span class="pre">def</span></tt>, strings, and comments. For any text window, these are the cursor (when
+present), found text (when possible), and selected text.</p>
+<p>Text coloring is done in the background, so uncolorized text is occasionally
+visible.  To change the color scheme, use the Configure IDLE dialog
+Highlighting tab.  The marking of debugger breakpoint lines in the editor and
+text in popups and dialogs is not user-configurable.</p>
+</div>
+</div>
+<div class="section" id="startup-and-code-execution">
+<h2>24.6.3. Startup and code execution<a class="headerlink" href="#startup-and-code-execution" title="Permalink to this headline">¶</a></h2>
+<p>Upon startup with the <tt class="docutils literal"><span class="pre">-s</span></tt> option, IDLE will execute the file referenced by
+the environment variables <span class="target" id="index-5"></span><tt class="xref std std-envvar docutils literal"><span class="pre">IDLESTARTUP</span></tt> or <span class="target" id="index-6"></span><a class="reference internal" href="../using/cmdline.html#envvar-PYTHONSTARTUP"><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONSTARTUP</span></tt></a>.
+IDLE first checks for <tt class="docutils literal"><span class="pre">IDLESTARTUP</span></tt>; if <tt class="docutils literal"><span class="pre">IDLESTARTUP</span></tt> is present the file
+referenced is run.  If <tt class="docutils literal"><span class="pre">IDLESTARTUP</span></tt> is not present, IDLE checks for
+<tt class="docutils literal"><span class="pre">PYTHONSTARTUP</span></tt>.  Files referenced by these environment variables are
+convenient places to store functions that are used frequently from the IDLE
+shell, or for executing import statements to import common modules.</p>
+<p>In addition, <tt class="docutils literal"><span class="pre">Tk</span></tt> also loads a startup file if it is present.  Note that the
+Tk file is loaded unconditionally.  This additional file is <tt class="docutils literal"><span class="pre">.Idle.py</span></tt> and is
+looked for in the user&#8217;s home directory.  Statements in this file will be
+executed in the Tk namespace, so this file is not useful for importing
+functions to be used from IDLE&#8217;s Python shell.</p>
+<div class="section" id="command-line-usage">
+<h3>24.6.3.1. Command line usage<a class="headerlink" href="#command-line-usage" title="Permalink to this headline">¶</a></h3>
+<div class="highlight-python"><div class="highlight"><pre>idle.py [-c command] [-d] [-e] [-h] [-i] [-r file] [-s] [-t title] [-] [arg] ...
+
+-c command  run command in the shell window
+-d          enable debugger and open shell window
+-e          open editor window
+-h          print help message with legal combinatios and exit
+-i          open shell window
+-r file     run file in shell window
+-s          run $IDLESTARTUP or $PYTHONSTARTUP first, in shell window
+-t title    set title of shell window
+-           run stdin in shell (- must be last option before args)
+</pre></div>
+</div>
+<p>If there are arguments:</p>
+<ul class="simple">
+<li>If <tt class="docutils literal"><span class="pre">-</span></tt>, <tt class="docutils literal"><span class="pre">-c</span></tt>, or <tt class="docutils literal"><span class="pre">r</span></tt> is used, all arguments are placed in
+<tt class="docutils literal"><span class="pre">sys.argv[1:...]</span></tt> and <tt class="docutils literal"><span class="pre">sys.argv[0]</span></tt> is set to <tt class="docutils literal"><span class="pre">''</span></tt>, <tt class="docutils literal"><span class="pre">'-c'</span></tt>,
+or <tt class="docutils literal"><span class="pre">'-r'</span></tt>.  No editor window is opened, even if that is the default
+set in the Options dialog.</li>
+<li>Otherwise, arguments are files opened for editing and
+<tt class="docutils literal"><span class="pre">sys.argv</span></tt> reflects the arguments passed to IDLE itself.</li>
+</ul>
+</div>
+<div class="section" id="idle-console-differences">
+<h3>24.6.3.2. IDLE-console differences<a class="headerlink" href="#idle-console-differences" title="Permalink to this headline">¶</a></h3>
+<p>As much as possible, the result of executing Python code with IDLE is the
+same as executing the same code in a console window.  However, the different
+interface and operation occasionally affects results.</p>
+<p>For instance, IDLE normally executes user code in a separate process from
+the IDLE GUI itself.  The IDLE versions of sys.stdin, .stdout, and .stderr in the
+execution process get input from and send output to the GUI process,
+which keeps control of the keyboard and screen.  This is normally transparent,
+but code that access these object will see different attribute values.
+Also, functions that directly access the keyboard and screen will not work.</p>
+<p>With IDLE&#8217;s Shell, one enters, edits, and recalls complete statements.
+Some consoles only work with a single physical line at a time.</p>
+</div>
+<div class="section" id="running-without-a-subprocess">
+<h3>24.6.3.3. Running without a subprocess<a class="headerlink" href="#running-without-a-subprocess" title="Permalink to this headline">¶</a></h3>
+<p>By default, IDLE executes user code in a separate subprocess via a socket,
+which uses the internal loopback interface.  This connection is not
+externally visible and no data is sent to or received from the Internet.
+If firewall software complains anyway, you can ignore it.</p>
+<p>If the attempt to make the socket connection fails, Idle will notify you.
+Such failures are sometimes transient, but if persistent, the problem
+may be either a firewall blocking the connecton or misconfiguration of
+a particular system.  Until the problem is fixed, one can run Idle with
+the -n command line switch.</p>
+<p>If IDLE is started with the -n command line switch it will run in a
+single process and will not create the subprocess which runs the RPC
+Python execution server.  This can be useful if Python cannot create
+the subprocess or the RPC socket interface on your platform.  However,
+in this mode user code is not isolated from IDLE itself.  Also, the
+environment is not restarted when Run/Run Module (F5) is selected.  If
+your code has been modified, you must reload() the affected modules and
+re-import any specific items (e.g. from foo import baz) if the changes
+are to take effect.  For these reasons, it is preferable to run IDLE
+with the default subprocess if at all possible.</p>
+<div class="deprecated">
+<p><span class="versionmodified">Deprecated since version 3.4.</span></p>
+</div>
+</div>
+</div>
+<div class="section" id="help-and-preferences">
+<h2>24.6.4. Help and preferences<a class="headerlink" href="#help-and-preferences" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="additional-help-sources">
+<h3>24.6.4.1. Additional help sources<a class="headerlink" href="#additional-help-sources" title="Permalink to this headline">¶</a></h3>
+<p>IDLE includes a help menu entry called &#8220;Python Docs&#8221; that will open the
+extensive sources of help, including tutorials, available at docs.python.org.
+Selected URLs can be added or removed from the help menu at any time using the
+Configure IDLE dialog. See the IDLE help option in the help menu of IDLE for
+more information.</p>
+</div>
+<div class="section" id="setting-preferences">
+<h3>24.6.4.2. Setting preferences<a class="headerlink" href="#setting-preferences" title="Permalink to this headline">¶</a></h3>
+<p>The font preferences, highlighting, keys, and general preferences can be
+changed via Configure IDLE on the Option menu.  Keys can be user defined;
+IDLE ships with four built in key sets. In addition a user can create a
+custom key set in the Configure IDLE dialog under the keys tab.</p>
+</div>
+<div class="section" id="extensions">
+<h3>24.6.4.3. Extensions<a class="headerlink" href="#extensions" title="Permalink to this headline">¶</a></h3>
+<p>IDLE contains an extension facility.  Peferences for extensions can be
+changed with Configure Extensions. See the beginning of config-extensions.def
+in the idlelib directory for further information.  The default extensions
+are currently:</p>
+<ul class="simple">
+<li>FormatParagraph</li>
+<li>AutoExpand</li>
+<li>ZoomHeight</li>
+<li>ScriptBinding</li>
+<li>CallTips</li>
+<li>ParenMatch</li>
+<li>AutoComplete</li>
+<li>CodeContext</li>
+<li>RstripExtension</li>
+</ul>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+  <h3><a href="../contents.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">24.6. IDLE</a><ul>
+<li><a class="reference internal" href="#menus">24.6.1. Menus</a><ul>
+<li><a class="reference internal" href="#file-menu-shell-and-editor">24.6.1.1. File menu (Shell and Editor)</a></li>
+<li><a class="reference internal" href="#edit-menu-shell-and-editor">24.6.1.2. Edit menu (Shell and Editor)</a></li>
+<li><a class="reference internal" href="#format-menu-editor-window-only">24.6.1.3. Format menu (Editor window only)</a></li>
+<li><a class="reference internal" href="#run-menu-editor-window-only">24.6.1.4. Run menu (Editor window only)</a></li>
+<li><a class="reference internal" href="#shell-menu-shell-window-only">24.6.1.5. Shell menu (Shell window only)</a></li>
+<li><a class="reference internal" href="#debug-menu-shell-window-only">24.6.1.6. Debug menu (Shell window only)</a></li>
+<li><a class="reference internal" href="#options-menu-shell-and-editor">24.6.1.7. Options menu (Shell and Editor)</a></li>
+<li><a class="reference internal" href="#window-menu-shell-and-editor">24.6.1.8. Window menu (Shell and Editor)</a></li>
+<li><a class="reference internal" href="#help-menu-shell-and-editor">24.6.1.9. Help menu (Shell and Editor)</a></li>
+<li><a class="reference internal" href="#context-menus">24.6.1.10. Context Menus</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#editing-and-navigation">24.6.2. Editing and navigation</a><ul>
+<li><a class="reference internal" href="#automatic-indentation">24.6.2.1. Automatic indentation</a></li>
+<li><a class="reference internal" href="#completions">24.6.2.2. Completions</a></li>
+<li><a class="reference internal" href="#calltips">24.6.2.3. Calltips</a></li>
+<li><a class="reference internal" href="#python-shell-window">24.6.2.4. Python Shell window</a></li>
+<li><a class="reference internal" href="#text-colors">24.6.2.5. Text colors</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#startup-and-code-execution">24.6.3. Startup and code execution</a><ul>
+<li><a class="reference internal" href="#command-line-usage">24.6.3.1. Command line usage</a></li>
+<li><a class="reference internal" href="#idle-console-differences">24.6.3.2. IDLE-console differences</a></li>
+<li><a class="reference internal" href="#running-without-a-subprocess">24.6.3.3. Running without a subprocess</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#help-and-preferences">24.6.4. Help and preferences</a><ul>
+<li><a class="reference internal" href="#additional-help-sources">24.6.4.1. Additional help sources</a></li>
+<li><a class="reference internal" href="#setting-preferences">24.6.4.2. Setting preferences</a></li>
+<li><a class="reference internal" href="#extensions">24.6.4.3. Extensions</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="turtle.html"
+                        title="previous chapter">24.5. <tt class="docutils literal"><span class="pre">turtle</span></tt> &#8212; Turtle graphics for Tk</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="othergui.html"
+                        title="next chapter">24.7. Other Graphical User Interface Packages</a></p>
+<h3>This Page</h3>
+<ul class="this-page-menu">
+  <li><a href="../bugs.html">Report a Bug</a></li>
+  <li><a href="../_sources/library/idle.txt"
+         rel="nofollow">Show Source</a></li>
+</ul>
+
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="../py-modindex.html" title="Python Module Index"
+             >modules</a> |</li>
+        <li class="right" >
+          <a href="othergui.html" title="24.7. Other Graphical User Interface Packages"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="turtle.html" title="24.5. turtle — Turtle graphics for Tk"
+             >previous</a> |</li>
+        <li><img src="../_static/py.png" alt=""
+                 style="vertical-align: middle; margin-top: -1px"/></li>
+        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
+        <li>
+          <a href="../index.html">Python 2.7.10 documentation</a> &raquo;
+        </li>
+
+          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
+          <li><a href="tk.html" >24. Graphical User Interfaces with Tk</a> &raquo;</li>
+      </ul>
+    </div>
+    <div class="footer">
+    &copy; <a href="../copyright.html">Copyright</a> 1990-2015, Python Software Foundation.
+    <br />
+    The Python Software Foundation is a non-profit corporation.
+    <a href="https://www.python.org/psf/donations/">Please donate.</a>
+    <br />
+    Last updated on Oct 13, 2015.
+    <a href="../bugs.html">Found a bug</a>?
+    <br />
+    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
+    </div>
+
+  </body>
+</html>
diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py
new file mode 100644 (file)
index 0000000..6398c77
--- /dev/null
@@ -0,0 +1,252 @@
+""" help.py: Implement the Idle help menu.
+Contents are subject to revision at any time, without notice.
+
+
+Help => About IDLE: diplay About Idle dialog
+
+<to be moved here from aboutDialog.py>
+
+
+Help => IDLE Help: Display help.html with proper formatting.
+Doc/library/idle.rst (Sphinx)=> Doc/build/html/library/idle.html
+(help.copy_strip)=> Lib/idlelib/help.html
+
+HelpParser - Parse help.html and and render to tk Text.
+
+HelpText - Display formatted help.html.
+
+HelpFrame - Contain text, scrollbar, and table-of-contents.
+(This will be needed for display in a future tabbed window.)
+
+HelpWindow - Display HelpFrame in a standalone window.
+
+copy_strip - Copy idle.html to help.html, rstripping each line.
+
+show_idlehelp - Create HelpWindow.  Called in EditorWindow.help_dialog.
+"""
+from HTMLParser import HTMLParser
+from os.path import abspath, dirname, isdir, isfile, join
+from Tkinter import Tk, Toplevel, Frame, Text, Scrollbar, Menu, Menubutton
+import tkFont as tkfont
+from idlelib.configHandler import idleConf
+
+use_ttk = False # until available to import
+if use_ttk:
+    from tkinter.ttk import Menubutton
+
+## About IDLE ##
+
+
+## IDLE Help ##
+
+class HelpParser(HTMLParser):
+    """Render help.html into a text widget.
+
+    The overridden handle_xyz methods handle a subset of html tags.
+    The supplied text should have the needed tag configurations.
+    The behavior for unsupported tags, such as table, is undefined.
+    """
+    def __init__(self, text):
+        HTMLParser.__init__(self)
+        self.text = text         # text widget we're rendering into
+        self.tags = ''           # current block level text tags to apply
+        self.chartags = ''       # current character level text tags
+        self.show = False        # used so we exclude page navigation
+        self.hdrlink = False     # used so we don't show header links
+        self.level = 0           # indentation level
+        self.pre = False         # displaying preformatted text
+        self.hprefix = ''        # prefix such as '25.5' to strip from headings
+        self.nested_dl = False   # if we're in a nested <dl>
+        self.simplelist = False  # simple list (no double spacing)
+        self.toc = []            # pair headers with text indexes for toc
+        self.header = ''         # text within header tags for toc
+
+    def indent(self, amt=1):
+        self.level += amt
+        self.tags = '' if self.level == 0 else 'l'+str(self.level)
+
+    def handle_starttag(self, tag, attrs):
+        "Handle starttags in help.html."
+        class_ = ''
+        for a, v in attrs:
+            if a == 'class':
+                class_ = v
+        s = ''
+        if tag == 'div' and class_ == 'section':
+            self.show = True    # start of main content
+        elif tag == 'div' and class_ == 'sphinxsidebar':
+            self.show = False   # end of main content
+        elif tag == 'p' and class_ != 'first':
+            s = '\n\n'
+        elif tag == 'span' and class_ == 'pre':
+            self.chartags = 'pre'
+        elif tag == 'span' and class_ == 'versionmodified':
+            self.chartags = 'em'
+        elif tag == 'em':
+            self.chartags = 'em'
+        elif tag in ['ul', 'ol']:
+            if class_.find('simple') != -1:
+                s = '\n'
+                self.simplelist = True
+            else:
+                self.simplelist = False
+            self.indent()
+        elif tag == 'dl':
+            if self.level > 0:
+                self.nested_dl = True
+        elif tag == 'li':
+            s = '\n* ' if self.simplelist else '\n\n* '
+        elif tag == 'dt':
+            s = '\n\n' if not self.nested_dl else '\n'  # avoid extra line
+            self.nested_dl = False
+        elif tag == 'dd':
+            self.indent()
+            s = '\n'
+        elif tag == 'pre':
+            self.pre = True
+            if self.show:
+                self.text.insert('end', '\n\n')
+            self.tags = 'preblock'
+        elif tag == 'a' and class_ == 'headerlink':
+            self.hdrlink = True
+        elif tag == 'h1':
+            self.tags = tag
+        elif tag in ['h2', 'h3']:
+            if self.show:
+                self.header = ''
+                self.text.insert('end', '\n\n')
+            self.tags = tag
+        if self.show:
+            self.text.insert('end', s, (self.tags, self.chartags))
+
+    def handle_endtag(self, tag):
+        "Handle endtags in help.html."
+        if tag in ['h1', 'h2', 'h3']:
+            self.indent(0)  # clear tag, reset indent
+            if self.show:
+                self.toc.append((self.header, self.text.index('insert')))
+        elif tag in ['span', 'em']:
+            self.chartags = ''
+        elif tag == 'a':
+            self.hdrlink = False
+        elif tag == 'pre':
+            self.pre = False
+            self.tags = ''
+        elif tag in ['ul', 'dd', 'ol']:
+            self.indent(amt=-1)
+
+    def handle_data(self, data):
+        "Handle date segments in help.html."
+        if self.show and not self.hdrlink:
+            d = data if self.pre else data.replace('\n', ' ')
+            if self.tags == 'h1':
+                self.hprefix = d[0:d.index(' ')]
+            if self.tags in ['h1', 'h2', 'h3'] and self.hprefix != '':
+                if d[0:len(self.hprefix)] == self.hprefix:
+                    d = d[len(self.hprefix):].strip()
+                self.header += d
+            self.text.insert('end', d, (self.tags, self.chartags))
+
+    def handle_charref(self, name):
+        self.text.insert('end', unichr(int(name)))
+
+
+class HelpText(Text):
+    "Display help.html."
+    def __init__(self, parent, filename):
+        "Configure tags and feed file to parser."
+        uwide = idleConf.GetOption('main', 'EditorWindow', 'width', type='int')
+        uhigh = idleConf.GetOption('main', 'EditorWindow', 'height', type='int')
+        uhigh = 3 * uhigh // 4  # lines average 4/3 of editor line height
+        Text.__init__(self, parent, wrap='word', highlightthickness=0,
+                      padx=5, borderwidth=0, width=uwide, height=uhigh)
+
+        normalfont = self.findfont(['TkDefaultFont', 'arial', 'helvetica'])
+        fixedfont = self.findfont(['TkFixedFont', 'monaco', 'courier'])
+        self['font'] = (normalfont, 12)
+        self.tag_configure('em', font=(normalfont, 12, 'italic'))
+        self.tag_configure('h1', font=(normalfont, 20, 'bold'))
+        self.tag_configure('h2', font=(normalfont, 18, 'bold'))
+        self.tag_configure('h3', font=(normalfont, 15, 'bold'))
+        self.tag_configure('pre', font=(fixedfont, 12), background='#f6f6ff')
+        self.tag_configure('preblock', font=(fixedfont, 10), lmargin1=25,
+                borderwidth=1, relief='solid', background='#eeffcc')
+        self.tag_configure('l1', lmargin1=25, lmargin2=25)
+        self.tag_configure('l2', lmargin1=50, lmargin2=50)
+        self.tag_configure('l3', lmargin1=75, lmargin2=75)
+        self.tag_configure('l4', lmargin1=100, lmargin2=100)
+
+        self.parser = HelpParser(self)
+        with open(filename) as f:
+            contents = f.read().decode(encoding='utf-8')
+        self.parser.feed(contents)
+        self['state'] = 'disabled'
+
+    def findfont(self, names):
+        "Return name of first font family derived from names."
+        for name in names:
+            if name.lower() in (x.lower() for x in tkfont.names(root=self)):
+                font = tkfont.Font(name=name, exists=True, root=self)
+                return font.actual()['family']
+            elif name.lower() in (x.lower()
+                                  for x in tkfont.families(root=self)):
+                return name
+
+
+class HelpFrame(Frame):
+    "Display html text, scrollbar, and toc."
+    def __init__(self, parent, filename):
+        Frame.__init__(self, parent)
+        text = HelpText(self, filename)
+        self['background'] = text['background']
+        scroll = Scrollbar(self, command=text.yview)
+        text['yscrollcommand'] = scroll.set
+        self.rowconfigure(0, weight=1)
+        self.columnconfigure(1, weight=1)  # text
+        self.toc_menu(text).grid(column=0, row=0, sticky='nw')
+        text.grid(column=1, row=0, sticky='nsew')
+        scroll.grid(column=2, row=0, sticky='ns')
+
+    def toc_menu(self, text):
+        "Create table of contents as drop-down menu."
+        toc = Menubutton(self, text='TOC')
+        drop = Menu(toc, tearoff=False)
+        for lbl, dex in text.parser.toc:
+            drop.add_command(label=lbl, command=lambda dex=dex:text.yview(dex))
+        toc['menu'] = drop
+        return toc
+
+
+class HelpWindow(Toplevel):
+    "Display frame with rendered html."
+    def __init__(self, parent, filename, title):
+        Toplevel.__init__(self, parent)
+        self.wm_title(title)
+        self.protocol("WM_DELETE_WINDOW", self.destroy)
+        HelpFrame(self, filename).grid(column=0, row=0, sticky='nsew')
+        self.grid_columnconfigure(0, weight=1)
+        self.grid_rowconfigure(0, weight=1)
+
+
+def copy_strip():
+    "Copy idle.html to idlelib/help.html, stripping trailing whitespace."
+    src = join(abspath(dirname(dirname(dirname(__file__)))),
+               'Doc', 'build', 'html', 'library', 'idle.html')
+    dst = join(abspath(dirname(__file__)), 'help.html')
+    with open(src, 'r') as inn,\
+         open(dst, 'w') as out:
+        for line in inn:
+            out.write(line.rstrip() + '\n')
+    print('idle.html copied to help.html')
+
+def show_idlehelp(parent):
+    "Create HelpWindow; called from Idle Help event handler."
+    filename = join(abspath(dirname(__file__)), 'help.html')
+    if not isfile(filename):
+        # try copy_strip, present message
+        return
+    HelpWindow(parent, filename, 'IDLE Help')
+
+if __name__ == '__main__':
+    from idlelib.idle_test.htest import run
+    run(show_idlehelp)
index 6b1c0023eee67e9bca8b3464b0f12600391ff519..296c78bdf0d99c4030a0bc87878e5a989a58c99a 100644 (file)
@@ -1,7 +1,8 @@
-[See the end of this file for ** TIPS ** on using IDLE !!]
+This file, idlelib/help.txt is out-of-date and no longer used by Idle.
+It is deprecated and will be removed in the future, possibly in 3.6
+----------------------------------------------------------------------
 
-Click on the dotted line at the top of a menu to "tear it off": a
-separate window containing the menu is created.
+[See the end of this file for ** TIPS ** on using IDLE !!]
 
 File Menu:
 
@@ -90,10 +91,9 @@ Options Menu:
        Configure IDLE -- Open a configuration dialog.  Fonts, indentation,
                           keybindings, and color themes may be altered.
                           Startup Preferences may be set, and Additional Help
-                          Sources can be specified.
-                         
-                         On OS X this menu is not present, use
-                         menu 'IDLE -> Preferences...' instead.
+                          Sources can be specified.  On OS X, open the
+                          configuration dialog by selecting Preferences
+                          in the application menu.
        ---
        Code Context --   Open a pane at the top of the edit window which
                          shows the block context of the section of code
index 537dd5a9a75462f50f1463fdca315d1f9ba3d47a..9ce4c9f8a3363d475f1c6f5d1e3802574ab1ffa9 100644 (file)
@@ -2,20 +2,16 @@ try:
     import idlelib.PyShell
 except ImportError:
     # IDLE is not installed, but maybe PyShell is on sys.path:
-    try:
-        import PyShell
-    except ImportError:
-        raise
-    else:
-        import os
-        idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
-        if idledir != os.getcwd():
-            # We're not in the IDLE directory, help the subprocess find run.py
-            pypath = os.environ.get('PYTHONPATH', '')
-            if pypath:
-                os.environ['PYTHONPATH'] = pypath + ':' + idledir
-            else:
-                os.environ['PYTHONPATH'] = idledir
-        PyShell.main()
+    import PyShell
+    import os
+    idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
+    if idledir != os.getcwd():
+        # We're not in the IDLE directory, help the subprocess find run.py
+        pypath = os.environ.get('PYTHONPATH', '')
+        if pypath:
+            os.environ['PYTHONPATH'] = pypath + ':' + idledir
+        else:
+            os.environ['PYTHONPATH'] = idledir
+    PyShell.main()
 else:
     idlelib.PyShell.main()
index f6b6a21ad5aa8ccbce5fc10300cf29492853eb6e..2339926ef337c889b6d3a31292db3f0e6c58f541 100644 (file)
@@ -1,14 +1,24 @@
 README FOR IDLE TESTS IN IDLELIB.IDLE_TEST
 
+0. Quick Start
+
+Automated unit tests were added in 2.7 for Python 2.x and 3.3 for Python 3.x.
+To run the tests from a command line:
+
+python -m test.test_idle
+
+Human-mediated tests were added later in 2.7 and in 3.4.
+
+python -m idlelib.idle_test.htest
+
 
 1. Test Files
 
 The idle directory, idlelib, has over 60 xyz.py files. The idle_test
-subdirectory should contain a test_xyy.py for each. (For test modules, make
-'xyz' lower case, and possibly shorten it.) Each file should start with the
-something like the following template, with the blanks after after '.' and 'as',
-and before and after '_' filled in.
----
+subdirectory should contain a test_xyz.py for each, where 'xyz' is lowercased
+even if xyz.py is not. Here is a possible template, with the blanks after after
+'.' and 'as', and before and after '_' to be filled in.
+
 import unittest
 from test.support import requires
 import idlelib. as
@@ -18,33 +28,33 @@ class _Test(unittest.TestCase):
     def test_(self):
 
 if __name__ == '__main__':
-    unittest.main(verbosity=2, exit=2)
----
-Idle tests are run with unittest; do not use regrtest's test_main.
+    unittest.main(verbosity=2)
+
+Add the following at the end of xyy.py, with the appropriate name added after
+'test_'. Some files already have something like this for htest.  If so, insert
+the import and unittest.main lines before the htest lines.
 
-Once test_xyy is written, the following should go at the end of xyy.py,
-with xyz (lowercased) added after 'test_'.
----
 if __name__ == "__main__":
     import unittest
     unittest.main('idlelib.idle_test.test_', verbosity=2, exit=False)
----
 
 
-2. Gui Tests
 
-Gui tests need 'requires' from test.support (test.test_support in 2.7). A
-test is a gui test if it creates a Tk root or master object either directly
-or indirectly by instantiating a tkinter or idle class. For the benefit of
-test processes that either have no graphical environment available or are not
-allowed to use it, gui tests must be 'guarded' by "requires('gui')" in a
-setUp function or method. This will typically be setUpClass.
+2. GUI Tests
+
+When run as part of the Python test suite, Idle gui tests need to run
+test.support.requires('gui') (test.test_support in 2.7).  A test is a gui test
+if it creates a Tk root or master object either directly or indirectly by
+instantiating a tkinter or idle class.  For the benefit of test processes that
+either have no graphical environment available or are not allowed to use it, gui
+tests must be 'guarded' by "requires('gui')" in a setUp function or method.
+This will typically be setUpClass.
+
+To avoid interfering with other gui tests, all gui objects must be destroyed and
+deleted by the end of the test.  Widgets, such as a Tk root, created in a setUpX
+function, should be destroyed in the corresponding tearDownX.  Module and class
+widget attributes should also be deleted..
 
-To avoid interfering with other gui tests, all gui objects must be destroyed
-and deleted by the end of the test.  If a widget, such as a Tk root, is created
-in a setUpX function, destroy it in the corresponding tearDownX.  For module
-and class attributes, also delete the widget.
----
     @classmethod
     def setUpClass(cls):
         requires('gui')
@@ -54,49 +64,55 @@ and class attributes, also delete the widget.
     def tearDownClass(cls):
         cls.root.destroy()
         del cls.root
----
 
-Support.requires('gui') causes the test(s) it guards to be skipped if any of
+
+Requires('gui') causes the test(s) it guards to be skipped if any of
 a few conditions are met:
- - The tests are being run by regrtest.py, and it was started without
-   enabling the "gui" resource with the "-u" command line option.
+    
+ - The tests are being run by regrtest.py, and it was started without enabling
+   the "gui" resource with the "-u" command line option.
+   
  - The tests are being run on Windows by a service that is not allowed to
    interact with the graphical environment.
+   
  - The tests are being run on Mac OSX in a process that cannot make a window
    manager connection.
+   
  - tkinter.Tk cannot be successfully instantiated for some reason.
  - test.support.use_resources has been set by something other than
    regrtest.py and does not contain "gui".
+   
+Tests of non-gui operations should avoid creating tk widgets. Incidental uses of
+tk variables and messageboxes can be replaced by the mock classes in
+idle_test/mock_tk.py. The mock text handles some uses of the tk Text widget.
 
-Since non-gui tests always run, but gui tests only sometimes, tests of non-gui
-operations should best avoid needing a gui. Methods that make incidental use of
-tkinter (tk) variables and messageboxes can do this by using the mock classes in
-idle_test/mock_tk.py. There is also a mock text that will handle some uses of the
-tk Text widget.
 
+3. Running Unit Tests
 
-3. Running Tests
+Assume that xyz.py and test_xyz.py both end with a unittest.main() call.
+Running either from an Idle editor runs all tests in the test_xyz file with the
+version of Python running Idle.  Test output appears in the Shell window.  The
+'verbosity=2' option lists all test methods in the file, which is appropriate
+when developing tests. The 'exit=False' option is needed in xyx.py files when an
+htest follows.
 
-Assume that xyz.py and test_xyz.py end with the "if __name__" statements given
-above. In Idle, pressing F5 in an editor window with either loaded will run all
-tests in the test_xyz file with the version of Python running Idle.  The test
-report and any tracebacks will appear in the Shell window. The options in these
-"if __name__" statements are appropriate for developers running (as opposed to
-importing) either of the files during development: verbosity=2 lists all test
-methods in the file; exit=False avoids a spurious sys.exit traceback that would
-otherwise occur when running in Idle. The following command lines also run
-all test methods, including gui tests, in test_xyz.py. (The exceptions are that
-idlelib and idlelib.idle start Idle and idlelib.PyShell should (issue 18330).)
+The following command lines also run all test methods, including
+gui tests, in test_xyz.py. (Both '-m idlelib' and '-m idlelib.idle' start
+Idle and so cannot run tests.)
 
-python -m idlelib.xyz  # With the capitalization of the xyz module
+python -m idlelib.xyz
 python -m idlelib.idle_test.test_xyz
 
-To run all idle_test/test_*.py tests, either interactively
-('>>>', with unittest imported) or from a command line, use one of the
-following. (Notes: in 2.7, 'test ' (with the space) is 'test.regrtest ';
-where present, -v and -ugui can be omitted.)
+The following runs all idle_test/test_*.py tests interactively.
+
+>>> import unittest
+>>> unittest.main('idlelib.idle_test', verbosity=2)
+
+The following run all Idle tests at a command line.  Option '-v' is the same as
+'verbosity=2'.  (For 2.7, replace 'test' in the second line with
+'test.regrtest'.)
 
->>> unittest.main('idlelib.idle_test', verbosity=2, exit=False)
 python -m unittest -v idlelib.idle_test
 python -m test -v -ugui test_idle
 python -m test.test_idle
@@ -113,3 +129,15 @@ To run an individual Testcase or test method, extend the dotted name given to
 unittest on the command line.
 
 python -m unittest -v idlelib.idle_test.test_xyz.Test_case.test_meth
+
+
+4. Human-mediated Tests
+
+Human-mediated tests are widget tests that cannot be automated but need human
+verification. They are contained in idlelib/idle_test/htest.py, which has
+instructions.  (Some modules need an auxiliary function, identified with # htest
+# on the header line.)  The set is about complete, though some tests need
+improvement. To run all htests, run the htest file from an editor or from the
+command line with:
+
+python -m idlelib.idle_test.htest
index 27377aefc0f68515341e368fc212ec9fd51e3f39..a3e6d3a88e2455861aa60b255a36a961c0cf9d67 100644 (file)
@@ -93,15 +93,6 @@ _class_browser_spec = {
            "Double clicking on items prints a traceback for an exception "
            "that is ignored."
     }
-ConfigExtensionsDialog_spec = {
-    'file': 'configDialog',
-    'kwds': {'title': 'Test Extension Configuration',
-             '_htest': True,},
-    'msg': "IDLE extensions dialog.\n"
-           "\n[Ok] to close the dialog.[Apply] to apply the settings and "
-           "and [Cancel] to revert all changes.\nRe-run the test to ensure "
-           "changes made have persisted."
-    }
 
 _color_delegator_spec = {
     'file': 'ColorDelegator',
@@ -121,7 +112,8 @@ ConfigDialog_spec = {
            "font face of the text in the area below it.\nIn the "
            "'Highlighting' tab, try different color schemes. Clicking "
            "items in the sample program should update the choices above it."
-           "\nIn the 'Keys' and 'General' tab, test settings of interest."
+           "\nIn the 'Keys', 'General' and 'Extensions' tabs, test settings"
+           "of interest."
            "\n[Ok] to close the dialog.[Apply] to apply the settings and "
            "and [Cancel] to revert all changes.\nRe-run the test to ensure "
            "changes made have persisted."
@@ -194,19 +186,14 @@ _grep_dialog_spec = {
            "should open that file \nin a new EditorWindow."
     }
 
-_help_dialog_spec = {
-    'file': 'EditorWindow',
-    'kwds': {},
-    'msg': "If the help text displays, this works.\n"
-           "Text is selectable. Window is scrollable."
-    }
-
 _io_binding_spec = {
     'file': 'IOBinding',
     'kwds': {},
-    'msg': "Test the following bindings\n"
-           "<Control-o> to display open window from file dialog.\n"
-           "<Control-s> to save the file\n"
+    'msg': "Test the following bindings.\n"
+           "<Control-o> to open file from dialog.\n"
+           "Edit the file.\n"
+           "<Control-s> to save the file.\n"
+           "Check that changes were saved by opening the file elsewhere."
     }
 
 _multi_call_spec = {
@@ -279,6 +266,13 @@ _scrolled_list_spec = {
            "Right clicking an item will display a popup."
     }
 
+show_idlehelp_spec = {
+    'file': 'help',
+    'kwds': {},
+    'msg': "If the help text displays, this works.\n"
+           "Text is selectable. Window is scrollable."
+    }
+
 _stack_viewer_spec = {
     'file': 'StackViewer',
     'kwds': {},
index ee9d0eda5d1a174edc346ac1092b5e0bfe06e7b2..c2a72666be59f5c8a2aaa4fe32b7f6993f08c94a 100644 (file)
@@ -1,6 +1,6 @@
 import unittest
 from test.test_support import requires
-from Tkinter import Tk, Text, TclError
+from Tkinter import Tk, Text
 
 import idlelib.AutoComplete as ac
 import idlelib.AutoCompleteWindow as acw
@@ -95,8 +95,8 @@ class AutoCompleteTest(unittest.TestCase):
         del ev.mc_state
 
         # If autocomplete window is open, complete() method is called
-        testwin = self.autocomplete._make_autocomplete_window()
         self.text.insert('1.0', 're.')
+        # This must call autocomplete._make_autocomplete_window()
         Equal(self.autocomplete.autocomplete_event(ev), 'break')
 
         # If autocomplete window is not active or does not exist,
index 07bbf16e879e4807329da040583804ed16ee7def..9185a968a65c5f8769f4e4952bce80e38fb8ea1d 100644 (file)
@@ -2,7 +2,7 @@
 import unittest
 from idlelib import FormatParagraph as fp
 from idlelib.EditorWindow import EditorWindow
-from Tkinter import Tk, Text, TclError
+from Tkinter import Tk, Text
 from test.test_support import requires
 
 
index 7ad7c97a79e82c3f317cc164421ec42f6b4cc418..f02841481bf220250fb72b2de0177e9fb931756e 100644 (file)
@@ -1,5 +1,8 @@
 import unittest
-import idlelib.PathBrowser as PathBrowser
+import os
+import sys
+import idlelib
+from idlelib import PathBrowser
 
 class PathBrowserTest(unittest.TestCase):
 
@@ -7,6 +10,19 @@ class PathBrowserTest(unittest.TestCase):
         # Issue16226 - make sure that getting a sublist works
         d = PathBrowser.DirBrowserTreeItem('')
         d.GetSubList()
+        self.assertEqual('', d.GetText())
+
+        dir = os.path.split(os.path.abspath(idlelib.__file__))[0]
+        self.assertEqual(d.ispackagedir(dir), True)
+        self.assertEqual(d.ispackagedir(dir + '/Icons'), False)
+
+    def test_PathBrowserTreeItem(self):
+        p = PathBrowser.PathBrowserTreeItem()
+        self.assertEqual(p.GetText(), 'sys.path')
+        sub = p.GetSubList()
+        self.assertEqual(len(sub), len(sys.path))
+        # Following fails in 2.7 because old-style class
+        #self.assertEqual(type(sub[0]), PathBrowser.DirBrowserTreeItem)
 
 if __name__ == '__main__':
     unittest.main(verbosity=2, exit=False)
index c1bee3e6f17a31aca5fea09f5465887f600f3179..32abfe6f792dc12f36d68a75d05c3355592ccd7c 100644 (file)
@@ -6,14 +6,13 @@ testing skipping of suite when self.needwrapbutton is false.
 '''
 import unittest
 from test.test_support import requires
-from Tkinter import Tk, Toplevel, Frame, Label, BooleanVar, StringVar
+from Tkinter import Tk, Toplevel, Frame ## BooleanVar, StringVar
 from idlelib import SearchEngine as se
 from idlelib import SearchDialogBase as sdb
 from idlelib.idle_test.mock_idle import Func
-from idlelib.idle_test.mock_tk import Var, Mbox
+##from idlelib.idle_test.mock_tk import Var
 
-# The following could help make some tests gui-free.
-# However, they currently make radiobutton tests fail.
+# The ## imports above & following could help make some tests gui-free.# However, they currently make radiobutton tests fail.
 ##def setUpModule():
 ##    # Replace tk objects used to initialize se.SearchEngine.
 ##    se.BooleanVar = Var
index 2525a135c2ec9c3a4aa3ed9ae10097c25e39cd10..8bf9d4728a092731248368c80ae10c69bbea4f6e 100644 (file)
@@ -7,7 +7,7 @@
 
 import re
 import unittest
-from test.test_support import requires
+#from test.test_support import requires
 from Tkinter import  BooleanVar, StringVar, TclError  # ,Tk, Text
 import tkMessageBox
 from idlelib import SearchEngine as se
index f0b9b762f1c05a3d6e8a99523b3eeeeb9c43d9c6..50d3facec7cfa188c84b1bcd8624a2a1caf4d5f7 100644 (file)
@@ -3,7 +3,6 @@ import unittest
 from test.test_support import requires
 
 from _tkinter import TclError
-import Tkinter as tk
 
 class TextTest(object):
 
index da1d8a1d0ab3dd3ee5e41dbd7236860e47ba91f8..26710f14291585286aec61b720f5d96a12c53ee0 100644 (file)
@@ -68,6 +68,15 @@ class ShellWarnTest(unittest.TestCase):
                     'Test', UserWarning, 'test_warning.py', 99, f, 'Line of code')
             self.assertEqual(shellmsg.splitlines(), f.getvalue().splitlines())
 
+class ImportWarnTest(unittest.TestCase):
+    def test_idlever(self):
+        with warnings.catch_warnings(record=True) as w:
+            warnings.simplefilter("always")
+            import idlelib.idlever
+            self.assertEqual(len(w), 1)
+            self.assertTrue(issubclass(w[-1].category, DeprecationWarning))
+            self.assertIn("version", str(w[-1].message))
+
 
 if __name__ == '__main__':
     unittest.main(verbosity=2, exit=False)
index 563d933f3bd66e319ed3e195479128cd03095b4f..3e9f69a3e37200a07bdd81dbbea0cdf342aba8a8 100644 (file)
@@ -1,4 +1,12 @@
-"""Unused by Idle: there is no separate Idle version anymore.
-Kept only for possible existing extension use."""
+"""
+The separate Idle version was eliminated years ago;
+idlelib.idlever is no longer used by Idle
+and will be removed in 3.6 or later.  Use
+    from sys import version
+    IDLE_VERSION = version[:version.index(' ')]
+"""
+# Kept for now only for possible existing extension use
+import warnings as w
+w.warn(__doc__, DeprecationWarning, stacklevel=2)
 from sys import version
 IDLE_VERSION = version[:version.index(' ')]
index 10a06bb0d5e39271067a240a9bd07177b5fb6d96..041d7008dcd8f91c2ff6c51cb7f8716cdb099806 100644 (file)
@@ -125,11 +125,9 @@ def overrideRootMenu(root, flist):
     #
     # Due to a (mis-)feature of TkAqua the user will also see an empty Help
     # menu.
-    from Tkinter import Menu, Text, Text
-    from idlelib.EditorWindow import prepstr, get_accelerator
+    from Tkinter import Menu
     from idlelib import Bindings
     from idlelib import WindowList
-    from idlelib.MultiCall import MultiCallCreator
 
     closeItem = Bindings.menudefs[0][1][-2]
 
@@ -149,7 +147,7 @@ def overrideRootMenu(root, flist):
     root.configure(menu=menubar)
     menudict = {}
 
-    menudict['windows'] = menu = Menu(menubar, name='windows')
+    menudict['windows'] = menu = Menu(menubar, name='windows', tearoff=0)
     menubar.add_cascade(label='Window', menu=menu, underline=0)
 
     def postwindowsmenu(menu=menu):
@@ -163,18 +161,23 @@ def overrideRootMenu(root, flist):
     WindowList.register_callback(postwindowsmenu)
 
     def about_dialog(event=None):
+        "Handle Help 'About IDLE' event."
+        # Synchronize with EditorWindow.EditorWindow.about_dialog.
         from idlelib import aboutDialog
         aboutDialog.AboutDialog(root, 'About IDLE')
 
     def config_dialog(event=None):
+        "Handle Options 'Configure IDLE' event."
+        # Synchronize with EditorWindow.EditorWindow.config_dialog.
         from idlelib import configDialog
         root.instance_dict = flist.inversedict
         configDialog.ConfigDialog(root, 'Settings')
 
     def help_dialog(event=None):
-        from idlelib import textView
-        fn = path.join(path.abspath(path.dirname(__file__)), 'help.txt')
-        textView.view_file(root, 'Help', fn)
+        "Handle Help 'IDLE Help' event."
+        # Synchronize with EditorWindow.EditorWindow.help_dialog.
+        from idlelib import help
+        help.show_idlehelp(root)
 
     root.bind('<<about-idle>>', about_dialog)
     root.bind('<<open-config-dialog>>', config_dialog)
@@ -189,7 +192,8 @@ def overrideRootMenu(root, flist):
 
     if isCarbonTk():
         # for Carbon AquaTk, replace the default Tk apple menu
-        menudict['application'] = menu = Menu(menubar, name='apple')
+        menudict['application'] = menu = Menu(menubar, name='apple',
+                                              tearoff=0)
         menubar.add_cascade(label='IDLE', menu=menu)
         Bindings.menudefs.insert(0,
             ('application', [
index 8f611a304d29ed0858e71600393558fdbc43ed26..5c4aabd8a87e9aca0f638c0f36b32ce917cb8af9 100644 (file)
@@ -332,10 +332,7 @@ class SocketIO(object):
                 n = self.sock.send(s[:BUFSIZE])
             except (AttributeError, TypeError):
                 raise IOError, "socket no longer exists"
-            except socket.error:
-                raise
-            else:
-                s = s[n:]
+            s = s[n:]
 
     buffer = ""
     bufneed = 4
index 604c5cd54e1e68dd1671ec859cee5c002f876f51..466c61ea341a73a621085bdef6fb7a5eb47c9c8a 100644 (file)
@@ -1,5 +1,4 @@
 import sys
-import io
 import linecache
 import time
 import socket
@@ -165,7 +164,7 @@ def show_socket_error(err, address):
         tkMessageBox.showerror("IDLE Subprocess Error", msg, parent=root)
     else:
         tkMessageBox.showerror("IDLE Subprocess Error",
-                               "Socket Error: %s" % err.args[1])
+                               "Socket Error: %s" % err.args[1], parent=root)
     root.destroy()
 
 def print_exception():
@@ -211,6 +210,8 @@ def cleanup_traceback(tb, exclude):
         fn, ln, nm, line = tb[i]
         if nm == '?':
             nm = "-toplevel-"
+        if fn.startswith("<pyshell#") and IOBinding.encoding != 'utf-8':
+            ln -= 1  # correction for coding cookie
         if not line and fn.startswith("<pyshell#"):
             line = rpchandler.remotecall('linecache', 'getline',
                                               (fn, ln), {})
index eb60274156ee1af4993a59b517e82368c4575e14..8687d402fd4dceac827c0ba475e2f184453f2e80 100644 (file)
@@ -21,7 +21,7 @@ class TextViewer(Toplevel):
         Toplevel.__init__(self, parent)
         self.configure(borderwidth=5)
         # place dialog below parent if running htest
-        self.geometry("=%dx%d+%d+%d" % (625, 500,
+        self.geometry("=%dx%d+%d+%d" % (750, 500,
                            parent.winfo_rootx() + 10,
                            parent.winfo_rooty() + (10 if not _htest else 100)))
         #elguavas - config placeholders til config stuff completed
index 933694394dd1fe3880c998147b448da4d8420733..b08e145f07d9ee681d144e3f1c4e775164cc4a50 100644 (file)
@@ -969,8 +969,13 @@ def getcallargs(func, *positional, **named):
         assign(varkw, named)
     elif named:
         unexpected = next(iter(named))
-        if isinstance(unexpected, unicode):
-            unexpected = unexpected.encode(sys.getdefaultencoding(), 'replace')
+        try:
+            unicode
+        except NameError:
+            pass
+        else:
+            if isinstance(unexpected, unicode):
+                unexpected = unexpected.encode(sys.getdefaultencoding(), 'replace')
         raise TypeError("%s() got an unexpected keyword argument '%s'" %
                         (f_name, unexpected))
     unassigned = num_args - len([arg for arg in args if is_assigned(arg)])
index 0be85da022b2e88ddc21eb7cec57b69775300a4c..140a3d0e58e07f4bf928a7ea16a2ce4c62c3027f 100644 (file)
@@ -195,10 +195,11 @@ def dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True,
         encoding='utf-8', default=None, sort_keys=False, **kw):
     """Serialize ``obj`` to a JSON formatted ``str``.
 
-    If ``skipkeys`` is false then ``dict`` keys that are not basic types
+    If ``skipkeys`` is true then ``dict`` keys that are not basic types
     (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)
     will be skipped instead of raising a ``TypeError``.
 
+
     If ``ensure_ascii`` is false, all non-ASCII characters are not escaped, and
     the return value may be a ``unicode`` instance. See ``dump`` for details.
 
index 1b4323839b96b07ee60291dec1d9d6b8e1d4437c..5141f879d956e4715ea002197fc467b6eb640188 100644 (file)
@@ -15,10 +15,8 @@ __all__ = ['JSONDecoder']
 FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
 
 def _floatconstants():
-    _BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
-    if sys.byteorder != 'big':
-        _BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1]
-    nan, inf = struct.unpack('dd', _BYTES)
+    nan, = struct.unpack('>d', b'\x7f\xf8\x00\x00\x00\x00\x00\x00')
+    inf, = struct.unpack('>d', b'\x7f\xf0\x00\x00\x00\x00\x00\x00')
     return nan, inf, -inf
 
 NaN, PosInf, NegInf = _floatconstants()
index 953dcd55583165d4845609821c47b237e6dd73eb..8af27b582684339232e89bef0e5f51258a1a7740 100644 (file)
@@ -49,7 +49,10 @@ else:
 prefix = os.path.join(sys.prefix,"tcl")
 if not os.path.exists(prefix):
     # devdir/externals/tcltk/lib
-    prefix = os.path.join(sys.prefix, "externals", "tcltk", "lib")
+    tcltk = 'tcltk'
+    if sys.maxsize > 2**31 - 1:
+        tcltk = 'tcltk64'
+    prefix = os.path.join(sys.prefix, "externals", tcltk, "lib")
     prefix = os.path.abspath(prefix)
 # if this does not exist, no further search is needed
 if os.path.exists(prefix):
index cb7edf0ed44c36f1aee667200737833fc0a462a6..b4f6b3c78808b43bf3bda7f49afaa664caf67712 100644 (file)
@@ -1117,7 +1117,7 @@ class Misc:
 
         return self._bind(('bind', className), sequence, func, add, 0)
     def unbind_class(self, className, sequence):
-        """Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE
+        """Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE
         all functions."""
         self.tk.call('bind', className , sequence, '')
     def mainloop(self, n=0):
index 3eecd3241b2d96a1e440d34d545df17297be9b13..4cbf82e8d8bac2be666865df1872ae1b959163d0 100644 (file)
@@ -6,14 +6,54 @@ from test_ttk.support import AbstractTkTest
 
 requires('gui')
 
+fontname = "TkDefaultFont"
+
 class FontTest(AbstractTkTest, unittest.TestCase):
 
-    def test_font_eq(self):
-        fontname = "TkDefaultFont"
+    @classmethod
+    def setUpClass(cls):
+        AbstractTkTest.setUpClass.__func__(cls)
         try:
-            f = font.Font(root=self.root, name=fontname, exists=True)
-        except tkinter._tkinter.TclError:
-            f = font.Font(root=self.root, name=fontname, exists=False)
+            cls.font = font.Font(root=cls.root, name=fontname, exists=True)
+        except tkinter.TclError:
+            cls.font = font.Font(root=cls.root, name=fontname, exists=False)
+
+    def test_configure(self):
+        options = self.font.configure()
+        self.assertGreaterEqual(set(options),
+            {'family', 'size', 'weight', 'slant', 'underline', 'overstrike'})
+        for key in options:
+            self.assertEqual(self.font.cget(key), options[key])
+            self.assertEqual(self.font[key], options[key])
+        for key in 'family', 'weight', 'slant':
+            self.assertIsInstance(options[key], str)
+            self.assertIsInstance(self.font.cget(key), str)
+            self.assertIsInstance(self.font[key], str)
+        sizetype = int if self.wantobjects else str
+        for key in 'size', 'underline', 'overstrike':
+            self.assertIsInstance(options[key], sizetype)
+            self.assertIsInstance(self.font.cget(key), sizetype)
+            self.assertIsInstance(self.font[key], sizetype)
+
+    def test_actual(self):
+        options = self.font.actual()
+        self.assertGreaterEqual(set(options),
+            {'family', 'size', 'weight', 'slant', 'underline', 'overstrike'})
+        for key in options:
+            self.assertEqual(self.font.actual(key), options[key])
+        for key in 'family', 'weight', 'slant':
+            self.assertIsInstance(options[key], str)
+            self.assertIsInstance(self.font.actual(key), str)
+        sizetype = int if self.wantobjects else str
+        for key in 'size', 'underline', 'overstrike':
+            self.assertIsInstance(options[key], sizetype)
+            self.assertIsInstance(self.font.actual(key), sizetype)
+
+    def test_name(self):
+        self.assertEqual(self.font.name, fontname)
+        self.assertEqual(str(self.font), fontname)
+
+    def test_eq(self):
         font1 = font.Font(root=self.root, name=fontname, exists=True)
         font2 = font.Font(root=self.root, name=fontname, exists=True)
         self.assertIsNot(font1, font2)
@@ -22,6 +62,35 @@ class FontTest(AbstractTkTest, unittest.TestCase):
         self.assertNotEqual(font1, 0)
         self.assertNotIn(font1, [0])
 
+    def test_measure(self):
+        self.assertIsInstance(self.font.measure('abc'), int)
+
+    def test_metrics(self):
+        metrics = self.font.metrics()
+        self.assertGreaterEqual(set(metrics),
+            {'ascent', 'descent', 'linespace', 'fixed'})
+        for key in metrics:
+            self.assertEqual(self.font.metrics(key), metrics[key])
+            self.assertIsInstance(metrics[key], int)
+            self.assertIsInstance(self.font.metrics(key), int)
+
+    def test_families(self):
+        families = font.families(self.root)
+        self.assertIsInstance(families, tuple)
+        self.assertTrue(families)
+        for family in families:
+            self.assertIsInstance(family, (str, unicode))
+            self.assertTrue(family)
+
+    def test_names(self):
+        names = font.names(self.root)
+        self.assertIsInstance(names, tuple)
+        self.assertTrue(names)
+        for name in names:
+            self.assertIsInstance(name, (str, unicode))
+            self.assertTrue(name)
+        self.assertIn(fontname, names)
+
 tests_gui = (FontTest, )
 
 if __name__ == "__main__":
index 91795d9c09578a39f13d6595456e13cd08c5afd5..c4d842aac16f0ebe6e1df5cd418aff02c05eda06 100644 (file)
@@ -23,7 +23,7 @@ class AbstractTkTest:
     def tearDownClass(cls):
         cls.root.update_idletasks()
         cls.root.destroy()
-        cls.root = None
+        del cls.root
         tkinter._default_root = None
         tkinter._support_default_root = cls._old_support_default_root
 
index 4f5593c5feb0d6c7a455649473d679cf3c3e3bc6..8399a130047287e215c092786d2cb23c874673eb 100644 (file)
@@ -114,7 +114,7 @@ def find_metas(cls_node):
                 left_node = expr_node.children[0]
                 if isinstance(left_node, Leaf) and \
                         left_node.value == u'__metaclass__':
-                    # We found a assignment to __metaclass__.
+                    # We found an assignment to __metaclass__.
                     fixup_simple_stmt(node, i, simple_node)
                     remove_trailing_newline(simple_node)
                     yield (node, i, simple_node)
index fc9d4959276a716970d020dab580cb613e0f6217..baaeabd97271288aa63ef6164066bab8f43d4df5 100644 (file)
@@ -42,7 +42,7 @@ _TYPE_MAPPING = {
         'NotImplementedType' : 'type(NotImplemented)',
         'SliceType' : 'slice',
         'StringType': 'bytes', # XXX ?
-        'StringTypes' : 'str', # XXX ?
+        'StringTypes' : '(str,)', # XXX ?
         'TupleType': 'tuple',
         'TypeType' : 'type',
         'UnicodeType': 'str',
index a4c168df9e0dd435a9e2cc9980ed219aa00f3a2a..bd238978b4e5f3fd419228106be9a2c33408b44f 100644 (file)
@@ -255,7 +255,7 @@ class RefactoringTool(object):
             fixer = fix_class(self.options, self.fixer_log)
             if fixer.explicit and self.explicit is not True and \
                     fix_mod_path not in self.explicit:
-                self.log_message("Skipping implicit fixer: %s", fix_name)
+                self.log_message("Skipping optional fixer: %s", fix_name)
                 continue
 
             self.log_debug("Adding transformation: %s", fix_name)
index 7db9af217b08ac60c1eeb64b032d6837103a5d00..6fa603fd391c18a0c8b500a57bb4373acddf258e 100644 (file)
@@ -3263,6 +3263,10 @@ class Test_types(FixerTestCase):
         a = """type(None)"""
         self.check(b, a)
 
+        b = "types.StringTypes"
+        a = "(str,)"
+        self.check(b, a)
+
 class Test_idioms(FixerTestCase):
     fixer = "idioms"
 
index bd4afeb1aa34dcafc45ed3a3c01a84be46393787..fa9ebe8bf23ac02b0aadd31f6e17e0048cb205b5 100644 (file)
@@ -59,18 +59,6 @@ try:
 except NameError:
     _unicode = False
 
-#
-# _srcfile is used when walking the stack to check when we've got the first
-# caller stack frame.
-#
-if hasattr(sys, 'frozen'): #support for py2exe
-    _srcfile = "logging%s__init__%s" % (os.sep, __file__[-4:])
-elif __file__[-4:].lower() in ['.pyc', '.pyo']:
-    _srcfile = __file__[:-4] + '.py'
-else:
-    _srcfile = __file__
-_srcfile = os.path.normcase(_srcfile)
-
 # next bit filched from 1.5.2's inspect.py
 def currentframe():
     """Return the frame object for the caller's stack frame."""
@@ -82,6 +70,12 @@ def currentframe():
 if hasattr(sys, '_getframe'): currentframe = lambda: sys._getframe(3)
 # done filching
 
+#
+# _srcfile is used when walking the stack to check when we've got the first
+# caller stack frame.
+#
+_srcfile = os.path.normcase(currentframe.__code__.co_filename)
+
 # _srcfile is only used in conjunction with sys._getframe().
 # To provide compatibility with older versions of Python, set _srcfile
 # to None if _getframe() is not available; this value will prevent
index 856e87804cd968ca90a21e27c5be22e30236c1ce..46311fc20fc47ed0d7b2a331db485d39ecf1f43b 100644 (file)
@@ -159,7 +159,7 @@ class MH:
         # Get the link count so we can avoid listing folders
         # that have no subfolders.
         nlinks = os.stat(fullname).st_nlink
-        if nlinks <= 2:
+        if nlinks == 2:
             return []
         subfolders = []
         subnames = os.listdir(fullname)
@@ -171,7 +171,7 @@ class MH:
                 # Stop looking for subfolders when
                 # we've seen them all
                 nlinks = nlinks - 1
-                if nlinks <= 2:
+                if nlinks == 2:
                     break
         subfolders.sort()
         return subfolders
@@ -186,7 +186,7 @@ class MH:
         # Get the link count so we can avoid listing folders
         # that have no subfolders.
         nlinks = os.stat(fullname).st_nlink
-        if nlinks <= 2:
+        if nlinks == 2:
             return []
         subfolders = []
         subnames = os.listdir(fullname)
@@ -203,7 +203,7 @@ class MH:
                 # Stop looking for subfolders when
                 # we've seen them all
                 nlinks = nlinks - 1
-                if nlinks <= 2:
+                if nlinks == 2:
                     break
         subfolders.sort()
         return subfolders
index 6bddfb74ff502a6677ce267780145f3abcf80bc6..d393817bb34db1ebd5e11d8cec89b3a681037cdb 100644 (file)
@@ -470,12 +470,26 @@ def prepare(data):
         process.ORIGINAL_DIR = data['orig_dir']
 
     if 'main_path' in data:
+        # XXX (ncoghlan): The following code makes several bogus
+        # assumptions regarding the relationship between __file__
+        # and a module's real name. See PEP 302 and issue #10845
+        # The problem is resolved properly in Python 3.4+, as
+        # described in issue #19946
+
         main_path = data['main_path']
         main_name = os.path.splitext(os.path.basename(main_path))[0]
         if main_name == '__init__':
             main_name = os.path.basename(os.path.dirname(main_path))
 
-        if main_name != 'ipython':
+        if main_name == '__main__':
+            # For directory and zipfile execution, we assume an implicit
+            # "if __name__ == '__main__':" around the module, and don't
+            # rerun the main module code in spawned processes
+            main_module = sys.modules['__main__']
+            main_module.__file__ = main_path
+        elif main_name != 'ipython':
+            # Main modules not actually called __main__.py may
+            # contain additional code that should still be executed
             import imp
 
             if main_path is None:
index 10ea27280789f5a6bcfc7a2fb6c94ab6b9df5645..9e6eb0d559d78fe4766ee4ecc5747e14110f5651 100644 (file)
@@ -4,9 +4,11 @@ def url2pathname(url):
     """OS-specific conversion from a relative URL of the 'file' scheme
     to a file system path; not recommended for general use."""
     # e.g.
-    # ///C|/foo/bar/spam.foo
-    # becomes
-    # C:\foo\bar\spam.foo
+    #   ///C|/foo/bar/spam.foo
+    # and
+    #   ///C:/foo/bar/spam.foo
+    # become
+    #   C:\foo\bar\spam.foo
     import string, urllib
     # Windows itself uses ":" even in URLs.
     url = url.replace(':', '|')
@@ -39,9 +41,9 @@ def pathname2url(p):
     """OS-specific conversion from a file system path to a relative URL
     of the 'file' scheme; not recommended for general use."""
     # e.g.
-    # C:\foo\bar\spam.foo
+    #   C:\foo\bar\spam.foo
     # becomes
-    # ///C|/foo/bar/spam.foo
+    #   ///C:/foo/bar/spam.foo
     import urllib
     if not ':' in p:
         # No drive specifier, just convert slashes and quote the name
index 113b4e089271dff4d7bceed732bd68cdc71e957a..4d35103b90b694235836fc211556ce3b0161caa6 100755 (executable)
@@ -1322,6 +1322,9 @@ def main():
             # In most cases SystemExit does not warrant a post-mortem session.
             print "The program exited via sys.exit(). Exit status: ",
             print sys.exc_info()[1]
+        except SyntaxError:
+            traceback.print_exc()
+            sys.exit(1)
         except:
             traceback.print_exc()
             print "Uncaught exception. Entering post mortem debugging"
index 299de16f519b56a7cc964fa1af3fdab7b9e6b030..1b3196ff753f67fbbab10c0f8bda5f57197e3333 100644 (file)
@@ -402,7 +402,13 @@ class Pickler:
             write(REDUCE)
 
         if obj is not None:
-            self.memoize(obj)
+            # If the object is already in the memo, this means it is
+            # recursive. In this case, throw away everything we put on the
+            # stack, and fetch the object back from the memo.
+            if id(obj) in self.memo:
+                write(POP + self.get(self.memo[id(obj)][0]))
+            else:
+                self.memoize(obj)
 
         # More new special cases (that work with older protocols as
         # well): when __reduce__ returns a tuple with 4 or 5 items,
index df2af83acd32868fb9c44f7ccc57fab502f5b12b..3dbdfe0b7fe32ee7e22264068afae18678ed61fc 100755 (executable)
 #      Betancourt, Randall Hopper, Karl Putland, John Farrell, Greg
 #      Andruk, Just van Rossum, Thomas Heller, Mark R. Levinson, Mark
 #      Hammond, Bill Tutt, Hans Nowak, Uwe Zessin (OpenVMS support),
-#      Colin Kong, Trent Mick, Guido van Rossum, Anthony Baxter
+#      Colin Kong, Trent Mick, Guido van Rossum, Anthony Baxter, Steve
+#      Dower
 #
 #    History:
 #
 #    <see CVS and SVN checkin messages for history>
 #
+#    1.0.8 - changed Windows support to read version from kernel32.dll
 #    1.0.7 - added DEV_NULL
 #    1.0.6 - added linux_distribution()
 #    1.0.5 - fixed Java support to allow running the module on Jython
@@ -531,189 +533,140 @@ def _syscmd_ver(system='', release='', version='',
         version = _norm_version(version)
     return system,release,version
 
-def _win32_getvalue(key,name,default=''):
+_WIN32_CLIENT_RELEASES = {
+    (5, 0): "2000",
+    (5, 1): "XP",
+    # Strictly, 5.2 client is XP 64-bit, but platform.py historically
+    # has always called it 2003 Server
+    (5, 2): "2003Server",
+    (5, None): "post2003",
+
+    (6, 0): "Vista",
+    (6, 1): "7",
+    (6, 2): "8",
+    (6, 3): "8.1",
+    (6, None): "post8.1",
+
+    (10, 0): "10",
+    (10, None): "post10",
+}
 
-    """ Read a value for name from the registry key.
+# Server release name lookup will default to client names if necessary
+_WIN32_SERVER_RELEASES = {
+    (5, 2): "2003Server",
 
-        In case this fails, default is returned.
+    (6, 0): "2008Server",
+    (6, 1): "2008ServerR2",
+    (6, 2): "2012Server",
+    (6, 3): "2012ServerR2",
+    (6, None): "post2012ServerR2",
+}
 
-    """
+def _get_real_winver(maj, min, build):
+    if maj < 6 or (maj == 6 and min < 2):
+        return maj, min, build
+
+    from ctypes import (c_buffer, POINTER, byref, create_unicode_buffer,
+                        Structure, WinDLL)
+    from ctypes.wintypes import DWORD, HANDLE
+
+    class VS_FIXEDFILEINFO(Structure):
+        _fields_ = [
+            ("dwSignature", DWORD),
+            ("dwStrucVersion", DWORD),
+            ("dwFileVersionMS", DWORD),
+            ("dwFileVersionLS", DWORD),
+            ("dwProductVersionMS", DWORD),
+            ("dwProductVersionLS", DWORD),
+            ("dwFileFlagsMask", DWORD),
+            ("dwFileFlags", DWORD),
+            ("dwFileOS", DWORD),
+            ("dwFileType", DWORD),
+            ("dwFileSubtype", DWORD),
+            ("dwFileDateMS", DWORD),
+            ("dwFileDateLS", DWORD),
+        ]
+
+    kernel32 = WinDLL('kernel32')
+    version = WinDLL('version')
+
+    # We will immediately double the length up to MAX_PATH, but the
+    # path may be longer, so we retry until the returned string is
+    # shorter than our buffer.
+    name_len = actual_len = 130
+    while actual_len == name_len:
+        name_len *= 2
+        name = create_unicode_buffer(name_len)
+        actual_len = kernel32.GetModuleFileNameW(HANDLE(kernel32._handle),
+                                                 name, len(name))
+        if not actual_len:
+            return maj, min, build
+
+    size = version.GetFileVersionInfoSizeW(name, None)
+    if not size:
+        return maj, min, build
+
+    ver_block = c_buffer(size)
+    if (not version.GetFileVersionInfoW(name, None, size, ver_block) or
+        not ver_block):
+        return maj, min, build
+
+    pvi = POINTER(VS_FIXEDFILEINFO)()
+    if not version.VerQueryValueW(ver_block, "", byref(pvi), byref(DWORD())):
+        return maj, min, build
+
+    maj = pvi.contents.dwProductVersionMS >> 16
+    min = pvi.contents.dwProductVersionMS & 0xFFFF
+    build = pvi.contents.dwProductVersionLS >> 16
+
+    return maj, min, build
+
+def win32_ver(release='', version='', csd='', ptype=''):
     try:
-        # Use win32api if available
-        from win32api import RegQueryValueEx
+        from sys import getwindowsversion
     except ImportError:
-        # On Python 2.0 and later, emulate using _winreg
-        import _winreg
-        RegQueryValueEx = _winreg.QueryValueEx
+        return release, version, csd, ptype
     try:
-        return RegQueryValueEx(key,name)
-    except:
-        return default
-
-def win32_ver(release='',version='',csd='',ptype=''):
-
-    """ Get additional version information from the Windows Registry
-        and return a tuple (version,csd,ptype) referring to version
-        number, CSD level (service pack), and OS type (multi/single
-        processor).
-
-        As a hint: ptype returns 'Uniprocessor Free' on single
-        processor NT machines and 'Multiprocessor Free' on multi
-        processor machines. The 'Free' refers to the OS version being
-        free of debugging code. It could also state 'Checked' which
-        means the OS version uses debugging code, i.e. code that
-        checks arguments, ranges, etc. (Thomas Heller).
+        from winreg import OpenKeyEx, QueryValueEx, CloseKey, HKEY_LOCAL_MACHINE
+    except ImportError:
+        from _winreg import OpenKeyEx, QueryValueEx, CloseKey, HKEY_LOCAL_MACHINE
 
-        Note: this function works best with Mark Hammond's win32
-        package installed, but also on Python 2.3 and later. It
-        obviously only runs on Win32 compatible platforms.
+    winver = getwindowsversion()
+    maj, min, build = _get_real_winver(*winver[:3])
+    version = '{0}.{1}.{2}'.format(maj, min, build)
 
-    """
-    # XXX Is there any way to find out the processor type on WinXX ?
-    # XXX Is win32 available on Windows CE ?
-    #
-    # Adapted from code posted by Karl Putland to comp.lang.python.
-    #
-    # The mappings between reg. values and release names can be found
-    # here: http://msdn.microsoft.com/library/en-us/sysinfo/base/osversioninfo_str.asp
+    release = (_WIN32_CLIENT_RELEASES.get((maj, min)) or
+               _WIN32_CLIENT_RELEASES.get((maj, None)) or
+               release)
 
-    # Import the needed APIs
-    try:
-        import win32api
-        from win32api import RegQueryValueEx, RegOpenKeyEx, \
-             RegCloseKey, GetVersionEx
-        from win32con import HKEY_LOCAL_MACHINE, VER_PLATFORM_WIN32_NT, \
-             VER_PLATFORM_WIN32_WINDOWS, VER_NT_WORKSTATION
-    except ImportError:
-        # Emulate the win32api module using Python APIs
+    # getwindowsversion() reflect the compatibility mode Python is
+    # running under, and so the service pack value is only going to be
+    # valid if the versions match.
+    if winver[:2] == (maj, min):
         try:
-            sys.getwindowsversion
+            csd = 'SP{}'.format(winver.service_pack_major)
         except AttributeError:
-            # No emulation possible, so return the defaults...
-            return release,version,csd,ptype
-        else:
-            # Emulation using _winreg (added in Python 2.0) and
-            # sys.getwindowsversion() (added in Python 2.3)
-            import _winreg
-            GetVersionEx = sys.getwindowsversion
-            RegQueryValueEx = _winreg.QueryValueEx
-            RegOpenKeyEx = _winreg.OpenKeyEx
-            RegCloseKey = _winreg.CloseKey
-            HKEY_LOCAL_MACHINE = _winreg.HKEY_LOCAL_MACHINE
-            VER_PLATFORM_WIN32_WINDOWS = 1
-            VER_PLATFORM_WIN32_NT = 2
-            VER_NT_WORKSTATION = 1
-            VER_NT_SERVER = 3
-            REG_SZ = 1
-
-    # Find out the registry key and some general version infos
-    winver = GetVersionEx()
-    maj,min,buildno,plat,csd = winver
-    version = '%i.%i.%i' % (maj,min,buildno & 0xFFFF)
-    if hasattr(winver, "service_pack"):
-        if winver.service_pack != "":
-            csd = 'SP%s' % winver.service_pack_major
-    else:
-        if csd[:13] == 'Service Pack ':
-            csd = 'SP' + csd[13:]
-
-    if plat == VER_PLATFORM_WIN32_WINDOWS:
-        regkey = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion'
-        # Try to guess the release name
-        if maj == 4:
-            if min == 0:
-                release = '95'
-            elif min == 10:
-                release = '98'
-            elif min == 90:
-                release = 'Me'
-            else:
-                release = 'postMe'
-        elif maj == 5:
-            release = '2000'
-
-    elif plat == VER_PLATFORM_WIN32_NT:
-        regkey = 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'
-        if maj <= 4:
-            release = 'NT'
-        elif maj == 5:
-            if min == 0:
-                release = '2000'
-            elif min == 1:
-                release = 'XP'
-            elif min == 2:
-                release = '2003Server'
-            else:
-                release = 'post2003'
-        elif maj == 6:
-            if hasattr(winver, "product_type"):
-                product_type = winver.product_type
-            else:
-                product_type = VER_NT_WORKSTATION
-                # Without an OSVERSIONINFOEX capable sys.getwindowsversion(),
-                # or help from the registry, we cannot properly identify
-                # non-workstation versions.
-                try:
-                    key = RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey)
-                    name, type = RegQueryValueEx(key, "ProductName")
-                    # Discard any type that isn't REG_SZ
-                    if type == REG_SZ and name.find("Server") != -1:
-                        product_type = VER_NT_SERVER
-                except WindowsError:
-                    # Use default of VER_NT_WORKSTATION
-                    pass
-
-            if min == 0:
-                if product_type == VER_NT_WORKSTATION:
-                    release = 'Vista'
-                else:
-                    release = '2008Server'
-            elif min == 1:
-                if product_type == VER_NT_WORKSTATION:
-                    release = '7'
-                else:
-                    release = '2008ServerR2'
-            elif min == 2:
-                if product_type == VER_NT_WORKSTATION:
-                    release = '8'
-                else:
-                    release = '2012Server'
-            else:
-                release = 'post2012Server'
+            if csd[:13] == 'Service Pack ':
+                csd = 'SP' + csd[13:]
 
-    else:
-        if not release:
-            # E.g. Win3.1 with win32s
-            release = '%i.%i' % (maj,min)
-        return release,version,csd,ptype
+    # VER_NT_SERVER = 3
+    if getattr(winver, 'product_type', None) == 3:
+        release = (_WIN32_SERVER_RELEASES.get((maj, min)) or
+                   _WIN32_SERVER_RELEASES.get((maj, None)) or
+                   release)
 
-    # Open the registry key
+    key = None
     try:
-        keyCurVer = RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey)
-        # Get a value to make sure the key exists...
-        RegQueryValueEx(keyCurVer, 'SystemRoot')
+        key = OpenKeyEx(HKEY_LOCAL_MACHINE,
+                        r'SOFTWARE\Microsoft\Windows NT\CurrentVersion')
+        ptype = QueryValueEx(key, 'CurrentType')[0]
     except:
-        return release,version,csd,ptype
-
-    # Parse values
-    #subversion = _win32_getvalue(keyCurVer,
-    #                            'SubVersionNumber',
-    #                            ('',1))[0]
-    #if subversion:
-    #   release = release + subversion # 95a, 95b, etc.
-    build = _win32_getvalue(keyCurVer,
-                            'CurrentBuildNumber',
-                            ('',1))[0]
-    ptype = _win32_getvalue(keyCurVer,
-                           'CurrentType',
-                           (ptype,1))[0]
-
-    # Normalize version
-    version = _norm_version(version,build)
-
-    # Close key
-    RegCloseKey(keyCurVer)
-    return release,version,csd,ptype
+        pass
+    finally:
+        if key:
+            CloseKey(key)
+
+    return release, version, csd, ptype
 
 def _mac_ver_lookup(selectors,default=None):
 
index d7396f015d3c4ff5712f973de2d5be40f5eab5cc..9316fff1515017ebf30c39c34266f4c5c2808a75 100755 (executable)
@@ -2244,8 +2244,11 @@ def gui():
             if self.scanner:
                 self.scanner.quit = 1
             self.scanner = ModuleScanner()
+            def onerror(modname):
+                pass
             threading.Thread(target=self.scanner.run,
-                             args=(self.update, key, self.done)).start()
+                             args=(self.update, key, self.done),
+                             kwargs=dict(onerror=onerror)).start()
 
         def update(self, path, modname, desc):
             if modname[-9:] == '.__init__':
index 30dc44b797541a289e7e0f7a47cde22a5e4def2c..5790624f991e108c0169fd7bf383b799da9377a3 100644 (file)
 # -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Sun May 10 13:12:18 2015
-topics = {'assert': u'\nThe "assert" statement\n**********************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n   assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form, "assert expression", is equivalent to\n\n   if __debug__:\n      if not expression: raise AssertionError\n\nThe extended form, "assert expression1, expression2", is equivalent to\n\n   if __debug__:\n      if not expression1: raise AssertionError(expression2)\n\nThese equivalences assume that "__debug__" and "AssertionError" refer\nto the built-in variables with those names.  In the current\nimplementation, the built-in variable "__debug__" is "True" under\nnormal circumstances, "False" when optimization is requested (command\nline option -O).  The current code generator emits no code for an\nassert statement when optimization is requested at compile time.  Note\nthat it is unnecessary to include the source code for the expression\nthat failed in the error message; it will be displayed as part of the\nstack trace.\n\nAssignments to "__debug__" are illegal.  The value for the built-in\nvariable is determined when the interpreter starts.\n',
- 'assignment': u'\nAssignment statements\n*********************\n\nAssignment statements are used to (re)bind names to values and to\nmodify attributes or items of mutable objects:\n\n   assignment_stmt ::= (target_list "=")+ (expression_list | yield_expression)\n   target_list     ::= target ("," target)* [","]\n   target          ::= identifier\n              | "(" target_list ")"\n              | "[" target_list "]"\n              | attributeref\n              | subscription\n              | slicing\n\n(See section Primaries for the syntax definitions for the last three\nsymbols.)\n\nAn assignment statement evaluates the expression list (remember that\nthis can be a single expression or a comma-separated list, the latter\nyielding a tuple) and assigns the single resulting object to each of\nthe target lists, from left to right.\n\nAssignment is defined recursively depending on the form of the target\n(list). When a target is part of a mutable object (an attribute\nreference, subscription or slicing), the mutable object must\nultimately perform the assignment and decide about its validity, and\nmay raise an exception if the assignment is unacceptable.  The rules\nobserved by various types and the exceptions raised are given with the\ndefinition of the object types (see section The standard type\nhierarchy).\n\nAssignment of an object to a target list is recursively defined as\nfollows.\n\n* If the target list is a single target: The object is assigned to\n  that target.\n\n* If the target list is a comma-separated list of targets: The\n  object must be an iterable with the same number of items as there\n  are targets in the target list, and the items are assigned, from\n  left to right, to the corresponding targets.\n\nAssignment of an object to a single target is recursively defined as\nfollows.\n\n* If the target is an identifier (name):\n\n  * If the name does not occur in a "global" statement in the\n    current code block: the name is bound to the object in the current\n    local namespace.\n\n  * Otherwise: the name is bound to the object in the current global\n    namespace.\n\n  The name is rebound if it was already bound.  This may cause the\n  reference count for the object previously bound to the name to reach\n  zero, causing the object to be deallocated and its destructor (if it\n  has one) to be called.\n\n* If the target is a target list enclosed in parentheses or in\n  square brackets: The object must be an iterable with the same number\n  of items as there are targets in the target list, and its items are\n  assigned, from left to right, to the corresponding targets.\n\n* If the target is an attribute reference: The primary expression in\n  the reference is evaluated.  It should yield an object with\n  assignable attributes; if this is not the case, "TypeError" is\n  raised.  That object is then asked to assign the assigned object to\n  the given attribute; if it cannot perform the assignment, it raises\n  an exception (usually but not necessarily "AttributeError").\n\n  Note: If the object is a class instance and the attribute reference\n  occurs on both sides of the assignment operator, the RHS expression,\n  "a.x" can access either an instance attribute or (if no instance\n  attribute exists) a class attribute.  The LHS target "a.x" is always\n  set as an instance attribute, creating it if necessary.  Thus, the\n  two occurrences of "a.x" do not necessarily refer to the same\n  attribute: if the RHS expression refers to a class attribute, the\n  LHS creates a new instance attribute as the target of the\n  assignment:\n\n     class Cls:\n         x = 3             # class variable\n     inst = Cls()\n     inst.x = inst.x + 1   # writes inst.x as 4 leaving Cls.x as 3\n\n  This description does not necessarily apply to descriptor\n  attributes, such as properties created with "property()".\n\n* If the target is a subscription: The primary expression in the\n  reference is evaluated.  It should yield either a mutable sequence\n  object (such as a list) or a mapping object (such as a dictionary).\n  Next, the subscript expression is evaluated.\n\n  If the primary is a mutable sequence object (such as a list), the\n  subscript must yield a plain integer.  If it is negative, the\n  sequence\'s length is added to it. The resulting value must be a\n  nonnegative integer less than the sequence\'s length, and the\n  sequence is asked to assign the assigned object to its item with\n  that index.  If the index is out of range, "IndexError" is raised\n  (assignment to a subscripted sequence cannot add new items to a\n  list).\n\n  If the primary is a mapping object (such as a dictionary), the\n  subscript must have a type compatible with the mapping\'s key type,\n  and the mapping is then asked to create a key/datum pair which maps\n  the subscript to the assigned object.  This can either replace an\n  existing key/value pair with the same key value, or insert a new\n  key/value pair (if no key with the same value existed).\n\n* If the target is a slicing: The primary expression in the\n  reference is evaluated.  It should yield a mutable sequence object\n  (such as a list).  The assigned object should be a sequence object\n  of the same type.  Next, the lower and upper bound expressions are\n  evaluated, insofar they are present; defaults are zero and the\n  sequence\'s length.  The bounds should evaluate to (small) integers.\n  If either bound is negative, the sequence\'s length is added to it.\n  The resulting bounds are clipped to lie between zero and the\n  sequence\'s length, inclusive.  Finally, the sequence object is asked\n  to replace the slice with the items of the assigned sequence.  The\n  length of the slice may be different from the length of the assigned\n  sequence, thus changing the length of the target sequence, if the\n  object allows it.\n\n**CPython implementation detail:** In the current implementation, the\nsyntax for targets is taken to be the same as for expressions, and\ninvalid syntax is rejected during the code generation phase, causing\nless detailed error messages.\n\nWARNING: Although the definition of assignment implies that overlaps\nbetween the left-hand side and the right-hand side are \'safe\' (for\nexample "a, b = b, a" swaps two variables), overlaps *within* the\ncollection of assigned-to variables are not safe!  For instance, the\nfollowing program prints "[0, 2]":\n\n   x = [0, 1]\n   i = 0\n   i, x[i] = 1, 2\n   print x\n\n\nAugmented assignment statements\n===============================\n\nAugmented assignment is the combination, in a single statement, of a\nbinary operation and an assignment statement:\n\n   augmented_assignment_stmt ::= augtarget augop (expression_list | yield_expression)\n   augtarget                 ::= identifier | attributeref | subscription | slicing\n   augop                     ::= "+=" | "-=" | "*=" | "/=" | "//=" | "%=" | "**="\n             | ">>=" | "<<=" | "&=" | "^=" | "|="\n\n(See section Primaries for the syntax definitions for the last three\nsymbols.)\n\nAn augmented assignment evaluates the target (which, unlike normal\nassignment statements, cannot be an unpacking) and the expression\nlist, performs the binary operation specific to the type of assignment\non the two operands, and assigns the result to the original target.\nThe target is only evaluated once.\n\nAn augmented assignment expression like "x += 1" can be rewritten as\n"x = x + 1" to achieve a similar, but not exactly equal effect. In the\naugmented version, "x" is only evaluated once. Also, when possible,\nthe actual operation is performed *in-place*, meaning that rather than\ncreating a new object and assigning that to the target, the old object\nis modified instead.\n\nWith the exception of assigning to tuples and multiple targets in a\nsingle statement, the assignment done by augmented assignment\nstatements is handled the same way as normal assignments. Similarly,\nwith the exception of the possible *in-place* behavior, the binary\noperation performed by augmented assignment is the same as the normal\nbinary operations.\n\nFor targets which are attribute references, the same caveat about\nclass and instance attributes applies as for regular assignments.\n',
- 'atom-identifiers': u'\nIdentifiers (Names)\n*******************\n\nAn identifier occurring as an atom is a name.  See section Identifiers\nand keywords for lexical definition and section Naming and binding for\ndocumentation of naming and binding.\n\nWhen the name is bound to an object, evaluation of the atom yields\nthat object. When a name is not bound, an attempt to evaluate it\nraises a "NameError" exception.\n\n**Private name mangling:** When an identifier that textually occurs in\na class definition begins with two or more underscore characters and\ndoes not end in two or more underscores, it is considered a *private\nname* of that class. Private names are transformed to a longer form\nbefore code is generated for them.  The transformation inserts the\nclass name, with leading underscores removed and a single underscore\ninserted, in front of the name.  For example, the identifier "__spam"\noccurring in a class named "Ham" will be transformed to "_Ham__spam".\nThis transformation is independent of the syntactical context in which\nthe identifier is used.  If the transformed name is extremely long\n(longer than 255 characters), implementation defined truncation may\nhappen. If the class name consists only of underscores, no\ntransformation is done.\n',
- 'atom-literals': u"\nLiterals\n********\n\nPython supports string literals and various numeric literals:\n\n   literal ::= stringliteral | integer | longinteger\n               | floatnumber | imagnumber\n\nEvaluation of a literal yields an object of the given type (string,\ninteger, long integer, floating point number, complex number) with the\ngiven value.  The value may be approximated in the case of floating\npoint and imaginary (complex) literals.  See section Literals for\ndetails.\n\nAll literals correspond to immutable data types, and hence the\nobject's identity is less important than its value.  Multiple\nevaluations of literals with the same value (either the same\noccurrence in the program text or a different occurrence) may obtain\nthe same object or a different object with the same value.\n",
- 'attribute-access': u'\nCustomizing attribute access\n****************************\n\nThe following methods can be defined to customize the meaning of\nattribute access (use of, assignment to, or deletion of "x.name") for\nclass instances.\n\nobject.__getattr__(self, name)\n\n   Called when an attribute lookup has not found the attribute in the\n   usual places (i.e. it is not an instance attribute nor is it found\n   in the class tree for "self").  "name" is the attribute name. This\n   method should return the (computed) attribute value or raise an\n   "AttributeError" exception.\n\n   Note that if the attribute is found through the normal mechanism,\n   "__getattr__()" is not called.  (This is an intentional asymmetry\n   between "__getattr__()" and "__setattr__()".) This is done both for\n   efficiency reasons and because otherwise "__getattr__()" would have\n   no way to access other attributes of the instance.  Note that at\n   least for instance variables, you can fake total control by not\n   inserting any values in the instance attribute dictionary (but\n   instead inserting them in another object).  See the\n   "__getattribute__()" method below for a way to actually get total\n   control in new-style classes.\n\nobject.__setattr__(self, name, value)\n\n   Called when an attribute assignment is attempted.  This is called\n   instead of the normal mechanism (i.e. store the value in the\n   instance dictionary).  *name* is the attribute name, *value* is the\n   value to be assigned to it.\n\n   If "__setattr__()" wants to assign to an instance attribute, it\n   should not simply execute "self.name = value" --- this would cause\n   a recursive call to itself.  Instead, it should insert the value in\n   the dictionary of instance attributes, e.g., "self.__dict__[name] =\n   value".  For new-style classes, rather than accessing the instance\n   dictionary, it should call the base class method with the same\n   name, for example, "object.__setattr__(self, name, value)".\n\nobject.__delattr__(self, name)\n\n   Like "__setattr__()" but for attribute deletion instead of\n   assignment.  This should only be implemented if "del obj.name" is\n   meaningful for the object.\n\n\nMore attribute access for new-style classes\n===========================================\n\nThe following methods only apply to new-style classes.\n\nobject.__getattribute__(self, name)\n\n   Called unconditionally to implement attribute accesses for\n   instances of the class. If the class also defines "__getattr__()",\n   the latter will not be called unless "__getattribute__()" either\n   calls it explicitly or raises an "AttributeError". This method\n   should return the (computed) attribute value or raise an\n   "AttributeError" exception. In order to avoid infinite recursion in\n   this method, its implementation should always call the base class\n   method with the same name to access any attributes it needs, for\n   example, "object.__getattribute__(self, name)".\n\n   Note: This method may still be bypassed when looking up special\n     methods as the result of implicit invocation via language syntax\n     or built-in functions. See Special method lookup for new-style\n     classes.\n\n\nImplementing Descriptors\n========================\n\nThe following methods only apply when an instance of the class\ncontaining the method (a so-called *descriptor* class) appears in an\n*owner* class (the descriptor must be in either the owner\'s class\ndictionary or in the class dictionary for one of its parents).  In the\nexamples below, "the attribute" refers to the attribute whose name is\nthe key of the property in the owner class\' "__dict__".\n\nobject.__get__(self, instance, owner)\n\n   Called to get the attribute of the owner class (class attribute\n   access) or of an instance of that class (instance attribute\n   access). *owner* is always the owner class, while *instance* is the\n   instance that the attribute was accessed through, or "None" when\n   the attribute is accessed through the *owner*.  This method should\n   return the (computed) attribute value or raise an "AttributeError"\n   exception.\n\nobject.__set__(self, instance, value)\n\n   Called to set the attribute on an instance *instance* of the owner\n   class to a new value, *value*.\n\nobject.__delete__(self, instance)\n\n   Called to delete the attribute on an instance *instance* of the\n   owner class.\n\n\nInvoking Descriptors\n====================\n\nIn general, a descriptor is an object attribute with "binding\nbehavior", one whose attribute access has been overridden by methods\nin the descriptor protocol:  "__get__()", "__set__()", and\n"__delete__()". If any of those methods are defined for an object, it\nis said to be a descriptor.\n\nThe default behavior for attribute access is to get, set, or delete\nthe attribute from an object\'s dictionary. For instance, "a.x" has a\nlookup chain starting with "a.__dict__[\'x\']", then\n"type(a).__dict__[\'x\']", and continuing through the base classes of\n"type(a)" excluding metaclasses.\n\nHowever, if the looked-up value is an object defining one of the\ndescriptor methods, then Python may override the default behavior and\ninvoke the descriptor method instead.  Where this occurs in the\nprecedence chain depends on which descriptor methods were defined and\nhow they were called.  Note that descriptors are only invoked for new\nstyle objects or classes (ones that subclass "object()" or "type()").\n\nThe starting point for descriptor invocation is a binding, "a.x". How\nthe arguments are assembled depends on "a":\n\nDirect Call\n   The simplest and least common call is when user code directly\n   invokes a descriptor method:    "x.__get__(a)".\n\nInstance Binding\n   If binding to a new-style object instance, "a.x" is transformed\n   into the call: "type(a).__dict__[\'x\'].__get__(a, type(a))".\n\nClass Binding\n   If binding to a new-style class, "A.x" is transformed into the\n   call: "A.__dict__[\'x\'].__get__(None, A)".\n\nSuper Binding\n   If "a" is an instance of "super", then the binding "super(B,\n   obj).m()" searches "obj.__class__.__mro__" for the base class "A"\n   immediately preceding "B" and then invokes the descriptor with the\n   call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n\nFor instance bindings, the precedence of descriptor invocation depends\non the which descriptor methods are defined.  A descriptor can define\nany combination of "__get__()", "__set__()" and "__delete__()".  If it\ndoes not define "__get__()", then accessing the attribute will return\nthe descriptor object itself unless there is a value in the object\'s\ninstance dictionary.  If the descriptor defines "__set__()" and/or\n"__delete__()", it is a data descriptor; if it defines neither, it is\na non-data descriptor.  Normally, data descriptors define both\n"__get__()" and "__set__()", while non-data descriptors have just the\n"__get__()" method.  Data descriptors with "__set__()" and "__get__()"\ndefined always override a redefinition in an instance dictionary.  In\ncontrast, non-data descriptors can be overridden by instances.\n\nPython methods (including "staticmethod()" and "classmethod()") are\nimplemented as non-data descriptors.  Accordingly, instances can\nredefine and override methods.  This allows individual instances to\nacquire behaviors that differ from other instances of the same class.\n\nThe "property()" function is implemented as a data descriptor.\nAccordingly, instances cannot override the behavior of a property.\n\n\n__slots__\n=========\n\nBy default, instances of both old and new-style classes have a\ndictionary for attribute storage.  This wastes space for objects\nhaving very few instance variables.  The space consumption can become\nacute when creating large numbers of instances.\n\nThe default can be overridden by defining *__slots__* in a new-style\nclass definition.  The *__slots__* declaration takes a sequence of\ninstance variables and reserves just enough space in each instance to\nhold a value for each variable.  Space is saved because *__dict__* is\nnot created for each instance.\n\n__slots__\n\n   This class variable can be assigned a string, iterable, or sequence\n   of strings with variable names used by instances.  If defined in a\n   new-style class, *__slots__* reserves space for the declared\n   variables and prevents the automatic creation of *__dict__* and\n   *__weakref__* for each instance.\n\n   New in version 2.2.\n\nNotes on using *__slots__*\n\n* When inheriting from a class without *__slots__*, the *__dict__*\n  attribute of that class will always be accessible, so a *__slots__*\n  definition in the subclass is meaningless.\n\n* Without a *__dict__* variable, instances cannot be assigned new\n  variables not listed in the *__slots__* definition.  Attempts to\n  assign to an unlisted variable name raises "AttributeError". If\n  dynamic assignment of new variables is desired, then add\n  "\'__dict__\'" to the sequence of strings in the *__slots__*\n  declaration.\n\n  Changed in version 2.3: Previously, adding "\'__dict__\'" to the\n  *__slots__* declaration would not enable the assignment of new\n  attributes not specifically listed in the sequence of instance\n  variable names.\n\n* Without a *__weakref__* variable for each instance, classes\n  defining *__slots__* do not support weak references to its\n  instances. If weak reference support is needed, then add\n  "\'__weakref__\'" to the sequence of strings in the *__slots__*\n  declaration.\n\n  Changed in version 2.3: Previously, adding "\'__weakref__\'" to the\n  *__slots__* declaration would not enable support for weak\n  references.\n\n* *__slots__* are implemented at the class level by creating\n  descriptors (Implementing Descriptors) for each variable name.  As a\n  result, class attributes cannot be used to set default values for\n  instance variables defined by *__slots__*; otherwise, the class\n  attribute would overwrite the descriptor assignment.\n\n* The action of a *__slots__* declaration is limited to the class\n  where it is defined.  As a result, subclasses will have a *__dict__*\n  unless they also define *__slots__* (which must only contain names\n  of any *additional* slots).\n\n* If a class defines a slot also defined in a base class, the\n  instance variable defined by the base class slot is inaccessible\n  (except by retrieving its descriptor directly from the base class).\n  This renders the meaning of the program undefined.  In the future, a\n  check may be added to prevent this.\n\n* Nonempty *__slots__* does not work for classes derived from\n  "variable-length" built-in types such as "long", "str" and "tuple".\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings\n  may also be used; however, in the future, special meaning may be\n  assigned to the values corresponding to each key.\n\n* *__class__* assignment works only if both classes have the same\n  *__slots__*.\n\n  Changed in version 2.6: Previously, *__class__* assignment raised an\n  error if either new or old class had *__slots__*.\n',
- 'attribute-references': u'\nAttribute references\n********************\n\nAn attribute reference is a primary followed by a period and a name:\n\n   attributeref ::= primary "." identifier\n\nThe primary must evaluate to an object of a type that supports\nattribute references, e.g., a module, list, or an instance.  This\nobject is then asked to produce the attribute whose name is the\nidentifier.  If this attribute is not available, the exception\n"AttributeError" is raised. Otherwise, the type and value of the\nobject produced is determined by the object.  Multiple evaluations of\nthe same attribute reference may yield different objects.\n',
- 'augassign': u'\nAugmented assignment statements\n*******************************\n\nAugmented assignment is the combination, in a single statement, of a\nbinary operation and an assignment statement:\n\n   augmented_assignment_stmt ::= augtarget augop (expression_list | yield_expression)\n   augtarget                 ::= identifier | attributeref | subscription | slicing\n   augop                     ::= "+=" | "-=" | "*=" | "/=" | "//=" | "%=" | "**="\n             | ">>=" | "<<=" | "&=" | "^=" | "|="\n\n(See section Primaries for the syntax definitions for the last three\nsymbols.)\n\nAn augmented assignment evaluates the target (which, unlike normal\nassignment statements, cannot be an unpacking) and the expression\nlist, performs the binary operation specific to the type of assignment\non the two operands, and assigns the result to the original target.\nThe target is only evaluated once.\n\nAn augmented assignment expression like "x += 1" can be rewritten as\n"x = x + 1" to achieve a similar, but not exactly equal effect. In the\naugmented version, "x" is only evaluated once. Also, when possible,\nthe actual operation is performed *in-place*, meaning that rather than\ncreating a new object and assigning that to the target, the old object\nis modified instead.\n\nWith the exception of assigning to tuples and multiple targets in a\nsingle statement, the assignment done by augmented assignment\nstatements is handled the same way as normal assignments. Similarly,\nwith the exception of the possible *in-place* behavior, the binary\noperation performed by augmented assignment is the same as the normal\nbinary operations.\n\nFor targets which are attribute references, the same caveat about\nclass and instance attributes applies as for regular assignments.\n',
- 'binary': u'\nBinary arithmetic operations\n****************************\n\nThe binary arithmetic operations have the conventional priority\nlevels.  Note that some of these operations also apply to certain non-\nnumeric types.  Apart from the power operator, there are only two\nlevels, one for multiplicative operators and one for additive\noperators:\n\n   m_expr ::= u_expr | m_expr "*" u_expr | m_expr "//" u_expr | m_expr "/" u_expr\n              | m_expr "%" u_expr\n   a_expr ::= m_expr | a_expr "+" m_expr | a_expr "-" m_expr\n\nThe "*" (multiplication) operator yields the product of its arguments.\nThe arguments must either both be numbers, or one argument must be an\ninteger (plain or long) and the other must be a sequence. In the\nformer case, the numbers are converted to a common type and then\nmultiplied together.  In the latter case, sequence repetition is\nperformed; a negative repetition factor yields an empty sequence.\n\nThe "/" (division) and "//" (floor division) operators yield the\nquotient of their arguments.  The numeric arguments are first\nconverted to a common type. Plain or long integer division yields an\ninteger of the same type; the result is that of mathematical division\nwith the \'floor\' function applied to the result. Division by zero\nraises the "ZeroDivisionError" exception.\n\nThe "%" (modulo) operator yields the remainder from the division of\nthe first argument by the second.  The numeric arguments are first\nconverted to a common type.  A zero right argument raises the\n"ZeroDivisionError" exception.  The arguments may be floating point\nnumbers, e.g., "3.14%0.7" equals "0.34" (since "3.14" equals "4*0.7 +\n0.34".)  The modulo operator always yields a result with the same sign\nas its second operand (or zero); the absolute value of the result is\nstrictly smaller than the absolute value of the second operand [2].\n\nThe integer division and modulo operators are connected by the\nfollowing identity: "x == (x/y)*y + (x%y)".  Integer division and\nmodulo are also connected with the built-in function "divmod()":\n"divmod(x, y) == (x/y, x%y)".  These identities don\'t hold for\nfloating point numbers; there similar identities hold approximately\nwhere "x/y" is replaced by "floor(x/y)" or "floor(x/y) - 1" [3].\n\nIn addition to performing the modulo operation on numbers, the "%"\noperator is also overloaded by string and unicode objects to perform\nstring formatting (also known as interpolation). The syntax for string\nformatting is described in the Python Library Reference, section\nString Formatting Operations.\n\nDeprecated since version 2.3: The floor division operator, the modulo\noperator, and the "divmod()" function are no longer defined for\ncomplex numbers.  Instead, convert to a floating point number using\nthe "abs()" function if appropriate.\n\nThe "+" (addition) operator yields the sum of its arguments. The\narguments must either both be numbers or both sequences of the same\ntype.  In the former case, the numbers are converted to a common type\nand then added together.  In the latter case, the sequences are\nconcatenated.\n\nThe "-" (subtraction) operator yields the difference of its arguments.\nThe numeric arguments are first converted to a common type.\n',
- 'bitwise': u'\nBinary bitwise operations\n*************************\n\nEach of the three bitwise operations has a different priority level:\n\n   and_expr ::= shift_expr | and_expr "&" shift_expr\n   xor_expr ::= and_expr | xor_expr "^" and_expr\n   or_expr  ::= xor_expr | or_expr "|" xor_expr\n\nThe "&" operator yields the bitwise AND of its arguments, which must\nbe plain or long integers.  The arguments are converted to a common\ntype.\n\nThe "^" operator yields the bitwise XOR (exclusive OR) of its\narguments, which must be plain or long integers.  The arguments are\nconverted to a common type.\n\nThe "|" operator yields the bitwise (inclusive) OR of its arguments,\nwhich must be plain or long integers.  The arguments are converted to\na common type.\n',
- 'bltin-code-objects': u'\nCode Objects\n************\n\nCode objects are used by the implementation to represent "pseudo-\ncompiled" executable Python code such as a function body. They differ\nfrom function objects because they don\'t contain a reference to their\nglobal execution environment.  Code objects are returned by the built-\nin "compile()" function and can be extracted from function objects\nthrough their "func_code" attribute. See also the "code" module.\n\nA code object can be executed or evaluated by passing it (instead of a\nsource string) to the "exec" statement or the built-in "eval()"\nfunction.\n\nSee The standard type hierarchy for more information.\n',
- 'bltin-ellipsis-object': u'\nThe Ellipsis Object\n*******************\n\nThis object is used by extended slice notation (see Slicings).  It\nsupports no special operations.  There is exactly one ellipsis object,\nnamed "Ellipsis" (a built-in name).\n\nIt is written as "Ellipsis".  When in a subscript, it can also be\nwritten as "...", for example "seq[...]".\n',
- 'bltin-null-object': u'\nThe Null Object\n***************\n\nThis object is returned by functions that don\'t explicitly return a\nvalue.  It supports no special operations.  There is exactly one null\nobject, named "None" (a built-in name).\n\nIt is written as "None".\n',
- 'bltin-type-objects': u'\nType Objects\n************\n\nType objects represent the various object types.  An object\'s type is\naccessed by the built-in function "type()".  There are no special\noperations on types.  The standard module "types" defines names for\nall standard built-in types.\n\nTypes are written like this: "<type \'int\'>".\n',
- 'booleans': u'\nBoolean operations\n******************\n\n   or_test  ::= and_test | or_test "or" and_test\n   and_test ::= not_test | and_test "and" not_test\n   not_test ::= comparison | "not" not_test\n\nIn the context of Boolean operations, and also when expressions are\nused by control flow statements, the following values are interpreted\nas false: "False", "None", numeric zero of all types, and empty\nstrings and containers (including strings, tuples, lists,\ndictionaries, sets and frozensets).  All other values are interpreted\nas true.  (See the "__nonzero__()" special method for a way to change\nthis.)\n\nThe operator "not" yields "True" if its argument is false, "False"\notherwise.\n\nThe expression "x and y" first evaluates *x*; if *x* is false, its\nvalue is returned; otherwise, *y* is evaluated and the resulting value\nis returned.\n\nThe expression "x or y" first evaluates *x*; if *x* is true, its value\nis returned; otherwise, *y* is evaluated and the resulting value is\nreturned.\n\n(Note that neither "and" nor "or" restrict the value and type they\nreturn to "False" and "True", but rather return the last evaluated\nargument. This is sometimes useful, e.g., if "s" is a string that\nshould be replaced by a default value if it is empty, the expression\n"s or \'foo\'" yields the desired value.  Because "not" has to invent a\nvalue anyway, it does not bother to return a value of the same type as\nits argument, so e.g., "not \'foo\'" yields "False", not "\'\'".)\n',
- 'break': u'\nThe "break" statement\n*********************\n\n   break_stmt ::= "break"\n\n"break" may only occur syntactically nested in a "for" or "while"\nloop, but not nested in a function or class definition within that\nloop.\n\nIt terminates the nearest enclosing loop, skipping the optional "else"\nclause if the loop has one.\n\nIf a "for" loop is terminated by "break", the loop control target\nkeeps its current value.\n\nWhen "break" passes control out of a "try" statement with a "finally"\nclause, that "finally" clause is executed before really leaving the\nloop.\n',
- 'callable-types': u'\nEmulating callable objects\n**************************\n\nobject.__call__(self[, args...])\n\n   Called when the instance is "called" as a function; if this method\n   is defined, "x(arg1, arg2, ...)" is a shorthand for\n   "x.__call__(arg1, arg2, ...)".\n',
- 'calls': u'\nCalls\n*****\n\nA call calls a callable object (e.g., a *function*) with a possibly\nempty series of *arguments*:\n\n   call                 ::= primary "(" [argument_list [","]\n            | expression genexpr_for] ")"\n   argument_list        ::= positional_arguments ["," keyword_arguments]\n                       ["," "*" expression] ["," keyword_arguments]\n                       ["," "**" expression]\n                     | keyword_arguments ["," "*" expression]\n                       ["," "**" expression]\n                     | "*" expression ["," keyword_arguments] ["," "**" expression]\n                     | "**" expression\n   positional_arguments ::= expression ("," expression)*\n   keyword_arguments    ::= keyword_item ("," keyword_item)*\n   keyword_item         ::= identifier "=" expression\n\nA trailing comma may be present after the positional and keyword\narguments but does not affect the semantics.\n\nThe primary must evaluate to a callable object (user-defined\nfunctions, built-in functions, methods of built-in objects, class\nobjects, methods of class instances, and certain class instances\nthemselves are callable; extensions may define additional callable\nobject types).  All argument expressions are evaluated before the call\nis attempted.  Please refer to section Function definitions for the\nsyntax of formal *parameter* lists.\n\nIf keyword arguments are present, they are first converted to\npositional arguments, as follows.  First, a list of unfilled slots is\ncreated for the formal parameters.  If there are N positional\narguments, they are placed in the first N slots.  Next, for each\nkeyword argument, the identifier is used to determine the\ncorresponding slot (if the identifier is the same as the first formal\nparameter name, the first slot is used, and so on).  If the slot is\nalready filled, a "TypeError" exception is raised. Otherwise, the\nvalue of the argument is placed in the slot, filling it (even if the\nexpression is "None", it fills the slot).  When all arguments have\nbeen processed, the slots that are still unfilled are filled with the\ncorresponding default value from the function definition.  (Default\nvalues are calculated, once, when the function is defined; thus, a\nmutable object such as a list or dictionary used as default value will\nbe shared by all calls that don\'t specify an argument value for the\ncorresponding slot; this should usually be avoided.)  If there are any\nunfilled slots for which no default value is specified, a "TypeError"\nexception is raised.  Otherwise, the list of filled slots is used as\nthe argument list for the call.\n\n**CPython implementation detail:** An implementation may provide\nbuilt-in functions whose positional parameters do not have names, even\nif they are \'named\' for the purpose of documentation, and which\ntherefore cannot be supplied by keyword.  In CPython, this is the case\nfor functions implemented in C that use "PyArg_ParseTuple()" to parse\ntheir arguments.\n\nIf there are more positional arguments than there are formal parameter\nslots, a "TypeError" exception is raised, unless a formal parameter\nusing the syntax "*identifier" is present; in this case, that formal\nparameter receives a tuple containing the excess positional arguments\n(or an empty tuple if there were no excess positional arguments).\n\nIf any keyword argument does not correspond to a formal parameter\nname, a "TypeError" exception is raised, unless a formal parameter\nusing the syntax "**identifier" is present; in this case, that formal\nparameter receives a dictionary containing the excess keyword\narguments (using the keywords as keys and the argument values as\ncorresponding values), or a (new) empty dictionary if there were no\nexcess keyword arguments.\n\nIf the syntax "*expression" appears in the function call, "expression"\nmust evaluate to an iterable.  Elements from this iterable are treated\nas if they were additional positional arguments; if there are\npositional arguments *x1*, ..., *xN*, and "expression" evaluates to a\nsequence *y1*, ..., *yM*, this is equivalent to a call with M+N\npositional arguments *x1*, ..., *xN*, *y1*, ..., *yM*.\n\nA consequence of this is that although the "*expression" syntax may\nappear *after* some keyword arguments, it is processed *before* the\nkeyword arguments (and the "**expression" argument, if any -- see\nbelow).  So:\n\n   >>> def f(a, b):\n   ...  print a, b\n   ...\n   >>> f(b=1, *(2,))\n   2 1\n   >>> f(a=1, *(2,))\n   Traceback (most recent call last):\n     File "<stdin>", line 1, in ?\n   TypeError: f() got multiple values for keyword argument \'a\'\n   >>> f(1, *(2,))\n   1 2\n\nIt is unusual for both keyword arguments and the "*expression" syntax\nto be used in the same call, so in practice this confusion does not\narise.\n\nIf the syntax "**expression" appears in the function call,\n"expression" must evaluate to a mapping, the contents of which are\ntreated as additional keyword arguments.  In the case of a keyword\nappearing in both "expression" and as an explicit keyword argument, a\n"TypeError" exception is raised.\n\nFormal parameters using the syntax "*identifier" or "**identifier"\ncannot be used as positional argument slots or as keyword argument\nnames.  Formal parameters using the syntax "(sublist)" cannot be used\nas keyword argument names; the outermost sublist corresponds to a\nsingle unnamed argument slot, and the argument value is assigned to\nthe sublist using the usual tuple assignment rules after all other\nparameter processing is done.\n\nA call always returns some value, possibly "None", unless it raises an\nexception.  How this value is computed depends on the type of the\ncallable object.\n\nIf it is---\n\na user-defined function:\n   The code block for the function is executed, passing it the\n   argument list.  The first thing the code block will do is bind the\n   formal parameters to the arguments; this is described in section\n   Function definitions.  When the code block executes a "return"\n   statement, this specifies the return value of the function call.\n\na built-in function or method:\n   The result is up to the interpreter; see Built-in Functions for the\n   descriptions of built-in functions and methods.\n\na class object:\n   A new instance of that class is returned.\n\na class instance method:\n   The corresponding user-defined function is called, with an argument\n   list that is one longer than the argument list of the call: the\n   instance becomes the first argument.\n\na class instance:\n   The class must define a "__call__()" method; the effect is then the\n   same as if that method was called.\n',
- 'class': u'\nClass definitions\n*****************\n\nA class definition defines a class object (see section The standard\ntype hierarchy):\n\n   classdef    ::= "class" classname [inheritance] ":" suite\n   inheritance ::= "(" [expression_list] ")"\n   classname   ::= identifier\n\nA class definition is an executable statement.  It first evaluates the\ninheritance list, if present.  Each item in the inheritance list\nshould evaluate to a class object or class type which allows\nsubclassing.  The class\'s suite is then executed in a new execution\nframe (see section Naming and binding), using a newly created local\nnamespace and the original global namespace. (Usually, the suite\ncontains only function definitions.)  When the class\'s suite finishes\nexecution, its execution frame is discarded but its local namespace is\nsaved. [4] A class object is then created using the inheritance list\nfor the base classes and the saved local namespace for the attribute\ndictionary.  The class name is bound to this class object in the\noriginal local namespace.\n\n**Programmer\'s note:** Variables defined in the class definition are\nclass variables; they are shared by all instances.  To create instance\nvariables, they can be set in a method with "self.name = value".  Both\nclass and instance variables are accessible through the notation\n""self.name"", and an instance variable hides a class variable with\nthe same name when accessed in this way. Class variables can be used\nas defaults for instance variables, but using mutable values there can\nlead to unexpected results.  For *new-style class*es, descriptors can\nbe used to create instance variables with different implementation\ndetails.\n\nClass definitions, like function definitions, may be wrapped by one or\nmore *decorator* expressions.  The evaluation rules for the decorator\nexpressions are the same as for functions.  The result must be a class\nobject, which is then bound to the class name.\n\n-[ Footnotes ]-\n\n[1] The exception is propagated to the invocation stack unless\n    there is a "finally" clause which happens to raise another\n    exception. That new exception causes the old one to be lost.\n\n[2] Currently, control "flows off the end" except in the case of\n    an exception or the execution of a "return", "continue", or\n    "break" statement.\n\n[3] A string literal appearing as the first statement in the\n    function body is transformed into the function\'s "__doc__"\n    attribute and therefore the function\'s *docstring*.\n\n[4] A string literal appearing as the first statement in the class\n    body is transformed into the namespace\'s "__doc__" item and\n    therefore the class\'s *docstring*.\n',
- 'comparisons': u'\nComparisons\n***********\n\nUnlike C, all comparison operations in Python have the same priority,\nwhich is lower than that of any arithmetic, shifting or bitwise\noperation.  Also unlike C, expressions like "a < b < c" have the\ninterpretation that is conventional in mathematics:\n\n   comparison    ::= or_expr ( comp_operator or_expr )*\n   comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "<>" | "!="\n                     | "is" ["not"] | ["not"] "in"\n\nComparisons yield boolean values: "True" or "False".\n\nComparisons can be chained arbitrarily, e.g., "x < y <= z" is\nequivalent to "x < y and y <= z", except that "y" is evaluated only\nonce (but in both cases "z" is not evaluated at all when "x < y" is\nfound to be false).\n\nFormally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*,\n*op2*, ..., *opN* are comparison operators, then "a op1 b op2 c ... y\nopN z" is equivalent to "a op1 b and b op2 c and ... y opN z", except\nthat each expression is evaluated at most once.\n\nNote that "a op1 b op2 c" doesn\'t imply any kind of comparison between\n*a* and *c*, so that, e.g., "x < y > z" is perfectly legal (though\nperhaps not pretty).\n\nThe forms "<>" and "!=" are equivalent; for consistency with C, "!="\nis preferred; where "!=" is mentioned below "<>" is also accepted.\nThe "<>" spelling is considered obsolescent.\n\nThe operators "<", ">", "==", ">=", "<=", and "!=" compare the values\nof two objects.  The objects need not have the same type. If both are\nnumbers, they are converted to a common type.  Otherwise, objects of\ndifferent types *always* compare unequal, and are ordered consistently\nbut arbitrarily. You can control comparison behavior of objects of\nnon-built-in types by defining a "__cmp__" method or rich comparison\nmethods like "__gt__", described in section Special method names.\n\n(This unusual definition of comparison was used to simplify the\ndefinition of operations like sorting and the "in" and "not in"\noperators. In the future, the comparison rules for objects of\ndifferent types are likely to change.)\n\nComparison of objects of the same type depends on the type:\n\n* Numbers are compared arithmetically.\n\n* Strings are compared lexicographically using the numeric\n  equivalents (the result of the built-in function "ord()") of their\n  characters. Unicode and 8-bit strings are fully interoperable in\n  this behavior. [4]\n\n* Tuples and lists are compared lexicographically using comparison\n  of corresponding elements.  This means that to compare equal, each\n  element must compare equal and the two sequences must be of the same\n  type and have the same length.\n\n  If not equal, the sequences are ordered the same as their first\n  differing elements.  For example, "cmp([1,2,x], [1,2,y])" returns\n  the same as "cmp(x,y)".  If the corresponding element does not\n  exist, the shorter sequence is ordered first (for example, "[1,2] <\n  [1,2,3]").\n\n* Mappings (dictionaries) compare equal if and only if their sorted\n  (key, value) lists compare equal. [5] Outcomes other than equality\n  are resolved consistently, but are not otherwise defined. [6]\n\n* Most other objects of built-in types compare unequal unless they\n  are the same object; the choice whether one object is considered\n  smaller or larger than another one is made arbitrarily but\n  consistently within one execution of a program.\n\nThe operators "in" and "not in" test for collection membership.  "x in\ns" evaluates to true if *x* is a member of the collection *s*, and\nfalse otherwise.  "x not in s" returns the negation of "x in s". The\ncollection membership test has traditionally been bound to sequences;\nan object is a member of a collection if the collection is a sequence\nand contains an element equal to that object.  However, it make sense\nfor many other object types to support membership tests without being\na sequence.  In particular, dictionaries (for keys) and sets support\nmembership testing.\n\nFor the list and tuple types, "x in y" is true if and only if there\nexists an index *i* such that "x == y[i]" is true.\n\nFor the Unicode and string types, "x in y" is true if and only if *x*\nis a substring of *y*.  An equivalent test is "y.find(x) != -1".\nNote, *x* and *y* need not be the same type; consequently, "u\'ab\' in\n\'abc\'" will return "True". Empty strings are always considered to be a\nsubstring of any other string, so """ in "abc"" will return "True".\n\nChanged in version 2.3: Previously, *x* was required to be a string of\nlength "1".\n\nFor user-defined classes which define the "__contains__()" method, "x\nin y" is true if and only if "y.__contains__(x)" is true.\n\nFor user-defined classes which do not define "__contains__()" but do\ndefine "__iter__()", "x in y" is true if some value "z" with "x == z"\nis produced while iterating over "y".  If an exception is raised\nduring the iteration, it is as if "in" raised that exception.\n\nLastly, the old-style iteration protocol is tried: if a class defines\n"__getitem__()", "x in y" is true if and only if there is a non-\nnegative integer index *i* such that "x == y[i]", and all lower\ninteger indices do not raise "IndexError" exception. (If any other\nexception is raised, it is as if "in" raised that exception).\n\nThe operator "not in" is defined to have the inverse true value of\n"in".\n\nThe operators "is" and "is not" test for object identity: "x is y" is\ntrue if and only if *x* and *y* are the same object.  "x is not y"\nyields the inverse truth value. [7]\n',
- 'compound': u'\nCompound statements\n*******************\n\nCompound statements contain (groups of) other statements; they affect\nor control the execution of those other statements in some way.  In\ngeneral, compound statements span multiple lines, although in simple\nincarnations a whole compound statement may be contained in one line.\n\nThe "if", "while" and "for" statements implement traditional control\nflow constructs.  "try" specifies exception handlers and/or cleanup\ncode for a group of statements.  Function and class definitions are\nalso syntactically compound statements.\n\nCompound statements consist of one or more \'clauses.\'  A clause\nconsists of a header and a \'suite.\'  The clause headers of a\nparticular compound statement are all at the same indentation level.\nEach clause header begins with a uniquely identifying keyword and ends\nwith a colon.  A suite is a group of statements controlled by a\nclause.  A suite can be one or more semicolon-separated simple\nstatements on the same line as the header, following the header\'s\ncolon, or it can be one or more indented statements on subsequent\nlines.  Only the latter form of suite can contain nested compound\nstatements; the following is illegal, mostly because it wouldn\'t be\nclear to which "if" clause a following "else" clause would belong:\n\n   if test1: if test2: print x\n\nAlso note that the semicolon binds tighter than the colon in this\ncontext, so that in the following example, either all or none of the\n"print" statements are executed:\n\n   if x < y < z: print x; print y; print z\n\nSummarizing:\n\n   compound_stmt ::= if_stmt\n                     | while_stmt\n                     | for_stmt\n                     | try_stmt\n                     | with_stmt\n                     | funcdef\n                     | classdef\n                     | decorated\n   suite         ::= stmt_list NEWLINE | NEWLINE INDENT statement+ DEDENT\n   statement     ::= stmt_list NEWLINE | compound_stmt\n   stmt_list     ::= simple_stmt (";" simple_stmt)* [";"]\n\nNote that statements always end in a "NEWLINE" possibly followed by a\n"DEDENT". Also note that optional continuation clauses always begin\nwith a keyword that cannot start a statement, thus there are no\nambiguities (the \'dangling "else"\' problem is solved in Python by\nrequiring nested "if" statements to be indented).\n\nThe formatting of the grammar rules in the following sections places\neach clause on a separate line for clarity.\n\n\nThe "if" statement\n==================\n\nThe "if" statement is used for conditional execution:\n\n   if_stmt ::= "if" expression ":" suite\n               ( "elif" expression ":" suite )*\n               ["else" ":" suite]\n\nIt selects exactly one of the suites by evaluating the expressions one\nby one until one is found to be true (see section Boolean operations\nfor the definition of true and false); then that suite is executed\n(and no other part of the "if" statement is executed or evaluated).\nIf all expressions are false, the suite of the "else" clause, if\npresent, is executed.\n\n\nThe "while" statement\n=====================\n\nThe "while" statement is used for repeated execution as long as an\nexpression is true:\n\n   while_stmt ::= "while" expression ":" suite\n                  ["else" ":" suite]\n\nThis repeatedly tests the expression and, if it is true, executes the\nfirst suite; if the expression is false (which may be the first time\nit is tested) the suite of the "else" clause, if present, is executed\nand the loop terminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite.  A "continue" statement\nexecuted in the first suite skips the rest of the suite and goes back\nto testing the expression.\n\n\nThe "for" statement\n===================\n\nThe "for" statement is used to iterate over the elements of a sequence\n(such as a string, tuple or list) or other iterable object:\n\n   for_stmt ::= "for" target_list "in" expression_list ":" suite\n                ["else" ":" suite]\n\nThe expression list is evaluated once; it should yield an iterable\nobject.  An iterator is created for the result of the\n"expression_list".  The suite is then executed once for each item\nprovided by the iterator, in the order of ascending indices.  Each\nitem in turn is assigned to the target list using the standard rules\nfor assignments, and then the suite is executed.  When the items are\nexhausted (which is immediately when the sequence is empty), the suite\nin the "else" clause, if present, is executed, and the loop\nterminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite.  A "continue" statement\nexecuted in the first suite skips the rest of the suite and continues\nwith the next item, or with the "else" clause if there was no next\nitem.\n\nThe suite may assign to the variable(s) in the target list; this does\nnot affect the next item assigned to it.\n\nThe target list is not deleted when the loop is finished, but if the\nsequence is empty, it will not have been assigned to at all by the\nloop.  Hint: the built-in function "range()" returns a sequence of\nintegers suitable to emulate the effect of Pascal\'s "for i := a to b\ndo"; e.g., "range(3)" returns the list "[0, 1, 2]".\n\nNote: There is a subtlety when the sequence is being modified by the\n  loop (this can only occur for mutable sequences, i.e. lists). An\n  internal counter is used to keep track of which item is used next,\n  and this is incremented on each iteration.  When this counter has\n  reached the length of the sequence the loop terminates.  This means\n  that if the suite deletes the current (or a previous) item from the\n  sequence, the next item will be skipped (since it gets the index of\n  the current item which has already been treated).  Likewise, if the\n  suite inserts an item in the sequence before the current item, the\n  current item will be treated again the next time through the loop.\n  This can lead to nasty bugs that can be avoided by making a\n  temporary copy using a slice of the whole sequence, e.g.,\n\n     for x in a[:]:\n         if x < 0: a.remove(x)\n\n\nThe "try" statement\n===================\n\nThe "try" statement specifies exception handlers and/or cleanup code\nfor a group of statements:\n\n   try_stmt  ::= try1_stmt | try2_stmt\n   try1_stmt ::= "try" ":" suite\n                 ("except" [expression [("as" | ",") identifier]] ":" suite)+\n                 ["else" ":" suite]\n                 ["finally" ":" suite]\n   try2_stmt ::= "try" ":" suite\n                 "finally" ":" suite\n\nChanged in version 2.5: In previous versions of Python,\n"try"..."except"..."finally" did not work. "try"..."except" had to be\nnested in "try"..."finally".\n\nThe "except" clause(s) specify one or more exception handlers. When no\nexception occurs in the "try" clause, no exception handler is\nexecuted. When an exception occurs in the "try" suite, a search for an\nexception handler is started.  This search inspects the except clauses\nin turn until one is found that matches the exception.  An expression-\nless except clause, if present, must be last; it matches any\nexception.  For an except clause with an expression, that expression\nis evaluated, and the clause matches the exception if the resulting\nobject is "compatible" with the exception.  An object is compatible\nwith an exception if it is the class or a base class of the exception\nobject, or a tuple containing an item compatible with the exception.\n\nIf no except clause matches the exception, the search for an exception\nhandler continues in the surrounding code and on the invocation stack.\n[1]\n\nIf the evaluation of an expression in the header of an except clause\nraises an exception, the original search for a handler is canceled and\na search starts for the new exception in the surrounding code and on\nthe call stack (it is treated as if the entire "try" statement raised\nthe exception).\n\nWhen a matching except clause is found, the exception is assigned to\nthe target specified in that except clause, if present, and the except\nclause\'s suite is executed.  All except clauses must have an\nexecutable block.  When the end of this block is reached, execution\ncontinues normally after the entire try statement.  (This means that\nif two nested handlers exist for the same exception, and the exception\noccurs in the try clause of the inner handler, the outer handler will\nnot handle the exception.)\n\nBefore an except clause\'s suite is executed, details about the\nexception are assigned to three variables in the "sys" module:\n"sys.exc_type" receives the object identifying the exception;\n"sys.exc_value" receives the exception\'s parameter;\n"sys.exc_traceback" receives a traceback object (see section The\nstandard type hierarchy) identifying the point in the program where\nthe exception occurred. These details are also available through the\n"sys.exc_info()" function, which returns a tuple "(exc_type,\nexc_value, exc_traceback)".  Use of the corresponding variables is\ndeprecated in favor of this function, since their use is unsafe in a\nthreaded program.  As of Python 1.5, the variables are restored to\ntheir previous values (before the call) when returning from a function\nthat handled an exception.\n\nThe optional "else" clause is executed if and when control flows off\nthe end of the "try" clause. [2] Exceptions in the "else" clause are\nnot handled by the preceding "except" clauses.\n\nIf "finally" is present, it specifies a \'cleanup\' handler.  The "try"\nclause is executed, including any "except" and "else" clauses.  If an\nexception occurs in any of the clauses and is not handled, the\nexception is temporarily saved. The "finally" clause is executed.  If\nthere is a saved exception, it is re-raised at the end of the\n"finally" clause. If the "finally" clause raises another exception or\nexecutes a "return" or "break" statement, the saved exception is\ndiscarded:\n\n   >>> def f():\n   ...     try:\n   ...         1/0\n   ...     finally:\n   ...         return 42\n   ...\n   >>> f()\n   42\n\nThe exception information is not available to the program during\nexecution of the "finally" clause.\n\nWhen a "return", "break" or "continue" statement is executed in the\n"try" suite of a "try"..."finally" statement, the "finally" clause is\nalso executed \'on the way out.\' A "continue" statement is illegal in\nthe "finally" clause. (The reason is a problem with the current\nimplementation --- this restriction may be lifted in the future).\n\nThe return value of a function is determined by the last "return"\nstatement executed.  Since the "finally" clause always executes, a\n"return" statement executed in the "finally" clause will always be the\nlast one executed:\n\n   >>> def foo():\n   ...     try:\n   ...         return \'try\'\n   ...     finally:\n   ...         return \'finally\'\n   ...\n   >>> foo()\n   \'finally\'\n\nAdditional information on exceptions can be found in section\nExceptions, and information on using the "raise" statement to generate\nexceptions may be found in section The raise statement.\n\n\nThe "with" statement\n====================\n\nNew in version 2.5.\n\nThe "with" statement is used to wrap the execution of a block with\nmethods defined by a context manager (see section With Statement\nContext Managers). This allows common "try"..."except"..."finally"\nusage patterns to be encapsulated for convenient reuse.\n\n   with_stmt ::= "with" with_item ("," with_item)* ":" suite\n   with_item ::= expression ["as" target]\n\nThe execution of the "with" statement with one "item" proceeds as\nfollows:\n\n1. The context expression (the expression given in the "with_item")\n   is evaluated to obtain a context manager.\n\n2. The context manager\'s "__exit__()" is loaded for later use.\n\n3. The context manager\'s "__enter__()" method is invoked.\n\n4. If a target was included in the "with" statement, the return\n   value from "__enter__()" is assigned to it.\n\n   Note: The "with" statement guarantees that if the "__enter__()"\n     method returns without an error, then "__exit__()" will always be\n     called. Thus, if an error occurs during the assignment to the\n     target list, it will be treated the same as an error occurring\n     within the suite would be. See step 6 below.\n\n5. The suite is executed.\n\n6. The context manager\'s "__exit__()" method is invoked. If an\n   exception caused the suite to be exited, its type, value, and\n   traceback are passed as arguments to "__exit__()". Otherwise, three\n   "None" arguments are supplied.\n\n   If the suite was exited due to an exception, and the return value\n   from the "__exit__()" method was false, the exception is reraised.\n   If the return value was true, the exception is suppressed, and\n   execution continues with the statement following the "with"\n   statement.\n\n   If the suite was exited for any reason other than an exception, the\n   return value from "__exit__()" is ignored, and execution proceeds\n   at the normal location for the kind of exit that was taken.\n\nWith more than one item, the context managers are processed as if\nmultiple "with" statements were nested:\n\n   with A() as a, B() as b:\n       suite\n\nis equivalent to\n\n   with A() as a:\n       with B() as b:\n           suite\n\nNote: In Python 2.5, the "with" statement is only allowed when the\n  "with_statement" feature has been enabled.  It is always enabled in\n  Python 2.6.\n\nChanged in version 2.7: Support for multiple context expressions.\n\nSee also: **PEP 0343** - The "with" statement\n\n     The specification, background, and examples for the Python "with"\n     statement.\n\n\nFunction definitions\n====================\n\nA function definition defines a user-defined function object (see\nsection The standard type hierarchy):\n\n   decorated      ::= decorators (classdef | funcdef)\n   decorators     ::= decorator+\n   decorator      ::= "@" dotted_name ["(" [argument_list [","]] ")"] NEWLINE\n   funcdef        ::= "def" funcname "(" [parameter_list] ")" ":" suite\n   dotted_name    ::= identifier ("." identifier)*\n   parameter_list ::= (defparameter ",")*\n                      (  "*" identifier ["," "**" identifier]\n                      | "**" identifier\n                      | defparameter [","] )\n   defparameter   ::= parameter ["=" expression]\n   sublist        ::= parameter ("," parameter)* [","]\n   parameter      ::= identifier | "(" sublist ")"\n   funcname       ::= identifier\n\nA function definition is an executable statement.  Its execution binds\nthe function name in the current local namespace to a function object\n(a wrapper around the executable code for the function).  This\nfunction object contains a reference to the current global namespace\nas the global namespace to be used when the function is called.\n\nThe function definition does not execute the function body; this gets\nexecuted only when the function is called. [3]\n\nA function definition may be wrapped by one or more *decorator*\nexpressions. Decorator expressions are evaluated when the function is\ndefined, in the scope that contains the function definition.  The\nresult must be a callable, which is invoked with the function object\nas the only argument. The returned value is bound to the function name\ninstead of the function object.  Multiple decorators are applied in\nnested fashion. For example, the following code:\n\n   @f1(arg)\n   @f2\n   def func(): pass\n\nis equivalent to:\n\n   def func(): pass\n   func = f1(arg)(f2(func))\n\nWhen one or more top-level *parameters* have the form *parameter* "="\n*expression*, the function is said to have "default parameter values."\nFor a parameter with a default value, the corresponding *argument* may\nbe omitted from a call, in which case the parameter\'s default value is\nsubstituted.  If a parameter has a default value, all following\nparameters must also have a default value --- this is a syntactic\nrestriction that is not expressed by the grammar.\n\n**Default parameter values are evaluated when the function definition\nis executed.**  This means that the expression is evaluated once, when\nthe function is defined, and that the same "pre-computed" value is\nused for each call.  This is especially important to understand when a\ndefault parameter is a mutable object, such as a list or a dictionary:\nif the function modifies the object (e.g. by appending an item to a\nlist), the default value is in effect modified. This is generally not\nwhat was intended.  A way around this  is to use "None" as the\ndefault, and explicitly test for it in the body of the function, e.g.:\n\n   def whats_on_the_telly(penguin=None):\n       if penguin is None:\n           penguin = []\n       penguin.append("property of the zoo")\n       return penguin\n\nFunction call semantics are described in more detail in section Calls.\nA function call always assigns values to all parameters mentioned in\nthe parameter list, either from position arguments, from keyword\narguments, or from default values.  If the form ""*identifier"" is\npresent, it is initialized to a tuple receiving any excess positional\nparameters, defaulting to the empty tuple.  If the form\n""**identifier"" is present, it is initialized to a new dictionary\nreceiving any excess keyword arguments, defaulting to a new empty\ndictionary.\n\nIt is also possible to create anonymous functions (functions not bound\nto a name), for immediate use in expressions.  This uses lambda\nexpressions, described in section Lambdas.  Note that the lambda\nexpression is merely a shorthand for a simplified function definition;\na function defined in a ""def"" statement can be passed around or\nassigned to another name just like a function defined by a lambda\nexpression.  The ""def"" form is actually more powerful since it\nallows the execution of multiple statements.\n\n**Programmer\'s note:** Functions are first-class objects.  A ""def""\nform executed inside a function definition defines a local function\nthat can be returned or passed around.  Free variables used in the\nnested function can access the local variables of the function\ncontaining the def.  See section Naming and binding for details.\n\n\nClass definitions\n=================\n\nA class definition defines a class object (see section The standard\ntype hierarchy):\n\n   classdef    ::= "class" classname [inheritance] ":" suite\n   inheritance ::= "(" [expression_list] ")"\n   classname   ::= identifier\n\nA class definition is an executable statement.  It first evaluates the\ninheritance list, if present.  Each item in the inheritance list\nshould evaluate to a class object or class type which allows\nsubclassing.  The class\'s suite is then executed in a new execution\nframe (see section Naming and binding), using a newly created local\nnamespace and the original global namespace. (Usually, the suite\ncontains only function definitions.)  When the class\'s suite finishes\nexecution, its execution frame is discarded but its local namespace is\nsaved. [4] A class object is then created using the inheritance list\nfor the base classes and the saved local namespace for the attribute\ndictionary.  The class name is bound to this class object in the\noriginal local namespace.\n\n**Programmer\'s note:** Variables defined in the class definition are\nclass variables; they are shared by all instances.  To create instance\nvariables, they can be set in a method with "self.name = value".  Both\nclass and instance variables are accessible through the notation\n""self.name"", and an instance variable hides a class variable with\nthe same name when accessed in this way. Class variables can be used\nas defaults for instance variables, but using mutable values there can\nlead to unexpected results.  For *new-style class*es, descriptors can\nbe used to create instance variables with different implementation\ndetails.\n\nClass definitions, like function definitions, may be wrapped by one or\nmore *decorator* expressions.  The evaluation rules for the decorator\nexpressions are the same as for functions.  The result must be a class\nobject, which is then bound to the class name.\n\n-[ Footnotes ]-\n\n[1] The exception is propagated to the invocation stack unless\n    there is a "finally" clause which happens to raise another\n    exception. That new exception causes the old one to be lost.\n\n[2] Currently, control "flows off the end" except in the case of\n    an exception or the execution of a "return", "continue", or\n    "break" statement.\n\n[3] A string literal appearing as the first statement in the\n    function body is transformed into the function\'s "__doc__"\n    attribute and therefore the function\'s *docstring*.\n\n[4] A string literal appearing as the first statement in the class\n    body is transformed into the namespace\'s "__doc__" item and\n    therefore the class\'s *docstring*.\n',
- 'context-managers': u'\nWith Statement Context Managers\n*******************************\n\nNew in version 2.5.\n\nA *context manager* is an object that defines the runtime context to\nbe established when executing a "with" statement. The context manager\nhandles the entry into, and the exit from, the desired runtime context\nfor the execution of the block of code.  Context managers are normally\ninvoked using the "with" statement (described in section The with\nstatement), but can also be used by directly invoking their methods.\n\nTypical uses of context managers include saving and restoring various\nkinds of global state, locking and unlocking resources, closing opened\nfiles, etc.\n\nFor more information on context managers, see Context Manager Types.\n\nobject.__enter__(self)\n\n   Enter the runtime context related to this object. The "with"\n   statement will bind this method\'s return value to the target(s)\n   specified in the "as" clause of the statement, if any.\n\nobject.__exit__(self, exc_type, exc_value, traceback)\n\n   Exit the runtime context related to this object. The parameters\n   describe the exception that caused the context to be exited. If the\n   context was exited without an exception, all three arguments will\n   be "None".\n\n   If an exception is supplied, and the method wishes to suppress the\n   exception (i.e., prevent it from being propagated), it should\n   return a true value. Otherwise, the exception will be processed\n   normally upon exit from this method.\n\n   Note that "__exit__()" methods should not reraise the passed-in\n   exception; this is the caller\'s responsibility.\n\nSee also: **PEP 0343** - The "with" statement\n\n     The specification, background, and examples for the Python "with"\n     statement.\n',
- 'continue': u'\nThe "continue" statement\n************************\n\n   continue_stmt ::= "continue"\n\n"continue" may only occur syntactically nested in a "for" or "while"\nloop, but not nested in a function or class definition or "finally"\nclause within that loop.  It continues with the next cycle of the\nnearest enclosing loop.\n\nWhen "continue" passes control out of a "try" statement with a\n"finally" clause, that "finally" clause is executed before really\nstarting the next loop cycle.\n',
- 'conversions': u'\nArithmetic conversions\n**********************\n\nWhen a description of an arithmetic operator below uses the phrase\n"the numeric arguments are converted to a common type," the arguments\nare coerced using the coercion rules listed at  Coercion rules.  If\nboth arguments are standard numeric types, the following coercions are\napplied:\n\n* If either argument is a complex number, the other is converted to\n  complex;\n\n* otherwise, if either argument is a floating point number, the\n  other is converted to floating point;\n\n* otherwise, if either argument is a long integer, the other is\n  converted to long integer;\n\n* otherwise, both must be plain integers and no conversion is\n  necessary.\n\nSome additional rules apply for certain operators (e.g., a string left\nargument to the \'%\' operator). Extensions can define their own\ncoercions.\n',
- 'customization': u'\nBasic customization\n*******************\n\nobject.__new__(cls[, ...])\n\n   Called to create a new instance of class *cls*.  "__new__()" is a\n   static method (special-cased so you need not declare it as such)\n   that takes the class of which an instance was requested as its\n   first argument.  The remaining arguments are those passed to the\n   object constructor expression (the call to the class).  The return\n   value of "__new__()" should be the new object instance (usually an\n   instance of *cls*).\n\n   Typical implementations create a new instance of the class by\n   invoking the superclass\'s "__new__()" method using\n   "super(currentclass, cls).__new__(cls[, ...])" with appropriate\n   arguments and then modifying the newly-created instance as\n   necessary before returning it.\n\n   If "__new__()" returns an instance of *cls*, then the new\n   instance\'s "__init__()" method will be invoked like\n   "__init__(self[, ...])", where *self* is the new instance and the\n   remaining arguments are the same as were passed to "__new__()".\n\n   If "__new__()" does not return an instance of *cls*, then the new\n   instance\'s "__init__()" method will not be invoked.\n\n   "__new__()" is intended mainly to allow subclasses of immutable\n   types (like int, str, or tuple) to customize instance creation.  It\n   is also commonly overridden in custom metaclasses in order to\n   customize class creation.\n\nobject.__init__(self[, ...])\n\n   Called after the instance has been created (by "__new__()"), but\n   before it is returned to the caller.  The arguments are those\n   passed to the class constructor expression.  If a base class has an\n   "__init__()" method, the derived class\'s "__init__()" method, if\n   any, must explicitly call it to ensure proper initialization of the\n   base class part of the instance; for example:\n   "BaseClass.__init__(self, [args...])".\n\n   Because "__new__()" and "__init__()" work together in constructing\n   objects ("__new__()" to create it, and "__init__()" to customise\n   it), no non-"None" value may be returned by "__init__()"; doing so\n   will cause a "TypeError" to be raised at runtime.\n\nobject.__del__(self)\n\n   Called when the instance is about to be destroyed.  This is also\n   called a destructor.  If a base class has a "__del__()" method, the\n   derived class\'s "__del__()" method, if any, must explicitly call it\n   to ensure proper deletion of the base class part of the instance.\n   Note that it is possible (though not recommended!) for the\n   "__del__()" method to postpone destruction of the instance by\n   creating a new reference to it.  It may then be called at a later\n   time when this new reference is deleted.  It is not guaranteed that\n   "__del__()" methods are called for objects that still exist when\n   the interpreter exits.\n\n   Note: "del x" doesn\'t directly call "x.__del__()" --- the former\n     decrements the reference count for "x" by one, and the latter is\n     only called when "x"\'s reference count reaches zero.  Some common\n     situations that may prevent the reference count of an object from\n     going to zero include: circular references between objects (e.g.,\n     a doubly-linked list or a tree data structure with parent and\n     child pointers); a reference to the object on the stack frame of\n     a function that caught an exception (the traceback stored in\n     "sys.exc_traceback" keeps the stack frame alive); or a reference\n     to the object on the stack frame that raised an unhandled\n     exception in interactive mode (the traceback stored in\n     "sys.last_traceback" keeps the stack frame alive).  The first\n     situation can only be remedied by explicitly breaking the cycles;\n     the latter two situations can be resolved by storing "None" in\n     "sys.exc_traceback" or "sys.last_traceback".  Circular references\n     which are garbage are detected when the option cycle detector is\n     enabled (it\'s on by default), but can only be cleaned up if there\n     are no Python-level "__del__()" methods involved. Refer to the\n     documentation for the "gc" module for more information about how\n     "__del__()" methods are handled by the cycle detector,\n     particularly the description of the "garbage" value.\n\n   Warning: Due to the precarious circumstances under which\n     "__del__()" methods are invoked, exceptions that occur during\n     their execution are ignored, and a warning is printed to\n     "sys.stderr" instead. Also, when "__del__()" is invoked in\n     response to a module being deleted (e.g., when execution of the\n     program is done), other globals referenced by the "__del__()"\n     method may already have been deleted or in the process of being\n     torn down (e.g. the import machinery shutting down).  For this\n     reason, "__del__()" methods should do the absolute minimum needed\n     to maintain external invariants.  Starting with version 1.5,\n     Python guarantees that globals whose name begins with a single\n     underscore are deleted from their module before other globals are\n     deleted; if no other references to such globals exist, this may\n     help in assuring that imported modules are still available at the\n     time when the "__del__()" method is called.\n\n   See also the "-R" command-line option.\n\nobject.__repr__(self)\n\n   Called by the "repr()" built-in function and by string conversions\n   (reverse quotes) to compute the "official" string representation of\n   an object.  If at all possible, this should look like a valid\n   Python expression that could be used to recreate an object with the\n   same value (given an appropriate environment).  If this is not\n   possible, a string of the form "<...some useful description...>"\n   should be returned.  The return value must be a string object. If a\n   class defines "__repr__()" but not "__str__()", then "__repr__()"\n   is also used when an "informal" string representation of instances\n   of that class is required.\n\n   This is typically used for debugging, so it is important that the\n   representation is information-rich and unambiguous.\n\nobject.__str__(self)\n\n   Called by the "str()" built-in function and by the "print"\n   statement to compute the "informal" string representation of an\n   object.  This differs from "__repr__()" in that it does not have to\n   be a valid Python expression: a more convenient or concise\n   representation may be used instead. The return value must be a\n   string object.\n\nobject.__lt__(self, other)\nobject.__le__(self, other)\nobject.__eq__(self, other)\nobject.__ne__(self, other)\nobject.__gt__(self, other)\nobject.__ge__(self, other)\n\n   New in version 2.1.\n\n   These are the so-called "rich comparison" methods, and are called\n   for comparison operators in preference to "__cmp__()" below. The\n   correspondence between operator symbols and method names is as\n   follows: "x<y" calls "x.__lt__(y)", "x<=y" calls "x.__le__(y)",\n   "x==y" calls "x.__eq__(y)", "x!=y" and "x<>y" call "x.__ne__(y)",\n   "x>y" calls "x.__gt__(y)", and "x>=y" calls "x.__ge__(y)".\n\n   A rich comparison method may return the singleton "NotImplemented"\n   if it does not implement the operation for a given pair of\n   arguments. By convention, "False" and "True" are returned for a\n   successful comparison. However, these methods can return any value,\n   so if the comparison operator is used in a Boolean context (e.g.,\n   in the condition of an "if" statement), Python will call "bool()"\n   on the value to determine if the result is true or false.\n\n   There are no implied relationships among the comparison operators.\n   The truth of "x==y" does not imply that "x!=y" is false.\n   Accordingly, when defining "__eq__()", one should also define\n   "__ne__()" so that the operators will behave as expected.  See the\n   paragraph on "__hash__()" for some important notes on creating\n   *hashable* objects which support custom comparison operations and\n   are usable as dictionary keys.\n\n   There are no swapped-argument versions of these methods (to be used\n   when the left argument does not support the operation but the right\n   argument does); rather, "__lt__()" and "__gt__()" are each other\'s\n   reflection, "__le__()" and "__ge__()" are each other\'s reflection,\n   and "__eq__()" and "__ne__()" are their own reflection.\n\n   Arguments to rich comparison methods are never coerced.\n\n   To automatically generate ordering operations from a single root\n   operation, see "functools.total_ordering()".\n\nobject.__cmp__(self, other)\n\n   Called by comparison operations if rich comparison (see above) is\n   not defined.  Should return a negative integer if "self < other",\n   zero if "self == other", a positive integer if "self > other".  If\n   no "__cmp__()", "__eq__()" or "__ne__()" operation is defined,\n   class instances are compared by object identity ("address").  See\n   also the description of "__hash__()" for some important notes on\n   creating *hashable* objects which support custom comparison\n   operations and are usable as dictionary keys. (Note: the\n   restriction that exceptions are not propagated by "__cmp__()" has\n   been removed since Python 1.5.)\n\nobject.__rcmp__(self, other)\n\n   Changed in version 2.1: No longer supported.\n\nobject.__hash__(self)\n\n   Called by built-in function "hash()" and for operations on members\n   of hashed collections including "set", "frozenset", and "dict".\n   "__hash__()" should return an integer.  The only required property\n   is that objects which compare equal have the same hash value; it is\n   advised to somehow mix together (e.g. using exclusive or) the hash\n   values for the components of the object that also play a part in\n   comparison of objects.\n\n   If a class does not define a "__cmp__()" or "__eq__()" method it\n   should not define a "__hash__()" operation either; if it defines\n   "__cmp__()" or "__eq__()" but not "__hash__()", its instances will\n   not be usable in hashed collections.  If a class defines mutable\n   objects and implements a "__cmp__()" or "__eq__()" method, it\n   should not implement "__hash__()", since hashable collection\n   implementations require that a object\'s hash value is immutable (if\n   the object\'s hash value changes, it will be in the wrong hash\n   bucket).\n\n   User-defined classes have "__cmp__()" and "__hash__()" methods by\n   default; with them, all objects compare unequal (except with\n   themselves) and "x.__hash__()" returns a result derived from\n   "id(x)".\n\n   Classes which inherit a "__hash__()" method from a parent class but\n   change the meaning of "__cmp__()" or "__eq__()" such that the hash\n   value returned is no longer appropriate (e.g. by switching to a\n   value-based concept of equality instead of the default identity\n   based equality) can explicitly flag themselves as being unhashable\n   by setting "__hash__ = None" in the class definition. Doing so\n   means that not only will instances of the class raise an\n   appropriate "TypeError" when a program attempts to retrieve their\n   hash value, but they will also be correctly identified as\n   unhashable when checking "isinstance(obj, collections.Hashable)"\n   (unlike classes which define their own "__hash__()" to explicitly\n   raise "TypeError").\n\n   Changed in version 2.5: "__hash__()" may now also return a long\n   integer object; the 32-bit integer is then derived from the hash of\n   that object.\n\n   Changed in version 2.6: "__hash__" may now be set to "None" to\n   explicitly flag instances of a class as unhashable.\n\nobject.__nonzero__(self)\n\n   Called to implement truth value testing and the built-in operation\n   "bool()"; should return "False" or "True", or their integer\n   equivalents "0" or "1".  When this method is not defined,\n   "__len__()" is called, if it is defined, and the object is\n   considered true if its result is nonzero. If a class defines\n   neither "__len__()" nor "__nonzero__()", all its instances are\n   considered true.\n\nobject.__unicode__(self)\n\n   Called to implement "unicode()" built-in; should return a Unicode\n   object. When this method is not defined, string conversion is\n   attempted, and the result of string conversion is converted to\n   Unicode using the system default encoding.\n',
- 'debugger': u'\n"pdb" --- The Python Debugger\n*****************************\n\n**Source code:** Lib/pdb.py\n\n======================================================================\n\nThe module "pdb" defines an interactive source code debugger for\nPython programs.  It supports setting (conditional) breakpoints and\nsingle stepping at the source line level, inspection of stack frames,\nsource code listing, and evaluation of arbitrary Python code in the\ncontext of any stack frame.  It also supports post-mortem debugging\nand can be called under program control.\n\nThe debugger is extensible --- it is actually defined as the class\n"Pdb". This is currently undocumented but easily understood by reading\nthe source.  The extension interface uses the modules "bdb" and "cmd".\n\nThe debugger\'s prompt is "(Pdb)". Typical usage to run a program under\ncontrol of the debugger is:\n\n   >>> import pdb\n   >>> import mymodule\n   >>> pdb.run(\'mymodule.test()\')\n   > <string>(0)?()\n   (Pdb) continue\n   > <string>(1)?()\n   (Pdb) continue\n   NameError: \'spam\'\n   > <string>(1)?()\n   (Pdb)\n\n"pdb.py" can also be invoked as a script to debug other scripts.  For\nexample:\n\n   python -m pdb myscript.py\n\nWhen invoked as a script, pdb will automatically enter post-mortem\ndebugging if the program being debugged exits abnormally. After post-\nmortem debugging (or after normal exit of the program), pdb will\nrestart the program. Automatic restarting preserves pdb\'s state (such\nas breakpoints) and in most cases is more useful than quitting the\ndebugger upon program\'s exit.\n\nNew in version 2.4: Restarting post-mortem behavior added.\n\nThe typical usage to break into the debugger from a running program is\nto insert\n\n   import pdb; pdb.set_trace()\n\nat the location you want to break into the debugger.  You can then\nstep through the code following this statement, and continue running\nwithout the debugger using the "c" command.\n\nThe typical usage to inspect a crashed program is:\n\n   >>> import pdb\n   >>> import mymodule\n   >>> mymodule.test()\n   Traceback (most recent call last):\n     File "<stdin>", line 1, in ?\n     File "./mymodule.py", line 4, in test\n       test2()\n     File "./mymodule.py", line 3, in test2\n       print spam\n   NameError: spam\n   >>> pdb.pm()\n   > ./mymodule.py(3)test2()\n   -> print spam\n   (Pdb)\n\nThe module defines the following functions; each enters the debugger\nin a slightly different way:\n\npdb.run(statement[, globals[, locals]])\n\n   Execute the *statement* (given as a string) under debugger control.\n   The debugger prompt appears before any code is executed; you can\n   set breakpoints and type "continue", or you can step through the\n   statement using "step" or "next" (all these commands are explained\n   below).  The optional *globals* and *locals* arguments specify the\n   environment in which the code is executed; by default the\n   dictionary of the module "__main__" is used.  (See the explanation\n   of the "exec" statement or the "eval()" built-in function.)\n\npdb.runeval(expression[, globals[, locals]])\n\n   Evaluate the *expression* (given as a string) under debugger\n   control.  When "runeval()" returns, it returns the value of the\n   expression.  Otherwise this function is similar to "run()".\n\npdb.runcall(function[, argument, ...])\n\n   Call the *function* (a function or method object, not a string)\n   with the given arguments.  When "runcall()" returns, it returns\n   whatever the function call returned.  The debugger prompt appears\n   as soon as the function is entered.\n\npdb.set_trace()\n\n   Enter the debugger at the calling stack frame.  This is useful to\n   hard-code a breakpoint at a given point in a program, even if the\n   code is not otherwise being debugged (e.g. when an assertion\n   fails).\n\npdb.post_mortem([traceback])\n\n   Enter post-mortem debugging of the given *traceback* object.  If no\n   *traceback* is given, it uses the one of the exception that is\n   currently being handled (an exception must be being handled if the\n   default is to be used).\n\npdb.pm()\n\n   Enter post-mortem debugging of the traceback found in\n   "sys.last_traceback".\n\nThe "run*" functions and "set_trace()" are aliases for instantiating\nthe "Pdb" class and calling the method of the same name.  If you want\nto access further features, you have to do this yourself:\n\nclass class pdb.Pdb(completekey=\'tab\', stdin=None, stdout=None, skip=None)\n\n   "Pdb" is the debugger class.\n\n   The *completekey*, *stdin* and *stdout* arguments are passed to the\n   underlying "cmd.Cmd" class; see the description there.\n\n   The *skip* argument, if given, must be an iterable of glob-style\n   module name patterns.  The debugger will not step into frames that\n   originate in a module that matches one of these patterns. [1]\n\n   Example call to enable tracing with *skip*:\n\n      import pdb; pdb.Pdb(skip=[\'django.*\']).set_trace()\n\n   New in version 2.7: The *skip* argument.\n\n   run(statement[, globals[, locals]])\n   runeval(expression[, globals[, locals]])\n   runcall(function[, argument, ...])\n   set_trace()\n\n      See the documentation for the functions explained above.\n',
- 'del': u'\nThe "del" statement\n*******************\n\n   del_stmt ::= "del" target_list\n\nDeletion is recursively defined very similar to the way assignment is\ndefined. Rather than spelling it out in full details, here are some\nhints.\n\nDeletion of a target list recursively deletes each target, from left\nto right.\n\nDeletion of a name removes the binding of that name  from the local or\nglobal namespace, depending on whether the name occurs in a "global"\nstatement in the same code block.  If the name is unbound, a\n"NameError" exception will be raised.\n\nIt is illegal to delete a name from the local namespace if it occurs\nas a free variable in a nested block.\n\nDeletion of attribute references, subscriptions and slicings is passed\nto the primary object involved; deletion of a slicing is in general\nequivalent to assignment of an empty slice of the right type (but even\nthis is determined by the sliced object).\n',
- 'dict': u'\nDictionary displays\n*******************\n\nA dictionary display is a possibly empty series of key/datum pairs\nenclosed in curly braces:\n\n   dict_display       ::= "{" [key_datum_list | dict_comprehension] "}"\n   key_datum_list     ::= key_datum ("," key_datum)* [","]\n   key_datum          ::= expression ":" expression\n   dict_comprehension ::= expression ":" expression comp_for\n\nA dictionary display yields a new dictionary object.\n\nIf a comma-separated sequence of key/datum pairs is given, they are\nevaluated from left to right to define the entries of the dictionary:\neach key object is used as a key into the dictionary to store the\ncorresponding datum.  This means that you can specify the same key\nmultiple times in the key/datum list, and the final dictionary\'s value\nfor that key will be the last one given.\n\nA dict comprehension, in contrast to list and set comprehensions,\nneeds two expressions separated with a colon followed by the usual\n"for" and "if" clauses. When the comprehension is run, the resulting\nkey and value elements are inserted in the new dictionary in the order\nthey are produced.\n\nRestrictions on the types of the key values are listed earlier in\nsection The standard type hierarchy.  (To summarize, the key type\nshould be *hashable*, which excludes all mutable objects.)  Clashes\nbetween duplicate keys are not detected; the last datum (textually\nrightmost in the display) stored for a given key value prevails.\n',
- 'dynamic-features': u'\nInteraction with dynamic features\n*********************************\n\nThere are several cases where Python statements are illegal when used\nin conjunction with nested scopes that contain free variables.\n\nIf a variable is referenced in an enclosing scope, it is illegal to\ndelete the name.  An error will be reported at compile time.\n\nIf the wild card form of import --- "import *" --- is used in a\nfunction and the function contains or is a nested block with free\nvariables, the compiler will raise a "SyntaxError".\n\nIf "exec" is used in a function and the function contains or is a\nnested block with free variables, the compiler will raise a\n"SyntaxError" unless the exec explicitly specifies the local namespace\nfor the "exec".  (In other words, "exec obj" would be illegal, but\n"exec obj in ns" would be legal.)\n\nThe "eval()", "execfile()", and "input()" functions and the "exec"\nstatement do not have access to the full environment for resolving\nnames.  Names may be resolved in the local and global namespaces of\nthe caller.  Free variables are not resolved in the nearest enclosing\nnamespace, but in the global namespace. [1] The "exec" statement and\nthe "eval()" and "execfile()" functions have optional arguments to\noverride the global and local namespace.  If only one namespace is\nspecified, it is used for both.\n',
- 'else': u'\nThe "if" statement\n******************\n\nThe "if" statement is used for conditional execution:\n\n   if_stmt ::= "if" expression ":" suite\n               ( "elif" expression ":" suite )*\n               ["else" ":" suite]\n\nIt selects exactly one of the suites by evaluating the expressions one\nby one until one is found to be true (see section Boolean operations\nfor the definition of true and false); then that suite is executed\n(and no other part of the "if" statement is executed or evaluated).\nIf all expressions are false, the suite of the "else" clause, if\npresent, is executed.\n',
- 'exceptions': u'\nExceptions\n**********\n\nExceptions are a means of breaking out of the normal flow of control\nof a code block in order to handle errors or other exceptional\nconditions.  An exception is *raised* at the point where the error is\ndetected; it may be *handled* by the surrounding code block or by any\ncode block that directly or indirectly invoked the code block where\nthe error occurred.\n\nThe Python interpreter raises an exception when it detects a run-time\nerror (such as division by zero).  A Python program can also\nexplicitly raise an exception with the "raise" statement. Exception\nhandlers are specified with the "try" ... "except" statement.  The\n"finally" clause of such a statement can be used to specify cleanup\ncode which does not handle the exception, but is executed whether an\nexception occurred or not in the preceding code.\n\nPython uses the "termination" model of error handling: an exception\nhandler can find out what happened and continue execution at an outer\nlevel, but it cannot repair the cause of the error and retry the\nfailing operation (except by re-entering the offending piece of code\nfrom the top).\n\nWhen an exception is not handled at all, the interpreter terminates\nexecution of the program, or returns to its interactive main loop.  In\neither case, it prints a stack backtrace, except when the exception is\n"SystemExit".\n\nExceptions are identified by class instances.  The "except" clause is\nselected depending on the class of the instance: it must reference the\nclass of the instance or a base class thereof.  The instance can be\nreceived by the handler and can carry additional information about the\nexceptional condition.\n\nExceptions can also be identified by strings, in which case the\n"except" clause is selected by object identity.  An arbitrary value\ncan be raised along with the identifying string which can be passed to\nthe handler.\n\nNote: Messages to exceptions are not part of the Python API.  Their\n  contents may change from one version of Python to the next without\n  warning and should not be relied on by code which will run under\n  multiple versions of the interpreter.\n\nSee also the description of the "try" statement in section The try\nstatement and "raise" statement in section The raise statement.\n\n-[ Footnotes ]-\n\n[1] This limitation occurs because the code that is executed by\n    these operations is not available at the time the module is\n    compiled.\n',
- 'exec': u'\nThe "exec" statement\n********************\n\n   exec_stmt ::= "exec" or_expr ["in" expression ["," expression]]\n\nThis statement supports dynamic execution of Python code.  The first\nexpression should evaluate to either a Unicode string, a *Latin-1*\nencoded string, an open file object, a code object, or a tuple.  If it\nis a string, the string is parsed as a suite of Python statements\nwhich is then executed (unless a syntax error occurs). [1] If it is an\nopen file, the file is parsed until EOF and executed. If it is a code\nobject, it is simply executed.  For the interpretation of a tuple, see\nbelow.  In all cases, the code that\'s executed is expected to be valid\nas file input (see section File input).  Be aware that the "return"\nand "yield" statements may not be used outside of function definitions\neven within the context of code passed to the "exec" statement.\n\nIn all cases, if the optional parts are omitted, the code is executed\nin the current scope.  If only the first expression after "in" is\nspecified, it should be a dictionary, which will be used for both the\nglobal and the local variables.  If two expressions are given, they\nare used for the global and local variables, respectively. If\nprovided, *locals* can be any mapping object. Remember that at module\nlevel, globals and locals are the same dictionary. If two separate\nobjects are given as *globals* and *locals*, the code will be executed\nas if it were embedded in a class definition.\n\nThe first expression may also be a tuple of length 2 or 3.  In this\ncase, the optional parts must be omitted.  The form "exec(expr,\nglobals)" is equivalent to "exec expr in globals", while the form\n"exec(expr, globals, locals)" is equivalent to "exec expr in globals,\nlocals".  The tuple form of "exec" provides compatibility with Python\n3, where "exec" is a function rather than a statement.\n\nChanged in version 2.4: Formerly, *locals* was required to be a\ndictionary.\n\nAs a side effect, an implementation may insert additional keys into\nthe dictionaries given besides those corresponding to variable names\nset by the executed code.  For example, the current implementation may\nadd a reference to the dictionary of the built-in module "__builtin__"\nunder the key "__builtins__" (!).\n\n**Programmer\'s hints:** dynamic evaluation of expressions is supported\nby the built-in function "eval()".  The built-in functions "globals()"\nand "locals()" return the current global and local dictionary,\nrespectively, which may be useful to pass around for use by "exec".\n\n-[ Footnotes ]-\n\n[1] Note that the parser only accepts the Unix-style end of line\n    convention. If you are reading the code from a file, make sure to\n    use *universal newlines* mode to convert Windows or Mac-style\n    newlines.\n',
- 'execmodel': u'\nExecution model\n***************\n\n\nNaming and binding\n==================\n\n*Names* refer to objects.  Names are introduced by name binding\noperations. Each occurrence of a name in the program text refers to\nthe *binding* of that name established in the innermost function block\ncontaining the use.\n\nA *block* is a piece of Python program text that is executed as a\nunit. The following are blocks: a module, a function body, and a class\ndefinition. Each command typed interactively is a block.  A script\nfile (a file given as standard input to the interpreter or specified\non the interpreter command line the first argument) is a code block.\nA script command (a command specified on the interpreter command line\nwith the \'**-c**\' option) is a code block.  The file read by the\nbuilt-in function "execfile()" is a code block.  The string argument\npassed to the built-in function "eval()" and to the "exec" statement\nis a code block. The expression read and evaluated by the built-in\nfunction "input()" is a code block.\n\nA code block is executed in an *execution frame*.  A frame contains\nsome administrative information (used for debugging) and determines\nwhere and how execution continues after the code block\'s execution has\ncompleted.\n\nA *scope* defines the visibility of a name within a block.  If a local\nvariable is defined in a block, its scope includes that block.  If the\ndefinition occurs in a function block, the scope extends to any blocks\ncontained within the defining one, unless a contained block introduces\na different binding for the name.  The scope of names defined in a\nclass block is limited to the class block; it does not extend to the\ncode blocks of methods -- this includes generator expressions since\nthey are implemented using a function scope.  This means that the\nfollowing will fail:\n\n   class A:\n       a = 42\n       b = list(a + i for i in range(10))\n\nWhen a name is used in a code block, it is resolved using the nearest\nenclosing scope.  The set of all such scopes visible to a code block\nis called the block\'s *environment*.\n\nIf a name is bound in a block, it is a local variable of that block.\nIf a name is bound at the module level, it is a global variable.  (The\nvariables of the module code block are local and global.)  If a\nvariable is used in a code block but not defined there, it is a *free\nvariable*.\n\nWhen a name is not found at all, a "NameError" exception is raised.\nIf the name refers to a local variable that has not been bound, a\n"UnboundLocalError" exception is raised.  "UnboundLocalError" is a\nsubclass of "NameError".\n\nThe following constructs bind names: formal parameters to functions,\n"import" statements, class and function definitions (these bind the\nclass or function name in the defining block), and targets that are\nidentifiers if occurring in an assignment, "for" loop header, in the\nsecond position of an "except" clause header or after "as" in a "with"\nstatement.  The "import" statement of the form "from ... import *"\nbinds all names defined in the imported module, except those beginning\nwith an underscore.  This form may only be used at the module level.\n\nA target occurring in a "del" statement is also considered bound for\nthis purpose (though the actual semantics are to unbind the name).  It\nis illegal to unbind a name that is referenced by an enclosing scope;\nthe compiler will report a "SyntaxError".\n\nEach assignment or import statement occurs within a block defined by a\nclass or function definition or at the module level (the top-level\ncode block).\n\nIf a name binding operation occurs anywhere within a code block, all\nuses of the name within the block are treated as references to the\ncurrent block.  This can lead to errors when a name is used within a\nblock before it is bound. This rule is subtle.  Python lacks\ndeclarations and allows name binding operations to occur anywhere\nwithin a code block.  The local variables of a code block can be\ndetermined by scanning the entire text of the block for name binding\noperations.\n\nIf the global statement occurs within a block, all uses of the name\nspecified in the statement refer to the binding of that name in the\ntop-level namespace. Names are resolved in the top-level namespace by\nsearching the global namespace, i.e. the namespace of the module\ncontaining the code block, and the builtins namespace, the namespace\nof the module "__builtin__".  The global namespace is searched first.\nIf the name is not found there, the builtins namespace is searched.\nThe global statement must precede all uses of the name.\n\nThe builtins namespace associated with the execution of a code block\nis actually found by looking up the name "__builtins__" in its global\nnamespace; this should be a dictionary or a module (in the latter case\nthe module\'s dictionary is used).  By default, when in the "__main__"\nmodule, "__builtins__" is the built-in module "__builtin__" (note: no\n\'s\'); when in any other module, "__builtins__" is an alias for the\ndictionary of the "__builtin__" module itself.  "__builtins__" can be\nset to a user-created dictionary to create a weak form of restricted\nexecution.\n\n**CPython implementation detail:** Users should not touch\n"__builtins__"; it is strictly an implementation detail.  Users\nwanting to override values in the builtins namespace should "import"\nthe "__builtin__" (no \'s\') module and modify its attributes\nappropriately.\n\nThe namespace for a module is automatically created the first time a\nmodule is imported.  The main module for a script is always called\n"__main__".\n\nThe "global" statement has the same scope as a name binding operation\nin the same block.  If the nearest enclosing scope for a free variable\ncontains a global statement, the free variable is treated as a global.\n\nA class definition is an executable statement that may use and define\nnames. These references follow the normal rules for name resolution.\nThe namespace of the class definition becomes the attribute dictionary\nof the class.  Names defined at the class scope are not visible in\nmethods.\n\n\nInteraction with dynamic features\n---------------------------------\n\nThere are several cases where Python statements are illegal when used\nin conjunction with nested scopes that contain free variables.\n\nIf a variable is referenced in an enclosing scope, it is illegal to\ndelete the name.  An error will be reported at compile time.\n\nIf the wild card form of import --- "import *" --- is used in a\nfunction and the function contains or is a nested block with free\nvariables, the compiler will raise a "SyntaxError".\n\nIf "exec" is used in a function and the function contains or is a\nnested block with free variables, the compiler will raise a\n"SyntaxError" unless the exec explicitly specifies the local namespace\nfor the "exec".  (In other words, "exec obj" would be illegal, but\n"exec obj in ns" would be legal.)\n\nThe "eval()", "execfile()", and "input()" functions and the "exec"\nstatement do not have access to the full environment for resolving\nnames.  Names may be resolved in the local and global namespaces of\nthe caller.  Free variables are not resolved in the nearest enclosing\nnamespace, but in the global namespace. [1] The "exec" statement and\nthe "eval()" and "execfile()" functions have optional arguments to\noverride the global and local namespace.  If only one namespace is\nspecified, it is used for both.\n\n\nExceptions\n==========\n\nExceptions are a means of breaking out of the normal flow of control\nof a code block in order to handle errors or other exceptional\nconditions.  An exception is *raised* at the point where the error is\ndetected; it may be *handled* by the surrounding code block or by any\ncode block that directly or indirectly invoked the code block where\nthe error occurred.\n\nThe Python interpreter raises an exception when it detects a run-time\nerror (such as division by zero).  A Python program can also\nexplicitly raise an exception with the "raise" statement. Exception\nhandlers are specified with the "try" ... "except" statement.  The\n"finally" clause of such a statement can be used to specify cleanup\ncode which does not handle the exception, but is executed whether an\nexception occurred or not in the preceding code.\n\nPython uses the "termination" model of error handling: an exception\nhandler can find out what happened and continue execution at an outer\nlevel, but it cannot repair the cause of the error and retry the\nfailing operation (except by re-entering the offending piece of code\nfrom the top).\n\nWhen an exception is not handled at all, the interpreter terminates\nexecution of the program, or returns to its interactive main loop.  In\neither case, it prints a stack backtrace, except when the exception is\n"SystemExit".\n\nExceptions are identified by class instances.  The "except" clause is\nselected depending on the class of the instance: it must reference the\nclass of the instance or a base class thereof.  The instance can be\nreceived by the handler and can carry additional information about the\nexceptional condition.\n\nExceptions can also be identified by strings, in which case the\n"except" clause is selected by object identity.  An arbitrary value\ncan be raised along with the identifying string which can be passed to\nthe handler.\n\nNote: Messages to exceptions are not part of the Python API.  Their\n  contents may change from one version of Python to the next without\n  warning and should not be relied on by code which will run under\n  multiple versions of the interpreter.\n\nSee also the description of the "try" statement in section The try\nstatement and "raise" statement in section The raise statement.\n\n-[ Footnotes ]-\n\n[1] This limitation occurs because the code that is executed by\n    these operations is not available at the time the module is\n    compiled.\n',
- 'exprlists': u'\nExpression lists\n****************\n\n   expression_list ::= expression ( "," expression )* [","]\n\nAn expression list containing at least one comma yields a tuple.  The\nlength of the tuple is the number of expressions in the list.  The\nexpressions are evaluated from left to right.\n\nThe trailing comma is required only to create a single tuple (a.k.a. a\n*singleton*); it is optional in all other cases.  A single expression\nwithout a trailing comma doesn\'t create a tuple, but rather yields the\nvalue of that expression. (To create an empty tuple, use an empty pair\nof parentheses: "()".)\n',
- 'floating': u'\nFloating point literals\n***********************\n\nFloating point literals are described by the following lexical\ndefinitions:\n\n   floatnumber   ::= pointfloat | exponentfloat\n   pointfloat    ::= [intpart] fraction | intpart "."\n   exponentfloat ::= (intpart | pointfloat) exponent\n   intpart       ::= digit+\n   fraction      ::= "." digit+\n   exponent      ::= ("e" | "E") ["+" | "-"] digit+\n\nNote that the integer and exponent parts of floating point numbers can\nlook like octal integers, but are interpreted using radix 10.  For\nexample, "077e010" is legal, and denotes the same number as "77e10".\nThe allowed range of floating point literals is implementation-\ndependent. Some examples of floating point literals:\n\n   3.14    10.    .001    1e100    3.14e-10    0e0\n\nNote that numeric literals do not include a sign; a phrase like "-1"\nis actually an expression composed of the unary operator "-" and the\nliteral "1".\n',
- 'for': u'\nThe "for" statement\n*******************\n\nThe "for" statement is used to iterate over the elements of a sequence\n(such as a string, tuple or list) or other iterable object:\n\n   for_stmt ::= "for" target_list "in" expression_list ":" suite\n                ["else" ":" suite]\n\nThe expression list is evaluated once; it should yield an iterable\nobject.  An iterator is created for the result of the\n"expression_list".  The suite is then executed once for each item\nprovided by the iterator, in the order of ascending indices.  Each\nitem in turn is assigned to the target list using the standard rules\nfor assignments, and then the suite is executed.  When the items are\nexhausted (which is immediately when the sequence is empty), the suite\nin the "else" clause, if present, is executed, and the loop\nterminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite.  A "continue" statement\nexecuted in the first suite skips the rest of the suite and continues\nwith the next item, or with the "else" clause if there was no next\nitem.\n\nThe suite may assign to the variable(s) in the target list; this does\nnot affect the next item assigned to it.\n\nThe target list is not deleted when the loop is finished, but if the\nsequence is empty, it will not have been assigned to at all by the\nloop.  Hint: the built-in function "range()" returns a sequence of\nintegers suitable to emulate the effect of Pascal\'s "for i := a to b\ndo"; e.g., "range(3)" returns the list "[0, 1, 2]".\n\nNote: There is a subtlety when the sequence is being modified by the\n  loop (this can only occur for mutable sequences, i.e. lists). An\n  internal counter is used to keep track of which item is used next,\n  and this is incremented on each iteration.  When this counter has\n  reached the length of the sequence the loop terminates.  This means\n  that if the suite deletes the current (or a previous) item from the\n  sequence, the next item will be skipped (since it gets the index of\n  the current item which has already been treated).  Likewise, if the\n  suite inserts an item in the sequence before the current item, the\n  current item will be treated again the next time through the loop.\n  This can lead to nasty bugs that can be avoided by making a\n  temporary copy using a slice of the whole sequence, e.g.,\n\n     for x in a[:]:\n         if x < 0: a.remove(x)\n',
- 'formatstrings': u'\nFormat String Syntax\n********************\n\nThe "str.format()" method and the "Formatter" class share the same\nsyntax for format strings (although in the case of "Formatter",\nsubclasses can define their own format string syntax).\n\nFormat strings contain "replacement fields" surrounded by curly braces\n"{}". Anything that is not contained in braces is considered literal\ntext, which is copied unchanged to the output.  If you need to include\na brace character in the literal text, it can be escaped by doubling:\n"{{" and "}}".\n\nThe grammar for a replacement field is as follows:\n\n      replacement_field ::= "{" [field_name] ["!" conversion] [":" format_spec] "}"\n      field_name        ::= arg_name ("." attribute_name | "[" element_index "]")*\n      arg_name          ::= [identifier | integer]\n      attribute_name    ::= identifier\n      element_index     ::= integer | index_string\n      index_string      ::= <any source character except "]"> +\n      conversion        ::= "r" | "s"\n      format_spec       ::= <described in the next section>\n\nIn less formal terms, the replacement field can start with a\n*field_name* that specifies the object whose value is to be formatted\nand inserted into the output instead of the replacement field. The\n*field_name* is optionally followed by a  *conversion* field, which is\npreceded by an exclamation point "\'!\'", and a *format_spec*, which is\npreceded by a colon "\':\'".  These specify a non-default format for the\nreplacement value.\n\nSee also the Format Specification Mini-Language section.\n\nThe *field_name* itself begins with an *arg_name* that is either a\nnumber or a keyword.  If it\'s a number, it refers to a positional\nargument, and if it\'s a keyword, it refers to a named keyword\nargument.  If the numerical arg_names in a format string are 0, 1, 2,\n... in sequence, they can all be omitted (not just some) and the\nnumbers 0, 1, 2, ... will be automatically inserted in that order.\nBecause *arg_name* is not quote-delimited, it is not possible to\nspecify arbitrary dictionary keys (e.g., the strings "\'10\'" or\n"\':-]\'") within a format string. The *arg_name* can be followed by any\nnumber of index or attribute expressions. An expression of the form\n"\'.name\'" selects the named attribute using "getattr()", while an\nexpression of the form "\'[index]\'" does an index lookup using\n"__getitem__()".\n\nChanged in version 2.7: The positional argument specifiers can be\nomitted, so "\'{} {}\'" is equivalent to "\'{0} {1}\'".\n\nSome simple format string examples:\n\n   "First, thou shalt count to {0}" # References first positional argument\n   "Bring me a {}"                  # Implicitly references the first positional argument\n   "From {} to {}"                  # Same as "From {0} to {1}"\n   "My quest is {name}"             # References keyword argument \'name\'\n   "Weight in tons {0.weight}"      # \'weight\' attribute of first positional arg\n   "Units destroyed: {players[0]}"  # First element of keyword argument \'players\'.\n\nThe *conversion* field causes a type coercion before formatting.\nNormally, the job of formatting a value is done by the "__format__()"\nmethod of the value itself.  However, in some cases it is desirable to\nforce a type to be formatted as a string, overriding its own\ndefinition of formatting.  By converting the value to a string before\ncalling "__format__()", the normal formatting logic is bypassed.\n\nTwo conversion flags are currently supported: "\'!s\'" which calls\n"str()" on the value, and "\'!r\'" which calls "repr()".\n\nSome examples:\n\n   "Harold\'s a clever {0!s}"        # Calls str() on the argument first\n   "Bring out the holy {name!r}"    # Calls repr() on the argument first\n\nThe *format_spec* field contains a specification of how the value\nshould be presented, including such details as field width, alignment,\npadding, decimal precision and so on.  Each value type can define its\nown "formatting mini-language" or interpretation of the *format_spec*.\n\nMost built-in types support a common formatting mini-language, which\nis described in the next section.\n\nA *format_spec* field can also include nested replacement fields\nwithin it. These nested replacement fields can contain only a field\nname; conversion flags and format specifications are not allowed.  The\nreplacement fields within the format_spec are substituted before the\n*format_spec* string is interpreted. This allows the formatting of a\nvalue to be dynamically specified.\n\nSee the Format examples section for some examples.\n\n\nFormat Specification Mini-Language\n==================================\n\n"Format specifications" are used within replacement fields contained\nwithin a format string to define how individual values are presented\n(see Format String Syntax).  They can also be passed directly to the\nbuilt-in "format()" function.  Each formattable type may define how\nthe format specification is to be interpreted.\n\nMost built-in types implement the following options for format\nspecifications, although some of the formatting options are only\nsupported by the numeric types.\n\nA general convention is that an empty format string ("""") produces\nthe same result as if you had called "str()" on the value. A non-empty\nformat string typically modifies the result.\n\nThe general form of a *standard format specifier* is:\n\n   format_spec ::= [[fill]align][sign][#][0][width][,][.precision][type]\n   fill        ::= <any character>\n   align       ::= "<" | ">" | "=" | "^"\n   sign        ::= "+" | "-" | " "\n   width       ::= integer\n   precision   ::= integer\n   type        ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"\n\nIf a valid *align* value is specified, it can be preceded by a *fill*\ncharacter that can be any character and defaults to a space if\nomitted. Note that it is not possible to use "{" and "}" as *fill*\nchar while using the "str.format()" method; this limitation however\ndoesn\'t affect the "format()" function.\n\nThe meaning of the various alignment options is as follows:\n\n   +-----------+------------------------------------------------------------+\n   | Option    | Meaning                                                    |\n   +===========+============================================================+\n   | "\'<\'"     | Forces the field to be left-aligned within the available   |\n   |           | space (this is the default for most objects).              |\n   +-----------+------------------------------------------------------------+\n   | "\'>\'"     | Forces the field to be right-aligned within the available  |\n   |           | space (this is the default for numbers).                   |\n   +-----------+------------------------------------------------------------+\n   | "\'=\'"     | Forces the padding to be placed after the sign (if any)    |\n   |           | but before the digits.  This is used for printing fields   |\n   |           | in the form \'+000000120\'. This alignment option is only    |\n   |           | valid for numeric types.                                   |\n   +-----------+------------------------------------------------------------+\n   | "\'^\'"     | Forces the field to be centered within the available       |\n   |           | space.                                                     |\n   +-----------+------------------------------------------------------------+\n\nNote that unless a minimum field width is defined, the field width\nwill always be the same size as the data to fill it, so that the\nalignment option has no meaning in this case.\n\nThe *sign* option is only valid for number types, and can be one of\nthe following:\n\n   +-----------+------------------------------------------------------------+\n   | Option    | Meaning                                                    |\n   +===========+============================================================+\n   | "\'+\'"     | indicates that a sign should be used for both positive as  |\n   |           | well as negative numbers.                                  |\n   +-----------+------------------------------------------------------------+\n   | "\'-\'"     | indicates that a sign should be used only for negative     |\n   |           | numbers (this is the default behavior).                    |\n   +-----------+------------------------------------------------------------+\n   | space     | indicates that a leading space should be used on positive  |\n   |           | numbers, and a minus sign on negative numbers.             |\n   +-----------+------------------------------------------------------------+\n\nThe "\'#\'" option is only valid for integers, and only for binary,\noctal, or hexadecimal output.  If present, it specifies that the\noutput will be prefixed by "\'0b\'", "\'0o\'", or "\'0x\'", respectively.\n\nThe "\',\'" option signals the use of a comma for a thousands separator.\nFor a locale aware separator, use the "\'n\'" integer presentation type\ninstead.\n\nChanged in version 2.7: Added the "\',\'" option (see also **PEP 378**).\n\n*width* is a decimal integer defining the minimum field width.  If not\nspecified, then the field width will be determined by the content.\n\nPreceding the *width* field by a zero ("\'0\'") character enables sign-\naware zero-padding for numeric types.  This is equivalent to a *fill*\ncharacter of "\'0\'" with an *alignment* type of "\'=\'".\n\nThe *precision* is a decimal number indicating how many digits should\nbe displayed after the decimal point for a floating point value\nformatted with "\'f\'" and "\'F\'", or before and after the decimal point\nfor a floating point value formatted with "\'g\'" or "\'G\'".  For non-\nnumber types the field indicates the maximum field size - in other\nwords, how many characters will be used from the field content. The\n*precision* is not allowed for integer values.\n\nFinally, the *type* determines how the data should be presented.\n\nThe available string presentation types are:\n\n   +-----------+------------------------------------------------------------+\n   | Type      | Meaning                                                    |\n   +===========+============================================================+\n   | "\'s\'"     | String format. This is the default type for strings and    |\n   |           | may be omitted.                                            |\n   +-----------+------------------------------------------------------------+\n   | None      | The same as "\'s\'".                                         |\n   +-----------+------------------------------------------------------------+\n\nThe available integer presentation types are:\n\n   +-----------+------------------------------------------------------------+\n   | Type      | Meaning                                                    |\n   +===========+============================================================+\n   | "\'b\'"     | Binary format. Outputs the number in base 2.               |\n   +-----------+------------------------------------------------------------+\n   | "\'c\'"     | Character. Converts the integer to the corresponding       |\n   |           | unicode character before printing.                         |\n   +-----------+------------------------------------------------------------+\n   | "\'d\'"     | Decimal Integer. Outputs the number in base 10.            |\n   +-----------+------------------------------------------------------------+\n   | "\'o\'"     | Octal format. Outputs the number in base 8.                |\n   +-----------+------------------------------------------------------------+\n   | "\'x\'"     | Hex format. Outputs the number in base 16, using lower-    |\n   |           | case letters for the digits above 9.                       |\n   +-----------+------------------------------------------------------------+\n   | "\'X\'"     | Hex format. Outputs the number in base 16, using upper-    |\n   |           | case letters for the digits above 9.                       |\n   +-----------+------------------------------------------------------------+\n   | "\'n\'"     | Number. This is the same as "\'d\'", except that it uses the |\n   |           | current locale setting to insert the appropriate number    |\n   |           | separator characters.                                      |\n   +-----------+------------------------------------------------------------+\n   | None      | The same as "\'d\'".                                         |\n   +-----------+------------------------------------------------------------+\n\nIn addition to the above presentation types, integers can be formatted\nwith the floating point presentation types listed below (except "\'n\'"\nand None). When doing so, "float()" is used to convert the integer to\na floating point number before formatting.\n\nThe available presentation types for floating point and decimal values\nare:\n\n   +-----------+------------------------------------------------------------+\n   | Type      | Meaning                                                    |\n   +===========+============================================================+\n   | "\'e\'"     | Exponent notation. Prints the number in scientific         |\n   |           | notation using the letter \'e\' to indicate the exponent.    |\n   |           | The default precision is "6".                              |\n   +-----------+------------------------------------------------------------+\n   | "\'E\'"     | Exponent notation. Same as "\'e\'" except it uses an upper   |\n   |           | case \'E\' as the separator character.                       |\n   +-----------+------------------------------------------------------------+\n   | "\'f\'"     | Fixed point. Displays the number as a fixed-point number.  |\n   |           | The default precision is "6".                              |\n   +-----------+------------------------------------------------------------+\n   | "\'F\'"     | Fixed point. Same as "\'f\'".                                |\n   +-----------+------------------------------------------------------------+\n   | "\'g\'"     | General format.  For a given precision "p >= 1", this      |\n   |           | rounds the number to "p" significant digits and then       |\n   |           | formats the result in either fixed-point format or in      |\n   |           | scientific notation, depending on its magnitude.  The      |\n   |           | precise rules are as follows: suppose that the result      |\n   |           | formatted with presentation type "\'e\'" and precision "p-1" |\n   |           | would have exponent "exp".  Then if "-4 <= exp < p", the   |\n   |           | number is formatted with presentation type "\'f\'" and       |\n   |           | precision "p-1-exp".  Otherwise, the number is formatted   |\n   |           | with presentation type "\'e\'" and precision "p-1". In both  |\n   |           | cases insignificant trailing zeros are removed from the    |\n   |           | significand, and the decimal point is also removed if      |\n   |           | there are no remaining digits following it.  Positive and  |\n   |           | negative infinity, positive and negative zero, and nans,   |\n   |           | are formatted as "inf", "-inf", "0", "-0" and "nan"        |\n   |           | respectively, regardless of the precision.  A precision of |\n   |           | "0" is treated as equivalent to a precision of "1". The    |\n   |           | default precision is "6".                                  |\n   +-----------+------------------------------------------------------------+\n   | "\'G\'"     | General format. Same as "\'g\'" except switches to "\'E\'" if  |\n   |           | the number gets too large. The representations of infinity |\n   |           | and NaN are uppercased, too.                               |\n   +-----------+------------------------------------------------------------+\n   | "\'n\'"     | Number. This is the same as "\'g\'", except that it uses the |\n   |           | current locale setting to insert the appropriate number    |\n   |           | separator characters.                                      |\n   +-----------+------------------------------------------------------------+\n   | "\'%\'"     | Percentage. Multiplies the number by 100 and displays in   |\n   |           | fixed ("\'f\'") format, followed by a percent sign.          |\n   +-----------+------------------------------------------------------------+\n   | None      | The same as "\'g\'".                                         |\n   +-----------+------------------------------------------------------------+\n\n\nFormat examples\n===============\n\nThis section contains examples of the new format syntax and comparison\nwith the old "%"-formatting.\n\nIn most of the cases the syntax is similar to the old "%"-formatting,\nwith the addition of the "{}" and with ":" used instead of "%". For\nexample, "\'%03.2f\'" can be translated to "\'{:03.2f}\'".\n\nThe new format syntax also supports new and different options, shown\nin the follow examples.\n\nAccessing arguments by position:\n\n   >>> \'{0}, {1}, {2}\'.format(\'a\', \'b\', \'c\')\n   \'a, b, c\'\n   >>> \'{}, {}, {}\'.format(\'a\', \'b\', \'c\')  # 2.7+ only\n   \'a, b, c\'\n   >>> \'{2}, {1}, {0}\'.format(\'a\', \'b\', \'c\')\n   \'c, b, a\'\n   >>> \'{2}, {1}, {0}\'.format(*\'abc\')      # unpacking argument sequence\n   \'c, b, a\'\n   >>> \'{0}{1}{0}\'.format(\'abra\', \'cad\')   # arguments\' indices can be repeated\n   \'abracadabra\'\n\nAccessing arguments by name:\n\n   >>> \'Coordinates: {latitude}, {longitude}\'.format(latitude=\'37.24N\', longitude=\'-115.81W\')\n   \'Coordinates: 37.24N, -115.81W\'\n   >>> coord = {\'latitude\': \'37.24N\', \'longitude\': \'-115.81W\'}\n   >>> \'Coordinates: {latitude}, {longitude}\'.format(**coord)\n   \'Coordinates: 37.24N, -115.81W\'\n\nAccessing arguments\' attributes:\n\n   >>> c = 3-5j\n   >>> (\'The complex number {0} is formed from the real part {0.real} \'\n   ...  \'and the imaginary part {0.imag}.\').format(c)\n   \'The complex number (3-5j) is formed from the real part 3.0 and the imaginary part -5.0.\'\n   >>> class Point(object):\n   ...     def __init__(self, x, y):\n   ...         self.x, self.y = x, y\n   ...     def __str__(self):\n   ...         return \'Point({self.x}, {self.y})\'.format(self=self)\n   ...\n   >>> str(Point(4, 2))\n   \'Point(4, 2)\'\n\nAccessing arguments\' items:\n\n   >>> coord = (3, 5)\n   >>> \'X: {0[0]};  Y: {0[1]}\'.format(coord)\n   \'X: 3;  Y: 5\'\n\nReplacing "%s" and "%r":\n\n   >>> "repr() shows quotes: {!r}; str() doesn\'t: {!s}".format(\'test1\', \'test2\')\n   "repr() shows quotes: \'test1\'; str() doesn\'t: test2"\n\nAligning the text and specifying a width:\n\n   >>> \'{:<30}\'.format(\'left aligned\')\n   \'left aligned                  \'\n   >>> \'{:>30}\'.format(\'right aligned\')\n   \'                 right aligned\'\n   >>> \'{:^30}\'.format(\'centered\')\n   \'           centered           \'\n   >>> \'{:*^30}\'.format(\'centered\')  # use \'*\' as a fill char\n   \'***********centered***********\'\n\nReplacing "%+f", "%-f", and "% f" and specifying a sign:\n\n   >>> \'{:+f}; {:+f}\'.format(3.14, -3.14)  # show it always\n   \'+3.140000; -3.140000\'\n   >>> \'{: f}; {: f}\'.format(3.14, -3.14)  # show a space for positive numbers\n   \' 3.140000; -3.140000\'\n   >>> \'{:-f}; {:-f}\'.format(3.14, -3.14)  # show only the minus -- same as \'{:f}; {:f}\'\n   \'3.140000; -3.140000\'\n\nReplacing "%x" and "%o" and converting the value to different bases:\n\n   >>> # format also supports binary numbers\n   >>> "int: {0:d};  hex: {0:x};  oct: {0:o};  bin: {0:b}".format(42)\n   \'int: 42;  hex: 2a;  oct: 52;  bin: 101010\'\n   >>> # with 0x, 0o, or 0b as prefix:\n   >>> "int: {0:d};  hex: {0:#x};  oct: {0:#o};  bin: {0:#b}".format(42)\n   \'int: 42;  hex: 0x2a;  oct: 0o52;  bin: 0b101010\'\n\nUsing the comma as a thousands separator:\n\n   >>> \'{:,}\'.format(1234567890)\n   \'1,234,567,890\'\n\nExpressing a percentage:\n\n   >>> points = 19.5\n   >>> total = 22\n   >>> \'Correct answers: {:.2%}\'.format(points/total)\n   \'Correct answers: 88.64%\'\n\nUsing type-specific formatting:\n\n   >>> import datetime\n   >>> d = datetime.datetime(2010, 7, 4, 12, 15, 58)\n   >>> \'{:%Y-%m-%d %H:%M:%S}\'.format(d)\n   \'2010-07-04 12:15:58\'\n\nNesting arguments and more complex examples:\n\n   >>> for align, text in zip(\'<^>\', [\'left\', \'center\', \'right\']):\n   ...     \'{0:{fill}{align}16}\'.format(text, fill=align, align=align)\n   ...\n   \'left<<<<<<<<<<<<\'\n   \'^^^^^center^^^^^\'\n   \'>>>>>>>>>>>right\'\n   >>>\n   >>> octets = [192, 168, 0, 1]\n   >>> \'{:02X}{:02X}{:02X}{:02X}\'.format(*octets)\n   \'C0A80001\'\n   >>> int(_, 16)\n   3232235521\n   >>>\n   >>> width = 5\n   >>> for num in range(5,12):\n   ...     for base in \'dXob\':\n   ...         print \'{0:{width}{base}}\'.format(num, base=base, width=width),\n   ...     print\n   ...\n       5     5     5   101\n       6     6     6   110\n       7     7     7   111\n       8     8    10  1000\n       9     9    11  1001\n      10     A    12  1010\n      11     B    13  1011\n',
- 'function': u'\nFunction definitions\n********************\n\nA function definition defines a user-defined function object (see\nsection The standard type hierarchy):\n\n   decorated      ::= decorators (classdef | funcdef)\n   decorators     ::= decorator+\n   decorator      ::= "@" dotted_name ["(" [argument_list [","]] ")"] NEWLINE\n   funcdef        ::= "def" funcname "(" [parameter_list] ")" ":" suite\n   dotted_name    ::= identifier ("." identifier)*\n   parameter_list ::= (defparameter ",")*\n                      (  "*" identifier ["," "**" identifier]\n                      | "**" identifier\n                      | defparameter [","] )\n   defparameter   ::= parameter ["=" expression]\n   sublist        ::= parameter ("," parameter)* [","]\n   parameter      ::= identifier | "(" sublist ")"\n   funcname       ::= identifier\n\nA function definition is an executable statement.  Its execution binds\nthe function name in the current local namespace to a function object\n(a wrapper around the executable code for the function).  This\nfunction object contains a reference to the current global namespace\nas the global namespace to be used when the function is called.\n\nThe function definition does not execute the function body; this gets\nexecuted only when the function is called. [3]\n\nA function definition may be wrapped by one or more *decorator*\nexpressions. Decorator expressions are evaluated when the function is\ndefined, in the scope that contains the function definition.  The\nresult must be a callable, which is invoked with the function object\nas the only argument. The returned value is bound to the function name\ninstead of the function object.  Multiple decorators are applied in\nnested fashion. For example, the following code:\n\n   @f1(arg)\n   @f2\n   def func(): pass\n\nis equivalent to:\n\n   def func(): pass\n   func = f1(arg)(f2(func))\n\nWhen one or more top-level *parameters* have the form *parameter* "="\n*expression*, the function is said to have "default parameter values."\nFor a parameter with a default value, the corresponding *argument* may\nbe omitted from a call, in which case the parameter\'s default value is\nsubstituted.  If a parameter has a default value, all following\nparameters must also have a default value --- this is a syntactic\nrestriction that is not expressed by the grammar.\n\n**Default parameter values are evaluated when the function definition\nis executed.**  This means that the expression is evaluated once, when\nthe function is defined, and that the same "pre-computed" value is\nused for each call.  This is especially important to understand when a\ndefault parameter is a mutable object, such as a list or a dictionary:\nif the function modifies the object (e.g. by appending an item to a\nlist), the default value is in effect modified. This is generally not\nwhat was intended.  A way around this  is to use "None" as the\ndefault, and explicitly test for it in the body of the function, e.g.:\n\n   def whats_on_the_telly(penguin=None):\n       if penguin is None:\n           penguin = []\n       penguin.append("property of the zoo")\n       return penguin\n\nFunction call semantics are described in more detail in section Calls.\nA function call always assigns values to all parameters mentioned in\nthe parameter list, either from position arguments, from keyword\narguments, or from default values.  If the form ""*identifier"" is\npresent, it is initialized to a tuple receiving any excess positional\nparameters, defaulting to the empty tuple.  If the form\n""**identifier"" is present, it is initialized to a new dictionary\nreceiving any excess keyword arguments, defaulting to a new empty\ndictionary.\n\nIt is also possible to create anonymous functions (functions not bound\nto a name), for immediate use in expressions.  This uses lambda\nexpressions, described in section Lambdas.  Note that the lambda\nexpression is merely a shorthand for a simplified function definition;\na function defined in a ""def"" statement can be passed around or\nassigned to another name just like a function defined by a lambda\nexpression.  The ""def"" form is actually more powerful since it\nallows the execution of multiple statements.\n\n**Programmer\'s note:** Functions are first-class objects.  A ""def""\nform executed inside a function definition defines a local function\nthat can be returned or passed around.  Free variables used in the\nnested function can access the local variables of the function\ncontaining the def.  See section Naming and binding for details.\n',
- 'global': u'\nThe "global" statement\n**********************\n\n   global_stmt ::= "global" identifier ("," identifier)*\n\nThe "global" statement is a declaration which holds for the entire\ncurrent code block.  It means that the listed identifiers are to be\ninterpreted as globals.  It would be impossible to assign to a global\nvariable without "global", although free variables may refer to\nglobals without being declared global.\n\nNames listed in a "global" statement must not be used in the same code\nblock textually preceding that "global" statement.\n\nNames listed in a "global" statement must not be defined as formal\nparameters or in a "for" loop control target, "class" definition,\nfunction definition, or "import" statement.\n\n**CPython implementation detail:** The current implementation does not\nenforce the latter two restrictions, but programs should not abuse\nthis freedom, as future implementations may enforce them or silently\nchange the meaning of the program.\n\n**Programmer\'s note:** the "global" is a directive to the parser.  It\napplies only to code parsed at the same time as the "global"\nstatement. In particular, a "global" statement contained in an "exec"\nstatement does not affect the code block *containing* the "exec"\nstatement, and code contained in an "exec" statement is unaffected by\n"global" statements in the code containing the "exec" statement.  The\nsame applies to the "eval()", "execfile()" and "compile()" functions.\n',
- 'id-classes': u'\nReserved classes of identifiers\n*******************************\n\nCertain classes of identifiers (besides keywords) have special\nmeanings.  These classes are identified by the patterns of leading and\ntrailing underscore characters:\n\n"_*"\n   Not imported by "from module import *".  The special identifier "_"\n   is used in the interactive interpreter to store the result of the\n   last evaluation; it is stored in the "__builtin__" module.  When\n   not in interactive mode, "_" has no special meaning and is not\n   defined. See section The import statement.\n\n   Note: The name "_" is often used in conjunction with\n     internationalization; refer to the documentation for the\n     "gettext" module for more information on this convention.\n\n"__*__"\n   System-defined names. These names are defined by the interpreter\n   and its implementation (including the standard library).  Current\n   system names are discussed in the Special method names section and\n   elsewhere.  More will likely be defined in future versions of\n   Python.  *Any* use of "__*__" names, in any context, that does not\n   follow explicitly documented use, is subject to breakage without\n   warning.\n\n"__*"\n   Class-private names.  Names in this category, when used within the\n   context of a class definition, are re-written to use a mangled form\n   to help avoid name clashes between "private" attributes of base and\n   derived classes. See section Identifiers (Names).\n',
- 'identifiers': u'\nIdentifiers and keywords\n************************\n\nIdentifiers (also referred to as *names*) are described by the\nfollowing lexical definitions:\n\n   identifier ::= (letter|"_") (letter | digit | "_")*\n   letter     ::= lowercase | uppercase\n   lowercase  ::= "a"..."z"\n   uppercase  ::= "A"..."Z"\n   digit      ::= "0"..."9"\n\nIdentifiers are unlimited in length.  Case is significant.\n\n\nKeywords\n========\n\nThe following identifiers are used as reserved words, or *keywords* of\nthe language, and cannot be used as ordinary identifiers.  They must\nbe spelled exactly as written here:\n\n   and       del       from      not       while\n   as        elif      global    or        with\n   assert    else      if        pass      yield\n   break     except    import    print\n   class     exec      in        raise\n   continue  finally   is        return\n   def       for       lambda    try\n\nChanged in version 2.4: "None" became a constant and is now recognized\nby the compiler as a name for the built-in object "None".  Although it\nis not a keyword, you cannot assign a different object to it.\n\nChanged in version 2.5: Using "as" and "with" as identifiers triggers\na warning.  To use them as keywords, enable the "with_statement"\nfuture feature .\n\nChanged in version 2.6: "as" and "with" are full keywords.\n\n\nReserved classes of identifiers\n===============================\n\nCertain classes of identifiers (besides keywords) have special\nmeanings.  These classes are identified by the patterns of leading and\ntrailing underscore characters:\n\n"_*"\n   Not imported by "from module import *".  The special identifier "_"\n   is used in the interactive interpreter to store the result of the\n   last evaluation; it is stored in the "__builtin__" module.  When\n   not in interactive mode, "_" has no special meaning and is not\n   defined. See section The import statement.\n\n   Note: The name "_" is often used in conjunction with\n     internationalization; refer to the documentation for the\n     "gettext" module for more information on this convention.\n\n"__*__"\n   System-defined names. These names are defined by the interpreter\n   and its implementation (including the standard library).  Current\n   system names are discussed in the Special method names section and\n   elsewhere.  More will likely be defined in future versions of\n   Python.  *Any* use of "__*__" names, in any context, that does not\n   follow explicitly documented use, is subject to breakage without\n   warning.\n\n"__*"\n   Class-private names.  Names in this category, when used within the\n   context of a class definition, are re-written to use a mangled form\n   to help avoid name clashes between "private" attributes of base and\n   derived classes. See section Identifiers (Names).\n',
- 'if': u'\nThe "if" statement\n******************\n\nThe "if" statement is used for conditional execution:\n\n   if_stmt ::= "if" expression ":" suite\n               ( "elif" expression ":" suite )*\n               ["else" ":" suite]\n\nIt selects exactly one of the suites by evaluating the expressions one\nby one until one is found to be true (see section Boolean operations\nfor the definition of true and false); then that suite is executed\n(and no other part of the "if" statement is executed or evaluated).\nIf all expressions are false, the suite of the "else" clause, if\npresent, is executed.\n',
- 'imaginary': u'\nImaginary literals\n******************\n\nImaginary literals are described by the following lexical definitions:\n\n   imagnumber ::= (floatnumber | intpart) ("j" | "J")\n\nAn imaginary literal yields a complex number with a real part of 0.0.\nComplex numbers are represented as a pair of floating point numbers\nand have the same restrictions on their range.  To create a complex\nnumber with a nonzero real part, add a floating point number to it,\ne.g., "(3+4j)".  Some examples of imaginary literals:\n\n   3.14j   10.j    10j     .001j   1e100j  3.14e-10j\n',
- 'import': u'\nThe "import" statement\n**********************\n\n   import_stmt     ::= "import" module ["as" name] ( "," module ["as" name] )*\n                   | "from" relative_module "import" identifier ["as" name]\n                   ( "," identifier ["as" name] )*\n                   | "from" relative_module "import" "(" identifier ["as" name]\n                   ( "," identifier ["as" name] )* [","] ")"\n                   | "from" module "import" "*"\n   module          ::= (identifier ".")* identifier\n   relative_module ::= "."* module | "."+\n   name            ::= identifier\n\nImport statements are executed in two steps: (1) find a module, and\ninitialize it if necessary; (2) define a name or names in the local\nnamespace (of the scope where the "import" statement occurs). The\nstatement comes in two forms differing on whether it uses the "from"\nkeyword. The first form (without "from") repeats these steps for each\nidentifier in the list. The form with "from" performs step (1) once,\nand then performs step (2) repeatedly.\n\nTo understand how step (1) occurs, one must first understand how\nPython handles hierarchical naming of modules. To help organize\nmodules and provide a hierarchy in naming, Python has a concept of\npackages. A package can contain other packages and modules while\nmodules cannot contain other modules or packages. From a file system\nperspective, packages are directories and modules are files.\n\nOnce the name of the module is known (unless otherwise specified, the\nterm "module" will refer to both packages and modules), searching for\nthe module or package can begin. The first place checked is\n"sys.modules", the cache of all modules that have been imported\npreviously. If the module is found there then it is used in step (2)\nof import.\n\nIf the module is not found in the cache, then "sys.meta_path" is\nsearched (the specification for "sys.meta_path" can be found in **PEP\n302**). The object is a list of *finder* objects which are queried in\norder as to whether they know how to load the module by calling their\n"find_module()" method with the name of the module. If the module\nhappens to be contained within a package (as denoted by the existence\nof a dot in the name), then a second argument to "find_module()" is\ngiven as the value of the "__path__" attribute from the parent package\n(everything up to the last dot in the name of the module being\nimported). If a finder can find the module it returns a *loader*\n(discussed later) or returns "None".\n\nIf none of the finders on "sys.meta_path" are able to find the module\nthen some implicitly defined finders are queried. Implementations of\nPython vary in what implicit meta path finders are defined. The one\nthey all do define, though, is one that handles "sys.path_hooks",\n"sys.path_importer_cache", and "sys.path".\n\nThe implicit finder searches for the requested module in the "paths"\nspecified in one of two places ("paths" do not have to be file system\npaths). If the module being imported is supposed to be contained\nwithin a package then the second argument passed to "find_module()",\n"__path__" on the parent package, is used as the source of paths. If\nthe module is not contained in a package then "sys.path" is used as\nthe source of paths.\n\nOnce the source of paths is chosen it is iterated over to find a\nfinder that can handle that path. The dict at\n"sys.path_importer_cache" caches finders for paths and is checked for\na finder. If the path does not have a finder cached then\n"sys.path_hooks" is searched by calling each object in the list with a\nsingle argument of the path, returning a finder or raises\n"ImportError". If a finder is returned then it is cached in\n"sys.path_importer_cache" and then used for that path entry. If no\nfinder can be found but the path exists then a value of "None" is\nstored in "sys.path_importer_cache" to signify that an implicit, file-\nbased finder that handles modules stored as individual files should be\nused for that path. If the path does not exist then a finder which\nalways returns "None" is placed in the cache for the path.\n\nIf no finder can find the module then "ImportError" is raised.\nOtherwise some finder returned a loader whose "load_module()" method\nis called with the name of the module to load (see **PEP 302** for the\noriginal definition of loaders). A loader has several responsibilities\nto perform on a module it loads. First, if the module already exists\nin "sys.modules" (a possibility if the loader is called outside of the\nimport machinery) then it is to use that module for initialization and\nnot a new module. But if the module does not exist in "sys.modules"\nthen it is to be added to that dict before initialization begins. If\nan error occurs during loading of the module and it was added to\n"sys.modules" it is to be removed from the dict. If an error occurs\nbut the module was already in "sys.modules" it is left in the dict.\n\nThe loader must set several attributes on the module. "__name__" is to\nbe set to the name of the module. "__file__" is to be the "path" to\nthe file unless the module is built-in (and thus listed in\n"sys.builtin_module_names") in which case the attribute is not set. If\nwhat is being imported is a package then "__path__" is to be set to a\nlist of paths to be searched when looking for modules and packages\ncontained within the package being imported. "__package__" is optional\nbut should be set to the name of package that contains the module or\npackage (the empty string is used for module not contained in a\npackage). "__loader__" is also optional but should be set to the\nloader object that is loading the module.\n\nIf an error occurs during loading then the loader raises "ImportError"\nif some other exception is not already being propagated. Otherwise the\nloader returns the module that was loaded and initialized.\n\nWhen step (1) finishes without raising an exception, step (2) can\nbegin.\n\nThe first form of "import" statement binds the module name in the\nlocal namespace to the module object, and then goes on to import the\nnext identifier, if any.  If the module name is followed by "as", the\nname following "as" is used as the local name for the module.\n\nThe "from" form does not bind the module name: it goes through the\nlist of identifiers, looks each one of them up in the module found in\nstep (1), and binds the name in the local namespace to the object thus\nfound.  As with the first form of "import", an alternate local name\ncan be supplied by specifying ""as" localname".  If a name is not\nfound, "ImportError" is raised.  If the list of identifiers is\nreplaced by a star ("\'*\'"), all public names defined in the module are\nbound in the local namespace of the "import" statement..\n\nThe *public names* defined by a module are determined by checking the\nmodule\'s namespace for a variable named "__all__"; if defined, it must\nbe a sequence of strings which are names defined or imported by that\nmodule.  The names given in "__all__" are all considered public and\nare required to exist.  If "__all__" is not defined, the set of public\nnames includes all names found in the module\'s namespace which do not\nbegin with an underscore character ("\'_\'"). "__all__" should contain\nthe entire public API. It is intended to avoid accidentally exporting\nitems that are not part of the API (such as library modules which were\nimported and used within the module).\n\nThe "from" form with "*" may only occur in a module scope.  If the\nwild card form of import --- "import *" --- is used in a function and\nthe function contains or is a nested block with free variables, the\ncompiler will raise a "SyntaxError".\n\nWhen specifying what module to import you do not have to specify the\nabsolute name of the module. When a module or package is contained\nwithin another package it is possible to make a relative import within\nthe same top package without having to mention the package name. By\nusing leading dots in the specified module or package after "from" you\ncan specify how high to traverse up the current package hierarchy\nwithout specifying exact names. One leading dot means the current\npackage where the module making the import exists. Two dots means up\none package level. Three dots is up two levels, etc. So if you execute\n"from . import mod" from a module in the "pkg" package then you will\nend up importing "pkg.mod". If you execute "from ..subpkg2 import mod"\nfrom within "pkg.subpkg1" you will import "pkg.subpkg2.mod". The\nspecification for relative imports is contained within **PEP 328**.\n\n"importlib.import_module()" is provided to support applications that\ndetermine which modules need to be loaded dynamically.\n\n\nFuture statements\n=================\n\nA *future statement* is a directive to the compiler that a particular\nmodule should be compiled using syntax or semantics that will be\navailable in a specified future release of Python.  The future\nstatement is intended to ease migration to future versions of Python\nthat introduce incompatible changes to the language.  It allows use of\nthe new features on a per-module basis before the release in which the\nfeature becomes standard.\n\n   future_statement ::= "from" "__future__" "import" feature ["as" name]\n                        ("," feature ["as" name])*\n                        | "from" "__future__" "import" "(" feature ["as" name]\n                        ("," feature ["as" name])* [","] ")"\n   feature          ::= identifier\n   name             ::= identifier\n\nA future statement must appear near the top of the module.  The only\nlines that can appear before a future statement are:\n\n* the module docstring (if any),\n\n* comments,\n\n* blank lines, and\n\n* other future statements.\n\nThe features recognized by Python 2.6 are "unicode_literals",\n"print_function", "absolute_import", "division", "generators",\n"nested_scopes" and "with_statement".  "generators", "with_statement",\n"nested_scopes" are redundant in Python version 2.6 and above because\nthey are always enabled.\n\nA future statement is recognized and treated specially at compile\ntime: Changes to the semantics of core constructs are often\nimplemented by generating different code.  It may even be the case\nthat a new feature introduces new incompatible syntax (such as a new\nreserved word), in which case the compiler may need to parse the\nmodule differently.  Such decisions cannot be pushed off until\nruntime.\n\nFor any given release, the compiler knows which feature names have\nbeen defined, and raises a compile-time error if a future statement\ncontains a feature not known to it.\n\nThe direct runtime semantics are the same as for any import statement:\nthere is a standard module "__future__", described later, and it will\nbe imported in the usual way at the time the future statement is\nexecuted.\n\nThe interesting runtime semantics depend on the specific feature\nenabled by the future statement.\n\nNote that there is nothing special about the statement:\n\n   import __future__ [as name]\n\nThat is not a future statement; it\'s an ordinary import statement with\nno special semantics or syntax restrictions.\n\nCode compiled by an "exec" statement or calls to the built-in\nfunctions "compile()" and "execfile()" that occur in a module "M"\ncontaining a future statement will, by default, use the new  syntax or\nsemantics associated with the future statement.  This can, starting\nwith Python 2.2 be controlled by optional arguments to "compile()" ---\nsee the documentation of that function for details.\n\nA future statement typed at an interactive interpreter prompt will\ntake effect for the rest of the interpreter session.  If an\ninterpreter is started with the "-i" option, is passed a script name\nto execute, and the script includes a future statement, it will be in\neffect in the interactive session started after the script is\nexecuted.\n\nSee also: **PEP 236** - Back to the __future__\n\n     The original proposal for the __future__ mechanism.\n',
- 'in': u'\nComparisons\n***********\n\nUnlike C, all comparison operations in Python have the same priority,\nwhich is lower than that of any arithmetic, shifting or bitwise\noperation.  Also unlike C, expressions like "a < b < c" have the\ninterpretation that is conventional in mathematics:\n\n   comparison    ::= or_expr ( comp_operator or_expr )*\n   comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "<>" | "!="\n                     | "is" ["not"] | ["not"] "in"\n\nComparisons yield boolean values: "True" or "False".\n\nComparisons can be chained arbitrarily, e.g., "x < y <= z" is\nequivalent to "x < y and y <= z", except that "y" is evaluated only\nonce (but in both cases "z" is not evaluated at all when "x < y" is\nfound to be false).\n\nFormally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*,\n*op2*, ..., *opN* are comparison operators, then "a op1 b op2 c ... y\nopN z" is equivalent to "a op1 b and b op2 c and ... y opN z", except\nthat each expression is evaluated at most once.\n\nNote that "a op1 b op2 c" doesn\'t imply any kind of comparison between\n*a* and *c*, so that, e.g., "x < y > z" is perfectly legal (though\nperhaps not pretty).\n\nThe forms "<>" and "!=" are equivalent; for consistency with C, "!="\nis preferred; where "!=" is mentioned below "<>" is also accepted.\nThe "<>" spelling is considered obsolescent.\n\nThe operators "<", ">", "==", ">=", "<=", and "!=" compare the values\nof two objects.  The objects need not have the same type. If both are\nnumbers, they are converted to a common type.  Otherwise, objects of\ndifferent types *always* compare unequal, and are ordered consistently\nbut arbitrarily. You can control comparison behavior of objects of\nnon-built-in types by defining a "__cmp__" method or rich comparison\nmethods like "__gt__", described in section Special method names.\n\n(This unusual definition of comparison was used to simplify the\ndefinition of operations like sorting and the "in" and "not in"\noperators. In the future, the comparison rules for objects of\ndifferent types are likely to change.)\n\nComparison of objects of the same type depends on the type:\n\n* Numbers are compared arithmetically.\n\n* Strings are compared lexicographically using the numeric\n  equivalents (the result of the built-in function "ord()") of their\n  characters. Unicode and 8-bit strings are fully interoperable in\n  this behavior. [4]\n\n* Tuples and lists are compared lexicographically using comparison\n  of corresponding elements.  This means that to compare equal, each\n  element must compare equal and the two sequences must be of the same\n  type and have the same length.\n\n  If not equal, the sequences are ordered the same as their first\n  differing elements.  For example, "cmp([1,2,x], [1,2,y])" returns\n  the same as "cmp(x,y)".  If the corresponding element does not\n  exist, the shorter sequence is ordered first (for example, "[1,2] <\n  [1,2,3]").\n\n* Mappings (dictionaries) compare equal if and only if their sorted\n  (key, value) lists compare equal. [5] Outcomes other than equality\n  are resolved consistently, but are not otherwise defined. [6]\n\n* Most other objects of built-in types compare unequal unless they\n  are the same object; the choice whether one object is considered\n  smaller or larger than another one is made arbitrarily but\n  consistently within one execution of a program.\n\nThe operators "in" and "not in" test for collection membership.  "x in\ns" evaluates to true if *x* is a member of the collection *s*, and\nfalse otherwise.  "x not in s" returns the negation of "x in s". The\ncollection membership test has traditionally been bound to sequences;\nan object is a member of a collection if the collection is a sequence\nand contains an element equal to that object.  However, it make sense\nfor many other object types to support membership tests without being\na sequence.  In particular, dictionaries (for keys) and sets support\nmembership testing.\n\nFor the list and tuple types, "x in y" is true if and only if there\nexists an index *i* such that "x == y[i]" is true.\n\nFor the Unicode and string types, "x in y" is true if and only if *x*\nis a substring of *y*.  An equivalent test is "y.find(x) != -1".\nNote, *x* and *y* need not be the same type; consequently, "u\'ab\' in\n\'abc\'" will return "True". Empty strings are always considered to be a\nsubstring of any other string, so """ in "abc"" will return "True".\n\nChanged in version 2.3: Previously, *x* was required to be a string of\nlength "1".\n\nFor user-defined classes which define the "__contains__()" method, "x\nin y" is true if and only if "y.__contains__(x)" is true.\n\nFor user-defined classes which do not define "__contains__()" but do\ndefine "__iter__()", "x in y" is true if some value "z" with "x == z"\nis produced while iterating over "y".  If an exception is raised\nduring the iteration, it is as if "in" raised that exception.\n\nLastly, the old-style iteration protocol is tried: if a class defines\n"__getitem__()", "x in y" is true if and only if there is a non-\nnegative integer index *i* such that "x == y[i]", and all lower\ninteger indices do not raise "IndexError" exception. (If any other\nexception is raised, it is as if "in" raised that exception).\n\nThe operator "not in" is defined to have the inverse true value of\n"in".\n\nThe operators "is" and "is not" test for object identity: "x is y" is\ntrue if and only if *x* and *y* are the same object.  "x is not y"\nyields the inverse truth value. [7]\n',
- 'integers': u'\nInteger and long integer literals\n*********************************\n\nInteger and long integer literals are described by the following\nlexical definitions:\n\n   longinteger    ::= integer ("l" | "L")\n   integer        ::= decimalinteger | octinteger | hexinteger | bininteger\n   decimalinteger ::= nonzerodigit digit* | "0"\n   octinteger     ::= "0" ("o" | "O") octdigit+ | "0" octdigit+\n   hexinteger     ::= "0" ("x" | "X") hexdigit+\n   bininteger     ::= "0" ("b" | "B") bindigit+\n   nonzerodigit   ::= "1"..."9"\n   octdigit       ::= "0"..."7"\n   bindigit       ::= "0" | "1"\n   hexdigit       ::= digit | "a"..."f" | "A"..."F"\n\nAlthough both lower case "\'l\'" and upper case "\'L\'" are allowed as\nsuffix for long integers, it is strongly recommended to always use\n"\'L\'", since the letter "\'l\'" looks too much like the digit "\'1\'".\n\nPlain integer literals that are above the largest representable plain\ninteger (e.g., 2147483647 when using 32-bit arithmetic) are accepted\nas if they were long integers instead. [1]  There is no limit for long\ninteger literals apart from what can be stored in available memory.\n\nSome examples of plain integer literals (first row) and long integer\nliterals (second and third rows):\n\n   7     2147483647                        0177\n   3L    79228162514264337593543950336L    0377L   0x100000000L\n         79228162514264337593543950336             0xdeadbeef\n',
- 'lambda': u'\nLambdas\n*******\n\n   lambda_expr     ::= "lambda" [parameter_list]: expression\n   old_lambda_expr ::= "lambda" [parameter_list]: old_expression\n\nLambda expressions (sometimes called lambda forms) have the same\nsyntactic position as expressions.  They are a shorthand to create\nanonymous functions; the expression "lambda arguments: expression"\nyields a function object.  The unnamed object behaves like a function\nobject defined with\n\n   def name(arguments):\n       return expression\n\nSee section Function definitions for the syntax of parameter lists.\nNote that functions created with lambda expressions cannot contain\nstatements.\n',
- 'lists': u'\nList displays\n*************\n\nA list display is a possibly empty series of expressions enclosed in\nsquare brackets:\n\n   list_display        ::= "[" [expression_list | list_comprehension] "]"\n   list_comprehension  ::= expression list_for\n   list_for            ::= "for" target_list "in" old_expression_list [list_iter]\n   old_expression_list ::= old_expression [("," old_expression)+ [","]]\n   old_expression      ::= or_test | old_lambda_expr\n   list_iter           ::= list_for | list_if\n   list_if             ::= "if" old_expression [list_iter]\n\nA list display yields a new list object.  Its contents are specified\nby providing either a list of expressions or a list comprehension.\nWhen a comma-separated list of expressions is supplied, its elements\nare evaluated from left to right and placed into the list object in\nthat order.  When a list comprehension is supplied, it consists of a\nsingle expression followed by at least one "for" clause and zero or\nmore "for" or "if" clauses.  In this case, the elements of the new\nlist are those that would be produced by considering each of the "for"\nor "if" clauses a block, nesting from left to right, and evaluating\nthe expression to produce a list element each time the innermost block\nis reached [1].\n',
- 'naming': u'\nNaming and binding\n******************\n\n*Names* refer to objects.  Names are introduced by name binding\noperations. Each occurrence of a name in the program text refers to\nthe *binding* of that name established in the innermost function block\ncontaining the use.\n\nA *block* is a piece of Python program text that is executed as a\nunit. The following are blocks: a module, a function body, and a class\ndefinition. Each command typed interactively is a block.  A script\nfile (a file given as standard input to the interpreter or specified\non the interpreter command line the first argument) is a code block.\nA script command (a command specified on the interpreter command line\nwith the \'**-c**\' option) is a code block.  The file read by the\nbuilt-in function "execfile()" is a code block.  The string argument\npassed to the built-in function "eval()" and to the "exec" statement\nis a code block. The expression read and evaluated by the built-in\nfunction "input()" is a code block.\n\nA code block is executed in an *execution frame*.  A frame contains\nsome administrative information (used for debugging) and determines\nwhere and how execution continues after the code block\'s execution has\ncompleted.\n\nA *scope* defines the visibility of a name within a block.  If a local\nvariable is defined in a block, its scope includes that block.  If the\ndefinition occurs in a function block, the scope extends to any blocks\ncontained within the defining one, unless a contained block introduces\na different binding for the name.  The scope of names defined in a\nclass block is limited to the class block; it does not extend to the\ncode blocks of methods -- this includes generator expressions since\nthey are implemented using a function scope.  This means that the\nfollowing will fail:\n\n   class A:\n       a = 42\n       b = list(a + i for i in range(10))\n\nWhen a name is used in a code block, it is resolved using the nearest\nenclosing scope.  The set of all such scopes visible to a code block\nis called the block\'s *environment*.\n\nIf a name is bound in a block, it is a local variable of that block.\nIf a name is bound at the module level, it is a global variable.  (The\nvariables of the module code block are local and global.)  If a\nvariable is used in a code block but not defined there, it is a *free\nvariable*.\n\nWhen a name is not found at all, a "NameError" exception is raised.\nIf the name refers to a local variable that has not been bound, a\n"UnboundLocalError" exception is raised.  "UnboundLocalError" is a\nsubclass of "NameError".\n\nThe following constructs bind names: formal parameters to functions,\n"import" statements, class and function definitions (these bind the\nclass or function name in the defining block), and targets that are\nidentifiers if occurring in an assignment, "for" loop header, in the\nsecond position of an "except" clause header or after "as" in a "with"\nstatement.  The "import" statement of the form "from ... import *"\nbinds all names defined in the imported module, except those beginning\nwith an underscore.  This form may only be used at the module level.\n\nA target occurring in a "del" statement is also considered bound for\nthis purpose (though the actual semantics are to unbind the name).  It\nis illegal to unbind a name that is referenced by an enclosing scope;\nthe compiler will report a "SyntaxError".\n\nEach assignment or import statement occurs within a block defined by a\nclass or function definition or at the module level (the top-level\ncode block).\n\nIf a name binding operation occurs anywhere within a code block, all\nuses of the name within the block are treated as references to the\ncurrent block.  This can lead to errors when a name is used within a\nblock before it is bound. This rule is subtle.  Python lacks\ndeclarations and allows name binding operations to occur anywhere\nwithin a code block.  The local variables of a code block can be\ndetermined by scanning the entire text of the block for name binding\noperations.\n\nIf the global statement occurs within a block, all uses of the name\nspecified in the statement refer to the binding of that name in the\ntop-level namespace. Names are resolved in the top-level namespace by\nsearching the global namespace, i.e. the namespace of the module\ncontaining the code block, and the builtins namespace, the namespace\nof the module "__builtin__".  The global namespace is searched first.\nIf the name is not found there, the builtins namespace is searched.\nThe global statement must precede all uses of the name.\n\nThe builtins namespace associated with the execution of a code block\nis actually found by looking up the name "__builtins__" in its global\nnamespace; this should be a dictionary or a module (in the latter case\nthe module\'s dictionary is used).  By default, when in the "__main__"\nmodule, "__builtins__" is the built-in module "__builtin__" (note: no\n\'s\'); when in any other module, "__builtins__" is an alias for the\ndictionary of the "__builtin__" module itself.  "__builtins__" can be\nset to a user-created dictionary to create a weak form of restricted\nexecution.\n\n**CPython implementation detail:** Users should not touch\n"__builtins__"; it is strictly an implementation detail.  Users\nwanting to override values in the builtins namespace should "import"\nthe "__builtin__" (no \'s\') module and modify its attributes\nappropriately.\n\nThe namespace for a module is automatically created the first time a\nmodule is imported.  The main module for a script is always called\n"__main__".\n\nThe "global" statement has the same scope as a name binding operation\nin the same block.  If the nearest enclosing scope for a free variable\ncontains a global statement, the free variable is treated as a global.\n\nA class definition is an executable statement that may use and define\nnames. These references follow the normal rules for name resolution.\nThe namespace of the class definition becomes the attribute dictionary\nof the class.  Names defined at the class scope are not visible in\nmethods.\n\n\nInteraction with dynamic features\n=================================\n\nThere are several cases where Python statements are illegal when used\nin conjunction with nested scopes that contain free variables.\n\nIf a variable is referenced in an enclosing scope, it is illegal to\ndelete the name.  An error will be reported at compile time.\n\nIf the wild card form of import --- "import *" --- is used in a\nfunction and the function contains or is a nested block with free\nvariables, the compiler will raise a "SyntaxError".\n\nIf "exec" is used in a function and the function contains or is a\nnested block with free variables, the compiler will raise a\n"SyntaxError" unless the exec explicitly specifies the local namespace\nfor the "exec".  (In other words, "exec obj" would be illegal, but\n"exec obj in ns" would be legal.)\n\nThe "eval()", "execfile()", and "input()" functions and the "exec"\nstatement do not have access to the full environment for resolving\nnames.  Names may be resolved in the local and global namespaces of\nthe caller.  Free variables are not resolved in the nearest enclosing\nnamespace, but in the global namespace. [1] The "exec" statement and\nthe "eval()" and "execfile()" functions have optional arguments to\noverride the global and local namespace.  If only one namespace is\nspecified, it is used for both.\n',
- 'numbers': u'\nNumeric literals\n****************\n\nThere are four types of numeric literals: plain integers, long\nintegers, floating point numbers, and imaginary numbers.  There are no\ncomplex literals (complex numbers can be formed by adding a real\nnumber and an imaginary number).\n\nNote that numeric literals do not include a sign; a phrase like "-1"\nis actually an expression composed of the unary operator \'"-"\' and the\nliteral "1".\n',
- 'numeric-types': u'\nEmulating numeric types\n***********************\n\nThe following methods can be defined to emulate numeric objects.\nMethods corresponding to operations that are not supported by the\nparticular kind of number implemented (e.g., bitwise operations for\nnon-integral numbers) should be left undefined.\n\nobject.__add__(self, other)\nobject.__sub__(self, other)\nobject.__mul__(self, other)\nobject.__floordiv__(self, other)\nobject.__mod__(self, other)\nobject.__divmod__(self, other)\nobject.__pow__(self, other[, modulo])\nobject.__lshift__(self, other)\nobject.__rshift__(self, other)\nobject.__and__(self, other)\nobject.__xor__(self, other)\nobject.__or__(self, other)\n\n   These methods are called to implement the binary arithmetic\n   operations ("+", "-", "*", "//", "%", "divmod()", "pow()", "**",\n   "<<", ">>", "&", "^", "|").  For instance, to evaluate the\n   expression "x + y", where *x* is an instance of a class that has an\n   "__add__()" method, "x.__add__(y)" is called.  The "__divmod__()"\n   method should be the equivalent to using "__floordiv__()" and\n   "__mod__()"; it should not be related to "__truediv__()" (described\n   below).  Note that "__pow__()" should be defined to accept an\n   optional third argument if the ternary version of the built-in\n   "pow()" function is to be supported.\n\n   If one of those methods does not support the operation with the\n   supplied arguments, it should return "NotImplemented".\n\nobject.__div__(self, other)\nobject.__truediv__(self, other)\n\n   The division operator ("/") is implemented by these methods.  The\n   "__truediv__()" method is used when "__future__.division" is in\n   effect, otherwise "__div__()" is used.  If only one of these two\n   methods is defined, the object will not support division in the\n   alternate context; "TypeError" will be raised instead.\n\nobject.__radd__(self, other)\nobject.__rsub__(self, other)\nobject.__rmul__(self, other)\nobject.__rdiv__(self, other)\nobject.__rtruediv__(self, other)\nobject.__rfloordiv__(self, other)\nobject.__rmod__(self, other)\nobject.__rdivmod__(self, other)\nobject.__rpow__(self, other)\nobject.__rlshift__(self, other)\nobject.__rrshift__(self, other)\nobject.__rand__(self, other)\nobject.__rxor__(self, other)\nobject.__ror__(self, other)\n\n   These methods are called to implement the binary arithmetic\n   operations ("+", "-", "*", "/", "%", "divmod()", "pow()", "**",\n   "<<", ">>", "&", "^", "|") with reflected (swapped) operands.\n   These functions are only called if the left operand does not\n   support the corresponding operation and the operands are of\n   different types. [2] For instance, to evaluate the expression "x -\n   y", where *y* is an instance of a class that has an "__rsub__()"\n   method, "y.__rsub__(x)" is called if "x.__sub__(y)" returns\n   *NotImplemented*.\n\n   Note that ternary "pow()" will not try calling "__rpow__()" (the\n   coercion rules would become too complicated).\n\n   Note: If the right operand\'s type is a subclass of the left\n     operand\'s type and that subclass provides the reflected method\n     for the operation, this method will be called before the left\n     operand\'s non-reflected method.  This behavior allows subclasses\n     to override their ancestors\' operations.\n\nobject.__iadd__(self, other)\nobject.__isub__(self, other)\nobject.__imul__(self, other)\nobject.__idiv__(self, other)\nobject.__itruediv__(self, other)\nobject.__ifloordiv__(self, other)\nobject.__imod__(self, other)\nobject.__ipow__(self, other[, modulo])\nobject.__ilshift__(self, other)\nobject.__irshift__(self, other)\nobject.__iand__(self, other)\nobject.__ixor__(self, other)\nobject.__ior__(self, other)\n\n   These methods are called to implement the augmented arithmetic\n   assignments ("+=", "-=", "*=", "/=", "//=", "%=", "**=", "<<=",\n   ">>=", "&=", "^=", "|=").  These methods should attempt to do the\n   operation in-place (modifying *self*) and return the result (which\n   could be, but does not have to be, *self*).  If a specific method\n   is not defined, the augmented assignment falls back to the normal\n   methods.  For instance, to execute the statement "x += y", where\n   *x* is an instance of a class that has an "__iadd__()" method,\n   "x.__iadd__(y)" is called.  If *x* is an instance of a class that\n   does not define a "__iadd__()" method, "x.__add__(y)" and\n   "y.__radd__(x)" are considered, as with the evaluation of "x + y".\n\nobject.__neg__(self)\nobject.__pos__(self)\nobject.__abs__(self)\nobject.__invert__(self)\n\n   Called to implement the unary arithmetic operations ("-", "+",\n   "abs()" and "~").\n\nobject.__complex__(self)\nobject.__int__(self)\nobject.__long__(self)\nobject.__float__(self)\n\n   Called to implement the built-in functions "complex()", "int()",\n   "long()", and "float()".  Should return a value of the appropriate\n   type.\n\nobject.__oct__(self)\nobject.__hex__(self)\n\n   Called to implement the built-in functions "oct()" and "hex()".\n   Should return a string value.\n\nobject.__index__(self)\n\n   Called to implement "operator.index()".  Also called whenever\n   Python needs an integer object (such as in slicing).  Must return\n   an integer (int or long).\n\n   New in version 2.5.\n\nobject.__coerce__(self, other)\n\n   Called to implement "mixed-mode" numeric arithmetic.  Should either\n   return a 2-tuple containing *self* and *other* converted to a\n   common numeric type, or "None" if conversion is impossible.  When\n   the common type would be the type of "other", it is sufficient to\n   return "None", since the interpreter will also ask the other object\n   to attempt a coercion (but sometimes, if the implementation of the\n   other type cannot be changed, it is useful to do the conversion to\n   the other type here).  A return value of "NotImplemented" is\n   equivalent to returning "None".\n',
- 'objects': u'\nObjects, values and types\n*************************\n\n*Objects* are Python\'s abstraction for data.  All data in a Python\nprogram is represented by objects or by relations between objects. (In\na sense, and in conformance to Von Neumann\'s model of a "stored\nprogram computer," code is also represented by objects.)\n\nEvery object has an identity, a type and a value.  An object\'s\n*identity* never changes once it has been created; you may think of it\nas the object\'s address in memory.  The \'"is"\' operator compares the\nidentity of two objects; the "id()" function returns an integer\nrepresenting its identity (currently implemented as its address). An\nobject\'s *type* is also unchangeable. [1] An object\'s type determines\nthe operations that the object supports (e.g., "does it have a\nlength?") and also defines the possible values for objects of that\ntype.  The "type()" function returns an object\'s type (which is an\nobject itself).  The *value* of some objects can change.  Objects\nwhose value can change are said to be *mutable*; objects whose value\nis unchangeable once they are created are called *immutable*. (The\nvalue of an immutable container object that contains a reference to a\nmutable object can change when the latter\'s value is changed; however\nthe container is still considered immutable, because the collection of\nobjects it contains cannot be changed.  So, immutability is not\nstrictly the same as having an unchangeable value, it is more subtle.)\nAn object\'s mutability is determined by its type; for instance,\nnumbers, strings and tuples are immutable, while dictionaries and\nlists are mutable.\n\nObjects are never explicitly destroyed; however, when they become\nunreachable they may be garbage-collected.  An implementation is\nallowed to postpone garbage collection or omit it altogether --- it is\na matter of implementation quality how garbage collection is\nimplemented, as long as no objects are collected that are still\nreachable.\n\n**CPython implementation detail:** CPython currently uses a reference-\ncounting scheme with (optional) delayed detection of cyclically linked\ngarbage, which collects most objects as soon as they become\nunreachable, but is not guaranteed to collect garbage containing\ncircular references.  See the documentation of the "gc" module for\ninformation on controlling the collection of cyclic garbage. Other\nimplementations act differently and CPython may change. Do not depend\non immediate finalization of objects when they become unreachable (ex:\nalways close files).\n\nNote that the use of the implementation\'s tracing or debugging\nfacilities may keep objects alive that would normally be collectable.\nAlso note that catching an exception with a \'"try"..."except"\'\nstatement may keep objects alive.\n\nSome objects contain references to "external" resources such as open\nfiles or windows.  It is understood that these resources are freed\nwhen the object is garbage-collected, but since garbage collection is\nnot guaranteed to happen, such objects also provide an explicit way to\nrelease the external resource, usually a "close()" method. Programs\nare strongly recommended to explicitly close such objects.  The\n\'"try"..."finally"\' statement provides a convenient way to do this.\n\nSome objects contain references to other objects; these are called\n*containers*. Examples of containers are tuples, lists and\ndictionaries.  The references are part of a container\'s value.  In\nmost cases, when we talk about the value of a container, we imply the\nvalues, not the identities of the contained objects; however, when we\ntalk about the mutability of a container, only the identities of the\nimmediately contained objects are implied.  So, if an immutable\ncontainer (like a tuple) contains a reference to a mutable object, its\nvalue changes if that mutable object is changed.\n\nTypes affect almost all aspects of object behavior.  Even the\nimportance of object identity is affected in some sense: for immutable\ntypes, operations that compute new values may actually return a\nreference to any existing object with the same type and value, while\nfor mutable objects this is not allowed.  E.g., after "a = 1; b = 1",\n"a" and "b" may or may not refer to the same object with the value\none, depending on the implementation, but after "c = []; d = []", "c"\nand "d" are guaranteed to refer to two different, unique, newly\ncreated empty lists. (Note that "c = d = []" assigns the same object\nto both "c" and "d".)\n',
- 'operator-summary': u'\nOperator precedence\n*******************\n\nThe following table summarizes the operator precedences in Python,\nfrom lowest precedence (least binding) to highest precedence (most\nbinding). Operators in the same box have the same precedence.  Unless\nthe syntax is explicitly given, operators are binary.  Operators in\nthe same box group left to right (except for comparisons, including\ntests, which all have the same precedence and chain from left to right\n--- see section Comparisons --- and exponentiation, which groups from\nright to left).\n\n+-------------------------------------------------+---------------------------------------+\n| Operator                                        | Description                           |\n+=================================================+=======================================+\n| "lambda"                                        | Lambda expression                     |\n+-------------------------------------------------+---------------------------------------+\n| "if" -- "else"                                  | Conditional expression                |\n+-------------------------------------------------+---------------------------------------+\n| "or"                                            | Boolean OR                            |\n+-------------------------------------------------+---------------------------------------+\n| "and"                                           | Boolean AND                           |\n+-------------------------------------------------+---------------------------------------+\n| "not" "x"                                       | Boolean NOT                           |\n+-------------------------------------------------+---------------------------------------+\n| "in", "not in", "is", "is not", "<", "<=", ">", | Comparisons, including membership     |\n| ">=", "<>", "!=", "=="                          | tests and identity tests              |\n+-------------------------------------------------+---------------------------------------+\n| "|"                                             | Bitwise OR                            |\n+-------------------------------------------------+---------------------------------------+\n| "^"                                             | Bitwise XOR                           |\n+-------------------------------------------------+---------------------------------------+\n| "&"                                             | Bitwise AND                           |\n+-------------------------------------------------+---------------------------------------+\n| "<<", ">>"                                      | Shifts                                |\n+-------------------------------------------------+---------------------------------------+\n| "+", "-"                                        | Addition and subtraction              |\n+-------------------------------------------------+---------------------------------------+\n| "*", "/", "//", "%"                             | Multiplication, division, remainder   |\n|                                                 | [8]                                   |\n+-------------------------------------------------+---------------------------------------+\n| "+x", "-x", "~x"                                | Positive, negative, bitwise NOT       |\n+-------------------------------------------------+---------------------------------------+\n| "**"                                            | Exponentiation [9]                    |\n+-------------------------------------------------+---------------------------------------+\n| "x[index]", "x[index:index]",                   | Subscription, slicing, call,          |\n| "x(arguments...)", "x.attribute"                | attribute reference                   |\n+-------------------------------------------------+---------------------------------------+\n| "(expressions...)", "[expressions...]", "{key:  | Binding or tuple display, list        |\n| value...}", "`expressions...`"                  | display, dictionary display, string   |\n|                                                 | conversion                            |\n+-------------------------------------------------+---------------------------------------+\n\n-[ Footnotes ]-\n\n[1] In Python 2.3 and later releases, a list comprehension "leaks"\n    the control variables of each "for" it contains into the\n    containing scope.  However, this behavior is deprecated, and\n    relying on it will not work in Python 3.\n\n[2] While "abs(x%y) < abs(y)" is true mathematically, for floats\n    it may not be true numerically due to roundoff.  For example, and\n    assuming a platform on which a Python float is an IEEE 754 double-\n    precision number, in order that "-1e-100 % 1e100" have the same\n    sign as "1e100", the computed result is "-1e-100 + 1e100", which\n    is numerically exactly equal to "1e100".  The function\n    "math.fmod()" returns a result whose sign matches the sign of the\n    first argument instead, and so returns "-1e-100" in this case.\n    Which approach is more appropriate depends on the application.\n\n[3] If x is very close to an exact integer multiple of y, it\'s\n    possible for "floor(x/y)" to be one larger than "(x-x%y)/y" due to\n    rounding.  In such cases, Python returns the latter result, in\n    order to preserve that "divmod(x,y)[0] * y + x % y" be very close\n    to "x".\n\n[4] While comparisons between unicode strings make sense at the\n    byte level, they may be counter-intuitive to users. For example,\n    the strings "u"\\u00C7"" and "u"\\u0043\\u0327"" compare differently,\n    even though they both represent the same unicode character (LATIN\n    CAPITAL LETTER C WITH CEDILLA). To compare strings in a human\n    recognizable way, compare using "unicodedata.normalize()".\n\n[5] The implementation computes this efficiently, without\n    constructing lists or sorting.\n\n[6] Earlier versions of Python used lexicographic comparison of\n    the sorted (key, value) lists, but this was very expensive for the\n    common case of comparing for equality.  An even earlier version of\n    Python compared dictionaries by identity only, but this caused\n    surprises because people expected to be able to test a dictionary\n    for emptiness by comparing it to "{}".\n\n[7] Due to automatic garbage-collection, free lists, and the\n    dynamic nature of descriptors, you may notice seemingly unusual\n    behaviour in certain uses of the "is" operator, like those\n    involving comparisons between instance methods, or constants.\n    Check their documentation for more info.\n\n[8] The "%" operator is also used for string formatting; the same\n    precedence applies.\n\n[9] The power operator "**" binds less tightly than an arithmetic\n    or bitwise unary operator on its right, that is, "2**-1" is "0.5".\n',
- 'pass': u'\nThe "pass" statement\n********************\n\n   pass_stmt ::= "pass"\n\n"pass" is a null operation --- when it is executed, nothing happens.\nIt is useful as a placeholder when a statement is required\nsyntactically, but no code needs to be executed, for example:\n\n   def f(arg): pass    # a function that does nothing (yet)\n\n   class C: pass       # a class with no methods (yet)\n',
- 'power': u'\nThe power operator\n******************\n\nThe power operator binds more tightly than unary operators on its\nleft; it binds less tightly than unary operators on its right.  The\nsyntax is:\n\n   power ::= primary ["**" u_expr]\n\nThus, in an unparenthesized sequence of power and unary operators, the\noperators are evaluated from right to left (this does not constrain\nthe evaluation order for the operands): "-1**2" results in "-1".\n\nThe power operator has the same semantics as the built-in "pow()"\nfunction, when called with two arguments: it yields its left argument\nraised to the power of its right argument.  The numeric arguments are\nfirst converted to a common type.  The result type is that of the\narguments after coercion.\n\nWith mixed operand types, the coercion rules for binary arithmetic\noperators apply. For int and long int operands, the result has the\nsame type as the operands (after coercion) unless the second argument\nis negative; in that case, all arguments are converted to float and a\nfloat result is delivered. For example, "10**2" returns "100", but\n"10**-2" returns "0.01". (This last feature was added in Python 2.2.\nIn Python 2.1 and before, if both arguments were of integer types and\nthe second argument was negative, an exception was raised).\n\nRaising "0.0" to a negative power results in a "ZeroDivisionError".\nRaising a negative number to a fractional power results in a\n"ValueError".\n',
- 'print': u'\nThe "print" statement\n*********************\n\n   print_stmt ::= "print" ([expression ("," expression)* [","]]\n                  | ">>" expression [("," expression)+ [","]])\n\n"print" evaluates each expression in turn and writes the resulting\nobject to standard output (see below).  If an object is not a string,\nit is first converted to a string using the rules for string\nconversions.  The (resulting or original) string is then written.  A\nspace is written before each object is (converted and) written, unless\nthe output system believes it is positioned at the beginning of a\nline.  This is the case (1) when no characters have yet been written\nto standard output, (2) when the last character written to standard\noutput is a whitespace character except "\' \'", or (3) when the last\nwrite operation on standard output was not a "print" statement. (In\nsome cases it may be functional to write an empty string to standard\noutput for this reason.)\n\nNote: Objects which act like file objects but which are not the\n  built-in file objects often do not properly emulate this aspect of\n  the file object\'s behavior, so it is best not to rely on this.\n\nA "\'\\n\'" character is written at the end, unless the "print" statement\nends with a comma.  This is the only action if the statement contains\njust the keyword "print".\n\nStandard output is defined as the file object named "stdout" in the\nbuilt-in module "sys".  If no such object exists, or if it does not\nhave a "write()" method, a "RuntimeError" exception is raised.\n\n"print" also has an extended form, defined by the second portion of\nthe syntax described above. This form is sometimes referred to as\n""print" chevron." In this form, the first expression after the ">>"\nmust evaluate to a "file-like" object, specifically an object that has\na "write()" method as described above.  With this extended form, the\nsubsequent expressions are printed to this file object.  If the first\nexpression evaluates to "None", then "sys.stdout" is used as the file\nfor output.\n',
- 'raise': u'\nThe "raise" statement\n*********************\n\n   raise_stmt ::= "raise" [expression ["," expression ["," expression]]]\n\nIf no expressions are present, "raise" re-raises the last exception\nthat was active in the current scope.  If no exception is active in\nthe current scope, a "TypeError" exception is raised indicating that\nthis is an error (if running under IDLE, a "Queue.Empty" exception is\nraised instead).\n\nOtherwise, "raise" evaluates the expressions to get three objects,\nusing "None" as the value of omitted expressions.  The first two\nobjects are used to determine the *type* and *value* of the exception.\n\nIf the first object is an instance, the type of the exception is the\nclass of the instance, the instance itself is the value, and the\nsecond object must be "None".\n\nIf the first object is a class, it becomes the type of the exception.\nThe second object is used to determine the exception value: If it is\nan instance of the class, the instance becomes the exception value. If\nthe second object is a tuple, it is used as the argument list for the\nclass constructor; if it is "None", an empty argument list is used,\nand any other object is treated as a single argument to the\nconstructor.  The instance so created by calling the constructor is\nused as the exception value.\n\nIf a third object is present and not "None", it must be a traceback\nobject (see section The standard type hierarchy), and it is\nsubstituted instead of the current location as the place where the\nexception occurred.  If the third object is present and not a\ntraceback object or "None", a "TypeError" exception is raised.  The\nthree-expression form of "raise" is useful to re-raise an exception\ntransparently in an except clause, but "raise" with no expressions\nshould be preferred if the exception to be re-raised was the most\nrecently active exception in the current scope.\n\nAdditional information on exceptions can be found in section\nExceptions, and information about handling exceptions is in section\nThe try statement.\n',
- 'return': u'\nThe "return" statement\n**********************\n\n   return_stmt ::= "return" [expression_list]\n\n"return" may only occur syntactically nested in a function definition,\nnot within a nested class definition.\n\nIf an expression list is present, it is evaluated, else "None" is\nsubstituted.\n\n"return" leaves the current function call with the expression list (or\n"None") as return value.\n\nWhen "return" passes control out of a "try" statement with a "finally"\nclause, that "finally" clause is executed before really leaving the\nfunction.\n\nIn a generator function, the "return" statement is not allowed to\ninclude an "expression_list".  In that context, a bare "return"\nindicates that the generator is done and will cause "StopIteration" to\nbe raised.\n',
- 'sequence-types': u'\nEmulating container types\n*************************\n\nThe following methods can be defined to implement container objects.\nContainers usually are sequences (such as lists or tuples) or mappings\n(like dictionaries), but can represent other containers as well.  The\nfirst set of methods is used either to emulate a sequence or to\nemulate a mapping; the difference is that for a sequence, the\nallowable keys should be the integers *k* for which "0 <= k < N" where\n*N* is the length of the sequence, or slice objects, which define a\nrange of items. (For backwards compatibility, the method\n"__getslice__()" (see below) can also be defined to handle simple, but\nnot extended slices.) It is also recommended that mappings provide the\nmethods "keys()", "values()", "items()", "has_key()", "get()",\n"clear()", "setdefault()", "iterkeys()", "itervalues()",\n"iteritems()", "pop()", "popitem()", "copy()", and "update()" behaving\nsimilar to those for Python\'s standard dictionary objects.  The\n"UserDict" module provides a "DictMixin" class to help create those\nmethods from a base set of "__getitem__()", "__setitem__()",\n"__delitem__()", and "keys()". Mutable sequences should provide\nmethods "append()", "count()", "index()", "extend()", "insert()",\n"pop()", "remove()", "reverse()" and "sort()", like Python standard\nlist objects.  Finally, sequence types should implement addition\n(meaning concatenation) and multiplication (meaning repetition) by\ndefining the methods "__add__()", "__radd__()", "__iadd__()",\n"__mul__()", "__rmul__()" and "__imul__()" described below; they\nshould not define "__coerce__()" or other numerical operators.  It is\nrecommended that both mappings and sequences implement the\n"__contains__()" method to allow efficient use of the "in" operator;\nfor mappings, "in" should be equivalent of "has_key()"; for sequences,\nit should search through the values.  It is further recommended that\nboth mappings and sequences implement the "__iter__()" method to allow\nefficient iteration through the container; for mappings, "__iter__()"\nshould be the same as "iterkeys()"; for sequences, it should iterate\nthrough the values.\n\nobject.__len__(self)\n\n   Called to implement the built-in function "len()".  Should return\n   the length of the object, an integer ">=" 0.  Also, an object that\n   doesn\'t define a "__nonzero__()" method and whose "__len__()"\n   method returns zero is considered to be false in a Boolean context.\n\nobject.__getitem__(self, key)\n\n   Called to implement evaluation of "self[key]". For sequence types,\n   the accepted keys should be integers and slice objects.  Note that\n   the special interpretation of negative indexes (if the class wishes\n   to emulate a sequence type) is up to the "__getitem__()" method. If\n   *key* is of an inappropriate type, "TypeError" may be raised; if of\n   a value outside the set of indexes for the sequence (after any\n   special interpretation of negative values), "IndexError" should be\n   raised. For mapping types, if *key* is missing (not in the\n   container), "KeyError" should be raised.\n\n   Note: "for" loops expect that an "IndexError" will be raised for\n     illegal indexes to allow proper detection of the end of the\n     sequence.\n\nobject.__missing__(self, key)\n\n   Called by "dict"."__getitem__()" to implement "self[key]" for dict\n   subclasses when key is not in the dictionary.\n\nobject.__setitem__(self, key, value)\n\n   Called to implement assignment to "self[key]".  Same note as for\n   "__getitem__()".  This should only be implemented for mappings if\n   the objects support changes to the values for keys, or if new keys\n   can be added, or for sequences if elements can be replaced.  The\n   same exceptions should be raised for improper *key* values as for\n   the "__getitem__()" method.\n\nobject.__delitem__(self, key)\n\n   Called to implement deletion of "self[key]".  Same note as for\n   "__getitem__()".  This should only be implemented for mappings if\n   the objects support removal of keys, or for sequences if elements\n   can be removed from the sequence.  The same exceptions should be\n   raised for improper *key* values as for the "__getitem__()" method.\n\nobject.__iter__(self)\n\n   This method is called when an iterator is required for a container.\n   This method should return a new iterator object that can iterate\n   over all the objects in the container.  For mappings, it should\n   iterate over the keys of the container, and should also be made\n   available as the method "iterkeys()".\n\n   Iterator objects also need to implement this method; they are\n   required to return themselves.  For more information on iterator\n   objects, see Iterator Types.\n\nobject.__reversed__(self)\n\n   Called (if present) by the "reversed()" built-in to implement\n   reverse iteration.  It should return a new iterator object that\n   iterates over all the objects in the container in reverse order.\n\n   If the "__reversed__()" method is not provided, the "reversed()"\n   built-in will fall back to using the sequence protocol ("__len__()"\n   and "__getitem__()").  Objects that support the sequence protocol\n   should only provide "__reversed__()" if they can provide an\n   implementation that is more efficient than the one provided by\n   "reversed()".\n\n   New in version 2.6.\n\nThe membership test operators ("in" and "not in") are normally\nimplemented as an iteration through a sequence.  However, container\nobjects can supply the following special method with a more efficient\nimplementation, which also does not require the object be a sequence.\n\nobject.__contains__(self, item)\n\n   Called to implement membership test operators.  Should return true\n   if *item* is in *self*, false otherwise.  For mapping objects, this\n   should consider the keys of the mapping rather than the values or\n   the key-item pairs.\n\n   For objects that don\'t define "__contains__()", the membership test\n   first tries iteration via "__iter__()", then the old sequence\n   iteration protocol via "__getitem__()", see this section in the\n   language reference.\n',
- 'shifting': u'\nShifting operations\n*******************\n\nThe shifting operations have lower priority than the arithmetic\noperations:\n\n   shift_expr ::= a_expr | shift_expr ( "<<" | ">>" ) a_expr\n\nThese operators accept plain or long integers as arguments.  The\narguments are converted to a common type.  They shift the first\nargument to the left or right by the number of bits given by the\nsecond argument.\n\nA right shift by *n* bits is defined as division by "pow(2, n)".  A\nleft shift by *n* bits is defined as multiplication with "pow(2, n)".\nNegative shift counts raise a "ValueError" exception.\n\nNote: In the current implementation, the right-hand operand is\n  required to be at most "sys.maxsize".  If the right-hand operand is\n  larger than "sys.maxsize" an "OverflowError" exception is raised.\n',
- 'slicings': u'\nSlicings\n********\n\nA slicing selects a range of items in a sequence object (e.g., a\nstring, tuple or list).  Slicings may be used as expressions or as\ntargets in assignment or "del" statements.  The syntax for a slicing:\n\n   slicing          ::= simple_slicing | extended_slicing\n   simple_slicing   ::= primary "[" short_slice "]"\n   extended_slicing ::= primary "[" slice_list "]"\n   slice_list       ::= slice_item ("," slice_item)* [","]\n   slice_item       ::= expression | proper_slice | ellipsis\n   proper_slice     ::= short_slice | long_slice\n   short_slice      ::= [lower_bound] ":" [upper_bound]\n   long_slice       ::= short_slice ":" [stride]\n   lower_bound      ::= expression\n   upper_bound      ::= expression\n   stride           ::= expression\n   ellipsis         ::= "..."\n\nThere is ambiguity in the formal syntax here: anything that looks like\nan expression list also looks like a slice list, so any subscription\ncan be interpreted as a slicing.  Rather than further complicating the\nsyntax, this is disambiguated by defining that in this case the\ninterpretation as a subscription takes priority over the\ninterpretation as a slicing (this is the case if the slice list\ncontains no proper slice nor ellipses).  Similarly, when the slice\nlist has exactly one short slice and no trailing comma, the\ninterpretation as a simple slicing takes priority over that as an\nextended slicing.\n\nThe semantics for a simple slicing are as follows.  The primary must\nevaluate to a sequence object.  The lower and upper bound expressions,\nif present, must evaluate to plain integers; defaults are zero and the\n"sys.maxint", respectively.  If either bound is negative, the\nsequence\'s length is added to it.  The slicing now selects all items\nwith index *k* such that "i <= k < j" where *i* and *j* are the\nspecified lower and upper bounds.  This may be an empty sequence.  It\nis not an error if *i* or *j* lie outside the range of valid indexes\n(such items don\'t exist so they aren\'t selected).\n\nThe semantics for an extended slicing are as follows.  The primary\nmust evaluate to a mapping object, and it is indexed with a key that\nis constructed from the slice list, as follows.  If the slice list\ncontains at least one comma, the key is a tuple containing the\nconversion of the slice items; otherwise, the conversion of the lone\nslice item is the key.  The conversion of a slice item that is an\nexpression is that expression.  The conversion of an ellipsis slice\nitem is the built-in "Ellipsis" object.  The conversion of a proper\nslice is a slice object (see section The standard type hierarchy)\nwhose "start", "stop" and "step" attributes are the values of the\nexpressions given as lower bound, upper bound and stride,\nrespectively, substituting "None" for missing expressions.\n',
- 'specialattrs': u'\nSpecial Attributes\n******************\n\nThe implementation adds a few special read-only attributes to several\nobject types, where they are relevant.  Some of these are not reported\nby the "dir()" built-in function.\n\nobject.__dict__\n\n   A dictionary or other mapping object used to store an object\'s\n   (writable) attributes.\n\nobject.__methods__\n\n   Deprecated since version 2.2: Use the built-in function "dir()" to\n   get a list of an object\'s attributes. This attribute is no longer\n   available.\n\nobject.__members__\n\n   Deprecated since version 2.2: Use the built-in function "dir()" to\n   get a list of an object\'s attributes. This attribute is no longer\n   available.\n\ninstance.__class__\n\n   The class to which a class instance belongs.\n\nclass.__bases__\n\n   The tuple of base classes of a class object.\n\nclass.__name__\n\n   The name of the class or type.\n\nThe following attributes are only supported by *new-style class*es.\n\nclass.__mro__\n\n   This attribute is a tuple of classes that are considered when\n   looking for base classes during method resolution.\n\nclass.mro()\n\n   This method can be overridden by a metaclass to customize the\n   method resolution order for its instances.  It is called at class\n   instantiation, and its result is stored in "__mro__".\n\nclass.__subclasses__()\n\n   Each new-style class keeps a list of weak references to its\n   immediate subclasses.  This method returns a list of all those\n   references still alive. Example:\n\n      >>> int.__subclasses__()\n      [<type \'bool\'>]\n\n-[ Footnotes ]-\n\n[1] Additional information on these special methods may be found\n    in the Python Reference Manual (Basic customization).\n\n[2] As a consequence, the list "[1, 2]" is considered equal to\n    "[1.0, 2.0]", and similarly for tuples.\n\n[3] They must have since the parser can\'t tell the type of the\n    operands.\n\n[4] Cased characters are those with general category property\n    being one of "Lu" (Letter, uppercase), "Ll" (Letter, lowercase),\n    or "Lt" (Letter, titlecase).\n\n[5] To format only a tuple you should therefore provide a\n    singleton tuple whose only element is the tuple to be formatted.\n\n[6] The advantage of leaving the newline on is that returning an\n    empty string is then an unambiguous EOF indication.  It is also\n    possible (in cases where it might matter, for example, if you want\n    to make an exact copy of a file while scanning its lines) to tell\n    whether the last line of a file ended in a newline or not (yes\n    this happens!).\n',
- 'specialnames': u'\nSpecial method names\n********************\n\nA class can implement certain operations that are invoked by special\nsyntax (such as arithmetic operations or subscripting and slicing) by\ndefining methods with special names. This is Python\'s approach to\n*operator overloading*, allowing classes to define their own behavior\nwith respect to language operators.  For instance, if a class defines\na method named "__getitem__()", and "x" is an instance of this class,\nthen "x[i]" is roughly equivalent to "x.__getitem__(i)" for old-style\nclasses and "type(x).__getitem__(x, i)" for new-style classes.  Except\nwhere mentioned, attempts to execute an operation raise an exception\nwhen no appropriate method is defined (typically "AttributeError" or\n"TypeError").\n\nWhen implementing a class that emulates any built-in type, it is\nimportant that the emulation only be implemented to the degree that it\nmakes sense for the object being modelled.  For example, some\nsequences may work well with retrieval of individual elements, but\nextracting a slice may not make sense.  (One example of this is the\n"NodeList" interface in the W3C\'s Document Object Model.)\n\n\nBasic customization\n===================\n\nobject.__new__(cls[, ...])\n\n   Called to create a new instance of class *cls*.  "__new__()" is a\n   static method (special-cased so you need not declare it as such)\n   that takes the class of which an instance was requested as its\n   first argument.  The remaining arguments are those passed to the\n   object constructor expression (the call to the class).  The return\n   value of "__new__()" should be the new object instance (usually an\n   instance of *cls*).\n\n   Typical implementations create a new instance of the class by\n   invoking the superclass\'s "__new__()" method using\n   "super(currentclass, cls).__new__(cls[, ...])" with appropriate\n   arguments and then modifying the newly-created instance as\n   necessary before returning it.\n\n   If "__new__()" returns an instance of *cls*, then the new\n   instance\'s "__init__()" method will be invoked like\n   "__init__(self[, ...])", where *self* is the new instance and the\n   remaining arguments are the same as were passed to "__new__()".\n\n   If "__new__()" does not return an instance of *cls*, then the new\n   instance\'s "__init__()" method will not be invoked.\n\n   "__new__()" is intended mainly to allow subclasses of immutable\n   types (like int, str, or tuple) to customize instance creation.  It\n   is also commonly overridden in custom metaclasses in order to\n   customize class creation.\n\nobject.__init__(self[, ...])\n\n   Called after the instance has been created (by "__new__()"), but\n   before it is returned to the caller.  The arguments are those\n   passed to the class constructor expression.  If a base class has an\n   "__init__()" method, the derived class\'s "__init__()" method, if\n   any, must explicitly call it to ensure proper initialization of the\n   base class part of the instance; for example:\n   "BaseClass.__init__(self, [args...])".\n\n   Because "__new__()" and "__init__()" work together in constructing\n   objects ("__new__()" to create it, and "__init__()" to customise\n   it), no non-"None" value may be returned by "__init__()"; doing so\n   will cause a "TypeError" to be raised at runtime.\n\nobject.__del__(self)\n\n   Called when the instance is about to be destroyed.  This is also\n   called a destructor.  If a base class has a "__del__()" method, the\n   derived class\'s "__del__()" method, if any, must explicitly call it\n   to ensure proper deletion of the base class part of the instance.\n   Note that it is possible (though not recommended!) for the\n   "__del__()" method to postpone destruction of the instance by\n   creating a new reference to it.  It may then be called at a later\n   time when this new reference is deleted.  It is not guaranteed that\n   "__del__()" methods are called for objects that still exist when\n   the interpreter exits.\n\n   Note: "del x" doesn\'t directly call "x.__del__()" --- the former\n     decrements the reference count for "x" by one, and the latter is\n     only called when "x"\'s reference count reaches zero.  Some common\n     situations that may prevent the reference count of an object from\n     going to zero include: circular references between objects (e.g.,\n     a doubly-linked list or a tree data structure with parent and\n     child pointers); a reference to the object on the stack frame of\n     a function that caught an exception (the traceback stored in\n     "sys.exc_traceback" keeps the stack frame alive); or a reference\n     to the object on the stack frame that raised an unhandled\n     exception in interactive mode (the traceback stored in\n     "sys.last_traceback" keeps the stack frame alive).  The first\n     situation can only be remedied by explicitly breaking the cycles;\n     the latter two situations can be resolved by storing "None" in\n     "sys.exc_traceback" or "sys.last_traceback".  Circular references\n     which are garbage are detected when the option cycle detector is\n     enabled (it\'s on by default), but can only be cleaned up if there\n     are no Python-level "__del__()" methods involved. Refer to the\n     documentation for the "gc" module for more information about how\n     "__del__()" methods are handled by the cycle detector,\n     particularly the description of the "garbage" value.\n\n   Warning: Due to the precarious circumstances under which\n     "__del__()" methods are invoked, exceptions that occur during\n     their execution are ignored, and a warning is printed to\n     "sys.stderr" instead. Also, when "__del__()" is invoked in\n     response to a module being deleted (e.g., when execution of the\n     program is done), other globals referenced by the "__del__()"\n     method may already have been deleted or in the process of being\n     torn down (e.g. the import machinery shutting down).  For this\n     reason, "__del__()" methods should do the absolute minimum needed\n     to maintain external invariants.  Starting with version 1.5,\n     Python guarantees that globals whose name begins with a single\n     underscore are deleted from their module before other globals are\n     deleted; if no other references to such globals exist, this may\n     help in assuring that imported modules are still available at the\n     time when the "__del__()" method is called.\n\n   See also the "-R" command-line option.\n\nobject.__repr__(self)\n\n   Called by the "repr()" built-in function and by string conversions\n   (reverse quotes) to compute the "official" string representation of\n   an object.  If at all possible, this should look like a valid\n   Python expression that could be used to recreate an object with the\n   same value (given an appropriate environment).  If this is not\n   possible, a string of the form "<...some useful description...>"\n   should be returned.  The return value must be a string object. If a\n   class defines "__repr__()" but not "__str__()", then "__repr__()"\n   is also used when an "informal" string representation of instances\n   of that class is required.\n\n   This is typically used for debugging, so it is important that the\n   representation is information-rich and unambiguous.\n\nobject.__str__(self)\n\n   Called by the "str()" built-in function and by the "print"\n   statement to compute the "informal" string representation of an\n   object.  This differs from "__repr__()" in that it does not have to\n   be a valid Python expression: a more convenient or concise\n   representation may be used instead. The return value must be a\n   string object.\n\nobject.__lt__(self, other)\nobject.__le__(self, other)\nobject.__eq__(self, other)\nobject.__ne__(self, other)\nobject.__gt__(self, other)\nobject.__ge__(self, other)\n\n   New in version 2.1.\n\n   These are the so-called "rich comparison" methods, and are called\n   for comparison operators in preference to "__cmp__()" below. The\n   correspondence between operator symbols and method names is as\n   follows: "x<y" calls "x.__lt__(y)", "x<=y" calls "x.__le__(y)",\n   "x==y" calls "x.__eq__(y)", "x!=y" and "x<>y" call "x.__ne__(y)",\n   "x>y" calls "x.__gt__(y)", and "x>=y" calls "x.__ge__(y)".\n\n   A rich comparison method may return the singleton "NotImplemented"\n   if it does not implement the operation for a given pair of\n   arguments. By convention, "False" and "True" are returned for a\n   successful comparison. However, these methods can return any value,\n   so if the comparison operator is used in a Boolean context (e.g.,\n   in the condition of an "if" statement), Python will call "bool()"\n   on the value to determine if the result is true or false.\n\n   There are no implied relationships among the comparison operators.\n   The truth of "x==y" does not imply that "x!=y" is false.\n   Accordingly, when defining "__eq__()", one should also define\n   "__ne__()" so that the operators will behave as expected.  See the\n   paragraph on "__hash__()" for some important notes on creating\n   *hashable* objects which support custom comparison operations and\n   are usable as dictionary keys.\n\n   There are no swapped-argument versions of these methods (to be used\n   when the left argument does not support the operation but the right\n   argument does); rather, "__lt__()" and "__gt__()" are each other\'s\n   reflection, "__le__()" and "__ge__()" are each other\'s reflection,\n   and "__eq__()" and "__ne__()" are their own reflection.\n\n   Arguments to rich comparison methods are never coerced.\n\n   To automatically generate ordering operations from a single root\n   operation, see "functools.total_ordering()".\n\nobject.__cmp__(self, other)\n\n   Called by comparison operations if rich comparison (see above) is\n   not defined.  Should return a negative integer if "self < other",\n   zero if "self == other", a positive integer if "self > other".  If\n   no "__cmp__()", "__eq__()" or "__ne__()" operation is defined,\n   class instances are compared by object identity ("address").  See\n   also the description of "__hash__()" for some important notes on\n   creating *hashable* objects which support custom comparison\n   operations and are usable as dictionary keys. (Note: the\n   restriction that exceptions are not propagated by "__cmp__()" has\n   been removed since Python 1.5.)\n\nobject.__rcmp__(self, other)\n\n   Changed in version 2.1: No longer supported.\n\nobject.__hash__(self)\n\n   Called by built-in function "hash()" and for operations on members\n   of hashed collections including "set", "frozenset", and "dict".\n   "__hash__()" should return an integer.  The only required property\n   is that objects which compare equal have the same hash value; it is\n   advised to somehow mix together (e.g. using exclusive or) the hash\n   values for the components of the object that also play a part in\n   comparison of objects.\n\n   If a class does not define a "__cmp__()" or "__eq__()" method it\n   should not define a "__hash__()" operation either; if it defines\n   "__cmp__()" or "__eq__()" but not "__hash__()", its instances will\n   not be usable in hashed collections.  If a class defines mutable\n   objects and implements a "__cmp__()" or "__eq__()" method, it\n   should not implement "__hash__()", since hashable collection\n   implementations require that a object\'s hash value is immutable (if\n   the object\'s hash value changes, it will be in the wrong hash\n   bucket).\n\n   User-defined classes have "__cmp__()" and "__hash__()" methods by\n   default; with them, all objects compare unequal (except with\n   themselves) and "x.__hash__()" returns a result derived from\n   "id(x)".\n\n   Classes which inherit a "__hash__()" method from a parent class but\n   change the meaning of "__cmp__()" or "__eq__()" such that the hash\n   value returned is no longer appropriate (e.g. by switching to a\n   value-based concept of equality instead of the default identity\n   based equality) can explicitly flag themselves as being unhashable\n   by setting "__hash__ = None" in the class definition. Doing so\n   means that not only will instances of the class raise an\n   appropriate "TypeError" when a program attempts to retrieve their\n   hash value, but they will also be correctly identified as\n   unhashable when checking "isinstance(obj, collections.Hashable)"\n   (unlike classes which define their own "__hash__()" to explicitly\n   raise "TypeError").\n\n   Changed in version 2.5: "__hash__()" may now also return a long\n   integer object; the 32-bit integer is then derived from the hash of\n   that object.\n\n   Changed in version 2.6: "__hash__" may now be set to "None" to\n   explicitly flag instances of a class as unhashable.\n\nobject.__nonzero__(self)\n\n   Called to implement truth value testing and the built-in operation\n   "bool()"; should return "False" or "True", or their integer\n   equivalents "0" or "1".  When this method is not defined,\n   "__len__()" is called, if it is defined, and the object is\n   considered true if its result is nonzero. If a class defines\n   neither "__len__()" nor "__nonzero__()", all its instances are\n   considered true.\n\nobject.__unicode__(self)\n\n   Called to implement "unicode()" built-in; should return a Unicode\n   object. When this method is not defined, string conversion is\n   attempted, and the result of string conversion is converted to\n   Unicode using the system default encoding.\n\n\nCustomizing attribute access\n============================\n\nThe following methods can be defined to customize the meaning of\nattribute access (use of, assignment to, or deletion of "x.name") for\nclass instances.\n\nobject.__getattr__(self, name)\n\n   Called when an attribute lookup has not found the attribute in the\n   usual places (i.e. it is not an instance attribute nor is it found\n   in the class tree for "self").  "name" is the attribute name. This\n   method should return the (computed) attribute value or raise an\n   "AttributeError" exception.\n\n   Note that if the attribute is found through the normal mechanism,\n   "__getattr__()" is not called.  (This is an intentional asymmetry\n   between "__getattr__()" and "__setattr__()".) This is done both for\n   efficiency reasons and because otherwise "__getattr__()" would have\n   no way to access other attributes of the instance.  Note that at\n   least for instance variables, you can fake total control by not\n   inserting any values in the instance attribute dictionary (but\n   instead inserting them in another object).  See the\n   "__getattribute__()" method below for a way to actually get total\n   control in new-style classes.\n\nobject.__setattr__(self, name, value)\n\n   Called when an attribute assignment is attempted.  This is called\n   instead of the normal mechanism (i.e. store the value in the\n   instance dictionary).  *name* is the attribute name, *value* is the\n   value to be assigned to it.\n\n   If "__setattr__()" wants to assign to an instance attribute, it\n   should not simply execute "self.name = value" --- this would cause\n   a recursive call to itself.  Instead, it should insert the value in\n   the dictionary of instance attributes, e.g., "self.__dict__[name] =\n   value".  For new-style classes, rather than accessing the instance\n   dictionary, it should call the base class method with the same\n   name, for example, "object.__setattr__(self, name, value)".\n\nobject.__delattr__(self, name)\n\n   Like "__setattr__()" but for attribute deletion instead of\n   assignment.  This should only be implemented if "del obj.name" is\n   meaningful for the object.\n\n\nMore attribute access for new-style classes\n-------------------------------------------\n\nThe following methods only apply to new-style classes.\n\nobject.__getattribute__(self, name)\n\n   Called unconditionally to implement attribute accesses for\n   instances of the class. If the class also defines "__getattr__()",\n   the latter will not be called unless "__getattribute__()" either\n   calls it explicitly or raises an "AttributeError". This method\n   should return the (computed) attribute value or raise an\n   "AttributeError" exception. In order to avoid infinite recursion in\n   this method, its implementation should always call the base class\n   method with the same name to access any attributes it needs, for\n   example, "object.__getattribute__(self, name)".\n\n   Note: This method may still be bypassed when looking up special\n     methods as the result of implicit invocation via language syntax\n     or built-in functions. See Special method lookup for new-style\n     classes.\n\n\nImplementing Descriptors\n------------------------\n\nThe following methods only apply when an instance of the class\ncontaining the method (a so-called *descriptor* class) appears in an\n*owner* class (the descriptor must be in either the owner\'s class\ndictionary or in the class dictionary for one of its parents).  In the\nexamples below, "the attribute" refers to the attribute whose name is\nthe key of the property in the owner class\' "__dict__".\n\nobject.__get__(self, instance, owner)\n\n   Called to get the attribute of the owner class (class attribute\n   access) or of an instance of that class (instance attribute\n   access). *owner* is always the owner class, while *instance* is the\n   instance that the attribute was accessed through, or "None" when\n   the attribute is accessed through the *owner*.  This method should\n   return the (computed) attribute value or raise an "AttributeError"\n   exception.\n\nobject.__set__(self, instance, value)\n\n   Called to set the attribute on an instance *instance* of the owner\n   class to a new value, *value*.\n\nobject.__delete__(self, instance)\n\n   Called to delete the attribute on an instance *instance* of the\n   owner class.\n\n\nInvoking Descriptors\n--------------------\n\nIn general, a descriptor is an object attribute with "binding\nbehavior", one whose attribute access has been overridden by methods\nin the descriptor protocol:  "__get__()", "__set__()", and\n"__delete__()". If any of those methods are defined for an object, it\nis said to be a descriptor.\n\nThe default behavior for attribute access is to get, set, or delete\nthe attribute from an object\'s dictionary. For instance, "a.x" has a\nlookup chain starting with "a.__dict__[\'x\']", then\n"type(a).__dict__[\'x\']", and continuing through the base classes of\n"type(a)" excluding metaclasses.\n\nHowever, if the looked-up value is an object defining one of the\ndescriptor methods, then Python may override the default behavior and\ninvoke the descriptor method instead.  Where this occurs in the\nprecedence chain depends on which descriptor methods were defined and\nhow they were called.  Note that descriptors are only invoked for new\nstyle objects or classes (ones that subclass "object()" or "type()").\n\nThe starting point for descriptor invocation is a binding, "a.x". How\nthe arguments are assembled depends on "a":\n\nDirect Call\n   The simplest and least common call is when user code directly\n   invokes a descriptor method:    "x.__get__(a)".\n\nInstance Binding\n   If binding to a new-style object instance, "a.x" is transformed\n   into the call: "type(a).__dict__[\'x\'].__get__(a, type(a))".\n\nClass Binding\n   If binding to a new-style class, "A.x" is transformed into the\n   call: "A.__dict__[\'x\'].__get__(None, A)".\n\nSuper Binding\n   If "a" is an instance of "super", then the binding "super(B,\n   obj).m()" searches "obj.__class__.__mro__" for the base class "A"\n   immediately preceding "B" and then invokes the descriptor with the\n   call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n\nFor instance bindings, the precedence of descriptor invocation depends\non the which descriptor methods are defined.  A descriptor can define\nany combination of "__get__()", "__set__()" and "__delete__()".  If it\ndoes not define "__get__()", then accessing the attribute will return\nthe descriptor object itself unless there is a value in the object\'s\ninstance dictionary.  If the descriptor defines "__set__()" and/or\n"__delete__()", it is a data descriptor; if it defines neither, it is\na non-data descriptor.  Normally, data descriptors define both\n"__get__()" and "__set__()", while non-data descriptors have just the\n"__get__()" method.  Data descriptors with "__set__()" and "__get__()"\ndefined always override a redefinition in an instance dictionary.  In\ncontrast, non-data descriptors can be overridden by instances.\n\nPython methods (including "staticmethod()" and "classmethod()") are\nimplemented as non-data descriptors.  Accordingly, instances can\nredefine and override methods.  This allows individual instances to\nacquire behaviors that differ from other instances of the same class.\n\nThe "property()" function is implemented as a data descriptor.\nAccordingly, instances cannot override the behavior of a property.\n\n\n__slots__\n---------\n\nBy default, instances of both old and new-style classes have a\ndictionary for attribute storage.  This wastes space for objects\nhaving very few instance variables.  The space consumption can become\nacute when creating large numbers of instances.\n\nThe default can be overridden by defining *__slots__* in a new-style\nclass definition.  The *__slots__* declaration takes a sequence of\ninstance variables and reserves just enough space in each instance to\nhold a value for each variable.  Space is saved because *__dict__* is\nnot created for each instance.\n\n__slots__\n\n   This class variable can be assigned a string, iterable, or sequence\n   of strings with variable names used by instances.  If defined in a\n   new-style class, *__slots__* reserves space for the declared\n   variables and prevents the automatic creation of *__dict__* and\n   *__weakref__* for each instance.\n\n   New in version 2.2.\n\nNotes on using *__slots__*\n\n* When inheriting from a class without *__slots__*, the *__dict__*\n  attribute of that class will always be accessible, so a *__slots__*\n  definition in the subclass is meaningless.\n\n* Without a *__dict__* variable, instances cannot be assigned new\n  variables not listed in the *__slots__* definition.  Attempts to\n  assign to an unlisted variable name raises "AttributeError". If\n  dynamic assignment of new variables is desired, then add\n  "\'__dict__\'" to the sequence of strings in the *__slots__*\n  declaration.\n\n  Changed in version 2.3: Previously, adding "\'__dict__\'" to the\n  *__slots__* declaration would not enable the assignment of new\n  attributes not specifically listed in the sequence of instance\n  variable names.\n\n* Without a *__weakref__* variable for each instance, classes\n  defining *__slots__* do not support weak references to its\n  instances. If weak reference support is needed, then add\n  "\'__weakref__\'" to the sequence of strings in the *__slots__*\n  declaration.\n\n  Changed in version 2.3: Previously, adding "\'__weakref__\'" to the\n  *__slots__* declaration would not enable support for weak\n  references.\n\n* *__slots__* are implemented at the class level by creating\n  descriptors (Implementing Descriptors) for each variable name.  As a\n  result, class attributes cannot be used to set default values for\n  instance variables defined by *__slots__*; otherwise, the class\n  attribute would overwrite the descriptor assignment.\n\n* The action of a *__slots__* declaration is limited to the class\n  where it is defined.  As a result, subclasses will have a *__dict__*\n  unless they also define *__slots__* (which must only contain names\n  of any *additional* slots).\n\n* If a class defines a slot also defined in a base class, the\n  instance variable defined by the base class slot is inaccessible\n  (except by retrieving its descriptor directly from the base class).\n  This renders the meaning of the program undefined.  In the future, a\n  check may be added to prevent this.\n\n* Nonempty *__slots__* does not work for classes derived from\n  "variable-length" built-in types such as "long", "str" and "tuple".\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings\n  may also be used; however, in the future, special meaning may be\n  assigned to the values corresponding to each key.\n\n* *__class__* assignment works only if both classes have the same\n  *__slots__*.\n\n  Changed in version 2.6: Previously, *__class__* assignment raised an\n  error if either new or old class had *__slots__*.\n\n\nCustomizing class creation\n==========================\n\nBy default, new-style classes are constructed using "type()". A class\ndefinition is read into a separate namespace and the value of class\nname is bound to the result of "type(name, bases, dict)".\n\nWhen the class definition is read, if *__metaclass__* is defined then\nthe callable assigned to it will be called instead of "type()". This\nallows classes or functions to be written which monitor or alter the\nclass creation process:\n\n* Modifying the class dictionary prior to the class being created.\n\n* Returning an instance of another class -- essentially performing\n  the role of a factory function.\n\nThese steps will have to be performed in the metaclass\'s "__new__()"\nmethod -- "type.__new__()" can then be called from this method to\ncreate a class with different properties.  This example adds a new\nelement to the class dictionary before creating the class:\n\n   class metacls(type):\n       def __new__(mcs, name, bases, dict):\n           dict[\'foo\'] = \'metacls was here\'\n           return type.__new__(mcs, name, bases, dict)\n\nYou can of course also override other class methods (or add new\nmethods); for example defining a custom "__call__()" method in the\nmetaclass allows custom behavior when the class is called, e.g. not\nalways creating a new instance.\n\n__metaclass__\n\n   This variable can be any callable accepting arguments for "name",\n   "bases", and "dict".  Upon class creation, the callable is used\n   instead of the built-in "type()".\n\n   New in version 2.2.\n\nThe appropriate metaclass is determined by the following precedence\nrules:\n\n* If "dict[\'__metaclass__\']" exists, it is used.\n\n* Otherwise, if there is at least one base class, its metaclass is\n  used (this looks for a *__class__* attribute first and if not found,\n  uses its type).\n\n* Otherwise, if a global variable named __metaclass__ exists, it is\n  used.\n\n* Otherwise, the old-style, classic metaclass (types.ClassType) is\n  used.\n\nThe potential uses for metaclasses are boundless. Some ideas that have\nbeen explored including logging, interface checking, automatic\ndelegation, automatic property creation, proxies, frameworks, and\nautomatic resource locking/synchronization.\n\n\nCustomizing instance and subclass checks\n========================================\n\nNew in version 2.6.\n\nThe following methods are used to override the default behavior of the\n"isinstance()" and "issubclass()" built-in functions.\n\nIn particular, the metaclass "abc.ABCMeta" implements these methods in\norder to allow the addition of Abstract Base Classes (ABCs) as\n"virtual base classes" to any class or type (including built-in\ntypes), including other ABCs.\n\nclass.__instancecheck__(self, instance)\n\n   Return true if *instance* should be considered a (direct or\n   indirect) instance of *class*. If defined, called to implement\n   "isinstance(instance, class)".\n\nclass.__subclasscheck__(self, subclass)\n\n   Return true if *subclass* should be considered a (direct or\n   indirect) subclass of *class*.  If defined, called to implement\n   "issubclass(subclass, class)".\n\nNote that these methods are looked up on the type (metaclass) of a\nclass.  They cannot be defined as class methods in the actual class.\nThis is consistent with the lookup of special methods that are called\non instances, only in this case the instance is itself a class.\n\nSee also: **PEP 3119** - Introducing Abstract Base Classes\n\n     Includes the specification for customizing "isinstance()" and\n     "issubclass()" behavior through "__instancecheck__()" and\n     "__subclasscheck__()", with motivation for this functionality in\n     the context of adding Abstract Base Classes (see the "abc"\n     module) to the language.\n\n\nEmulating callable objects\n==========================\n\nobject.__call__(self[, args...])\n\n   Called when the instance is "called" as a function; if this method\n   is defined, "x(arg1, arg2, ...)" is a shorthand for\n   "x.__call__(arg1, arg2, ...)".\n\n\nEmulating container types\n=========================\n\nThe following methods can be defined to implement container objects.\nContainers usually are sequences (such as lists or tuples) or mappings\n(like dictionaries), but can represent other containers as well.  The\nfirst set of methods is used either to emulate a sequence or to\nemulate a mapping; the difference is that for a sequence, the\nallowable keys should be the integers *k* for which "0 <= k < N" where\n*N* is the length of the sequence, or slice objects, which define a\nrange of items. (For backwards compatibility, the method\n"__getslice__()" (see below) can also be defined to handle simple, but\nnot extended slices.) It is also recommended that mappings provide the\nmethods "keys()", "values()", "items()", "has_key()", "get()",\n"clear()", "setdefault()", "iterkeys()", "itervalues()",\n"iteritems()", "pop()", "popitem()", "copy()", and "update()" behaving\nsimilar to those for Python\'s standard dictionary objects.  The\n"UserDict" module provides a "DictMixin" class to help create those\nmethods from a base set of "__getitem__()", "__setitem__()",\n"__delitem__()", and "keys()". Mutable sequences should provide\nmethods "append()", "count()", "index()", "extend()", "insert()",\n"pop()", "remove()", "reverse()" and "sort()", like Python standard\nlist objects.  Finally, sequence types should implement addition\n(meaning concatenation) and multiplication (meaning repetition) by\ndefining the methods "__add__()", "__radd__()", "__iadd__()",\n"__mul__()", "__rmul__()" and "__imul__()" described below; they\nshould not define "__coerce__()" or other numerical operators.  It is\nrecommended that both mappings and sequences implement the\n"__contains__()" method to allow efficient use of the "in" operator;\nfor mappings, "in" should be equivalent of "has_key()"; for sequences,\nit should search through the values.  It is further recommended that\nboth mappings and sequences implement the "__iter__()" method to allow\nefficient iteration through the container; for mappings, "__iter__()"\nshould be the same as "iterkeys()"; for sequences, it should iterate\nthrough the values.\n\nobject.__len__(self)\n\n   Called to implement the built-in function "len()".  Should return\n   the length of the object, an integer ">=" 0.  Also, an object that\n   doesn\'t define a "__nonzero__()" method and whose "__len__()"\n   method returns zero is considered to be false in a Boolean context.\n\nobject.__getitem__(self, key)\n\n   Called to implement evaluation of "self[key]". For sequence types,\n   the accepted keys should be integers and slice objects.  Note that\n   the special interpretation of negative indexes (if the class wishes\n   to emulate a sequence type) is up to the "__getitem__()" method. If\n   *key* is of an inappropriate type, "TypeError" may be raised; if of\n   a value outside the set of indexes for the sequence (after any\n   special interpretation of negative values), "IndexError" should be\n   raised. For mapping types, if *key* is missing (not in the\n   container), "KeyError" should be raised.\n\n   Note: "for" loops expect that an "IndexError" will be raised for\n     illegal indexes to allow proper detection of the end of the\n     sequence.\n\nobject.__missing__(self, key)\n\n   Called by "dict"."__getitem__()" to implement "self[key]" for dict\n   subclasses when key is not in the dictionary.\n\nobject.__setitem__(self, key, value)\n\n   Called to implement assignment to "self[key]".  Same note as for\n   "__getitem__()".  This should only be implemented for mappings if\n   the objects support changes to the values for keys, or if new keys\n   can be added, or for sequences if elements can be replaced.  The\n   same exceptions should be raised for improper *key* values as for\n   the "__getitem__()" method.\n\nobject.__delitem__(self, key)\n\n   Called to implement deletion of "self[key]".  Same note as for\n   "__getitem__()".  This should only be implemented for mappings if\n   the objects support removal of keys, or for sequences if elements\n   can be removed from the sequence.  The same exceptions should be\n   raised for improper *key* values as for the "__getitem__()" method.\n\nobject.__iter__(self)\n\n   This method is called when an iterator is required for a container.\n   This method should return a new iterator object that can iterate\n   over all the objects in the container.  For mappings, it should\n   iterate over the keys of the container, and should also be made\n   available as the method "iterkeys()".\n\n   Iterator objects also need to implement this method; they are\n   required to return themselves.  For more information on iterator\n   objects, see Iterator Types.\n\nobject.__reversed__(self)\n\n   Called (if present) by the "reversed()" built-in to implement\n   reverse iteration.  It should return a new iterator object that\n   iterates over all the objects in the container in reverse order.\n\n   If the "__reversed__()" method is not provided, the "reversed()"\n   built-in will fall back to using the sequence protocol ("__len__()"\n   and "__getitem__()").  Objects that support the sequence protocol\n   should only provide "__reversed__()" if they can provide an\n   implementation that is more efficient than the one provided by\n   "reversed()".\n\n   New in version 2.6.\n\nThe membership test operators ("in" and "not in") are normally\nimplemented as an iteration through a sequence.  However, container\nobjects can supply the following special method with a more efficient\nimplementation, which also does not require the object be a sequence.\n\nobject.__contains__(self, item)\n\n   Called to implement membership test operators.  Should return true\n   if *item* is in *self*, false otherwise.  For mapping objects, this\n   should consider the keys of the mapping rather than the values or\n   the key-item pairs.\n\n   For objects that don\'t define "__contains__()", the membership test\n   first tries iteration via "__iter__()", then the old sequence\n   iteration protocol via "__getitem__()", see this section in the\n   language reference.\n\n\nAdditional methods for emulation of sequence types\n==================================================\n\nThe following optional methods can be defined to further emulate\nsequence objects.  Immutable sequences methods should at most only\ndefine "__getslice__()"; mutable sequences might define all three\nmethods.\n\nobject.__getslice__(self, i, j)\n\n   Deprecated since version 2.0: Support slice objects as parameters\n   to the "__getitem__()" method. (However, built-in types in CPython\n   currently still implement "__getslice__()".  Therefore, you have to\n   override it in derived classes when implementing slicing.)\n\n   Called to implement evaluation of "self[i:j]". The returned object\n   should be of the same type as *self*.  Note that missing *i* or *j*\n   in the slice expression are replaced by zero or "sys.maxsize",\n   respectively.  If negative indexes are used in the slice, the\n   length of the sequence is added to that index. If the instance does\n   not implement the "__len__()" method, an "AttributeError" is\n   raised. No guarantee is made that indexes adjusted this way are not\n   still negative.  Indexes which are greater than the length of the\n   sequence are not modified. If no "__getslice__()" is found, a slice\n   object is created instead, and passed to "__getitem__()" instead.\n\nobject.__setslice__(self, i, j, sequence)\n\n   Called to implement assignment to "self[i:j]". Same notes for *i*\n   and *j* as for "__getslice__()".\n\n   This method is deprecated. If no "__setslice__()" is found, or for\n   extended slicing of the form "self[i:j:k]", a slice object is\n   created, and passed to "__setitem__()", instead of "__setslice__()"\n   being called.\n\nobject.__delslice__(self, i, j)\n\n   Called to implement deletion of "self[i:j]". Same notes for *i* and\n   *j* as for "__getslice__()". This method is deprecated. If no\n   "__delslice__()" is found, or for extended slicing of the form\n   "self[i:j:k]", a slice object is created, and passed to\n   "__delitem__()", instead of "__delslice__()" being called.\n\nNotice that these methods are only invoked when a single slice with a\nsingle colon is used, and the slice method is available.  For slice\noperations involving extended slice notation, or in absence of the\nslice methods, "__getitem__()", "__setitem__()" or "__delitem__()" is\ncalled with a slice object as argument.\n\nThe following example demonstrate how to make your program or module\ncompatible with earlier versions of Python (assuming that methods\n"__getitem__()", "__setitem__()" and "__delitem__()" support slice\nobjects as arguments):\n\n   class MyClass:\n       ...\n       def __getitem__(self, index):\n           ...\n       def __setitem__(self, index, value):\n           ...\n       def __delitem__(self, index):\n           ...\n\n       if sys.version_info < (2, 0):\n           # They won\'t be defined if version is at least 2.0 final\n\n           def __getslice__(self, i, j):\n               return self[max(0, i):max(0, j):]\n           def __setslice__(self, i, j, seq):\n               self[max(0, i):max(0, j):] = seq\n           def __delslice__(self, i, j):\n               del self[max(0, i):max(0, j):]\n       ...\n\nNote the calls to "max()"; these are necessary because of the handling\nof negative indices before the "__*slice__()" methods are called.\nWhen negative indexes are used, the "__*item__()" methods receive them\nas provided, but the "__*slice__()" methods get a "cooked" form of the\nindex values.  For each negative index value, the length of the\nsequence is added to the index before calling the method (which may\nstill result in a negative index); this is the customary handling of\nnegative indexes by the built-in sequence types, and the "__*item__()"\nmethods are expected to do this as well.  However, since they should\nalready be doing that, negative indexes cannot be passed in; they must\nbe constrained to the bounds of the sequence before being passed to\nthe "__*item__()" methods. Calling "max(0, i)" conveniently returns\nthe proper value.\n\n\nEmulating numeric types\n=======================\n\nThe following methods can be defined to emulate numeric objects.\nMethods corresponding to operations that are not supported by the\nparticular kind of number implemented (e.g., bitwise operations for\nnon-integral numbers) should be left undefined.\n\nobject.__add__(self, other)\nobject.__sub__(self, other)\nobject.__mul__(self, other)\nobject.__floordiv__(self, other)\nobject.__mod__(self, other)\nobject.__divmod__(self, other)\nobject.__pow__(self, other[, modulo])\nobject.__lshift__(self, other)\nobject.__rshift__(self, other)\nobject.__and__(self, other)\nobject.__xor__(self, other)\nobject.__or__(self, other)\n\n   These methods are called to implement the binary arithmetic\n   operations ("+", "-", "*", "//", "%", "divmod()", "pow()", "**",\n   "<<", ">>", "&", "^", "|").  For instance, to evaluate the\n   expression "x + y", where *x* is an instance of a class that has an\n   "__add__()" method, "x.__add__(y)" is called.  The "__divmod__()"\n   method should be the equivalent to using "__floordiv__()" and\n   "__mod__()"; it should not be related to "__truediv__()" (described\n   below).  Note that "__pow__()" should be defined to accept an\n   optional third argument if the ternary version of the built-in\n   "pow()" function is to be supported.\n\n   If one of those methods does not support the operation with the\n   supplied arguments, it should return "NotImplemented".\n\nobject.__div__(self, other)\nobject.__truediv__(self, other)\n\n   The division operator ("/") is implemented by these methods.  The\n   "__truediv__()" method is used when "__future__.division" is in\n   effect, otherwise "__div__()" is used.  If only one of these two\n   methods is defined, the object will not support division in the\n   alternate context; "TypeError" will be raised instead.\n\nobject.__radd__(self, other)\nobject.__rsub__(self, other)\nobject.__rmul__(self, other)\nobject.__rdiv__(self, other)\nobject.__rtruediv__(self, other)\nobject.__rfloordiv__(self, other)\nobject.__rmod__(self, other)\nobject.__rdivmod__(self, other)\nobject.__rpow__(self, other)\nobject.__rlshift__(self, other)\nobject.__rrshift__(self, other)\nobject.__rand__(self, other)\nobject.__rxor__(self, other)\nobject.__ror__(self, other)\n\n   These methods are called to implement the binary arithmetic\n   operations ("+", "-", "*", "/", "%", "divmod()", "pow()", "**",\n   "<<", ">>", "&", "^", "|") with reflected (swapped) operands.\n   These functions are only called if the left operand does not\n   support the corresponding operation and the operands are of\n   different types. [2] For instance, to evaluate the expression "x -\n   y", where *y* is an instance of a class that has an "__rsub__()"\n   method, "y.__rsub__(x)" is called if "x.__sub__(y)" returns\n   *NotImplemented*.\n\n   Note that ternary "pow()" will not try calling "__rpow__()" (the\n   coercion rules would become too complicated).\n\n   Note: If the right operand\'s type is a subclass of the left\n     operand\'s type and that subclass provides the reflected method\n     for the operation, this method will be called before the left\n     operand\'s non-reflected method.  This behavior allows subclasses\n     to override their ancestors\' operations.\n\nobject.__iadd__(self, other)\nobject.__isub__(self, other)\nobject.__imul__(self, other)\nobject.__idiv__(self, other)\nobject.__itruediv__(self, other)\nobject.__ifloordiv__(self, other)\nobject.__imod__(self, other)\nobject.__ipow__(self, other[, modulo])\nobject.__ilshift__(self, other)\nobject.__irshift__(self, other)\nobject.__iand__(self, other)\nobject.__ixor__(self, other)\nobject.__ior__(self, other)\n\n   These methods are called to implement the augmented arithmetic\n   assignments ("+=", "-=", "*=", "/=", "//=", "%=", "**=", "<<=",\n   ">>=", "&=", "^=", "|=").  These methods should attempt to do the\n   operation in-place (modifying *self*) and return the result (which\n   could be, but does not have to be, *self*).  If a specific method\n   is not defined, the augmented assignment falls back to the normal\n   methods.  For instance, to execute the statement "x += y", where\n   *x* is an instance of a class that has an "__iadd__()" method,\n   "x.__iadd__(y)" is called.  If *x* is an instance of a class that\n   does not define a "__iadd__()" method, "x.__add__(y)" and\n   "y.__radd__(x)" are considered, as with the evaluation of "x + y".\n\nobject.__neg__(self)\nobject.__pos__(self)\nobject.__abs__(self)\nobject.__invert__(self)\n\n   Called to implement the unary arithmetic operations ("-", "+",\n   "abs()" and "~").\n\nobject.__complex__(self)\nobject.__int__(self)\nobject.__long__(self)\nobject.__float__(self)\n\n   Called to implement the built-in functions "complex()", "int()",\n   "long()", and "float()".  Should return a value of the appropriate\n   type.\n\nobject.__oct__(self)\nobject.__hex__(self)\n\n   Called to implement the built-in functions "oct()" and "hex()".\n   Should return a string value.\n\nobject.__index__(self)\n\n   Called to implement "operator.index()".  Also called whenever\n   Python needs an integer object (such as in slicing).  Must return\n   an integer (int or long).\n\n   New in version 2.5.\n\nobject.__coerce__(self, other)\n\n   Called to implement "mixed-mode" numeric arithmetic.  Should either\n   return a 2-tuple containing *self* and *other* converted to a\n   common numeric type, or "None" if conversion is impossible.  When\n   the common type would be the type of "other", it is sufficient to\n   return "None", since the interpreter will also ask the other object\n   to attempt a coercion (but sometimes, if the implementation of the\n   other type cannot be changed, it is useful to do the conversion to\n   the other type here).  A return value of "NotImplemented" is\n   equivalent to returning "None".\n\n\nCoercion rules\n==============\n\nThis section used to document the rules for coercion.  As the language\nhas evolved, the coercion rules have become hard to document\nprecisely; documenting what one version of one particular\nimplementation does is undesirable.  Instead, here are some informal\nguidelines regarding coercion.  In Python 3, coercion will not be\nsupported.\n\n* If the left operand of a % operator is a string or Unicode object,\n  no coercion takes place and the string formatting operation is\n  invoked instead.\n\n* It is no longer recommended to define a coercion operation. Mixed-\n  mode operations on types that don\'t define coercion pass the\n  original arguments to the operation.\n\n* New-style classes (those derived from "object") never invoke the\n  "__coerce__()" method in response to a binary operator; the only\n  time "__coerce__()" is invoked is when the built-in function\n  "coerce()" is called.\n\n* For most intents and purposes, an operator that returns\n  "NotImplemented" is treated the same as one that is not implemented\n  at all.\n\n* Below, "__op__()" and "__rop__()" are used to signify the generic\n  method names corresponding to an operator; "__iop__()" is used for\n  the corresponding in-place operator.  For example, for the operator\n  \'"+"\', "__add__()" and "__radd__()" are used for the left and right\n  variant of the binary operator, and "__iadd__()" for the in-place\n  variant.\n\n* For objects *x* and *y*, first "x.__op__(y)" is tried.  If this is\n  not implemented or returns "NotImplemented", "y.__rop__(x)" is\n  tried.  If this is also not implemented or returns "NotImplemented",\n  a "TypeError" exception is raised.  But see the following exception:\n\n* Exception to the previous item: if the left operand is an instance\n  of a built-in type or a new-style class, and the right operand is an\n  instance of a proper subclass of that type or class and overrides\n  the base\'s "__rop__()" method, the right operand\'s "__rop__()"\n  method is tried *before* the left operand\'s "__op__()" method.\n\n  This is done so that a subclass can completely override binary\n  operators. Otherwise, the left operand\'s "__op__()" method would\n  always accept the right operand: when an instance of a given class\n  is expected, an instance of a subclass of that class is always\n  acceptable.\n\n* When either operand type defines a coercion, this coercion is\n  called before that type\'s "__op__()" or "__rop__()" method is\n  called, but no sooner.  If the coercion returns an object of a\n  different type for the operand whose coercion is invoked, part of\n  the process is redone using the new object.\n\n* When an in-place operator (like \'"+="\') is used, if the left\n  operand implements "__iop__()", it is invoked without any coercion.\n  When the operation falls back to "__op__()" and/or "__rop__()", the\n  normal coercion rules apply.\n\n* In "x + y", if *x* is a sequence that implements sequence\n  concatenation, sequence concatenation is invoked.\n\n* In "x * y", if one operand is a sequence that implements sequence\n  repetition, and the other is an integer ("int" or "long"), sequence\n  repetition is invoked.\n\n* Rich comparisons (implemented by methods "__eq__()" and so on)\n  never use coercion.  Three-way comparison (implemented by\n  "__cmp__()") does use coercion under the same conditions as other\n  binary operations use it.\n\n* In the current implementation, the built-in numeric types "int",\n  "long", "float", and "complex" do not use coercion. All these types\n  implement a "__coerce__()" method, for use by the built-in\n  "coerce()" function.\n\n  Changed in version 2.7: The complex type no longer makes implicit\n  calls to the "__coerce__()" method for mixed-type binary arithmetic\n  operations.\n\n\nWith Statement Context Managers\n===============================\n\nNew in version 2.5.\n\nA *context manager* is an object that defines the runtime context to\nbe established when executing a "with" statement. The context manager\nhandles the entry into, and the exit from, the desired runtime context\nfor the execution of the block of code.  Context managers are normally\ninvoked using the "with" statement (described in section The with\nstatement), but can also be used by directly invoking their methods.\n\nTypical uses of context managers include saving and restoring various\nkinds of global state, locking and unlocking resources, closing opened\nfiles, etc.\n\nFor more information on context managers, see Context Manager Types.\n\nobject.__enter__(self)\n\n   Enter the runtime context related to this object. The "with"\n   statement will bind this method\'s return value to the target(s)\n   specified in the "as" clause of the statement, if any.\n\nobject.__exit__(self, exc_type, exc_value, traceback)\n\n   Exit the runtime context related to this object. The parameters\n   describe the exception that caused the context to be exited. If the\n   context was exited without an exception, all three arguments will\n   be "None".\n\n   If an exception is supplied, and the method wishes to suppress the\n   exception (i.e., prevent it from being propagated), it should\n   return a true value. Otherwise, the exception will be processed\n   normally upon exit from this method.\n\n   Note that "__exit__()" methods should not reraise the passed-in\n   exception; this is the caller\'s responsibility.\n\nSee also: **PEP 0343** - The "with" statement\n\n     The specification, background, and examples for the Python "with"\n     statement.\n\n\nSpecial method lookup for old-style classes\n===========================================\n\nFor old-style classes, special methods are always looked up in exactly\nthe same way as any other method or attribute. This is the case\nregardless of whether the method is being looked up explicitly as in\n"x.__getitem__(i)" or implicitly as in "x[i]".\n\nThis behaviour means that special methods may exhibit different\nbehaviour for different instances of a single old-style class if the\nappropriate special attributes are set differently:\n\n   >>> class C:\n   ...     pass\n   ...\n   >>> c1 = C()\n   >>> c2 = C()\n   >>> c1.__len__ = lambda: 5\n   >>> c2.__len__ = lambda: 9\n   >>> len(c1)\n   5\n   >>> len(c2)\n   9\n\n\nSpecial method lookup for new-style classes\n===========================================\n\nFor new-style classes, implicit invocations of special methods are\nonly guaranteed to work correctly if defined on an object\'s type, not\nin the object\'s instance dictionary.  That behaviour is the reason why\nthe following code raises an exception (unlike the equivalent example\nwith old-style classes):\n\n   >>> class C(object):\n   ...     pass\n   ...\n   >>> c = C()\n   >>> c.__len__ = lambda: 5\n   >>> len(c)\n   Traceback (most recent call last):\n     File "<stdin>", line 1, in <module>\n   TypeError: object of type \'C\' has no len()\n\nThe rationale behind this behaviour lies with a number of special\nmethods such as "__hash__()" and "__repr__()" that are implemented by\nall objects, including type objects. If the implicit lookup of these\nmethods used the conventional lookup process, they would fail when\ninvoked on the type object itself:\n\n   >>> 1 .__hash__() == hash(1)\n   True\n   >>> int.__hash__() == hash(int)\n   Traceback (most recent call last):\n     File "<stdin>", line 1, in <module>\n   TypeError: descriptor \'__hash__\' of \'int\' object needs an argument\n\nIncorrectly attempting to invoke an unbound method of a class in this\nway is sometimes referred to as \'metaclass confusion\', and is avoided\nby bypassing the instance when looking up special methods:\n\n   >>> type(1).__hash__(1) == hash(1)\n   True\n   >>> type(int).__hash__(int) == hash(int)\n   True\n\nIn addition to bypassing any instance attributes in the interest of\ncorrectness, implicit special method lookup generally also bypasses\nthe "__getattribute__()" method even of the object\'s metaclass:\n\n   >>> class Meta(type):\n   ...    def __getattribute__(*args):\n   ...       print "Metaclass getattribute invoked"\n   ...       return type.__getattribute__(*args)\n   ...\n   >>> class C(object):\n   ...     __metaclass__ = Meta\n   ...     def __len__(self):\n   ...         return 10\n   ...     def __getattribute__(*args):\n   ...         print "Class getattribute invoked"\n   ...         return object.__getattribute__(*args)\n   ...\n   >>> c = C()\n   >>> c.__len__()                 # Explicit lookup via instance\n   Class getattribute invoked\n   10\n   >>> type(c).__len__(c)          # Explicit lookup via type\n   Metaclass getattribute invoked\n   10\n   >>> len(c)                      # Implicit lookup\n   10\n\nBypassing the "__getattribute__()" machinery in this fashion provides\nsignificant scope for speed optimisations within the interpreter, at\nthe cost of some flexibility in the handling of special methods (the\nspecial method *must* be set on the class object itself in order to be\nconsistently invoked by the interpreter).\n\n-[ Footnotes ]-\n\n[1] It *is* possible in some cases to change an object\'s type,\n    under certain controlled conditions. It generally isn\'t a good\n    idea though, since it can lead to some very strange behaviour if\n    it is handled incorrectly.\n\n[2] For operands of the same type, it is assumed that if the non-\n    reflected method (such as "__add__()") fails the operation is not\n    supported, which is why the reflected method is not called.\n',
- 'string-methods': u'\nString Methods\n**************\n\nBelow are listed the string methods which both 8-bit strings and\nUnicode objects support.  Some of them are also available on\n"bytearray" objects.\n\nIn addition, Python\'s strings support the sequence type methods\ndescribed in the Sequence Types --- str, unicode, list, tuple,\nbytearray, buffer, xrange section. To output formatted strings use\ntemplate strings or the "%" operator described in the String\nFormatting Operations section. Also, see the "re" module for string\nfunctions based on regular expressions.\n\nstr.capitalize()\n\n   Return a copy of the string with its first character capitalized\n   and the rest lowercased.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.center(width[, fillchar])\n\n   Return centered in a string of length *width*. Padding is done\n   using the specified *fillchar* (default is a space).\n\n   Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.count(sub[, start[, end]])\n\n   Return the number of non-overlapping occurrences of substring *sub*\n   in the range [*start*, *end*].  Optional arguments *start* and\n   *end* are interpreted as in slice notation.\n\nstr.decode([encoding[, errors]])\n\n   Decodes the string using the codec registered for *encoding*.\n   *encoding* defaults to the default string encoding.  *errors* may\n   be given to set a different error handling scheme.  The default is\n   "\'strict\'", meaning that encoding errors raise "UnicodeError".\n   Other possible values are "\'ignore\'", "\'replace\'" and any other\n   name registered via "codecs.register_error()", see section Codec\n   Base Classes.\n\n   New in version 2.2.\n\n   Changed in version 2.3: Support for other error handling schemes\n   added.\n\n   Changed in version 2.7: Support for keyword arguments added.\n\nstr.encode([encoding[, errors]])\n\n   Return an encoded version of the string.  Default encoding is the\n   current default string encoding.  *errors* may be given to set a\n   different error handling scheme.  The default for *errors* is\n   "\'strict\'", meaning that encoding errors raise a "UnicodeError".\n   Other possible values are "\'ignore\'", "\'replace\'",\n   "\'xmlcharrefreplace\'", "\'backslashreplace\'" and any other name\n   registered via "codecs.register_error()", see section Codec Base\n   Classes. For a list of possible encodings, see section Standard\n   Encodings.\n\n   New in version 2.0.\n\n   Changed in version 2.3: Support for "\'xmlcharrefreplace\'" and\n   "\'backslashreplace\'" and other error handling schemes added.\n\n   Changed in version 2.7: Support for keyword arguments added.\n\nstr.endswith(suffix[, start[, end]])\n\n   Return "True" if the string ends with the specified *suffix*,\n   otherwise return "False".  *suffix* can also be a tuple of suffixes\n   to look for.  With optional *start*, test beginning at that\n   position.  With optional *end*, stop comparing at that position.\n\n   Changed in version 2.5: Accept tuples as *suffix*.\n\nstr.expandtabs([tabsize])\n\n   Return a copy of the string where all tab characters are replaced\n   by one or more spaces, depending on the current column and the\n   given tab size.  Tab positions occur every *tabsize* characters\n   (default is 8, giving tab positions at columns 0, 8, 16 and so on).\n   To expand the string, the current column is set to zero and the\n   string is examined character by character.  If the character is a\n   tab ("\\t"), one or more space characters are inserted in the result\n   until the current column is equal to the next tab position. (The\n   tab character itself is not copied.)  If the character is a newline\n   ("\\n") or return ("\\r"), it is copied and the current column is\n   reset to zero.  Any other character is copied unchanged and the\n   current column is incremented by one regardless of how the\n   character is represented when printed.\n\n   >>> \'01\\t012\\t0123\\t01234\'.expandtabs()\n   \'01      012     0123    01234\'\n   >>> \'01\\t012\\t0123\\t01234\'.expandtabs(4)\n   \'01  012 0123    01234\'\n\nstr.find(sub[, start[, end]])\n\n   Return the lowest index in the string where substring *sub* is\n   found, such that *sub* is contained in the slice "s[start:end]".\n   Optional arguments *start* and *end* are interpreted as in slice\n   notation.  Return "-1" if *sub* is not found.\n\n   Note: The "find()" method should be used only if you need to know\n     the position of *sub*.  To check if *sub* is a substring or not,\n     use the "in" operator:\n\n        >>> \'Py\' in \'Python\'\n        True\n\nstr.format(*args, **kwargs)\n\n   Perform a string formatting operation.  The string on which this\n   method is called can contain literal text or replacement fields\n   delimited by braces "{}".  Each replacement field contains either\n   the numeric index of a positional argument, or the name of a\n   keyword argument.  Returns a copy of the string where each\n   replacement field is replaced with the string value of the\n   corresponding argument.\n\n   >>> "The sum of 1 + 2 is {0}".format(1+2)\n   \'The sum of 1 + 2 is 3\'\n\n   See Format String Syntax for a description of the various\n   formatting options that can be specified in format strings.\n\n   This method of string formatting is the new standard in Python 3,\n   and should be preferred to the "%" formatting described in String\n   Formatting Operations in new code.\n\n   New in version 2.6.\n\nstr.index(sub[, start[, end]])\n\n   Like "find()", but raise "ValueError" when the substring is not\n   found.\n\nstr.isalnum()\n\n   Return true if all characters in the string are alphanumeric and\n   there is at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isalpha()\n\n   Return true if all characters in the string are alphabetic and\n   there is at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isdigit()\n\n   Return true if all characters in the string are digits and there is\n   at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.islower()\n\n   Return true if all cased characters [4] in the string are lowercase\n   and there is at least one cased character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isspace()\n\n   Return true if there are only whitespace characters in the string\n   and there is at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.istitle()\n\n   Return true if the string is a titlecased string and there is at\n   least one character, for example uppercase characters may only\n   follow uncased characters and lowercase characters only cased ones.\n   Return false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isupper()\n\n   Return true if all cased characters [4] in the string are uppercase\n   and there is at least one cased character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.join(iterable)\n\n   Return a string which is the concatenation of the strings in the\n   *iterable* *iterable*.  The separator between elements is the\n   string providing this method.\n\nstr.ljust(width[, fillchar])\n\n   Return the string left justified in a string of length *width*.\n   Padding is done using the specified *fillchar* (default is a\n   space).  The original string is returned if *width* is less than or\n   equal to "len(s)".\n\n   Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.lower()\n\n   Return a copy of the string with all the cased characters [4]\n   converted to lowercase.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.lstrip([chars])\n\n   Return a copy of the string with leading characters removed.  The\n   *chars* argument is a string specifying the set of characters to be\n   removed.  If omitted or "None", the *chars* argument defaults to\n   removing whitespace.  The *chars* argument is not a prefix; rather,\n   all combinations of its values are stripped:\n\n   >>> \'   spacious   \'.lstrip()\n   \'spacious   \'\n   >>> \'www.example.com\'.lstrip(\'cmowz.\')\n   \'example.com\'\n\n   Changed in version 2.2.2: Support for the *chars* argument.\n\nstr.partition(sep)\n\n   Split the string at the first occurrence of *sep*, and return a\n   3-tuple containing the part before the separator, the separator\n   itself, and the part after the separator.  If the separator is not\n   found, return a 3-tuple containing the string itself, followed by\n   two empty strings.\n\n   New in version 2.5.\n\nstr.replace(old, new[, count])\n\n   Return a copy of the string with all occurrences of substring *old*\n   replaced by *new*.  If the optional argument *count* is given, only\n   the first *count* occurrences are replaced.\n\nstr.rfind(sub[, start[, end]])\n\n   Return the highest index in the string where substring *sub* is\n   found, such that *sub* is contained within "s[start:end]".\n   Optional arguments *start* and *end* are interpreted as in slice\n   notation.  Return "-1" on failure.\n\nstr.rindex(sub[, start[, end]])\n\n   Like "rfind()" but raises "ValueError" when the substring *sub* is\n   not found.\n\nstr.rjust(width[, fillchar])\n\n   Return the string right justified in a string of length *width*.\n   Padding is done using the specified *fillchar* (default is a\n   space). The original string is returned if *width* is less than or\n   equal to "len(s)".\n\n   Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.rpartition(sep)\n\n   Split the string at the last occurrence of *sep*, and return a\n   3-tuple containing the part before the separator, the separator\n   itself, and the part after the separator.  If the separator is not\n   found, return a 3-tuple containing two empty strings, followed by\n   the string itself.\n\n   New in version 2.5.\n\nstr.rsplit([sep[, maxsplit]])\n\n   Return a list of the words in the string, using *sep* as the\n   delimiter string. If *maxsplit* is given, at most *maxsplit* splits\n   are done, the *rightmost* ones.  If *sep* is not specified or\n   "None", any whitespace string is a separator.  Except for splitting\n   from the right, "rsplit()" behaves like "split()" which is\n   described in detail below.\n\n   New in version 2.4.\n\nstr.rstrip([chars])\n\n   Return a copy of the string with trailing characters removed.  The\n   *chars* argument is a string specifying the set of characters to be\n   removed.  If omitted or "None", the *chars* argument defaults to\n   removing whitespace.  The *chars* argument is not a suffix; rather,\n   all combinations of its values are stripped:\n\n   >>> \'   spacious   \'.rstrip()\n   \'   spacious\'\n   >>> \'mississippi\'.rstrip(\'ipz\')\n   \'mississ\'\n\n   Changed in version 2.2.2: Support for the *chars* argument.\n\nstr.split([sep[, maxsplit]])\n\n   Return a list of the words in the string, using *sep* as the\n   delimiter string.  If *maxsplit* is given, at most *maxsplit*\n   splits are done (thus, the list will have at most "maxsplit+1"\n   elements).  If *maxsplit* is not specified or "-1", then there is\n   no limit on the number of splits (all possible splits are made).\n\n   If *sep* is given, consecutive delimiters are not grouped together\n   and are deemed to delimit empty strings (for example,\n   "\'1,,2\'.split(\',\')" returns "[\'1\', \'\', \'2\']").  The *sep* argument\n   may consist of multiple characters (for example,\n   "\'1<>2<>3\'.split(\'<>\')" returns "[\'1\', \'2\', \'3\']"). Splitting an\n   empty string with a specified separator returns "[\'\']".\n\n   If *sep* is not specified or is "None", a different splitting\n   algorithm is applied: runs of consecutive whitespace are regarded\n   as a single separator, and the result will contain no empty strings\n   at the start or end if the string has leading or trailing\n   whitespace.  Consequently, splitting an empty string or a string\n   consisting of just whitespace with a "None" separator returns "[]".\n\n   For example, "\' 1  2   3  \'.split()" returns "[\'1\', \'2\', \'3\']", and\n   "\'  1  2   3  \'.split(None, 1)" returns "[\'1\', \'2   3  \']".\n\nstr.splitlines([keepends])\n\n   Return a list of the lines in the string, breaking at line\n   boundaries. This method uses the *universal newlines* approach to\n   splitting lines. Line breaks are not included in the resulting list\n   unless *keepends* is given and true.\n\n   For example, "\'ab c\\n\\nde fg\\rkl\\r\\n\'.splitlines()" returns "[\'ab\n   c\', \'\', \'de fg\', \'kl\']", while the same call with\n   "splitlines(True)" returns "[\'ab c\\n\', \'\\n\', \'de fg\\r\', \'kl\\r\\n\']".\n\n   Unlike "split()" when a delimiter string *sep* is given, this\n   method returns an empty list for the empty string, and a terminal\n   line break does not result in an extra line.\n\nstr.startswith(prefix[, start[, end]])\n\n   Return "True" if string starts with the *prefix*, otherwise return\n   "False". *prefix* can also be a tuple of prefixes to look for.\n   With optional *start*, test string beginning at that position.\n   With optional *end*, stop comparing string at that position.\n\n   Changed in version 2.5: Accept tuples as *prefix*.\n\nstr.strip([chars])\n\n   Return a copy of the string with the leading and trailing\n   characters removed. The *chars* argument is a string specifying the\n   set of characters to be removed. If omitted or "None", the *chars*\n   argument defaults to removing whitespace. The *chars* argument is\n   not a prefix or suffix; rather, all combinations of its values are\n   stripped:\n\n   >>> \'   spacious   \'.strip()\n   \'spacious\'\n   >>> \'www.example.com\'.strip(\'cmowz.\')\n   \'example\'\n\n   Changed in version 2.2.2: Support for the *chars* argument.\n\nstr.swapcase()\n\n   Return a copy of the string with uppercase characters converted to\n   lowercase and vice versa.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.title()\n\n   Return a titlecased version of the string where words start with an\n   uppercase character and the remaining characters are lowercase.\n\n   The algorithm uses a simple language-independent definition of a\n   word as groups of consecutive letters.  The definition works in\n   many contexts but it means that apostrophes in contractions and\n   possessives form word boundaries, which may not be the desired\n   result:\n\n      >>> "they\'re bill\'s friends from the UK".title()\n      "They\'Re Bill\'S Friends From The Uk"\n\n   A workaround for apostrophes can be constructed using regular\n   expressions:\n\n      >>> import re\n      >>> def titlecase(s):\n      ...     return re.sub(r"[A-Za-z]+(\'[A-Za-z]+)?",\n      ...                   lambda mo: mo.group(0)[0].upper() +\n      ...                              mo.group(0)[1:].lower(),\n      ...                   s)\n      ...\n      >>> titlecase("they\'re bill\'s friends.")\n      "They\'re Bill\'s Friends."\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.translate(table[, deletechars])\n\n   Return a copy of the string where all characters occurring in the\n   optional argument *deletechars* are removed, and the remaining\n   characters have been mapped through the given translation table,\n   which must be a string of length 256.\n\n   You can use the "maketrans()" helper function in the "string"\n   module to create a translation table. For string objects, set the\n   *table* argument to "None" for translations that only delete\n   characters:\n\n   >>> \'read this short text\'.translate(None, \'aeiou\')\n   \'rd ths shrt txt\'\n\n   New in version 2.6: Support for a "None" *table* argument.\n\n   For Unicode objects, the "translate()" method does not accept the\n   optional *deletechars* argument.  Instead, it returns a copy of the\n   *s* where all characters have been mapped through the given\n   translation table which must be a mapping of Unicode ordinals to\n   Unicode ordinals, Unicode strings or "None". Unmapped characters\n   are left untouched. Characters mapped to "None" are deleted.  Note,\n   a more flexible approach is to create a custom character mapping\n   codec using the "codecs" module (see "encodings.cp1251" for an\n   example).\n\nstr.upper()\n\n   Return a copy of the string with all the cased characters [4]\n   converted to uppercase.  Note that "str.upper().isupper()" might be\n   "False" if "s" contains uncased characters or if the Unicode\n   category of the resulting character(s) is not "Lu" (Letter,\n   uppercase), but e.g. "Lt" (Letter, titlecase).\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.zfill(width)\n\n   Return the numeric string left filled with zeros in a string of\n   length *width*.  A sign prefix is handled correctly.  The original\n   string is returned if *width* is less than or equal to "len(s)".\n\n   New in version 2.2.2.\n\nThe following methods are present only on unicode objects:\n\nunicode.isnumeric()\n\n   Return "True" if there are only numeric characters in S, "False"\n   otherwise. Numeric characters include digit characters, and all\n   characters that have the Unicode numeric value property, e.g.\n   U+2155, VULGAR FRACTION ONE FIFTH.\n\nunicode.isdecimal()\n\n   Return "True" if there are only decimal characters in S, "False"\n   otherwise. Decimal characters include digit characters, and all\n   characters that can be used to form decimal-radix numbers, e.g.\n   U+0660, ARABIC-INDIC DIGIT ZERO.\n',
- 'strings': u'\nString literals\n***************\n\nString literals are described by the following lexical definitions:\n\n   stringliteral   ::= [stringprefix](shortstring | longstring)\n   stringprefix    ::= "r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR"\n                    | "b" | "B" | "br" | "Br" | "bR" | "BR"\n   shortstring     ::= "\'" shortstringitem* "\'" | \'"\' shortstringitem* \'"\'\n   longstring      ::= "\'\'\'" longstringitem* "\'\'\'"\n                  | \'"""\' longstringitem* \'"""\'\n   shortstringitem ::= shortstringchar | escapeseq\n   longstringitem  ::= longstringchar | escapeseq\n   shortstringchar ::= <any source character except "\\" or newline or the quote>\n   longstringchar  ::= <any source character except "\\">\n   escapeseq       ::= "\\" <any ASCII character>\n\nOne syntactic restriction not indicated by these productions is that\nwhitespace is not allowed between the "stringprefix" and the rest of\nthe string literal. The source character set is defined by the\nencoding declaration; it is ASCII if no encoding declaration is given\nin the source file; see section Encoding declarations.\n\nIn plain English: String literals can be enclosed in matching single\nquotes ("\'") or double quotes (""").  They can also be enclosed in\nmatching groups of three single or double quotes (these are generally\nreferred to as *triple-quoted strings*).  The backslash ("\\")\ncharacter is used to escape characters that otherwise have a special\nmeaning, such as newline, backslash itself, or the quote character.\nString literals may optionally be prefixed with a letter "\'r\'" or\n"\'R\'"; such strings are called *raw strings* and use different rules\nfor interpreting backslash escape sequences.  A prefix of "\'u\'" or\n"\'U\'" makes the string a Unicode string.  Unicode strings use the\nUnicode character set as defined by the Unicode Consortium and ISO\n10646.  Some additional escape sequences, described below, are\navailable in Unicode strings. A prefix of "\'b\'" or "\'B\'" is ignored in\nPython 2; it indicates that the literal should become a bytes literal\nin Python 3 (e.g. when code is automatically converted with 2to3).  A\n"\'u\'" or "\'b\'" prefix may be followed by an "\'r\'" prefix.\n\nIn triple-quoted strings, unescaped newlines and quotes are allowed\n(and are retained), except that three unescaped quotes in a row\nterminate the string.  (A "quote" is the character used to open the\nstring, i.e. either "\'" or """.)\n\nUnless an "\'r\'" or "\'R\'" prefix is present, escape sequences in\nstrings are interpreted according to rules similar to those used by\nStandard C.  The recognized escape sequences are:\n\n+-------------------+-----------------------------------+---------+\n| Escape Sequence   | Meaning                           | Notes   |\n+===================+===================================+=========+\n| "\\newline"        | Ignored                           |         |\n+-------------------+-----------------------------------+---------+\n| "\\\\"              | Backslash ("\\")                   |         |\n+-------------------+-----------------------------------+---------+\n| "\\\'"              | Single quote ("\'")                |         |\n+-------------------+-----------------------------------+---------+\n| "\\""              | Double quote (""")                |         |\n+-------------------+-----------------------------------+---------+\n| "\\a"              | ASCII Bell (BEL)                  |         |\n+-------------------+-----------------------------------+---------+\n| "\\b"              | ASCII Backspace (BS)              |         |\n+-------------------+-----------------------------------+---------+\n| "\\f"              | ASCII Formfeed (FF)               |         |\n+-------------------+-----------------------------------+---------+\n| "\\n"              | ASCII Linefeed (LF)               |         |\n+-------------------+-----------------------------------+---------+\n| "\\N{name}"        | Character named *name* in the     |         |\n|                   | Unicode database (Unicode only)   |         |\n+-------------------+-----------------------------------+---------+\n| "\\r"              | ASCII Carriage Return (CR)        |         |\n+-------------------+-----------------------------------+---------+\n| "\\t"              | ASCII Horizontal Tab (TAB)        |         |\n+-------------------+-----------------------------------+---------+\n| "\\uxxxx"          | Character with 16-bit hex value   | (1)     |\n|                   | *xxxx* (Unicode only)             |         |\n+-------------------+-----------------------------------+---------+\n| "\\Uxxxxxxxx"      | Character with 32-bit hex value   | (2)     |\n|                   | *xxxxxxxx* (Unicode only)         |         |\n+-------------------+-----------------------------------+---------+\n| "\\v"              | ASCII Vertical Tab (VT)           |         |\n+-------------------+-----------------------------------+---------+\n| "\\ooo"            | Character with octal value *ooo*  | (3,5)   |\n+-------------------+-----------------------------------+---------+\n| "\\xhh"            | Character with hex value *hh*     | (4,5)   |\n+-------------------+-----------------------------------+---------+\n\nNotes:\n\n1. Individual code units which form parts of a surrogate pair can\n   be encoded using this escape sequence.\n\n2. Any Unicode character can be encoded this way, but characters\n   outside the Basic Multilingual Plane (BMP) will be encoded using a\n   surrogate pair if Python is compiled to use 16-bit code units (the\n   default).\n\n3. As in Standard C, up to three octal digits are accepted.\n\n4. Unlike in Standard C, exactly two hex digits are required.\n\n5. In a string literal, hexadecimal and octal escapes denote the\n   byte with the given value; it is not necessary that the byte\n   encodes a character in the source character set. In a Unicode\n   literal, these escapes denote a Unicode character with the given\n   value.\n\nUnlike Standard C, all unrecognized escape sequences are left in the\nstring unchanged, i.e., *the backslash is left in the string*.  (This\nbehavior is useful when debugging: if an escape sequence is mistyped,\nthe resulting output is more easily recognized as broken.)  It is also\nimportant to note that the escape sequences marked as "(Unicode only)"\nin the table above fall into the category of unrecognized escapes for\nnon-Unicode string literals.\n\nWhen an "\'r\'" or "\'R\'" prefix is present, a character following a\nbackslash is included in the string without change, and *all\nbackslashes are left in the string*.  For example, the string literal\n"r"\\n"" consists of two characters: a backslash and a lowercase "\'n\'".\nString quotes can be escaped with a backslash, but the backslash\nremains in the string; for example, "r"\\""" is a valid string literal\nconsisting of two characters: a backslash and a double quote; "r"\\""\nis not a valid string literal (even a raw string cannot end in an odd\nnumber of backslashes).  Specifically, *a raw string cannot end in a\nsingle backslash* (since the backslash would escape the following\nquote character).  Note also that a single backslash followed by a\nnewline is interpreted as those two characters as part of the string,\n*not* as a line continuation.\n\nWhen an "\'r\'" or "\'R\'" prefix is used in conjunction with a "\'u\'" or\n"\'U\'" prefix, then the "\\uXXXX" and "\\UXXXXXXXX" escape sequences are\nprocessed while  *all other backslashes are left in the string*. For\nexample, the string literal "ur"\\u0062\\n"" consists of three Unicode\ncharacters: \'LATIN SMALL LETTER B\', \'REVERSE SOLIDUS\', and \'LATIN\nSMALL LETTER N\'. Backslashes can be escaped with a preceding\nbackslash; however, both remain in the string.  As a result, "\\uXXXX"\nescape sequences are only recognized when there are an odd number of\nbackslashes.\n',
- 'subscriptions': u'\nSubscriptions\n*************\n\nA subscription selects an item of a sequence (string, tuple or list)\nor mapping (dictionary) object:\n\n   subscription ::= primary "[" expression_list "]"\n\nThe primary must evaluate to an object of a sequence or mapping type.\n\nIf the primary is a mapping, the expression list must evaluate to an\nobject whose value is one of the keys of the mapping, and the\nsubscription selects the value in the mapping that corresponds to that\nkey.  (The expression list is a tuple except if it has exactly one\nitem.)\n\nIf the primary is a sequence, the expression (list) must evaluate to a\nplain integer.  If this value is negative, the length of the sequence\nis added to it (so that, e.g., "x[-1]" selects the last item of "x".)\nThe resulting value must be a nonnegative integer less than the number\nof items in the sequence, and the subscription selects the item whose\nindex is that value (counting from zero).\n\nA string\'s items are characters.  A character is not a separate data\ntype but a string of exactly one character.\n',
- 'truth': u'\nTruth Value Testing\n*******************\n\nAny object can be tested for truth value, for use in an "if" or\n"while" condition or as operand of the Boolean operations below. The\nfollowing values are considered false:\n\n* "None"\n\n* "False"\n\n* zero of any numeric type, for example, "0", "0L", "0.0", "0j".\n\n* any empty sequence, for example, "\'\'", "()", "[]".\n\n* any empty mapping, for example, "{}".\n\n* instances of user-defined classes, if the class defines a\n  "__nonzero__()" or "__len__()" method, when that method returns the\n  integer zero or "bool" value "False". [1]\n\nAll other values are considered true --- so objects of many types are\nalways true.\n\nOperations and built-in functions that have a Boolean result always\nreturn "0" or "False" for false and "1" or "True" for true, unless\notherwise stated. (Important exception: the Boolean operations "or"\nand "and" always return one of their operands.)\n',
- 'try': u'\nThe "try" statement\n*******************\n\nThe "try" statement specifies exception handlers and/or cleanup code\nfor a group of statements:\n\n   try_stmt  ::= try1_stmt | try2_stmt\n   try1_stmt ::= "try" ":" suite\n                 ("except" [expression [("as" | ",") identifier]] ":" suite)+\n                 ["else" ":" suite]\n                 ["finally" ":" suite]\n   try2_stmt ::= "try" ":" suite\n                 "finally" ":" suite\n\nChanged in version 2.5: In previous versions of Python,\n"try"..."except"..."finally" did not work. "try"..."except" had to be\nnested in "try"..."finally".\n\nThe "except" clause(s) specify one or more exception handlers. When no\nexception occurs in the "try" clause, no exception handler is\nexecuted. When an exception occurs in the "try" suite, a search for an\nexception handler is started.  This search inspects the except clauses\nin turn until one is found that matches the exception.  An expression-\nless except clause, if present, must be last; it matches any\nexception.  For an except clause with an expression, that expression\nis evaluated, and the clause matches the exception if the resulting\nobject is "compatible" with the exception.  An object is compatible\nwith an exception if it is the class or a base class of the exception\nobject, or a tuple containing an item compatible with the exception.\n\nIf no except clause matches the exception, the search for an exception\nhandler continues in the surrounding code and on the invocation stack.\n[1]\n\nIf the evaluation of an expression in the header of an except clause\nraises an exception, the original search for a handler is canceled and\na search starts for the new exception in the surrounding code and on\nthe call stack (it is treated as if the entire "try" statement raised\nthe exception).\n\nWhen a matching except clause is found, the exception is assigned to\nthe target specified in that except clause, if present, and the except\nclause\'s suite is executed.  All except clauses must have an\nexecutable block.  When the end of this block is reached, execution\ncontinues normally after the entire try statement.  (This means that\nif two nested handlers exist for the same exception, and the exception\noccurs in the try clause of the inner handler, the outer handler will\nnot handle the exception.)\n\nBefore an except clause\'s suite is executed, details about the\nexception are assigned to three variables in the "sys" module:\n"sys.exc_type" receives the object identifying the exception;\n"sys.exc_value" receives the exception\'s parameter;\n"sys.exc_traceback" receives a traceback object (see section The\nstandard type hierarchy) identifying the point in the program where\nthe exception occurred. These details are also available through the\n"sys.exc_info()" function, which returns a tuple "(exc_type,\nexc_value, exc_traceback)".  Use of the corresponding variables is\ndeprecated in favor of this function, since their use is unsafe in a\nthreaded program.  As of Python 1.5, the variables are restored to\ntheir previous values (before the call) when returning from a function\nthat handled an exception.\n\nThe optional "else" clause is executed if and when control flows off\nthe end of the "try" clause. [2] Exceptions in the "else" clause are\nnot handled by the preceding "except" clauses.\n\nIf "finally" is present, it specifies a \'cleanup\' handler.  The "try"\nclause is executed, including any "except" and "else" clauses.  If an\nexception occurs in any of the clauses and is not handled, the\nexception is temporarily saved. The "finally" clause is executed.  If\nthere is a saved exception, it is re-raised at the end of the\n"finally" clause. If the "finally" clause raises another exception or\nexecutes a "return" or "break" statement, the saved exception is\ndiscarded:\n\n   >>> def f():\n   ...     try:\n   ...         1/0\n   ...     finally:\n   ...         return 42\n   ...\n   >>> f()\n   42\n\nThe exception information is not available to the program during\nexecution of the "finally" clause.\n\nWhen a "return", "break" or "continue" statement is executed in the\n"try" suite of a "try"..."finally" statement, the "finally" clause is\nalso executed \'on the way out.\' A "continue" statement is illegal in\nthe "finally" clause. (The reason is a problem with the current\nimplementation --- this restriction may be lifted in the future).\n\nThe return value of a function is determined by the last "return"\nstatement executed.  Since the "finally" clause always executes, a\n"return" statement executed in the "finally" clause will always be the\nlast one executed:\n\n   >>> def foo():\n   ...     try:\n   ...         return \'try\'\n   ...     finally:\n   ...         return \'finally\'\n   ...\n   >>> foo()\n   \'finally\'\n\nAdditional information on exceptions can be found in section\nExceptions, and information on using the "raise" statement to generate\nexceptions may be found in section The raise statement.\n',
- 'types': u'\nThe standard type hierarchy\n***************************\n\nBelow is a list of the types that are built into Python.  Extension\nmodules (written in C, Java, or other languages, depending on the\nimplementation) can define additional types.  Future versions of\nPython may add types to the type hierarchy (e.g., rational numbers,\nefficiently stored arrays of integers, etc.).\n\nSome of the type descriptions below contain a paragraph listing\n\'special attributes.\'  These are attributes that provide access to the\nimplementation and are not intended for general use.  Their definition\nmay change in the future.\n\nNone\n   This type has a single value.  There is a single object with this\n   value. This object is accessed through the built-in name "None". It\n   is used to signify the absence of a value in many situations, e.g.,\n   it is returned from functions that don\'t explicitly return\n   anything. Its truth value is false.\n\nNotImplemented\n   This type has a single value.  There is a single object with this\n   value. This object is accessed through the built-in name\n   "NotImplemented". Numeric methods and rich comparison methods may\n   return this value if they do not implement the operation for the\n   operands provided.  (The interpreter will then try the reflected\n   operation, or some other fallback, depending on the operator.)  Its\n   truth value is true.\n\nEllipsis\n   This type has a single value.  There is a single object with this\n   value. This object is accessed through the built-in name\n   "Ellipsis". It is used to indicate the presence of the "..." syntax\n   in a slice.  Its truth value is true.\n\n"numbers.Number"\n   These are created by numeric literals and returned as results by\n   arithmetic operators and arithmetic built-in functions.  Numeric\n   objects are immutable; once created their value never changes.\n   Python numbers are of course strongly related to mathematical\n   numbers, but subject to the limitations of numerical representation\n   in computers.\n\n   Python distinguishes between integers, floating point numbers, and\n   complex numbers:\n\n   "numbers.Integral"\n      These represent elements from the mathematical set of integers\n      (positive and negative).\n\n      There are three types of integers:\n\n      Plain integers\n         These represent numbers in the range -2147483648 through\n         2147483647. (The range may be larger on machines with a\n         larger natural word size, but not smaller.)  When the result\n         of an operation would fall outside this range, the result is\n         normally returned as a long integer (in some cases, the\n         exception "OverflowError" is raised instead).  For the\n         purpose of shift and mask operations, integers are assumed to\n         have a binary, 2\'s complement notation using 32 or more bits,\n         and hiding no bits from the user (i.e., all 4294967296\n         different bit patterns correspond to different values).\n\n      Long integers\n         These represent numbers in an unlimited range, subject to\n         available (virtual) memory only.  For the purpose of shift\n         and mask operations, a binary representation is assumed, and\n         negative numbers are represented in a variant of 2\'s\n         complement which gives the illusion of an infinite string of\n         sign bits extending to the left.\n\n      Booleans\n         These represent the truth values False and True.  The two\n         objects representing the values "False" and "True" are the\n         only Boolean objects. The Boolean type is a subtype of plain\n         integers, and Boolean values behave like the values 0 and 1,\n         respectively, in almost all contexts, the exception being\n         that when converted to a string, the strings ""False"" or\n         ""True"" are returned, respectively.\n\n      The rules for integer representation are intended to give the\n      most meaningful interpretation of shift and mask operations\n      involving negative integers and the least surprises when\n      switching between the plain and long integer domains.  Any\n      operation, if it yields a result in the plain integer domain,\n      will yield the same result in the long integer domain or when\n      using mixed operands.  The switch between domains is transparent\n      to the programmer.\n\n   "numbers.Real" ("float")\n      These represent machine-level double precision floating point\n      numbers. You are at the mercy of the underlying machine\n      architecture (and C or Java implementation) for the accepted\n      range and handling of overflow. Python does not support single-\n      precision floating point numbers; the savings in processor and\n      memory usage that are usually the reason for using these are\n      dwarfed by the overhead of using objects in Python, so there is\n      no reason to complicate the language with two kinds of floating\n      point numbers.\n\n   "numbers.Complex"\n      These represent complex numbers as a pair of machine-level\n      double precision floating point numbers.  The same caveats apply\n      as for floating point numbers. The real and imaginary parts of a\n      complex number "z" can be retrieved through the read-only\n      attributes "z.real" and "z.imag".\n\nSequences\n   These represent finite ordered sets indexed by non-negative\n   numbers. The built-in function "len()" returns the number of items\n   of a sequence. When the length of a sequence is *n*, the index set\n   contains the numbers 0, 1, ..., *n*-1.  Item *i* of sequence *a* is\n   selected by "a[i]".\n\n   Sequences also support slicing: "a[i:j]" selects all items with\n   index *k* such that *i* "<=" *k* "<" *j*.  When used as an\n   expression, a slice is a sequence of the same type.  This implies\n   that the index set is renumbered so that it starts at 0.\n\n   Some sequences also support "extended slicing" with a third "step"\n   parameter: "a[i:j:k]" selects all items of *a* with index *x* where\n   "x = i + n*k", *n* ">=" "0" and *i* "<=" *x* "<" *j*.\n\n   Sequences are distinguished according to their mutability:\n\n   Immutable sequences\n      An object of an immutable sequence type cannot change once it is\n      created.  (If the object contains references to other objects,\n      these other objects may be mutable and may be changed; however,\n      the collection of objects directly referenced by an immutable\n      object cannot change.)\n\n      The following types are immutable sequences:\n\n      Strings\n         The items of a string are characters.  There is no separate\n         character type; a character is represented by a string of one\n         item. Characters represent (at least) 8-bit bytes.  The\n         built-in functions "chr()" and "ord()" convert between\n         characters and nonnegative integers representing the byte\n         values.  Bytes with the values 0-127 usually represent the\n         corresponding ASCII values, but the interpretation of values\n         is up to the program.  The string data type is also used to\n         represent arrays of bytes, e.g., to hold data read from a\n         file.\n\n         (On systems whose native character set is not ASCII, strings\n         may use EBCDIC in their internal representation, provided the\n         functions "chr()" and "ord()" implement a mapping between\n         ASCII and EBCDIC, and string comparison preserves the ASCII\n         order. Or perhaps someone can propose a better rule?)\n\n      Unicode\n         The items of a Unicode object are Unicode code units.  A\n         Unicode code unit is represented by a Unicode object of one\n         item and can hold either a 16-bit or 32-bit value\n         representing a Unicode ordinal (the maximum value for the\n         ordinal is given in "sys.maxunicode", and depends on how\n         Python is configured at compile time).  Surrogate pairs may\n         be present in the Unicode object, and will be reported as two\n         separate items.  The built-in functions "unichr()" and\n         "ord()" convert between code units and nonnegative integers\n         representing the Unicode ordinals as defined in the Unicode\n         Standard 3.0. Conversion from and to other encodings are\n         possible through the Unicode method "encode()" and the built-\n         in function "unicode()".\n\n      Tuples\n         The items of a tuple are arbitrary Python objects. Tuples of\n         two or more items are formed by comma-separated lists of\n         expressions.  A tuple of one item (a \'singleton\') can be\n         formed by affixing a comma to an expression (an expression by\n         itself does not create a tuple, since parentheses must be\n         usable for grouping of expressions).  An empty tuple can be\n         formed by an empty pair of parentheses.\n\n   Mutable sequences\n      Mutable sequences can be changed after they are created.  The\n      subscription and slicing notations can be used as the target of\n      assignment and "del" (delete) statements.\n\n      There are currently two intrinsic mutable sequence types:\n\n      Lists\n         The items of a list are arbitrary Python objects.  Lists are\n         formed by placing a comma-separated list of expressions in\n         square brackets. (Note that there are no special cases needed\n         to form lists of length 0 or 1.)\n\n      Byte Arrays\n         A bytearray object is a mutable array. They are created by\n         the built-in "bytearray()" constructor.  Aside from being\n         mutable (and hence unhashable), byte arrays otherwise provide\n         the same interface and functionality as immutable bytes\n         objects.\n\n      The extension module "array" provides an additional example of a\n      mutable sequence type.\n\nSet types\n   These represent unordered, finite sets of unique, immutable\n   objects. As such, they cannot be indexed by any subscript. However,\n   they can be iterated over, and the built-in function "len()"\n   returns the number of items in a set. Common uses for sets are fast\n   membership testing, removing duplicates from a sequence, and\n   computing mathematical operations such as intersection, union,\n   difference, and symmetric difference.\n\n   For set elements, the same immutability rules apply as for\n   dictionary keys. Note that numeric types obey the normal rules for\n   numeric comparison: if two numbers compare equal (e.g., "1" and\n   "1.0"), only one of them can be contained in a set.\n\n   There are currently two intrinsic set types:\n\n   Sets\n      These represent a mutable set. They are created by the built-in\n      "set()" constructor and can be modified afterwards by several\n      methods, such as "add()".\n\n   Frozen sets\n      These represent an immutable set.  They are created by the\n      built-in "frozenset()" constructor.  As a frozenset is immutable\n      and *hashable*, it can be used again as an element of another\n      set, or as a dictionary key.\n\nMappings\n   These represent finite sets of objects indexed by arbitrary index\n   sets. The subscript notation "a[k]" selects the item indexed by "k"\n   from the mapping "a"; this can be used in expressions and as the\n   target of assignments or "del" statements. The built-in function\n   "len()" returns the number of items in a mapping.\n\n   There is currently a single intrinsic mapping type:\n\n   Dictionaries\n      These represent finite sets of objects indexed by nearly\n      arbitrary values.  The only types of values not acceptable as\n      keys are values containing lists or dictionaries or other\n      mutable types that are compared by value rather than by object\n      identity, the reason being that the efficient implementation of\n      dictionaries requires a key\'s hash value to remain constant.\n      Numeric types used for keys obey the normal rules for numeric\n      comparison: if two numbers compare equal (e.g., "1" and "1.0")\n      then they can be used interchangeably to index the same\n      dictionary entry.\n\n      Dictionaries are mutable; they can be created by the "{...}"\n      notation (see section Dictionary displays).\n\n      The extension modules "dbm", "gdbm", and "bsddb" provide\n      additional examples of mapping types.\n\nCallable types\n   These are the types to which the function call operation (see\n   section Calls) can be applied:\n\n   User-defined functions\n      A user-defined function object is created by a function\n      definition (see section Function definitions).  It should be\n      called with an argument list containing the same number of items\n      as the function\'s formal parameter list.\n\n      Special attributes:\n\n      +-------------------------+---------------------------------+-------------+\n      | Attribute               | Meaning                         |             |\n      +=========================+=================================+=============+\n      | "__doc__" "func_doc"    | The function\'s documentation    | Writable    |\n      |                         | string, or "None" if            |             |\n      |                         | unavailable.                    |             |\n      +-------------------------+---------------------------------+-------------+\n      | "__name__" "func_name"  | The function\'s name.            | Writable    |\n      +-------------------------+---------------------------------+-------------+\n      | "__module__"            | The name of the module the      | Writable    |\n      |                         | function was defined in, or     |             |\n      |                         | "None" if unavailable.          |             |\n      +-------------------------+---------------------------------+-------------+\n      | "__defaults__"          | A tuple containing default      | Writable    |\n      | "func_defaults"         | argument values for those       |             |\n      |                         | arguments that have defaults,   |             |\n      |                         | or "None" if no arguments have  |             |\n      |                         | a default value.                |             |\n      +-------------------------+---------------------------------+-------------+\n      | "__code__" "func_code"  | The code object representing    | Writable    |\n      |                         | the compiled function body.     |             |\n      +-------------------------+---------------------------------+-------------+\n      | "__globals__"           | A reference to the dictionary   | Read-only   |\n      | "func_globals"          | that holds the function\'s       |             |\n      |                         | global variables --- the global |             |\n      |                         | namespace of the module in      |             |\n      |                         | which the function was defined. |             |\n      +-------------------------+---------------------------------+-------------+\n      | "__dict__" "func_dict"  | The namespace supporting        | Writable    |\n      |                         | arbitrary function attributes.  |             |\n      +-------------------------+---------------------------------+-------------+\n      | "__closure__"           | "None" or a tuple of cells that | Read-only   |\n      | "func_closure"          | contain bindings for the        |             |\n      |                         | function\'s free variables.      |             |\n      +-------------------------+---------------------------------+-------------+\n\n      Most of the attributes labelled "Writable" check the type of the\n      assigned value.\n\n      Changed in version 2.4: "func_name" is now writable.\n\n      Changed in version 2.6: The double-underscore attributes\n      "__closure__", "__code__", "__defaults__", and "__globals__"\n      were introduced as aliases for the corresponding "func_*"\n      attributes for forwards compatibility with Python 3.\n\n      Function objects also support getting and setting arbitrary\n      attributes, which can be used, for example, to attach metadata\n      to functions.  Regular attribute dot-notation is used to get and\n      set such attributes. *Note that the current implementation only\n      supports function attributes on user-defined functions. Function\n      attributes on built-in functions may be supported in the\n      future.*\n\n      Additional information about a function\'s definition can be\n      retrieved from its code object; see the description of internal\n      types below.\n\n   User-defined methods\n      A user-defined method object combines a class, a class instance\n      (or "None") and any callable object (normally a user-defined\n      function).\n\n      Special read-only attributes: "im_self" is the class instance\n      object, "im_func" is the function object; "im_class" is the\n      class of "im_self" for bound methods or the class that asked for\n      the method for unbound methods; "__doc__" is the method\'s\n      documentation (same as "im_func.__doc__"); "__name__" is the\n      method name (same as "im_func.__name__"); "__module__" is the\n      name of the module the method was defined in, or "None" if\n      unavailable.\n\n      Changed in version 2.2: "im_self" used to refer to the class\n      that defined the method.\n\n      Changed in version 2.6: For Python 3 forward-compatibility,\n      "im_func" is also available as "__func__", and "im_self" as\n      "__self__".\n\n      Methods also support accessing (but not setting) the arbitrary\n      function attributes on the underlying function object.\n\n      User-defined method objects may be created when getting an\n      attribute of a class (perhaps via an instance of that class), if\n      that attribute is a user-defined function object, an unbound\n      user-defined method object, or a class method object. When the\n      attribute is a user-defined method object, a new method object\n      is only created if the class from which it is being retrieved is\n      the same as, or a derived class of, the class stored in the\n      original method object; otherwise, the original method object is\n      used as it is.\n\n      When a user-defined method object is created by retrieving a\n      user-defined function object from a class, its "im_self"\n      attribute is "None" and the method object is said to be unbound.\n      When one is created by retrieving a user-defined function object\n      from a class via one of its instances, its "im_self" attribute\n      is the instance, and the method object is said to be bound. In\n      either case, the new method\'s "im_class" attribute is the class\n      from which the retrieval takes place, and its "im_func"\n      attribute is the original function object.\n\n      When a user-defined method object is created by retrieving\n      another method object from a class or instance, the behaviour is\n      the same as for a function object, except that the "im_func"\n      attribute of the new instance is not the original method object\n      but its "im_func" attribute.\n\n      When a user-defined method object is created by retrieving a\n      class method object from a class or instance, its "im_self"\n      attribute is the class itself, and its "im_func" attribute is\n      the function object underlying the class method.\n\n      When an unbound user-defined method object is called, the\n      underlying function ("im_func") is called, with the restriction\n      that the first argument must be an instance of the proper class\n      ("im_class") or of a derived class thereof.\n\n      When a bound user-defined method object is called, the\n      underlying function ("im_func") is called, inserting the class\n      instance ("im_self") in front of the argument list.  For\n      instance, when "C" is a class which contains a definition for a\n      function "f()", and "x" is an instance of "C", calling "x.f(1)"\n      is equivalent to calling "C.f(x, 1)".\n\n      When a user-defined method object is derived from a class method\n      object, the "class instance" stored in "im_self" will actually\n      be the class itself, so that calling either "x.f(1)" or "C.f(1)"\n      is equivalent to calling "f(C,1)" where "f" is the underlying\n      function.\n\n      Note that the transformation from function object to (unbound or\n      bound) method object happens each time the attribute is\n      retrieved from the class or instance. In some cases, a fruitful\n      optimization is to assign the attribute to a local variable and\n      call that local variable. Also notice that this transformation\n      only happens for user-defined functions; other callable objects\n      (and all non-callable objects) are retrieved without\n      transformation.  It is also important to note that user-defined\n      functions which are attributes of a class instance are not\n      converted to bound methods; this *only* happens when the\n      function is an attribute of the class.\n\n   Generator functions\n      A function or method which uses the "yield" statement (see\n      section The yield statement) is called a *generator function*.\n      Such a function, when called, always returns an iterator object\n      which can be used to execute the body of the function:  calling\n      the iterator\'s "next()" method will cause the function to\n      execute until it provides a value using the "yield" statement.\n      When the function executes a "return" statement or falls off the\n      end, a "StopIteration" exception is raised and the iterator will\n      have reached the end of the set of values to be returned.\n\n   Built-in functions\n      A built-in function object is a wrapper around a C function.\n      Examples of built-in functions are "len()" and "math.sin()"\n      ("math" is a standard built-in module). The number and type of\n      the arguments are determined by the C function. Special read-\n      only attributes: "__doc__" is the function\'s documentation\n      string, or "None" if unavailable; "__name__" is the function\'s\n      name; "__self__" is set to "None" (but see the next item);\n      "__module__" is the name of the module the function was defined\n      in or "None" if unavailable.\n\n   Built-in methods\n      This is really a different disguise of a built-in function, this\n      time containing an object passed to the C function as an\n      implicit extra argument.  An example of a built-in method is\n      "alist.append()", assuming *alist* is a list object. In this\n      case, the special read-only attribute "__self__" is set to the\n      object denoted by *alist*.\n\n   Class Types\n      Class types, or "new-style classes," are callable.  These\n      objects normally act as factories for new instances of\n      themselves, but variations are possible for class types that\n      override "__new__()".  The arguments of the call are passed to\n      "__new__()" and, in the typical case, to "__init__()" to\n      initialize the new instance.\n\n   Classic Classes\n      Class objects are described below.  When a class object is\n      called, a new class instance (also described below) is created\n      and returned.  This implies a call to the class\'s "__init__()"\n      method if it has one.  Any arguments are passed on to the\n      "__init__()" method.  If there is no "__init__()" method, the\n      class must be called without arguments.\n\n   Class instances\n      Class instances are described below.  Class instances are\n      callable only when the class has a "__call__()" method;\n      "x(arguments)" is a shorthand for "x.__call__(arguments)".\n\nModules\n   Modules are imported by the "import" statement (see section The\n   import statement). A module object has a namespace implemented by a\n   dictionary object (this is the dictionary referenced by the\n   func_globals attribute of functions defined in the module).\n   Attribute references are translated to lookups in this dictionary,\n   e.g., "m.x" is equivalent to "m.__dict__["x"]". A module object\n   does not contain the code object used to initialize the module\n   (since it isn\'t needed once the initialization is done).\n\n   Attribute assignment updates the module\'s namespace dictionary,\n   e.g., "m.x = 1" is equivalent to "m.__dict__["x"] = 1".\n\n   Special read-only attribute: "__dict__" is the module\'s namespace\n   as a dictionary object.\n\n   **CPython implementation detail:** Because of the way CPython\n   clears module dictionaries, the module dictionary will be cleared\n   when the module falls out of scope even if the dictionary still has\n   live references.  To avoid this, copy the dictionary or keep the\n   module around while using its dictionary directly.\n\n   Predefined (writable) attributes: "__name__" is the module\'s name;\n   "__doc__" is the module\'s documentation string, or "None" if\n   unavailable; "__file__" is the pathname of the file from which the\n   module was loaded, if it was loaded from a file. The "__file__"\n   attribute is not present for C modules that are statically linked\n   into the interpreter; for extension modules loaded dynamically from\n   a shared library, it is the pathname of the shared library file.\n\nClasses\n   Both class types (new-style classes) and class objects (old-\n   style/classic classes) are typically created by class definitions\n   (see section Class definitions).  A class has a namespace\n   implemented by a dictionary object. Class attribute references are\n   translated to lookups in this dictionary, e.g., "C.x" is translated\n   to "C.__dict__["x"]" (although for new-style classes in particular\n   there are a number of hooks which allow for other means of locating\n   attributes). When the attribute name is not found there, the\n   attribute search continues in the base classes.  For old-style\n   classes, the search is depth-first, left-to-right in the order of\n   occurrence in the base class list. New-style classes use the more\n   complex C3 method resolution order which behaves correctly even in\n   the presence of \'diamond\' inheritance structures where there are\n   multiple inheritance paths leading back to a common ancestor.\n   Additional details on the C3 MRO used by new-style classes can be\n   found in the documentation accompanying the 2.3 release at\n   https://www.python.org/download/releases/2.3/mro/.\n\n   When a class attribute reference (for class "C", say) would yield a\n   user-defined function object or an unbound user-defined method\n   object whose associated class is either "C" or one of its base\n   classes, it is transformed into an unbound user-defined method\n   object whose "im_class" attribute is "C". When it would yield a\n   class method object, it is transformed into a bound user-defined\n   method object whose "im_self" attribute is "C".  When it would\n   yield a static method object, it is transformed into the object\n   wrapped by the static method object. See section Implementing\n   Descriptors for another way in which attributes retrieved from a\n   class may differ from those actually contained in its "__dict__"\n   (note that only new-style classes support descriptors).\n\n   Class attribute assignments update the class\'s dictionary, never\n   the dictionary of a base class.\n\n   A class object can be called (see above) to yield a class instance\n   (see below).\n\n   Special attributes: "__name__" is the class name; "__module__" is\n   the module name in which the class was defined; "__dict__" is the\n   dictionary containing the class\'s namespace; "__bases__" is a tuple\n   (possibly empty or a singleton) containing the base classes, in the\n   order of their occurrence in the base class list; "__doc__" is the\n   class\'s documentation string, or None if undefined.\n\nClass instances\n   A class instance is created by calling a class object (see above).\n   A class instance has a namespace implemented as a dictionary which\n   is the first place in which attribute references are searched.\n   When an attribute is not found there, and the instance\'s class has\n   an attribute by that name, the search continues with the class\n   attributes.  If a class attribute is found that is a user-defined\n   function object or an unbound user-defined method object whose\n   associated class is the class (call it "C") of the instance for\n   which the attribute reference was initiated or one of its bases, it\n   is transformed into a bound user-defined method object whose\n   "im_class" attribute is "C" and whose "im_self" attribute is the\n   instance. Static method and class method objects are also\n   transformed, as if they had been retrieved from class "C"; see\n   above under "Classes". See section Implementing Descriptors for\n   another way in which attributes of a class retrieved via its\n   instances may differ from the objects actually stored in the\n   class\'s "__dict__". If no class attribute is found, and the\n   object\'s class has a "__getattr__()" method, that is called to\n   satisfy the lookup.\n\n   Attribute assignments and deletions update the instance\'s\n   dictionary, never a class\'s dictionary.  If the class has a\n   "__setattr__()" or "__delattr__()" method, this is called instead\n   of updating the instance dictionary directly.\n\n   Class instances can pretend to be numbers, sequences, or mappings\n   if they have methods with certain special names.  See section\n   Special method names.\n\n   Special attributes: "__dict__" is the attribute dictionary;\n   "__class__" is the instance\'s class.\n\nFiles\n   A file object represents an open file.  File objects are created by\n   the "open()" built-in function, and also by "os.popen()",\n   "os.fdopen()", and the "makefile()" method of socket objects (and\n   perhaps by other functions or methods provided by extension\n   modules).  The objects "sys.stdin", "sys.stdout" and "sys.stderr"\n   are initialized to file objects corresponding to the interpreter\'s\n   standard input, output and error streams.  See File Objects for\n   complete documentation of file objects.\n\nInternal types\n   A few types used internally by the interpreter are exposed to the\n   user. Their definitions may change with future versions of the\n   interpreter, but they are mentioned here for completeness.\n\n   Code objects\n      Code objects represent *byte-compiled* executable Python code,\n      or *bytecode*. The difference between a code object and a\n      function object is that the function object contains an explicit\n      reference to the function\'s globals (the module in which it was\n      defined), while a code object contains no context; also the\n      default argument values are stored in the function object, not\n      in the code object (because they represent values calculated at\n      run-time).  Unlike function objects, code objects are immutable\n      and contain no references (directly or indirectly) to mutable\n      objects.\n\n      Special read-only attributes: "co_name" gives the function name;\n      "co_argcount" is the number of positional arguments (including\n      arguments with default values); "co_nlocals" is the number of\n      local variables used by the function (including arguments);\n      "co_varnames" is a tuple containing the names of the local\n      variables (starting with the argument names); "co_cellvars" is a\n      tuple containing the names of local variables that are\n      referenced by nested functions; "co_freevars" is a tuple\n      containing the names of free variables; "co_code" is a string\n      representing the sequence of bytecode instructions; "co_consts"\n      is a tuple containing the literals used by the bytecode;\n      "co_names" is a tuple containing the names used by the bytecode;\n      "co_filename" is the filename from which the code was compiled;\n      "co_firstlineno" is the first line number of the function;\n      "co_lnotab" is a string encoding the mapping from bytecode\n      offsets to line numbers (for details see the source code of the\n      interpreter); "co_stacksize" is the required stack size\n      (including local variables); "co_flags" is an integer encoding a\n      number of flags for the interpreter.\n\n      The following flag bits are defined for "co_flags": bit "0x04"\n      is set if the function uses the "*arguments" syntax to accept an\n      arbitrary number of positional arguments; bit "0x08" is set if\n      the function uses the "**keywords" syntax to accept arbitrary\n      keyword arguments; bit "0x20" is set if the function is a\n      generator.\n\n      Future feature declarations ("from __future__ import division")\n      also use bits in "co_flags" to indicate whether a code object\n      was compiled with a particular feature enabled: bit "0x2000" is\n      set if the function was compiled with future division enabled;\n      bits "0x10" and "0x1000" were used in earlier versions of\n      Python.\n\n      Other bits in "co_flags" are reserved for internal use.\n\n      If a code object represents a function, the first item in\n      "co_consts" is the documentation string of the function, or\n      "None" if undefined.\n\n   Frame objects\n      Frame objects represent execution frames.  They may occur in\n      traceback objects (see below).\n\n      Special read-only attributes: "f_back" is to the previous stack\n      frame (towards the caller), or "None" if this is the bottom\n      stack frame; "f_code" is the code object being executed in this\n      frame; "f_locals" is the dictionary used to look up local\n      variables; "f_globals" is used for global variables;\n      "f_builtins" is used for built-in (intrinsic) names;\n      "f_restricted" is a flag indicating whether the function is\n      executing in restricted execution mode; "f_lasti" gives the\n      precise instruction (this is an index into the bytecode string\n      of the code object).\n\n      Special writable attributes: "f_trace", if not "None", is a\n      function called at the start of each source code line (this is\n      used by the debugger); "f_exc_type", "f_exc_value",\n      "f_exc_traceback" represent the last exception raised in the\n      parent frame provided another exception was ever raised in the\n      current frame (in all other cases they are None); "f_lineno" is\n      the current line number of the frame --- writing to this from\n      within a trace function jumps to the given line (only for the\n      bottom-most frame).  A debugger can implement a Jump command\n      (aka Set Next Statement) by writing to f_lineno.\n\n   Traceback objects\n      Traceback objects represent a stack trace of an exception.  A\n      traceback object is created when an exception occurs.  When the\n      search for an exception handler unwinds the execution stack, at\n      each unwound level a traceback object is inserted in front of\n      the current traceback.  When an exception handler is entered,\n      the stack trace is made available to the program. (See section\n      The try statement.) It is accessible as "sys.exc_traceback", and\n      also as the third item of the tuple returned by\n      "sys.exc_info()".  The latter is the preferred interface, since\n      it works correctly when the program is using multiple threads.\n      When the program contains no suitable handler, the stack trace\n      is written (nicely formatted) to the standard error stream; if\n      the interpreter is interactive, it is also made available to the\n      user as "sys.last_traceback".\n\n      Special read-only attributes: "tb_next" is the next level in the\n      stack trace (towards the frame where the exception occurred), or\n      "None" if there is no next level; "tb_frame" points to the\n      execution frame of the current level; "tb_lineno" gives the line\n      number where the exception occurred; "tb_lasti" indicates the\n      precise instruction.  The line number and last instruction in\n      the traceback may differ from the line number of its frame\n      object if the exception occurred in a "try" statement with no\n      matching except clause or with a finally clause.\n\n   Slice objects\n      Slice objects are used to represent slices when *extended slice\n      syntax* is used. This is a slice using two colons, or multiple\n      slices or ellipses separated by commas, e.g., "a[i:j:step]",\n      "a[i:j, k:l]", or "a[..., i:j]".  They are also created by the\n      built-in "slice()" function.\n\n      Special read-only attributes: "start" is the lower bound; "stop"\n      is the upper bound; "step" is the step value; each is "None" if\n      omitted.  These attributes can have any type.\n\n      Slice objects support one method:\n\n      slice.indices(self, length)\n\n         This method takes a single integer argument *length* and\n         computes information about the extended slice that the slice\n         object would describe if applied to a sequence of *length*\n         items.  It returns a tuple of three integers; respectively\n         these are the *start* and *stop* indices and the *step* or\n         stride length of the slice. Missing or out-of-bounds indices\n         are handled in a manner consistent with regular slices.\n\n         New in version 2.3.\n\n   Static method objects\n      Static method objects provide a way of defeating the\n      transformation of function objects to method objects described\n      above. A static method object is a wrapper around any other\n      object, usually a user-defined method object. When a static\n      method object is retrieved from a class or a class instance, the\n      object actually returned is the wrapped object, which is not\n      subject to any further transformation. Static method objects are\n      not themselves callable, although the objects they wrap usually\n      are. Static method objects are created by the built-in\n      "staticmethod()" constructor.\n\n   Class method objects\n      A class method object, like a static method object, is a wrapper\n      around another object that alters the way in which that object\n      is retrieved from classes and class instances. The behaviour of\n      class method objects upon such retrieval is described above,\n      under "User-defined methods". Class method objects are created\n      by the built-in "classmethod()" constructor.\n',
- 'typesfunctions': u'\nFunctions\n*********\n\nFunction objects are created by function definitions.  The only\noperation on a function object is to call it: "func(argument-list)".\n\nThere are really two flavors of function objects: built-in functions\nand user-defined functions.  Both support the same operation (to call\nthe function), but the implementation is different, hence the\ndifferent object types.\n\nSee Function definitions for more information.\n',
- 'typesmapping': u'\nMapping Types --- "dict"\n************************\n\nA *mapping* object maps *hashable* values to arbitrary objects.\nMappings are mutable objects.  There is currently only one standard\nmapping type, the *dictionary*.  (For other containers see the built\nin "list", "set", and "tuple" classes, and the "collections" module.)\n\nA dictionary\'s keys are *almost* arbitrary values.  Values that are\nnot *hashable*, that is, values containing lists, dictionaries or\nother mutable types (that are compared by value rather than by object\nidentity) may not be used as keys.  Numeric types used for keys obey\nthe normal rules for numeric comparison: if two numbers compare equal\n(such as "1" and "1.0") then they can be used interchangeably to index\nthe same dictionary entry.  (Note however, that since computers store\nfloating-point numbers as approximations it is usually unwise to use\nthem as dictionary keys.)\n\nDictionaries can be created by placing a comma-separated list of "key:\nvalue" pairs within braces, for example: "{\'jack\': 4098, \'sjoerd\':\n4127}" or "{4098: \'jack\', 4127: \'sjoerd\'}", or by the "dict"\nconstructor.\n\nclass class dict(**kwarg)\nclass class dict(mapping, **kwarg)\nclass class dict(iterable, **kwarg)\n\n   Return a new dictionary initialized from an optional positional\n   argument and a possibly empty set of keyword arguments.\n\n   If no positional argument is given, an empty dictionary is created.\n   If a positional argument is given and it is a mapping object, a\n   dictionary is created with the same key-value pairs as the mapping\n   object.  Otherwise, the positional argument must be an *iterable*\n   object.  Each item in the iterable must itself be an iterable with\n   exactly two objects.  The first object of each item becomes a key\n   in the new dictionary, and the second object the corresponding\n   value.  If a key occurs more than once, the last value for that key\n   becomes the corresponding value in the new dictionary.\n\n   If keyword arguments are given, the keyword arguments and their\n   values are added to the dictionary created from the positional\n   argument.  If a key being added is already present, the value from\n   the keyword argument replaces the value from the positional\n   argument.\n\n   To illustrate, the following examples all return a dictionary equal\n   to "{"one": 1, "two": 2, "three": 3}":\n\n      >>> a = dict(one=1, two=2, three=3)\n      >>> b = {\'one\': 1, \'two\': 2, \'three\': 3}\n      >>> c = dict(zip([\'one\', \'two\', \'three\'], [1, 2, 3]))\n      >>> d = dict([(\'two\', 2), (\'one\', 1), (\'three\', 3)])\n      >>> e = dict({\'three\': 3, \'one\': 1, \'two\': 2})\n      >>> a == b == c == d == e\n      True\n\n   Providing keyword arguments as in the first example only works for\n   keys that are valid Python identifiers.  Otherwise, any valid keys\n   can be used.\n\n   New in version 2.2.\n\n   Changed in version 2.3: Support for building a dictionary from\n   keyword arguments added.\n\n   These are the operations that dictionaries support (and therefore,\n   custom mapping types should support too):\n\n   len(d)\n\n      Return the number of items in the dictionary *d*.\n\n   d[key]\n\n      Return the item of *d* with key *key*.  Raises a "KeyError" if\n      *key* is not in the map.\n\n      If a subclass of dict defines a method "__missing__()" and *key*\n      is not present, the "d[key]" operation calls that method with\n      the key *key* as argument.  The "d[key]" operation then returns\n      or raises whatever is returned or raised by the\n      "__missing__(key)" call. No other operations or methods invoke\n      "__missing__()". If "__missing__()" is not defined, "KeyError"\n      is raised. "__missing__()" must be a method; it cannot be an\n      instance variable:\n\n         >>> class Counter(dict):\n         ...     def __missing__(self, key):\n         ...         return 0\n         >>> c = Counter()\n         >>> c[\'red\']\n         0\n         >>> c[\'red\'] += 1\n         >>> c[\'red\']\n         1\n\n      The example above shows part of the implementation of\n      "collections.Counter".  A different "__missing__" method is used\n      by "collections.defaultdict".\n\n      New in version 2.5: Recognition of __missing__ methods of dict\n      subclasses.\n\n   d[key] = value\n\n      Set "d[key]" to *value*.\n\n   del d[key]\n\n      Remove "d[key]" from *d*.  Raises a "KeyError" if *key* is not\n      in the map.\n\n   key in d\n\n      Return "True" if *d* has a key *key*, else "False".\n\n      New in version 2.2.\n\n   key not in d\n\n      Equivalent to "not key in d".\n\n      New in version 2.2.\n\n   iter(d)\n\n      Return an iterator over the keys of the dictionary.  This is a\n      shortcut for "iterkeys()".\n\n   clear()\n\n      Remove all items from the dictionary.\n\n   copy()\n\n      Return a shallow copy of the dictionary.\n\n   fromkeys(seq[, value])\n\n      Create a new dictionary with keys from *seq* and values set to\n      *value*.\n\n      "fromkeys()" is a class method that returns a new dictionary.\n      *value* defaults to "None".\n\n      New in version 2.3.\n\n   get(key[, default])\n\n      Return the value for *key* if *key* is in the dictionary, else\n      *default*. If *default* is not given, it defaults to "None", so\n      that this method never raises a "KeyError".\n\n   has_key(key)\n\n      Test for the presence of *key* in the dictionary.  "has_key()"\n      is deprecated in favor of "key in d".\n\n   items()\n\n      Return a copy of the dictionary\'s list of "(key, value)" pairs.\n\n      **CPython implementation detail:** Keys and values are listed in\n      an arbitrary order which is non-random, varies across Python\n      implementations, and depends on the dictionary\'s history of\n      insertions and deletions.\n\n      If "items()", "keys()", "values()", "iteritems()", "iterkeys()",\n      and "itervalues()" are called with no intervening modifications\n      to the dictionary, the lists will directly correspond.  This\n      allows the creation of "(value, key)" pairs using "zip()":\n      "pairs = zip(d.values(), d.keys())".  The same relationship\n      holds for the "iterkeys()" and "itervalues()" methods: "pairs =\n      zip(d.itervalues(), d.iterkeys())" provides the same value for\n      "pairs". Another way to create the same list is "pairs = [(v, k)\n      for (k, v) in d.iteritems()]".\n\n   iteritems()\n\n      Return an iterator over the dictionary\'s "(key, value)" pairs.\n      See the note for "dict.items()".\n\n      Using "iteritems()" while adding or deleting entries in the\n      dictionary may raise a "RuntimeError" or fail to iterate over\n      all entries.\n\n      New in version 2.2.\n\n   iterkeys()\n\n      Return an iterator over the dictionary\'s keys.  See the note for\n      "dict.items()".\n\n      Using "iterkeys()" while adding or deleting entries in the\n      dictionary may raise a "RuntimeError" or fail to iterate over\n      all entries.\n\n      New in version 2.2.\n\n   itervalues()\n\n      Return an iterator over the dictionary\'s values.  See the note\n      for "dict.items()".\n\n      Using "itervalues()" while adding or deleting entries in the\n      dictionary may raise a "RuntimeError" or fail to iterate over\n      all entries.\n\n      New in version 2.2.\n\n   keys()\n\n      Return a copy of the dictionary\'s list of keys.  See the note\n      for "dict.items()".\n\n   pop(key[, default])\n\n      If *key* is in the dictionary, remove it and return its value,\n      else return *default*.  If *default* is not given and *key* is\n      not in the dictionary, a "KeyError" is raised.\n\n      New in version 2.3.\n\n   popitem()\n\n      Remove and return an arbitrary "(key, value)" pair from the\n      dictionary.\n\n      "popitem()" is useful to destructively iterate over a\n      dictionary, as often used in set algorithms.  If the dictionary\n      is empty, calling "popitem()" raises a "KeyError".\n\n   setdefault(key[, default])\n\n      If *key* is in the dictionary, return its value.  If not, insert\n      *key* with a value of *default* and return *default*.  *default*\n      defaults to "None".\n\n   update([other])\n\n      Update the dictionary with the key/value pairs from *other*,\n      overwriting existing keys.  Return "None".\n\n      "update()" accepts either another dictionary object or an\n      iterable of key/value pairs (as tuples or other iterables of\n      length two).  If keyword arguments are specified, the dictionary\n      is then updated with those key/value pairs: "d.update(red=1,\n      blue=2)".\n\n      Changed in version 2.4: Allowed the argument to be an iterable\n      of key/value pairs and allowed keyword arguments.\n\n   values()\n\n      Return a copy of the dictionary\'s list of values.  See the note\n      for "dict.items()".\n\n   viewitems()\n\n      Return a new view of the dictionary\'s items ("(key, value)"\n      pairs).  See below for documentation of view objects.\n\n      New in version 2.7.\n\n   viewkeys()\n\n      Return a new view of the dictionary\'s keys.  See below for\n      documentation of view objects.\n\n      New in version 2.7.\n\n   viewvalues()\n\n      Return a new view of the dictionary\'s values.  See below for\n      documentation of view objects.\n\n      New in version 2.7.\n\n\nDictionary view objects\n=======================\n\nThe objects returned by "dict.viewkeys()", "dict.viewvalues()" and\n"dict.viewitems()" are *view objects*.  They provide a dynamic view on\nthe dictionary\'s entries, which means that when the dictionary\nchanges, the view reflects these changes.\n\nDictionary views can be iterated over to yield their respective data,\nand support membership tests:\n\nlen(dictview)\n\n   Return the number of entries in the dictionary.\n\niter(dictview)\n\n   Return an iterator over the keys, values or items (represented as\n   tuples of "(key, value)") in the dictionary.\n\n   Keys and values are iterated over in an arbitrary order which is\n   non-random, varies across Python implementations, and depends on\n   the dictionary\'s history of insertions and deletions. If keys,\n   values and items views are iterated over with no intervening\n   modifications to the dictionary, the order of items will directly\n   correspond.  This allows the creation of "(value, key)" pairs using\n   "zip()": "pairs = zip(d.values(), d.keys())".  Another way to\n   create the same list is "pairs = [(v, k) for (k, v) in d.items()]".\n\n   Iterating views while adding or deleting entries in the dictionary\n   may raise a "RuntimeError" or fail to iterate over all entries.\n\nx in dictview\n\n   Return "True" if *x* is in the underlying dictionary\'s keys, values\n   or items (in the latter case, *x* should be a "(key, value)"\n   tuple).\n\nKeys views are set-like since their entries are unique and hashable.\nIf all values are hashable, so that (key, value) pairs are unique and\nhashable, then the items view is also set-like.  (Values views are not\ntreated as set-like since the entries are generally not unique.)  Then\nthese set operations are available ("other" refers either to another\nview or a set):\n\ndictview & other\n\n   Return the intersection of the dictview and the other object as a\n   new set.\n\ndictview | other\n\n   Return the union of the dictview and the other object as a new set.\n\ndictview - other\n\n   Return the difference between the dictview and the other object\n   (all elements in *dictview* that aren\'t in *other*) as a new set.\n\ndictview ^ other\n\n   Return the symmetric difference (all elements either in *dictview*\n   or *other*, but not in both) of the dictview and the other object\n   as a new set.\n\nAn example of dictionary view usage:\n\n   >>> dishes = {\'eggs\': 2, \'sausage\': 1, \'bacon\': 1, \'spam\': 500}\n   >>> keys = dishes.viewkeys()\n   >>> values = dishes.viewvalues()\n\n   >>> # iteration\n   >>> n = 0\n   >>> for val in values:\n   ...     n += val\n   >>> print(n)\n   504\n\n   >>> # keys and values are iterated over in the same order\n   >>> list(keys)\n   [\'eggs\', \'bacon\', \'sausage\', \'spam\']\n   >>> list(values)\n   [2, 1, 1, 500]\n\n   >>> # view objects are dynamic and reflect dict changes\n   >>> del dishes[\'eggs\']\n   >>> del dishes[\'sausage\']\n   >>> list(keys)\n   [\'spam\', \'bacon\']\n\n   >>> # set operations\n   >>> keys & {\'eggs\', \'bacon\', \'salad\'}\n   {\'bacon\'}\n',
- 'typesmethods': u'\nMethods\n*******\n\nMethods are functions that are called using the attribute notation.\nThere are two flavors: built-in methods (such as "append()" on lists)\nand class instance methods.  Built-in methods are described with the\ntypes that support them.\n\nThe implementation adds two special read-only attributes to class\ninstance methods: "m.im_self" is the object on which the method\noperates, and "m.im_func" is the function implementing the method.\nCalling "m(arg-1, arg-2, ..., arg-n)" is completely equivalent to\ncalling "m.im_func(m.im_self, arg-1, arg-2, ..., arg-n)".\n\nClass instance methods are either *bound* or *unbound*, referring to\nwhether the method was accessed through an instance or a class,\nrespectively.  When a method is unbound, its "im_self" attribute will\nbe "None" and if called, an explicit "self" object must be passed as\nthe first argument.  In this case, "self" must be an instance of the\nunbound method\'s class (or a subclass of that class), otherwise a\n"TypeError" is raised.\n\nLike function objects, methods objects support getting arbitrary\nattributes. However, since method attributes are actually stored on\nthe underlying function object ("meth.im_func"), setting method\nattributes on either bound or unbound methods is disallowed.\nAttempting to set an attribute on a method results in an\n"AttributeError" being raised.  In order to set a method attribute,\nyou need to explicitly set it on the underlying function object:\n\n   >>> class C:\n   ...     def method(self):\n   ...         pass\n   ...\n   >>> c = C()\n   >>> c.method.whoami = \'my name is method\'  # can\'t set on the method\n   Traceback (most recent call last):\n     File "<stdin>", line 1, in <module>\n   AttributeError: \'instancemethod\' object has no attribute \'whoami\'\n   >>> c.method.im_func.whoami = \'my name is method\'\n   >>> c.method.whoami\n   \'my name is method\'\n\nSee The standard type hierarchy for more information.\n',
- 'typesmodules': u'\nModules\n*******\n\nThe only special operation on a module is attribute access: "m.name",\nwhere *m* is a module and *name* accesses a name defined in *m*\'s\nsymbol table. Module attributes can be assigned to.  (Note that the\n"import" statement is not, strictly speaking, an operation on a module\nobject; "import foo" does not require a module object named *foo* to\nexist, rather it requires an (external) *definition* for a module\nnamed *foo* somewhere.)\n\nA special attribute of every module is "__dict__". This is the\ndictionary containing the module\'s symbol table. Modifying this\ndictionary will actually change the module\'s symbol table, but direct\nassignment to the "__dict__" attribute is not possible (you can write\n"m.__dict__[\'a\'] = 1", which defines "m.a" to be "1", but you can\'t\nwrite "m.__dict__ = {}").  Modifying "__dict__" directly is not\nrecommended.\n\nModules built into the interpreter are written like this: "<module\n\'sys\' (built-in)>".  If loaded from a file, they are written as\n"<module \'os\' from \'/usr/local/lib/pythonX.Y/os.pyc\'>".\n',
- 'typesseq': u'\nSequence Types --- "str", "unicode", "list", "tuple", "bytearray", "buffer", "xrange"\n*************************************************************************************\n\nThere are seven sequence types: strings, Unicode strings, lists,\ntuples, bytearrays, buffers, and xrange objects.\n\nFor other containers see the built in "dict" and "set" classes, and\nthe "collections" module.\n\nString literals are written in single or double quotes: "\'xyzzy\'",\n""frobozz"".  See String literals for more about string literals.\nUnicode strings are much like strings, but are specified in the syntax\nusing a preceding "\'u\'" character: "u\'abc\'", "u"def"". In addition to\nthe functionality described here, there are also string-specific\nmethods described in the String Methods section. Lists are constructed\nwith square brackets, separating items with commas: "[a, b, c]".\nTuples are constructed by the comma operator (not within square\nbrackets), with or without enclosing parentheses, but an empty tuple\nmust have the enclosing parentheses, such as "a, b, c" or "()".  A\nsingle item tuple must have a trailing comma, such as "(d,)".\n\nBytearray objects are created with the built-in function\n"bytearray()".\n\nBuffer objects are not directly supported by Python syntax, but can be\ncreated by calling the built-in function "buffer()".  They don\'t\nsupport concatenation or repetition.\n\nObjects of type xrange are similar to buffers in that there is no\nspecific syntax to create them, but they are created using the\n"xrange()" function.  They don\'t support slicing, concatenation or\nrepetition, and using "in", "not in", "min()" or "max()" on them is\ninefficient.\n\nMost sequence types support the following operations.  The "in" and\n"not in" operations have the same priorities as the comparison\noperations.  The "+" and "*" operations have the same priority as the\ncorresponding numeric operations. [3] Additional methods are provided\nfor Mutable Sequence Types.\n\nThis table lists the sequence operations sorted in ascending priority.\nIn the table, *s* and *t* are sequences of the same type; *n*, *i* and\n*j* are integers:\n\n+--------------------+----------------------------------+------------+\n| Operation          | Result                           | Notes      |\n+====================+==================================+============+\n| "x in s"           | "True" if an item of *s* is      | (1)        |\n|                    | equal to *x*, else "False"       |            |\n+--------------------+----------------------------------+------------+\n| "x not in s"       | "False" if an item of *s* is     | (1)        |\n|                    | equal to *x*, else "True"        |            |\n+--------------------+----------------------------------+------------+\n| "s + t"            | the concatenation of *s* and *t* | (6)        |\n+--------------------+----------------------------------+------------+\n| "s * n, n * s"     | *n* shallow copies of *s*        | (2)        |\n|                    | concatenated                     |            |\n+--------------------+----------------------------------+------------+\n| "s[i]"             | *i*th item of *s*, origin 0      | (3)        |\n+--------------------+----------------------------------+------------+\n| "s[i:j]"           | slice of *s* from *i* to *j*     | (3)(4)     |\n+--------------------+----------------------------------+------------+\n| "s[i:j:k]"         | slice of *s* from *i* to *j*     | (3)(5)     |\n|                    | with step *k*                    |            |\n+--------------------+----------------------------------+------------+\n| "len(s)"           | length of *s*                    |            |\n+--------------------+----------------------------------+------------+\n| "min(s)"           | smallest item of *s*             |            |\n+--------------------+----------------------------------+------------+\n| "max(s)"           | largest item of *s*              |            |\n+--------------------+----------------------------------+------------+\n| "s.index(x)"       | index of the first occurrence of |            |\n|                    | *x* in *s*                       |            |\n+--------------------+----------------------------------+------------+\n| "s.count(x)"       | total number of occurrences of   |            |\n|                    | *x* in *s*                       |            |\n+--------------------+----------------------------------+------------+\n\nSequence types also support comparisons. In particular, tuples and\nlists are compared lexicographically by comparing corresponding\nelements. This means that to compare equal, every element must compare\nequal and the two sequences must be of the same type and have the same\nlength. (For full details see Comparisons in the language reference.)\n\nNotes:\n\n1. When *s* is a string or Unicode string object the "in" and "not\n   in" operations act like a substring test.  In Python versions\n   before 2.3, *x* had to be a string of length 1. In Python 2.3 and\n   beyond, *x* may be a string of any length.\n\n2. Values of *n* less than "0" are treated as "0" (which yields an\n   empty sequence of the same type as *s*).  Note also that the copies\n   are shallow; nested structures are not copied.  This often haunts\n   new Python programmers; consider:\n\n   >>> lists = [[]] * 3\n   >>> lists\n   [[], [], []]\n   >>> lists[0].append(3)\n   >>> lists\n   [[3], [3], [3]]\n\n   What has happened is that "[[]]" is a one-element list containing\n   an empty list, so all three elements of "[[]] * 3" are (pointers\n   to) this single empty list.  Modifying any of the elements of\n   "lists" modifies this single list. You can create a list of\n   different lists this way:\n\n   >>> lists = [[] for i in range(3)]\n   >>> lists[0].append(3)\n   >>> lists[1].append(5)\n   >>> lists[2].append(7)\n   >>> lists\n   [[3], [5], [7]]\n\n3. If *i* or *j* is negative, the index is relative to the end of\n   the string: "len(s) + i" or "len(s) + j" is substituted.  But note\n   that "-0" is still "0".\n\n4. The slice of *s* from *i* to *j* is defined as the sequence of\n   items with index *k* such that "i <= k < j".  If *i* or *j* is\n   greater than "len(s)", use "len(s)".  If *i* is omitted or "None",\n   use "0".  If *j* is omitted or "None", use "len(s)".  If *i* is\n   greater than or equal to *j*, the slice is empty.\n\n5. The slice of *s* from *i* to *j* with step *k* is defined as the\n   sequence of items with index  "x = i + n*k" such that "0 <= n <\n   (j-i)/k".  In other words, the indices are "i", "i+k", "i+2*k",\n   "i+3*k" and so on, stopping when *j* is reached (but never\n   including *j*).  If *i* or *j* is greater than "len(s)", use\n   "len(s)".  If *i* or *j* are omitted or "None", they become "end"\n   values (which end depends on the sign of *k*).  Note, *k* cannot be\n   zero. If *k* is "None", it is treated like "1".\n\n6. **CPython implementation detail:** If *s* and *t* are both\n   strings, some Python implementations such as CPython can usually\n   perform an in-place optimization for assignments of the form "s = s\n   + t" or "s += t".  When applicable, this optimization makes\n   quadratic run-time much less likely.  This optimization is both\n   version and implementation dependent.  For performance sensitive\n   code, it is preferable to use the "str.join()" method which assures\n   consistent linear concatenation performance across versions and\n   implementations.\n\n   Changed in version 2.4: Formerly, string concatenation never\n   occurred in-place.\n\n\nString Methods\n==============\n\nBelow are listed the string methods which both 8-bit strings and\nUnicode objects support.  Some of them are also available on\n"bytearray" objects.\n\nIn addition, Python\'s strings support the sequence type methods\ndescribed in the Sequence Types --- str, unicode, list, tuple,\nbytearray, buffer, xrange section. To output formatted strings use\ntemplate strings or the "%" operator described in the String\nFormatting Operations section. Also, see the "re" module for string\nfunctions based on regular expressions.\n\nstr.capitalize()\n\n   Return a copy of the string with its first character capitalized\n   and the rest lowercased.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.center(width[, fillchar])\n\n   Return centered in a string of length *width*. Padding is done\n   using the specified *fillchar* (default is a space).\n\n   Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.count(sub[, start[, end]])\n\n   Return the number of non-overlapping occurrences of substring *sub*\n   in the range [*start*, *end*].  Optional arguments *start* and\n   *end* are interpreted as in slice notation.\n\nstr.decode([encoding[, errors]])\n\n   Decodes the string using the codec registered for *encoding*.\n   *encoding* defaults to the default string encoding.  *errors* may\n   be given to set a different error handling scheme.  The default is\n   "\'strict\'", meaning that encoding errors raise "UnicodeError".\n   Other possible values are "\'ignore\'", "\'replace\'" and any other\n   name registered via "codecs.register_error()", see section Codec\n   Base Classes.\n\n   New in version 2.2.\n\n   Changed in version 2.3: Support for other error handling schemes\n   added.\n\n   Changed in version 2.7: Support for keyword arguments added.\n\nstr.encode([encoding[, errors]])\n\n   Return an encoded version of the string.  Default encoding is the\n   current default string encoding.  *errors* may be given to set a\n   different error handling scheme.  The default for *errors* is\n   "\'strict\'", meaning that encoding errors raise a "UnicodeError".\n   Other possible values are "\'ignore\'", "\'replace\'",\n   "\'xmlcharrefreplace\'", "\'backslashreplace\'" and any other name\n   registered via "codecs.register_error()", see section Codec Base\n   Classes. For a list of possible encodings, see section Standard\n   Encodings.\n\n   New in version 2.0.\n\n   Changed in version 2.3: Support for "\'xmlcharrefreplace\'" and\n   "\'backslashreplace\'" and other error handling schemes added.\n\n   Changed in version 2.7: Support for keyword arguments added.\n\nstr.endswith(suffix[, start[, end]])\n\n   Return "True" if the string ends with the specified *suffix*,\n   otherwise return "False".  *suffix* can also be a tuple of suffixes\n   to look for.  With optional *start*, test beginning at that\n   position.  With optional *end*, stop comparing at that position.\n\n   Changed in version 2.5: Accept tuples as *suffix*.\n\nstr.expandtabs([tabsize])\n\n   Return a copy of the string where all tab characters are replaced\n   by one or more spaces, depending on the current column and the\n   given tab size.  Tab positions occur every *tabsize* characters\n   (default is 8, giving tab positions at columns 0, 8, 16 and so on).\n   To expand the string, the current column is set to zero and the\n   string is examined character by character.  If the character is a\n   tab ("\\t"), one or more space characters are inserted in the result\n   until the current column is equal to the next tab position. (The\n   tab character itself is not copied.)  If the character is a newline\n   ("\\n") or return ("\\r"), it is copied and the current column is\n   reset to zero.  Any other character is copied unchanged and the\n   current column is incremented by one regardless of how the\n   character is represented when printed.\n\n   >>> \'01\\t012\\t0123\\t01234\'.expandtabs()\n   \'01      012     0123    01234\'\n   >>> \'01\\t012\\t0123\\t01234\'.expandtabs(4)\n   \'01  012 0123    01234\'\n\nstr.find(sub[, start[, end]])\n\n   Return the lowest index in the string where substring *sub* is\n   found, such that *sub* is contained in the slice "s[start:end]".\n   Optional arguments *start* and *end* are interpreted as in slice\n   notation.  Return "-1" if *sub* is not found.\n\n   Note: The "find()" method should be used only if you need to know\n     the position of *sub*.  To check if *sub* is a substring or not,\n     use the "in" operator:\n\n        >>> \'Py\' in \'Python\'\n        True\n\nstr.format(*args, **kwargs)\n\n   Perform a string formatting operation.  The string on which this\n   method is called can contain literal text or replacement fields\n   delimited by braces "{}".  Each replacement field contains either\n   the numeric index of a positional argument, or the name of a\n   keyword argument.  Returns a copy of the string where each\n   replacement field is replaced with the string value of the\n   corresponding argument.\n\n   >>> "The sum of 1 + 2 is {0}".format(1+2)\n   \'The sum of 1 + 2 is 3\'\n\n   See Format String Syntax for a description of the various\n   formatting options that can be specified in format strings.\n\n   This method of string formatting is the new standard in Python 3,\n   and should be preferred to the "%" formatting described in String\n   Formatting Operations in new code.\n\n   New in version 2.6.\n\nstr.index(sub[, start[, end]])\n\n   Like "find()", but raise "ValueError" when the substring is not\n   found.\n\nstr.isalnum()\n\n   Return true if all characters in the string are alphanumeric and\n   there is at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isalpha()\n\n   Return true if all characters in the string are alphabetic and\n   there is at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isdigit()\n\n   Return true if all characters in the string are digits and there is\n   at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.islower()\n\n   Return true if all cased characters [4] in the string are lowercase\n   and there is at least one cased character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isspace()\n\n   Return true if there are only whitespace characters in the string\n   and there is at least one character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.istitle()\n\n   Return true if the string is a titlecased string and there is at\n   least one character, for example uppercase characters may only\n   follow uncased characters and lowercase characters only cased ones.\n   Return false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.isupper()\n\n   Return true if all cased characters [4] in the string are uppercase\n   and there is at least one cased character, false otherwise.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.join(iterable)\n\n   Return a string which is the concatenation of the strings in the\n   *iterable* *iterable*.  The separator between elements is the\n   string providing this method.\n\nstr.ljust(width[, fillchar])\n\n   Return the string left justified in a string of length *width*.\n   Padding is done using the specified *fillchar* (default is a\n   space).  The original string is returned if *width* is less than or\n   equal to "len(s)".\n\n   Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.lower()\n\n   Return a copy of the string with all the cased characters [4]\n   converted to lowercase.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.lstrip([chars])\n\n   Return a copy of the string with leading characters removed.  The\n   *chars* argument is a string specifying the set of characters to be\n   removed.  If omitted or "None", the *chars* argument defaults to\n   removing whitespace.  The *chars* argument is not a prefix; rather,\n   all combinations of its values are stripped:\n\n   >>> \'   spacious   \'.lstrip()\n   \'spacious   \'\n   >>> \'www.example.com\'.lstrip(\'cmowz.\')\n   \'example.com\'\n\n   Changed in version 2.2.2: Support for the *chars* argument.\n\nstr.partition(sep)\n\n   Split the string at the first occurrence of *sep*, and return a\n   3-tuple containing the part before the separator, the separator\n   itself, and the part after the separator.  If the separator is not\n   found, return a 3-tuple containing the string itself, followed by\n   two empty strings.\n\n   New in version 2.5.\n\nstr.replace(old, new[, count])\n\n   Return a copy of the string with all occurrences of substring *old*\n   replaced by *new*.  If the optional argument *count* is given, only\n   the first *count* occurrences are replaced.\n\nstr.rfind(sub[, start[, end]])\n\n   Return the highest index in the string where substring *sub* is\n   found, such that *sub* is contained within "s[start:end]".\n   Optional arguments *start* and *end* are interpreted as in slice\n   notation.  Return "-1" on failure.\n\nstr.rindex(sub[, start[, end]])\n\n   Like "rfind()" but raises "ValueError" when the substring *sub* is\n   not found.\n\nstr.rjust(width[, fillchar])\n\n   Return the string right justified in a string of length *width*.\n   Padding is done using the specified *fillchar* (default is a\n   space). The original string is returned if *width* is less than or\n   equal to "len(s)".\n\n   Changed in version 2.4: Support for the *fillchar* argument.\n\nstr.rpartition(sep)\n\n   Split the string at the last occurrence of *sep*, and return a\n   3-tuple containing the part before the separator, the separator\n   itself, and the part after the separator.  If the separator is not\n   found, return a 3-tuple containing two empty strings, followed by\n   the string itself.\n\n   New in version 2.5.\n\nstr.rsplit([sep[, maxsplit]])\n\n   Return a list of the words in the string, using *sep* as the\n   delimiter string. If *maxsplit* is given, at most *maxsplit* splits\n   are done, the *rightmost* ones.  If *sep* is not specified or\n   "None", any whitespace string is a separator.  Except for splitting\n   from the right, "rsplit()" behaves like "split()" which is\n   described in detail below.\n\n   New in version 2.4.\n\nstr.rstrip([chars])\n\n   Return a copy of the string with trailing characters removed.  The\n   *chars* argument is a string specifying the set of characters to be\n   removed.  If omitted or "None", the *chars* argument defaults to\n   removing whitespace.  The *chars* argument is not a suffix; rather,\n   all combinations of its values are stripped:\n\n   >>> \'   spacious   \'.rstrip()\n   \'   spacious\'\n   >>> \'mississippi\'.rstrip(\'ipz\')\n   \'mississ\'\n\n   Changed in version 2.2.2: Support for the *chars* argument.\n\nstr.split([sep[, maxsplit]])\n\n   Return a list of the words in the string, using *sep* as the\n   delimiter string.  If *maxsplit* is given, at most *maxsplit*\n   splits are done (thus, the list will have at most "maxsplit+1"\n   elements).  If *maxsplit* is not specified or "-1", then there is\n   no limit on the number of splits (all possible splits are made).\n\n   If *sep* is given, consecutive delimiters are not grouped together\n   and are deemed to delimit empty strings (for example,\n   "\'1,,2\'.split(\',\')" returns "[\'1\', \'\', \'2\']").  The *sep* argument\n   may consist of multiple characters (for example,\n   "\'1<>2<>3\'.split(\'<>\')" returns "[\'1\', \'2\', \'3\']"). Splitting an\n   empty string with a specified separator returns "[\'\']".\n\n   If *sep* is not specified or is "None", a different splitting\n   algorithm is applied: runs of consecutive whitespace are regarded\n   as a single separator, and the result will contain no empty strings\n   at the start or end if the string has leading or trailing\n   whitespace.  Consequently, splitting an empty string or a string\n   consisting of just whitespace with a "None" separator returns "[]".\n\n   For example, "\' 1  2   3  \'.split()" returns "[\'1\', \'2\', \'3\']", and\n   "\'  1  2   3  \'.split(None, 1)" returns "[\'1\', \'2   3  \']".\n\nstr.splitlines([keepends])\n\n   Return a list of the lines in the string, breaking at line\n   boundaries. This method uses the *universal newlines* approach to\n   splitting lines. Line breaks are not included in the resulting list\n   unless *keepends* is given and true.\n\n   For example, "\'ab c\\n\\nde fg\\rkl\\r\\n\'.splitlines()" returns "[\'ab\n   c\', \'\', \'de fg\', \'kl\']", while the same call with\n   "splitlines(True)" returns "[\'ab c\\n\', \'\\n\', \'de fg\\r\', \'kl\\r\\n\']".\n\n   Unlike "split()" when a delimiter string *sep* is given, this\n   method returns an empty list for the empty string, and a terminal\n   line break does not result in an extra line.\n\nstr.startswith(prefix[, start[, end]])\n\n   Return "True" if string starts with the *prefix*, otherwise return\n   "False". *prefix* can also be a tuple of prefixes to look for.\n   With optional *start*, test string beginning at that position.\n   With optional *end*, stop comparing string at that position.\n\n   Changed in version 2.5: Accept tuples as *prefix*.\n\nstr.strip([chars])\n\n   Return a copy of the string with the leading and trailing\n   characters removed. The *chars* argument is a string specifying the\n   set of characters to be removed. If omitted or "None", the *chars*\n   argument defaults to removing whitespace. The *chars* argument is\n   not a prefix or suffix; rather, all combinations of its values are\n   stripped:\n\n   >>> \'   spacious   \'.strip()\n   \'spacious\'\n   >>> \'www.example.com\'.strip(\'cmowz.\')\n   \'example\'\n\n   Changed in version 2.2.2: Support for the *chars* argument.\n\nstr.swapcase()\n\n   Return a copy of the string with uppercase characters converted to\n   lowercase and vice versa.\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.title()\n\n   Return a titlecased version of the string where words start with an\n   uppercase character and the remaining characters are lowercase.\n\n   The algorithm uses a simple language-independent definition of a\n   word as groups of consecutive letters.  The definition works in\n   many contexts but it means that apostrophes in contractions and\n   possessives form word boundaries, which may not be the desired\n   result:\n\n      >>> "they\'re bill\'s friends from the UK".title()\n      "They\'Re Bill\'S Friends From The Uk"\n\n   A workaround for apostrophes can be constructed using regular\n   expressions:\n\n      >>> import re\n      >>> def titlecase(s):\n      ...     return re.sub(r"[A-Za-z]+(\'[A-Za-z]+)?",\n      ...                   lambda mo: mo.group(0)[0].upper() +\n      ...                              mo.group(0)[1:].lower(),\n      ...                   s)\n      ...\n      >>> titlecase("they\'re bill\'s friends.")\n      "They\'re Bill\'s Friends."\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.translate(table[, deletechars])\n\n   Return a copy of the string where all characters occurring in the\n   optional argument *deletechars* are removed, and the remaining\n   characters have been mapped through the given translation table,\n   which must be a string of length 256.\n\n   You can use the "maketrans()" helper function in the "string"\n   module to create a translation table. For string objects, set the\n   *table* argument to "None" for translations that only delete\n   characters:\n\n   >>> \'read this short text\'.translate(None, \'aeiou\')\n   \'rd ths shrt txt\'\n\n   New in version 2.6: Support for a "None" *table* argument.\n\n   For Unicode objects, the "translate()" method does not accept the\n   optional *deletechars* argument.  Instead, it returns a copy of the\n   *s* where all characters have been mapped through the given\n   translation table which must be a mapping of Unicode ordinals to\n   Unicode ordinals, Unicode strings or "None". Unmapped characters\n   are left untouched. Characters mapped to "None" are deleted.  Note,\n   a more flexible approach is to create a custom character mapping\n   codec using the "codecs" module (see "encodings.cp1251" for an\n   example).\n\nstr.upper()\n\n   Return a copy of the string with all the cased characters [4]\n   converted to uppercase.  Note that "str.upper().isupper()" might be\n   "False" if "s" contains uncased characters or if the Unicode\n   category of the resulting character(s) is not "Lu" (Letter,\n   uppercase), but e.g. "Lt" (Letter, titlecase).\n\n   For 8-bit strings, this method is locale-dependent.\n\nstr.zfill(width)\n\n   Return the numeric string left filled with zeros in a string of\n   length *width*.  A sign prefix is handled correctly.  The original\n   string is returned if *width* is less than or equal to "len(s)".\n\n   New in version 2.2.2.\n\nThe following methods are present only on unicode objects:\n\nunicode.isnumeric()\n\n   Return "True" if there are only numeric characters in S, "False"\n   otherwise. Numeric characters include digit characters, and all\n   characters that have the Unicode numeric value property, e.g.\n   U+2155, VULGAR FRACTION ONE FIFTH.\n\nunicode.isdecimal()\n\n   Return "True" if there are only decimal characters in S, "False"\n   otherwise. Decimal characters include digit characters, and all\n   characters that can be used to form decimal-radix numbers, e.g.\n   U+0660, ARABIC-INDIC DIGIT ZERO.\n\n\nString Formatting Operations\n============================\n\nString and Unicode objects have one unique built-in operation: the "%"\noperator (modulo).  This is also known as the string *formatting* or\n*interpolation* operator.  Given "format % values" (where *format* is\na string or Unicode object), "%" conversion specifications in *format*\nare replaced with zero or more elements of *values*.  The effect is\nsimilar to the using "sprintf()" in the C language.  If *format* is a\nUnicode object, or if any of the objects being converted using the\n"%s" conversion are Unicode objects, the result will also be a Unicode\nobject.\n\nIf *format* requires a single argument, *values* may be a single non-\ntuple object. [5]  Otherwise, *values* must be a tuple with exactly\nthe number of items specified by the format string, or a single\nmapping object (for example, a dictionary).\n\nA conversion specifier contains two or more characters and has the\nfollowing components, which must occur in this order:\n\n1. The "\'%\'" character, which marks the start of the specifier.\n\n2. Mapping key (optional), consisting of a parenthesised sequence\n   of characters (for example, "(somename)").\n\n3. Conversion flags (optional), which affect the result of some\n   conversion types.\n\n4. Minimum field width (optional).  If specified as an "\'*\'"\n   (asterisk), the actual width is read from the next element of the\n   tuple in *values*, and the object to convert comes after the\n   minimum field width and optional precision.\n\n5. Precision (optional), given as a "\'.\'" (dot) followed by the\n   precision.  If specified as "\'*\'" (an asterisk), the actual width\n   is read from the next element of the tuple in *values*, and the\n   value to convert comes after the precision.\n\n6. Length modifier (optional).\n\n7. Conversion type.\n\nWhen the right argument is a dictionary (or other mapping type), then\nthe formats in the string *must* include a parenthesised mapping key\ninto that dictionary inserted immediately after the "\'%\'" character.\nThe mapping key selects the value to be formatted from the mapping.\nFor example:\n\n>>> print \'%(language)s has %(number)03d quote types.\' % \\\n...       {"language": "Python", "number": 2}\nPython has 002 quote types.\n\nIn this case no "*" specifiers may occur in a format (since they\nrequire a sequential parameter list).\n\nThe conversion flag characters are:\n\n+-----------+-----------------------------------------------------------------------+\n| Flag      | Meaning                                                               |\n+===========+=======================================================================+\n| "\'#\'"     | The value conversion will use the "alternate form" (where defined     |\n|           | below).                                                               |\n+-----------+-----------------------------------------------------------------------+\n| "\'0\'"     | The conversion will be zero padded for numeric values.                |\n+-----------+-----------------------------------------------------------------------+\n| "\'-\'"     | The converted value is left adjusted (overrides the "\'0\'" conversion  |\n|           | if both are given).                                                   |\n+-----------+-----------------------------------------------------------------------+\n| "\' \'"     | (a space) A blank should be left before a positive number (or empty   |\n|           | string) produced by a signed conversion.                              |\n+-----------+-----------------------------------------------------------------------+\n| "\'+\'"     | A sign character ("\'+\'" or "\'-\'") will precede the conversion         |\n|           | (overrides a "space" flag).                                           |\n+-----------+-----------------------------------------------------------------------+\n\nA length modifier ("h", "l", or "L") may be present, but is ignored as\nit is not necessary for Python -- so e.g. "%ld" is identical to "%d".\n\nThe conversion types are:\n\n+--------------+-------------------------------------------------------+---------+\n| Conversion   | Meaning                                               | Notes   |\n+==============+=======================================================+=========+\n| "\'d\'"        | Signed integer decimal.                               |         |\n+--------------+-------------------------------------------------------+---------+\n| "\'i\'"        | Signed integer decimal.                               |         |\n+--------------+-------------------------------------------------------+---------+\n| "\'o\'"        | Signed octal value.                                   | (1)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'u\'"        | Obsolete type -- it is identical to "\'d\'".            | (7)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'x\'"        | Signed hexadecimal (lowercase).                       | (2)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'X\'"        | Signed hexadecimal (uppercase).                       | (2)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'e\'"        | Floating point exponential format (lowercase).        | (3)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'E\'"        | Floating point exponential format (uppercase).        | (3)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'f\'"        | Floating point decimal format.                        | (3)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'F\'"        | Floating point decimal format.                        | (3)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'g\'"        | Floating point format. Uses lowercase exponential     | (4)     |\n|              | format if exponent is less than -4 or not less than   |         |\n|              | precision, decimal format otherwise.                  |         |\n+--------------+-------------------------------------------------------+---------+\n| "\'G\'"        | Floating point format. Uses uppercase exponential     | (4)     |\n|              | format if exponent is less than -4 or not less than   |         |\n|              | precision, decimal format otherwise.                  |         |\n+--------------+-------------------------------------------------------+---------+\n| "\'c\'"        | Single character (accepts integer or single character |         |\n|              | string).                                              |         |\n+--------------+-------------------------------------------------------+---------+\n| "\'r\'"        | String (converts any Python object using repr()).     | (5)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'s\'"        | String (converts any Python object using "str()").    | (6)     |\n+--------------+-------------------------------------------------------+---------+\n| "\'%\'"        | No argument is converted, results in a "\'%\'"          |         |\n|              | character in the result.                              |         |\n+--------------+-------------------------------------------------------+---------+\n\nNotes:\n\n1. The alternate form causes a leading zero ("\'0\'") to be inserted\n   between left-hand padding and the formatting of the number if the\n   leading character of the result is not already a zero.\n\n2. The alternate form causes a leading "\'0x\'" or "\'0X\'" (depending\n   on whether the "\'x\'" or "\'X\'" format was used) to be inserted\n   between left-hand padding and the formatting of the number if the\n   leading character of the result is not already a zero.\n\n3. The alternate form causes the result to always contain a decimal\n   point, even if no digits follow it.\n\n   The precision determines the number of digits after the decimal\n   point and defaults to 6.\n\n4. The alternate form causes the result to always contain a decimal\n   point, and trailing zeroes are not removed as they would otherwise\n   be.\n\n   The precision determines the number of significant digits before\n   and after the decimal point and defaults to 6.\n\n5. The "%r" conversion was added in Python 2.0.\n\n   The precision determines the maximal number of characters used.\n\n6. If the object or format provided is a "unicode" string, the\n   resulting string will also be "unicode".\n\n   The precision determines the maximal number of characters used.\n\n7. See **PEP 237**.\n\nSince Python strings have an explicit length, "%s" conversions do not\nassume that "\'\\0\'" is the end of the string.\n\nChanged in version 2.7: "%f" conversions for numbers whose absolute\nvalue is over 1e50 are no longer replaced by "%g" conversions.\n\nAdditional string operations are defined in standard modules "string"\nand "re".\n\n\nXRange Type\n===========\n\nThe "xrange" type is an immutable sequence which is commonly used for\nlooping.  The advantage of the "xrange" type is that an "xrange"\nobject will always take the same amount of memory, no matter the size\nof the range it represents.  There are no consistent performance\nadvantages.\n\nXRange objects have very little behavior: they only support indexing,\niteration, and the "len()" function.\n\n\nMutable Sequence Types\n======================\n\nList and "bytearray" objects support additional operations that allow\nin-place modification of the object. Other mutable sequence types\n(when added to the language) should also support these operations.\nStrings and tuples are immutable sequence types: such objects cannot\nbe modified once created. The following operations are defined on\nmutable sequence types (where *x* is an arbitrary object):\n\n+--------------------------------+----------------------------------+-----------------------+\n| Operation                      | Result                           | Notes                 |\n+================================+==================================+=======================+\n| "s[i] = x"                     | item *i* of *s* is replaced by   |                       |\n|                                | *x*                              |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s[i:j] = t"                   | slice of *s* from *i* to *j* is  |                       |\n|                                | replaced by the contents of the  |                       |\n|                                | iterable *t*                     |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "del s[i:j]"                   | same as "s[i:j] = []"            |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s[i:j:k] = t"                 | the elements of "s[i:j:k]" are   | (1)                   |\n|                                | replaced by those of *t*         |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "del s[i:j:k]"                 | removes the elements of          |                       |\n|                                | "s[i:j:k]" from the list         |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.append(x)"                  | same as "s[len(s):len(s)] = [x]" | (2)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.extend(x)"                  | same as "s[len(s):len(s)] = x"   | (3)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.count(x)"                   | return number of *i*\'s for which |                       |\n|                                | "s[i] == x"                      |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.index(x[, i[, j]])"         | return smallest *k* such that    | (4)                   |\n|                                | "s[k] == x" and "i <= k < j"     |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.insert(i, x)"               | same as "s[i:i] = [x]"           | (5)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.pop([i])"                   | same as "x = s[i]; del s[i];     | (6)                   |\n|                                | return x"                        |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.remove(x)"                  | same as "del s[s.index(x)]"      | (4)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.reverse()"                  | reverses the items of *s* in     | (7)                   |\n|                                | place                            |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.sort([cmp[, key[,           | sort the items of *s* in place   | (7)(8)(9)(10)         |\n| reverse]]])"                   |                                  |                       |\n+--------------------------------+----------------------------------+-----------------------+\n\nNotes:\n\n1. *t* must have the same length as the slice it is  replacing.\n\n2. The C implementation of Python has historically accepted\n   multiple parameters and implicitly joined them into a tuple; this\n   no longer works in Python 2.0.  Use of this misfeature has been\n   deprecated since Python 1.4.\n\n3. *x* can be any iterable object.\n\n4. Raises "ValueError" when *x* is not found in *s*. When a\n   negative index is passed as the second or third parameter to the\n   "index()" method, the list length is added, as for slice indices.\n   If it is still negative, it is truncated to zero, as for slice\n   indices.\n\n   Changed in version 2.3: Previously, "index()" didn\'t have arguments\n   for specifying start and stop positions.\n\n5. When a negative index is passed as the first parameter to the\n   "insert()" method, the list length is added, as for slice indices.\n   If it is still negative, it is truncated to zero, as for slice\n   indices.\n\n   Changed in version 2.3: Previously, all negative indices were\n   truncated to zero.\n\n6. The "pop()" method\'s optional argument *i* defaults to "-1", so\n   that by default the last item is removed and returned.\n\n7. The "sort()" and "reverse()" methods modify the list in place\n   for economy of space when sorting or reversing a large list.  To\n   remind you that they operate by side effect, they don\'t return the\n   sorted or reversed list.\n\n8. The "sort()" method takes optional arguments for controlling the\n   comparisons.\n\n   *cmp* specifies a custom comparison function of two arguments (list\n   items) which should return a negative, zero or positive number\n   depending on whether the first argument is considered smaller than,\n   equal to, or larger than the second argument: "cmp=lambda x,y:\n   cmp(x.lower(), y.lower())".  The default value is "None".\n\n   *key* specifies a function of one argument that is used to extract\n   a comparison key from each list element: "key=str.lower".  The\n   default value is "None".\n\n   *reverse* is a boolean value.  If set to "True", then the list\n   elements are sorted as if each comparison were reversed.\n\n   In general, the *key* and *reverse* conversion processes are much\n   faster than specifying an equivalent *cmp* function.  This is\n   because *cmp* is called multiple times for each list element while\n   *key* and *reverse* touch each element only once.  Use\n   "functools.cmp_to_key()" to convert an old-style *cmp* function to\n   a *key* function.\n\n   Changed in version 2.3: Support for "None" as an equivalent to\n   omitting *cmp* was added.\n\n   Changed in version 2.4: Support for *key* and *reverse* was added.\n\n9. Starting with Python 2.3, the "sort()" method is guaranteed to\n   be stable.  A sort is stable if it guarantees not to change the\n   relative order of elements that compare equal --- this is helpful\n   for sorting in multiple passes (for example, sort by department,\n   then by salary grade).\n\n10. **CPython implementation detail:** While a list is being\n    sorted, the effect of attempting to mutate, or even inspect, the\n    list is undefined.  The C implementation of Python 2.3 and newer\n    makes the list appear empty for the duration, and raises\n    "ValueError" if it can detect that the list has been mutated\n    during a sort.\n',
- 'typesseq-mutable': u'\nMutable Sequence Types\n**********************\n\nList and "bytearray" objects support additional operations that allow\nin-place modification of the object. Other mutable sequence types\n(when added to the language) should also support these operations.\nStrings and tuples are immutable sequence types: such objects cannot\nbe modified once created. The following operations are defined on\nmutable sequence types (where *x* is an arbitrary object):\n\n+--------------------------------+----------------------------------+-----------------------+\n| Operation                      | Result                           | Notes                 |\n+================================+==================================+=======================+\n| "s[i] = x"                     | item *i* of *s* is replaced by   |                       |\n|                                | *x*                              |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s[i:j] = t"                   | slice of *s* from *i* to *j* is  |                       |\n|                                | replaced by the contents of the  |                       |\n|                                | iterable *t*                     |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "del s[i:j]"                   | same as "s[i:j] = []"            |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s[i:j:k] = t"                 | the elements of "s[i:j:k]" are   | (1)                   |\n|                                | replaced by those of *t*         |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "del s[i:j:k]"                 | removes the elements of          |                       |\n|                                | "s[i:j:k]" from the list         |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.append(x)"                  | same as "s[len(s):len(s)] = [x]" | (2)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.extend(x)"                  | same as "s[len(s):len(s)] = x"   | (3)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.count(x)"                   | return number of *i*\'s for which |                       |\n|                                | "s[i] == x"                      |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.index(x[, i[, j]])"         | return smallest *k* such that    | (4)                   |\n|                                | "s[k] == x" and "i <= k < j"     |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.insert(i, x)"               | same as "s[i:i] = [x]"           | (5)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.pop([i])"                   | same as "x = s[i]; del s[i];     | (6)                   |\n|                                | return x"                        |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.remove(x)"                  | same as "del s[s.index(x)]"      | (4)                   |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.reverse()"                  | reverses the items of *s* in     | (7)                   |\n|                                | place                            |                       |\n+--------------------------------+----------------------------------+-----------------------+\n| "s.sort([cmp[, key[,           | sort the items of *s* in place   | (7)(8)(9)(10)         |\n| reverse]]])"                   |                                  |                       |\n+--------------------------------+----------------------------------+-----------------------+\n\nNotes:\n\n1. *t* must have the same length as the slice it is  replacing.\n\n2. The C implementation of Python has historically accepted\n   multiple parameters and implicitly joined them into a tuple; this\n   no longer works in Python 2.0.  Use of this misfeature has been\n   deprecated since Python 1.4.\n\n3. *x* can be any iterable object.\n\n4. Raises "ValueError" when *x* is not found in *s*. When a\n   negative index is passed as the second or third parameter to the\n   "index()" method, the list length is added, as for slice indices.\n   If it is still negative, it is truncated to zero, as for slice\n   indices.\n\n   Changed in version 2.3: Previously, "index()" didn\'t have arguments\n   for specifying start and stop positions.\n\n5. When a negative index is passed as the first parameter to the\n   "insert()" method, the list length is added, as for slice indices.\n   If it is still negative, it is truncated to zero, as for slice\n   indices.\n\n   Changed in version 2.3: Previously, all negative indices were\n   truncated to zero.\n\n6. The "pop()" method\'s optional argument *i* defaults to "-1", so\n   that by default the last item is removed and returned.\n\n7. The "sort()" and "reverse()" methods modify the list in place\n   for economy of space when sorting or reversing a large list.  To\n   remind you that they operate by side effect, they don\'t return the\n   sorted or reversed list.\n\n8. The "sort()" method takes optional arguments for controlling the\n   comparisons.\n\n   *cmp* specifies a custom comparison function of two arguments (list\n   items) which should return a negative, zero or positive number\n   depending on whether the first argument is considered smaller than,\n   equal to, or larger than the second argument: "cmp=lambda x,y:\n   cmp(x.lower(), y.lower())".  The default value is "None".\n\n   *key* specifies a function of one argument that is used to extract\n   a comparison key from each list element: "key=str.lower".  The\n   default value is "None".\n\n   *reverse* is a boolean value.  If set to "True", then the list\n   elements are sorted as if each comparison were reversed.\n\n   In general, the *key* and *reverse* conversion processes are much\n   faster than specifying an equivalent *cmp* function.  This is\n   because *cmp* is called multiple times for each list element while\n   *key* and *reverse* touch each element only once.  Use\n   "functools.cmp_to_key()" to convert an old-style *cmp* function to\n   a *key* function.\n\n   Changed in version 2.3: Support for "None" as an equivalent to\n   omitting *cmp* was added.\n\n   Changed in version 2.4: Support for *key* and *reverse* was added.\n\n9. Starting with Python 2.3, the "sort()" method is guaranteed to\n   be stable.  A sort is stable if it guarantees not to change the\n   relative order of elements that compare equal --- this is helpful\n   for sorting in multiple passes (for example, sort by department,\n   then by salary grade).\n\n10. **CPython implementation detail:** While a list is being\n    sorted, the effect of attempting to mutate, or even inspect, the\n    list is undefined.  The C implementation of Python 2.3 and newer\n    makes the list appear empty for the duration, and raises\n    "ValueError" if it can detect that the list has been mutated\n    during a sort.\n',
- 'unary': u'\nUnary arithmetic and bitwise operations\n***************************************\n\nAll unary arithmetic and bitwise operations have the same priority:\n\n   u_expr ::= power | "-" u_expr | "+" u_expr | "~" u_expr\n\nThe unary "-" (minus) operator yields the negation of its numeric\nargument.\n\nThe unary "+" (plus) operator yields its numeric argument unchanged.\n\nThe unary "~" (invert) operator yields the bitwise inversion of its\nplain or long integer argument.  The bitwise inversion of "x" is\ndefined as "-(x+1)".  It only applies to integral numbers.\n\nIn all three cases, if the argument does not have the proper type, a\n"TypeError" exception is raised.\n',
- 'while': u'\nThe "while" statement\n*********************\n\nThe "while" statement is used for repeated execution as long as an\nexpression is true:\n\n   while_stmt ::= "while" expression ":" suite\n                  ["else" ":" suite]\n\nThis repeatedly tests the expression and, if it is true, executes the\nfirst suite; if the expression is false (which may be the first time\nit is tested) the suite of the "else" clause, if present, is executed\nand the loop terminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite.  A "continue" statement\nexecuted in the first suite skips the rest of the suite and goes back\nto testing the expression.\n',
- 'with': u'\nThe "with" statement\n********************\n\nNew in version 2.5.\n\nThe "with" statement is used to wrap the execution of a block with\nmethods defined by a context manager (see section With Statement\nContext Managers). This allows common "try"..."except"..."finally"\nusage patterns to be encapsulated for convenient reuse.\n\n   with_stmt ::= "with" with_item ("," with_item)* ":" suite\n   with_item ::= expression ["as" target]\n\nThe execution of the "with" statement with one "item" proceeds as\nfollows:\n\n1. The context expression (the expression given in the "with_item")\n   is evaluated to obtain a context manager.\n\n2. The context manager\'s "__exit__()" is loaded for later use.\n\n3. The context manager\'s "__enter__()" method is invoked.\n\n4. If a target was included in the "with" statement, the return\n   value from "__enter__()" is assigned to it.\n\n   Note: The "with" statement guarantees that if the "__enter__()"\n     method returns without an error, then "__exit__()" will always be\n     called. Thus, if an error occurs during the assignment to the\n     target list, it will be treated the same as an error occurring\n     within the suite would be. See step 6 below.\n\n5. The suite is executed.\n\n6. The context manager\'s "__exit__()" method is invoked. If an\n   exception caused the suite to be exited, its type, value, and\n   traceback are passed as arguments to "__exit__()". Otherwise, three\n   "None" arguments are supplied.\n\n   If the suite was exited due to an exception, and the return value\n   from the "__exit__()" method was false, the exception is reraised.\n   If the return value was true, the exception is suppressed, and\n   execution continues with the statement following the "with"\n   statement.\n\n   If the suite was exited for any reason other than an exception, the\n   return value from "__exit__()" is ignored, and execution proceeds\n   at the normal location for the kind of exit that was taken.\n\nWith more than one item, the context managers are processed as if\nmultiple "with" statements were nested:\n\n   with A() as a, B() as b:\n       suite\n\nis equivalent to\n\n   with A() as a:\n       with B() as b:\n           suite\n\nNote: In Python 2.5, the "with" statement is only allowed when the\n  "with_statement" feature has been enabled.  It is always enabled in\n  Python 2.6.\n\nChanged in version 2.7: Support for multiple context expressions.\n\nSee also: **PEP 0343** - The "with" statement\n\n     The specification, background, and examples for the Python "with"\n     statement.\n',
- 'yield': u'\nThe "yield" statement\n*********************\n\n   yield_stmt ::= yield_expression\n\nThe "yield" statement is only used when defining a generator function,\nand is only used in the body of the generator function. Using a\n"yield" statement in a function definition is sufficient to cause that\ndefinition to create a generator function instead of a normal\nfunction.\n\nWhen a generator function is called, it returns an iterator known as a\ngenerator iterator, or more commonly, a generator.  The body of the\ngenerator function is executed by calling the generator\'s "next()"\nmethod repeatedly until it raises an exception.\n\nWhen a "yield" statement is executed, the state of the generator is\nfrozen and the value of "expression_list" is returned to "next()"\'s\ncaller.  By "frozen" we mean that all local state is retained,\nincluding the current bindings of local variables, the instruction\npointer, and the internal evaluation stack: enough information is\nsaved so that the next time "next()" is invoked, the function can\nproceed exactly as if the "yield" statement were just another external\ncall.\n\nAs of Python version 2.5, the "yield" statement is now allowed in the\n"try" clause of a "try" ...  "finally" construct.  If the generator is\nnot resumed before it is finalized (by reaching a zero reference count\nor by being garbage collected), the generator-iterator\'s "close()"\nmethod will be called, allowing any pending "finally" clauses to\nexecute.\n\nFor full details of "yield" semantics, refer to the Yield expressions\nsection.\n\nNote: In Python 2.2, the "yield" statement was only allowed when the\n  "generators" feature has been enabled.  This "__future__" import\n  statement was used to enable the feature:\n\n     from __future__ import generators\n\nSee also: **PEP 0255** - Simple Generators\n\n     The proposal for adding generators and the "yield" statement to\n     Python.\n\n  **PEP 0342** - Coroutines via Enhanced Generators\n     The proposal that, among other generator enhancements, proposed\n     allowing "yield" to appear inside a "try" ... "finally" block.\n'}
+# Autogenerated by Sphinx on Sat Nov 21 13:35:13 2015
+topics = {'assert': '\n'
+           'The "assert" statement\n'
+           '**********************\n'
+           '\n'
+           'Assert statements are a convenient way to insert debugging '
+           'assertions\n'
+           'into a program:\n'
+           '\n'
+           '   assert_stmt ::= "assert" expression ["," expression]\n'
+           '\n'
+           'The simple form, "assert expression", is equivalent to\n'
+           '\n'
+           '   if __debug__:\n'
+           '      if not expression: raise AssertionError\n'
+           '\n'
+           'The extended form, "assert expression1, expression2", is '
+           'equivalent to\n'
+           '\n'
+           '   if __debug__:\n'
+           '      if not expression1: raise AssertionError(expression2)\n'
+           '\n'
+           'These equivalences assume that "__debug__" and "AssertionError" '
+           'refer\n'
+           'to the built-in variables with those names.  In the current\n'
+           'implementation, the built-in variable "__debug__" is "True" '
+           'under\n'
+           'normal circumstances, "False" when optimization is requested '
+           '(command\n'
+           'line option -O).  The current code generator emits no code for '
+           'an\n'
+           'assert statement when optimization is requested at compile '
+           'time.  Note\n'
+           'that it is unnecessary to include the source code for the '
+           'expression\n'
+           'that failed in the error message; it will be displayed as part '
+           'of the\n'
+           'stack trace.\n'
+           '\n'
+           'Assignments to "__debug__" are illegal.  The value for the '
+           'built-in\n'
+           'variable is determined when the interpreter starts.\n',
+ 'assignment': '\n'
+               'Assignment statements\n'
+               '*********************\n'
+               '\n'
+               'Assignment statements are used to (re)bind names to values '
+               'and to\n'
+               'modify attributes or items of mutable objects:\n'
+               '\n'
+               '   assignment_stmt ::= (target_list "=")+ (expression_list | '
+               'yield_expression)\n'
+               '   target_list     ::= target ("," target)* [","]\n'
+               '   target          ::= identifier\n'
+               '              | "(" target_list ")"\n'
+               '              | "[" target_list "]"\n'
+               '              | attributeref\n'
+               '              | subscription\n'
+               '              | slicing\n'
+               '\n'
+               '(See section Primaries for the syntax definitions for the '
+               'last three\n'
+               'symbols.)\n'
+               '\n'
+               'An assignment statement evaluates the expression list '
+               '(remember that\n'
+               'this can be a single expression or a comma-separated list, '
+               'the latter\n'
+               'yielding a tuple) and assigns the single resulting object to '
+               'each of\n'
+               'the target lists, from left to right.\n'
+               '\n'
+               'Assignment is defined recursively depending on the form of '
+               'the target\n'
+               '(list). When a target is part of a mutable object (an '
+               'attribute\n'
+               'reference, subscription or slicing), the mutable object '
+               'must\n'
+               'ultimately perform the assignment and decide about its '
+               'validity, and\n'
+               'may raise an exception if the assignment is unacceptable.  '
+               'The rules\n'
+               'observed by various types and the exceptions raised are '
+               'given with the\n'
+               'definition of the object types (see section The standard '
+               'type\n'
+               'hierarchy).\n'
+               '\n'
+               'Assignment of an object to a target list is recursively '
+               'defined as\n'
+               'follows.\n'
+               '\n'
+               '* If the target list is a single target: The object is '
+               'assigned to\n'
+               '  that target.\n'
+               '\n'
+               '* If the target list is a comma-separated list of targets: '
+               'The\n'
+               '  object must be an iterable with the same number of items '
+               'as there\n'
+               '  are targets in the target list, and the items are '
+               'assigned, from\n'
+               '  left to right, to the corresponding targets.\n'
+               '\n'
+               'Assignment of an object to a single target is recursively '
+               'defined as\n'
+               'follows.\n'
+               '\n'
+               '* If the target is an identifier (name):\n'
+               '\n'
+               '  * If the name does not occur in a "global" statement in '
+               'the\n'
+               '    current code block: the name is bound to the object in '
+               'the current\n'
+               '    local namespace.\n'
+               '\n'
+               '  * Otherwise: the name is bound to the object in the '
+               'current global\n'
+               '    namespace.\n'
+               '\n'
+               '  The name is rebound if it was already bound.  This may '
+               'cause the\n'
+               '  reference count for the object previously bound to the '
+               'name to reach\n'
+               '  zero, causing the object to be deallocated and its '
+               'destructor (if it\n'
+               '  has one) to be called.\n'
+               '\n'
+               '* If the target is a target list enclosed in parentheses or '
+               'in\n'
+               '  square brackets: The object must be an iterable with the '
+               'same number\n'
+               '  of items as there are targets in the target list, and its '
+               'items are\n'
+               '  assigned, from left to right, to the corresponding '
+               'targets.\n'
+               '\n'
+               '* If the target is an attribute reference: The primary '
+               'expression in\n'
+               '  the reference is evaluated.  It should yield an object '
+               'with\n'
+               '  assignable attributes; if this is not the case, '
+               '"TypeError" is\n'
+               '  raised.  That object is then asked to assign the assigned '
+               'object to\n'
+               '  the given attribute; if it cannot perform the assignment, '
+               'it raises\n'
+               '  an exception (usually but not necessarily '
+               '"AttributeError").\n'
+               '\n'
+               '  Note: If the object is a class instance and the attribute '
+               'reference\n'
+               '  occurs on both sides of the assignment operator, the RHS '
+               'expression,\n'
+               '  "a.x" can access either an instance attribute or (if no '
+               'instance\n'
+               '  attribute exists) a class attribute.  The LHS target "a.x" '
+               'is always\n'
+               '  set as an instance attribute, creating it if necessary.  '
+               'Thus, the\n'
+               '  two occurrences of "a.x" do not necessarily refer to the '
+               'same\n'
+               '  attribute: if the RHS expression refers to a class '
+               'attribute, the\n'
+               '  LHS creates a new instance attribute as the target of the\n'
+               '  assignment:\n'
+               '\n'
+               '     class Cls:\n'
+               '         x = 3             # class variable\n'
+               '     inst = Cls()\n'
+               '     inst.x = inst.x + 1   # writes inst.x as 4 leaving '
+               'Cls.x as 3\n'
+               '\n'
+               '  This description does not necessarily apply to descriptor\n'
+               '  attributes, such as properties created with "property()".\n'
+               '\n'
+               '* If the target is a subscription: The primary expression in '
+               'the\n'
+               '  reference is evaluated.  It should yield either a mutable '
+               'sequence\n'
+               '  object (such as a list) or a mapping object (such as a '
+               'dictionary).\n'
+               '  Next, the subscript expression is evaluated.\n'
+               '\n'
+               '  If the primary is a mutable sequence object (such as a '
+               'list), the\n'
+               '  subscript must yield a plain integer.  If it is negative, '
+               'the\n'
+               "  sequence's length is added to it. The resulting value must "
+               'be a\n'
+               "  nonnegative integer less than the sequence's length, and "
+               'the\n'
+               '  sequence is asked to assign the assigned object to its '
+               'item with\n'
+               '  that index.  If the index is out of range, "IndexError" is '
+               'raised\n'
+               '  (assignment to a subscripted sequence cannot add new items '
+               'to a\n'
+               '  list).\n'
+               '\n'
+               '  If the primary is a mapping object (such as a dictionary), '
+               'the\n'
+               "  subscript must have a type compatible with the mapping's "
+               'key type,\n'
+               '  and the mapping is then asked to create a key/datum pair '
+               'which maps\n'
+               '  the subscript to the assigned object.  This can either '
+               'replace an\n'
+               '  existing key/value pair with the same key value, or insert '
+               'a new\n'
+               '  key/value pair (if no key with the same value existed).\n'
+               '\n'
+               '* If the target is a slicing: The primary expression in the\n'
+               '  reference is evaluated.  It should yield a mutable '
+               'sequence object\n'
+               '  (such as a list).  The assigned object should be a '
+               'sequence object\n'
+               '  of the same type.  Next, the lower and upper bound '
+               'expressions are\n'
+               '  evaluated, insofar they are present; defaults are zero and '
+               'the\n'
+               "  sequence's length.  The bounds should evaluate to (small) "
+               'integers.\n'
+               "  If either bound is negative, the sequence's length is "
+               'added to it.\n'
+               '  The resulting bounds are clipped to lie between zero and '
+               'the\n'
+               "  sequence's length, inclusive.  Finally, the sequence "
+               'object is asked\n'
+               '  to replace the slice with the items of the assigned '
+               'sequence.  The\n'
+               '  length of the slice may be different from the length of '
+               'the assigned\n'
+               '  sequence, thus changing the length of the target sequence, '
+               'if the\n'
+               '  object allows it.\n'
+               '\n'
+               '**CPython implementation detail:** In the current '
+               'implementation, the\n'
+               'syntax for targets is taken to be the same as for '
+               'expressions, and\n'
+               'invalid syntax is rejected during the code generation phase, '
+               'causing\n'
+               'less detailed error messages.\n'
+               '\n'
+               'WARNING: Although the definition of assignment implies that '
+               'overlaps\n'
+               'between the left-hand side and the right-hand side are '
+               "'safe' (for\n"
+               'example "a, b = b, a" swaps two variables), overlaps '
+               '*within* the\n'
+               'collection of assigned-to variables are not safe!  For '
+               'instance, the\n'
+               'following program prints "[0, 2]":\n'
+               '\n'
+               '   x = [0, 1]\n'
+               '   i = 0\n'
+               '   i, x[i] = 1, 2\n'
+               '   print x\n'
+               '\n'
+               '\n'
+               'Augmented assignment statements\n'
+               '===============================\n'
+               '\n'
+               'Augmented assignment is the combination, in a single '
+               'statement, of a\n'
+               'binary operation and an assignment statement:\n'
+               '\n'
+               '   augmented_assignment_stmt ::= augtarget augop '
+               '(expression_list | yield_expression)\n'
+               '   augtarget                 ::= identifier | attributeref | '
+               'subscription | slicing\n'
+               '   augop                     ::= "+=" | "-=" | "*=" | "/=" | '
+               '"//=" | "%=" | "**="\n'
+               '             | ">>=" | "<<=" | "&=" | "^=" | "|="\n'
+               '\n'
+               '(See section Primaries for the syntax definitions for the '
+               'last three\n'
+               'symbols.)\n'
+               '\n'
+               'An augmented assignment evaluates the target (which, unlike '
+               'normal\n'
+               'assignment statements, cannot be an unpacking) and the '
+               'expression\n'
+               'list, performs the binary operation specific to the type of '
+               'assignment\n'
+               'on the two operands, and assigns the result to the original '
+               'target.\n'
+               'The target is only evaluated once.\n'
+               '\n'
+               'An augmented assignment expression like "x += 1" can be '
+               'rewritten as\n'
+               '"x = x + 1" to achieve a similar, but not exactly equal '
+               'effect. In the\n'
+               'augmented version, "x" is only evaluated once. Also, when '
+               'possible,\n'
+               'the actual operation is performed *in-place*, meaning that '
+               'rather than\n'
+               'creating a new object and assigning that to the target, the '
+               'old object\n'
+               'is modified instead.\n'
+               '\n'
+               'With the exception of assigning to tuples and multiple '
+               'targets in a\n'
+               'single statement, the assignment done by augmented '
+               'assignment\n'
+               'statements is handled the same way as normal assignments. '
+               'Similarly,\n'
+               'with the exception of the possible *in-place* behavior, the '
+               'binary\n'
+               'operation performed by augmented assignment is the same as '
+               'the normal\n'
+               'binary operations.\n'
+               '\n'
+               'For targets which are attribute references, the same caveat '
+               'about\n'
+               'class and instance attributes applies as for regular '
+               'assignments.\n',
+ 'atom-identifiers': '\n'
+                     'Identifiers (Names)\n'
+                     '*******************\n'
+                     '\n'
+                     'An identifier occurring as an atom is a name.  See '
+                     'section Identifiers\n'
+                     'and keywords for lexical definition and section Naming '
+                     'and binding for\n'
+                     'documentation of naming and binding.\n'
+                     '\n'
+                     'When the name is bound to an object, evaluation of the '
+                     'atom yields\n'
+                     'that object. When a name is not bound, an attempt to '
+                     'evaluate it\n'
+                     'raises a "NameError" exception.\n'
+                     '\n'
+                     '**Private name mangling:** When an identifier that '
+                     'textually occurs in\n'
+                     'a class definition begins with two or more underscore '
+                     'characters and\n'
+                     'does not end in two or more underscores, it is '
+                     'considered a *private\n'
+                     'name* of that class. Private names are transformed to '
+                     'a longer form\n'
+                     'before code is generated for them.  The transformation '
+                     'inserts the\n'
+                     'class name, with leading underscores removed and a '
+                     'single underscore\n'
+                     'inserted, in front of the name.  For example, the '
+                     'identifier "__spam"\n'
+                     'occurring in a class named "Ham" will be transformed '
+                     'to "_Ham__spam".\n'
+                     'This transformation is independent of the syntactical '
+                     'context in which\n'
+                     'the identifier is used.  If the transformed name is '
+                     'extremely long\n'
+                     '(longer than 255 characters), implementation defined '
+                     'truncation may\n'
+                     'happen. If the class name consists only of '
+                     'underscores, no\n'
+                     'transformation is done.\n',
+ 'atom-literals': '\n'
+                  'Literals\n'
+                  '********\n'
+                  '\n'
+                  'Python supports string literals and various numeric '
+                  'literals:\n'
+                  '\n'
+                  '   literal ::= stringliteral | integer | longinteger\n'
+                  '               | floatnumber | imagnumber\n'
+                  '\n'
+                  'Evaluation of a literal yields an object of the given '
+                  'type (string,\n'
+                  'integer, long integer, floating point number, complex '
+                  'number) with the\n'
+                  'given value.  The value may be approximated in the case '
+                  'of floating\n'
+                  'point and imaginary (complex) literals.  See section '
+                  'Literals for\n'
+                  'details.\n'
+                  '\n'
+                  'All literals correspond to immutable data types, and '
+                  'hence the\n'
+                  "object's identity is less important than its value.  "
+                  'Multiple\n'
+                  'evaluations of literals with the same value (either the '
+                  'same\n'
+                  'occurrence in the program text or a different occurrence) '
+                  'may obtain\n'
+                  'the same object or a different object with the same '
+                  'value.\n',
+ 'attribute-access': '\n'
+                     'Customizing attribute access\n'
+                     '****************************\n'
+                     '\n'
+                     'The following methods can be defined to customize the '
+                     'meaning of\n'
+                     'attribute access (use of, assignment to, or deletion '
+                     'of "x.name") for\n'
+                     'class instances.\n'
+                     '\n'
+                     'object.__getattr__(self, name)\n'
+                     '\n'
+                     '   Called when an attribute lookup has not found the '
+                     'attribute in the\n'
+                     '   usual places (i.e. it is not an instance attribute '
+                     'nor is it found\n'
+                     '   in the class tree for "self").  "name" is the '
+                     'attribute name. This\n'
+                     '   method should return the (computed) attribute value '
+                     'or raise an\n'
+                     '   "AttributeError" exception.\n'
+                     '\n'
+                     '   Note that if the attribute is found through the '
+                     'normal mechanism,\n'
+                     '   "__getattr__()" is not called.  (This is an '
+                     'intentional asymmetry\n'
+                     '   between "__getattr__()" and "__setattr__()".) This '
+                     'is done both for\n'
+                     '   efficiency reasons and because otherwise '
+                     '"__getattr__()" would have\n'
+                     '   no way to access other attributes of the instance.  '
+                     'Note that at\n'
+                     '   least for instance variables, you can fake total '
+                     'control by not\n'
+                     '   inserting any values in the instance attribute '
+                     'dictionary (but\n'
+                     '   instead inserting them in another object).  See '
+                     'the\n'
+                     '   "__getattribute__()" method below for a way to '
+                     'actually get total\n'
+                     '   control in new-style classes.\n'
+                     '\n'
+                     'object.__setattr__(self, name, value)\n'
+                     '\n'
+                     '   Called when an attribute assignment is attempted.  '
+                     'This is called\n'
+                     '   instead of the normal mechanism (i.e. store the '
+                     'value in the\n'
+                     '   instance dictionary).  *name* is the attribute '
+                     'name, *value* is the\n'
+                     '   value to be assigned to it.\n'
+                     '\n'
+                     '   If "__setattr__()" wants to assign to an instance '
+                     'attribute, it\n'
+                     '   should not simply execute "self.name = value" --- '
+                     'this would cause\n'
+                     '   a recursive call to itself.  Instead, it should '
+                     'insert the value in\n'
+                     '   the dictionary of instance attributes, e.g., '
+                     '"self.__dict__[name] =\n'
+                     '   value".  For new-style classes, rather than '
+                     'accessing the instance\n'
+                     '   dictionary, it should call the base class method '
+                     'with the same\n'
+                     '   name, for example, "object.__setattr__(self, name, '
+                     'value)".\n'
+                     '\n'
+                     'object.__delattr__(self, name)\n'
+                     '\n'
+                     '   Like "__setattr__()" but for attribute deletion '
+                     'instead of\n'
+                     '   assignment.  This should only be implemented if '
+                     '"del obj.name" is\n'
+                     '   meaningful for the object.\n'
+                     '\n'
+                     '\n'
+                     'More attribute access for new-style classes\n'
+                     '===========================================\n'
+                     '\n'
+                     'The following methods only apply to new-style '
+                     'classes.\n'
+                     '\n'
+                     'object.__getattribute__(self, name)\n'
+                     '\n'
+                     '   Called unconditionally to implement attribute '
+                     'accesses for\n'
+                     '   instances of the class. If the class also defines '
+                     '"__getattr__()",\n'
+                     '   the latter will not be called unless '
+                     '"__getattribute__()" either\n'
+                     '   calls it explicitly or raises an "AttributeError". '
+                     'This method\n'
+                     '   should return the (computed) attribute value or '
+                     'raise an\n'
+                     '   "AttributeError" exception. In order to avoid '
+                     'infinite recursion in\n'
+                     '   this method, its implementation should always call '
+                     'the base class\n'
+                     '   method with the same name to access any attributes '
+                     'it needs, for\n'
+                     '   example, "object.__getattribute__(self, name)".\n'
+                     '\n'
+                     '   Note: This method may still be bypassed when '
+                     'looking up special\n'
+                     '     methods as the result of implicit invocation via '
+                     'language syntax\n'
+                     '     or built-in functions. See Special method lookup '
+                     'for new-style\n'
+                     '     classes.\n'
+                     '\n'
+                     '\n'
+                     'Implementing Descriptors\n'
+                     '========================\n'
+                     '\n'
+                     'The following methods only apply when an instance of '
+                     'the class\n'
+                     'containing the method (a so-called *descriptor* class) '
+                     'appears in an\n'
+                     '*owner* class (the descriptor must be in either the '
+                     "owner's class\n"
+                     'dictionary or in the class dictionary for one of its '
+                     'parents).  In the\n'
+                     'examples below, "the attribute" refers to the '
+                     'attribute whose name is\n'
+                     "the key of the property in the owner class' "
+                     '"__dict__".\n'
+                     '\n'
+                     'object.__get__(self, instance, owner)\n'
+                     '\n'
+                     '   Called to get the attribute of the owner class '
+                     '(class attribute\n'
+                     '   access) or of an instance of that class (instance '
+                     'attribute\n'
+                     '   access). *owner* is always the owner class, while '
+                     '*instance* is the\n'
+                     '   instance that the attribute was accessed through, '
+                     'or "None" when\n'
+                     '   the attribute is accessed through the *owner*.  '
+                     'This method should\n'
+                     '   return the (computed) attribute value or raise an '
+                     '"AttributeError"\n'
+                     '   exception.\n'
+                     '\n'
+                     'object.__set__(self, instance, value)\n'
+                     '\n'
+                     '   Called to set the attribute on an instance '
+                     '*instance* of the owner\n'
+                     '   class to a new value, *value*.\n'
+                     '\n'
+                     'object.__delete__(self, instance)\n'
+                     '\n'
+                     '   Called to delete the attribute on an instance '
+                     '*instance* of the\n'
+                     '   owner class.\n'
+                     '\n'
+                     '\n'
+                     'Invoking Descriptors\n'
+                     '====================\n'
+                     '\n'
+                     'In general, a descriptor is an object attribute with '
+                     '"binding\n'
+                     'behavior", one whose attribute access has been '
+                     'overridden by methods\n'
+                     'in the descriptor protocol:  "__get__()", "__set__()", '
+                     'and\n'
+                     '"__delete__()". If any of those methods are defined '
+                     'for an object, it\n'
+                     'is said to be a descriptor.\n'
+                     '\n'
+                     'The default behavior for attribute access is to get, '
+                     'set, or delete\n'
+                     "the attribute from an object's dictionary. For "
+                     'instance, "a.x" has a\n'
+                     'lookup chain starting with "a.__dict__[\'x\']", then\n'
+                     '"type(a).__dict__[\'x\']", and continuing through the '
+                     'base classes of\n'
+                     '"type(a)" excluding metaclasses.\n'
+                     '\n'
+                     'However, if the looked-up value is an object defining '
+                     'one of the\n'
+                     'descriptor methods, then Python may override the '
+                     'default behavior and\n'
+                     'invoke the descriptor method instead.  Where this '
+                     'occurs in the\n'
+                     'precedence chain depends on which descriptor methods '
+                     'were defined and\n'
+                     'how they were called.  Note that descriptors are only '
+                     'invoked for new\n'
+                     'style objects or classes (ones that subclass '
+                     '"object()" or "type()").\n'
+                     '\n'
+                     'The starting point for descriptor invocation is a '
+                     'binding, "a.x". How\n'
+                     'the arguments are assembled depends on "a":\n'
+                     '\n'
+                     'Direct Call\n'
+                     '   The simplest and least common call is when user '
+                     'code directly\n'
+                     '   invokes a descriptor method:    "x.__get__(a)".\n'
+                     '\n'
+                     'Instance Binding\n'
+                     '   If binding to a new-style object instance, "a.x" is '
+                     'transformed\n'
+                     '   into the call: "type(a).__dict__[\'x\'].__get__(a, '
+                     'type(a))".\n'
+                     '\n'
+                     'Class Binding\n'
+                     '   If binding to a new-style class, "A.x" is '
+                     'transformed into the\n'
+                     '   call: "A.__dict__[\'x\'].__get__(None, A)".\n'
+                     '\n'
+                     'Super Binding\n'
+                     '   If "a" is an instance of "super", then the binding '
+                     '"super(B,\n'
+                     '   obj).m()" searches "obj.__class__.__mro__" for the '
+                     'base class "A"\n'
+                     '   immediately preceding "B" and then invokes the '
+                     'descriptor with the\n'
+                     '   call: "A.__dict__[\'m\'].__get__(obj, '
+                     'obj.__class__)".\n'
+                     '\n'
+                     'For instance bindings, the precedence of descriptor '
+                     'invocation depends\n'
+                     'on the which descriptor methods are defined.  A '
+                     'descriptor can define\n'
+                     'any combination of "__get__()", "__set__()" and '
+                     '"__delete__()".  If it\n'
+                     'does not define "__get__()", then accessing the '
+                     'attribute will return\n'
+                     'the descriptor object itself unless there is a value '
+                     "in the object's\n"
+                     'instance dictionary.  If the descriptor defines '
+                     '"__set__()" and/or\n'
+                     '"__delete__()", it is a data descriptor; if it defines '
+                     'neither, it is\n'
+                     'a non-data descriptor.  Normally, data descriptors '
+                     'define both\n'
+                     '"__get__()" and "__set__()", while non-data '
+                     'descriptors have just the\n'
+                     '"__get__()" method.  Data descriptors with "__set__()" '
+                     'and "__get__()"\n'
+                     'defined always override a redefinition in an instance '
+                     'dictionary.  In\n'
+                     'contrast, non-data descriptors can be overridden by '
+                     'instances.\n'
+                     '\n'
+                     'Python methods (including "staticmethod()" and '
+                     '"classmethod()") are\n'
+                     'implemented as non-data descriptors.  Accordingly, '
+                     'instances can\n'
+                     'redefine and override methods.  This allows individual '
+                     'instances to\n'
+                     'acquire behaviors that differ from other instances of '
+                     'the same class.\n'
+                     '\n'
+                     'The "property()" function is implemented as a data '
+                     'descriptor.\n'
+                     'Accordingly, instances cannot override the behavior of '
+                     'a property.\n'
+                     '\n'
+                     '\n'
+                     '__slots__\n'
+                     '=========\n'
+                     '\n'
+                     'By default, instances of both old and new-style '
+                     'classes have a\n'
+                     'dictionary for attribute storage.  This wastes space '
+                     'for objects\n'
+                     'having very few instance variables.  The space '
+                     'consumption can become\n'
+                     'acute when creating large numbers of instances.\n'
+                     '\n'
+                     'The default can be overridden by defining *__slots__* '
+                     'in a new-style\n'
+                     'class definition.  The *__slots__* declaration takes a '
+                     'sequence of\n'
+                     'instance variables and reserves just enough space in '
+                     'each instance to\n'
+                     'hold a value for each variable.  Space is saved '
+                     'because *__dict__* is\n'
+                     'not created for each instance.\n'
+                     '\n'
+                     '__slots__\n'
+                     '\n'
+                     '   This class variable can be assigned a string, '
+                     'iterable, or sequence\n'
+                     '   of strings with variable names used by instances.  '
+                     'If defined in a\n'
+                     '   new-style class, *__slots__* reserves space for the '
+                     'declared\n'
+                     '   variables and prevents the automatic creation of '
+                     '*__dict__* and\n'
+                     '   *__weakref__* for each instance.\n'
+                     '\n'
+                     '   New in version 2.2.\n'
+                     '\n'
+                     'Notes on using *__slots__*\n'
+                     '\n'
+                     '* When inheriting from a class without *__slots__*, '
+                     'the *__dict__*\n'
+                     '  attribute of that class will always be accessible, '
+                     'so a *__slots__*\n'
+                     '  definition in the subclass is meaningless.\n'
+                     '\n'
+                     '* Without a *__dict__* variable, instances cannot be '
+                     'assigned new\n'
+                     '  variables not listed in the *__slots__* definition.  '
+                     'Attempts to\n'
+                     '  assign to an unlisted variable name raises '
+                     '"AttributeError". If\n'
+                     '  dynamic assignment of new variables is desired, then '
+                     'add\n'
+                     '  "\'__dict__\'" to the sequence of strings in the '
+                     '*__slots__*\n'
+                     '  declaration.\n'
+                     '\n'
+                     '  Changed in version 2.3: Previously, adding '
+                     '"\'__dict__\'" to the\n'
+                     '  *__slots__* declaration would not enable the '
+                     'assignment of new\n'
+                     '  attributes not specifically listed in the sequence '
+                     'of instance\n'
+                     '  variable names.\n'
+                     '\n'
+                     '* Without a *__weakref__* variable for each instance, '
+                     'classes\n'
+                     '  defining *__slots__* do not support weak references '
+                     'to its\n'
+                     '  instances. If weak reference support is needed, then '
+                     'add\n'
+                     '  "\'__weakref__\'" to the sequence of strings in the '
+                     '*__slots__*\n'
+                     '  declaration.\n'
+                     '\n'
+                     '  Changed in version 2.3: Previously, adding '
+                     '"\'__weakref__\'" to the\n'
+                     '  *__slots__* declaration would not enable support for '
+                     'weak\n'
+                     '  references.\n'
+                     '\n'
+                     '* *__slots__* are implemented at the class level by '
+                     'creating\n'
+                     '  descriptors (Implementing Descriptors) for each '
+                     'variable name.  As a\n'
+                     '  result, class attributes cannot be used to set '
+                     'default values for\n'
+                     '  instance variables defined by *__slots__*; '
+                     'otherwise, the class\n'
+                     '  attribute would overwrite the descriptor '
+                     'assignment.\n'
+                     '\n'
+                     '* The action of a *__slots__* declaration is limited '
+                     'to the class\n'
+                     '  where it is defined.  As a result, subclasses will '
+                     'have a *__dict__*\n'
+                     '  unless they also define *__slots__* (which must only '
+                     'contain names\n'
+                     '  of any *additional* slots).\n'
+                     '\n'
+                     '* If a class defines a slot also defined in a base '
+                     'class, the\n'
+                     '  instance variable defined by the base class slot is '
+                     'inaccessible\n'
+                     '  (except by retrieving its descriptor directly from '
+                     'the base class).\n'
+                     '  This renders the meaning of the program undefined.  '
+                     'In the future, a\n'
+                     '  check may be added to prevent this.\n'
+                     '\n'
+                     '* Nonempty *__slots__* does not work for classes '
+                     'derived from\n'
+                     '  "variable-length" built-in types such as "long", '
+                     '"str" and "tuple".\n'
+                     '\n'
+                     '* Any non-string iterable may be assigned to '
+                     '*__slots__*. Mappings\n'
+                     '  may also be used; however, in the future, special '
+                     'meaning may be\n'
+                     '  assigned to the values corresponding to each key.\n'
+                     '\n'
+                     '* *__class__* assignment works only if both classes '
+                     'have the same\n'
+                     '  *__slots__*.\n'
+                     '\n'
+                     '  Changed in version 2.6: Previously, *__class__* '
+                     'assignment raised an\n'
+                     '  error if either new or old class had *__slots__*.\n',
+ 'attribute-references': '\n'
+                         'Attribute references\n'
+                         '********************\n'
+                         '\n'
+                         'An attribute reference is a primary followed by a '
+                         'period and a name:\n'
+                         '\n'
+                         '   attributeref ::= primary "." identifier\n'
+                         '\n'
+                         'The primary must evaluate to an object of a type '
+                         'that supports\n'
+                         'attribute references, e.g., a module, list, or an '
+                         'instance.  This\n'
+                         'object is then asked to produce the attribute '
+                         'whose name is the\n'
+                         'identifier.  If this attribute is not available, '
+                         'the exception\n'
+                         '"AttributeError" is raised. Otherwise, the type '
+                         'and value of the\n'
+                         'object produced is determined by the object.  '
+                         'Multiple evaluations of\n'
+                         'the same attribute reference may yield different '
+                         'objects.\n',
+ 'augassign': '\n'
+              'Augmented assignment statements\n'
+              '*******************************\n'
+              '\n'
+              'Augmented assignment is the combination, in a single '
+              'statement, of a\n'
+              'binary operation and an assignment statement:\n'
+              '\n'
+              '   augmented_assignment_stmt ::= augtarget augop '
+              '(expression_list | yield_expression)\n'
+              '   augtarget                 ::= identifier | attributeref | '
+              'subscription | slicing\n'
+              '   augop                     ::= "+=" | "-=" | "*=" | "/=" | '
+              '"//=" | "%=" | "**="\n'
+              '             | ">>=" | "<<=" | "&=" | "^=" | "|="\n'
+              '\n'
+              '(See section Primaries for the syntax definitions for the '
+              'last three\n'
+              'symbols.)\n'
+              '\n'
+              'An augmented assignment evaluates the target (which, unlike '
+              'normal\n'
+              'assignment statements, cannot be an unpacking) and the '
+              'expression\n'
+              'list, performs the binary operation specific to the type of '
+              'assignment\n'
+              'on the two operands, and assigns the result to the original '
+              'target.\n'
+              'The target is only evaluated once.\n'
+              '\n'
+              'An augmented assignment expression like "x += 1" can be '
+              'rewritten as\n'
+              '"x = x + 1" to achieve a similar, but not exactly equal '
+              'effect. In the\n'
+              'augmented version, "x" is only evaluated once. Also, when '
+              'possible,\n'
+              'the actual operation is performed *in-place*, meaning that '
+              'rather than\n'
+              'creating a new object and assigning that to the target, the '
+              'old object\n'
+              'is modified instead.\n'
+              '\n'
+              'With the exception of assigning to tuples and multiple '
+              'targets in a\n'
+              'single statement, the assignment done by augmented '
+              'assignment\n'
+              'statements is handled the same way as normal assignments. '
+              'Similarly,\n'
+              'with the exception of the possible *in-place* behavior, the '
+              'binary\n'
+              'operation performed by augmented assignment is the same as '
+              'the normal\n'
+              'binary operations.\n'
+              '\n'
+              'For targets which are attribute references, the same caveat '
+              'about\n'
+              'class and instance attributes applies as for regular '
+              'assignments.\n',
+ 'binary': '\n'
+           'Binary arithmetic operations\n'
+           '****************************\n'
+           '\n'
+           'The binary arithmetic operations have the conventional priority\n'
+           'levels.  Note that some of these operations also apply to '
+           'certain non-\n'
+           'numeric types.  Apart from the power operator, there are only '
+           'two\n'
+           'levels, one for multiplicative operators and one for additive\n'
+           'operators:\n'
+           '\n'
+           '   m_expr ::= u_expr | m_expr "*" u_expr | m_expr "//" u_expr | '
+           'm_expr "/" u_expr\n'
+           '              | m_expr "%" u_expr\n'
+           '   a_expr ::= m_expr | a_expr "+" m_expr | a_expr "-" m_expr\n'
+           '\n'
+           'The "*" (multiplication) operator yields the product of its '
+           'arguments.\n'
+           'The arguments must either both be numbers, or one argument must '
+           'be an\n'
+           'integer (plain or long) and the other must be a sequence. In '
+           'the\n'
+           'former case, the numbers are converted to a common type and '
+           'then\n'
+           'multiplied together.  In the latter case, sequence repetition '
+           'is\n'
+           'performed; a negative repetition factor yields an empty '
+           'sequence.\n'
+           '\n'
+           'The "/" (division) and "//" (floor division) operators yield '
+           'the\n'
+           'quotient of their arguments.  The numeric arguments are first\n'
+           'converted to a common type. Plain or long integer division '
+           'yields an\n'
+           'integer of the same type; the result is that of mathematical '
+           'division\n'
+           "with the 'floor' function applied to the result. Division by "
+           'zero\n'
+           'raises the "ZeroDivisionError" exception.\n'
+           '\n'
+           'The "%" (modulo) operator yields the remainder from the division '
+           'of\n'
+           'the first argument by the second.  The numeric arguments are '
+           'first\n'
+           'converted to a common type.  A zero right argument raises the\n'
+           '"ZeroDivisionError" exception.  The arguments may be floating '
+           'point\n'
+           'numbers, e.g., "3.14%0.7" equals "0.34" (since "3.14" equals '
+           '"4*0.7 +\n'
+           '0.34".)  The modulo operator always yields a result with the '
+           'same sign\n'
+           'as its second operand (or zero); the absolute value of the '
+           'result is\n'
+           'strictly smaller than the absolute value of the second operand '
+           '[2].\n'
+           '\n'
+           'The integer division and modulo operators are connected by the\n'
+           'following identity: "x == (x/y)*y + (x%y)".  Integer division '
+           'and\n'
+           'modulo are also connected with the built-in function '
+           '"divmod()":\n'
+           '"divmod(x, y) == (x/y, x%y)".  These identities don\'t hold for\n'
+           'floating point numbers; there similar identities hold '
+           'approximately\n'
+           'where "x/y" is replaced by "floor(x/y)" or "floor(x/y) - 1" '
+           '[3].\n'
+           '\n'
+           'In addition to performing the modulo operation on numbers, the '
+           '"%"\n'
+           'operator is also overloaded by string and unicode objects to '
+           'perform\n'
+           'string formatting (also known as interpolation). The syntax for '
+           'string\n'
+           'formatting is described in the Python Library Reference, '
+           'section\n'
+           'String Formatting Operations.\n'
+           '\n'
+           'Deprecated since version 2.3: The floor division operator, the '
+           'modulo\n'
+           'operator, and the "divmod()" function are no longer defined for\n'
+           'complex numbers.  Instead, convert to a floating point number '
+           'using\n'
+           'the "abs()" function if appropriate.\n'
+           '\n'
+           'The "+" (addition) operator yields the sum of its arguments. '
+           'The\n'
+           'arguments must either both be numbers or both sequences of the '
+           'same\n'
+           'type.  In the former case, the numbers are converted to a common '
+           'type\n'
+           'and then added together.  In the latter case, the sequences are\n'
+           'concatenated.\n'
+           '\n'
+           'The "-" (subtraction) operator yields the difference of its '
+           'arguments.\n'
+           'The numeric arguments are first converted to a common type.\n',
+ 'bitwise': '\n'
+            'Binary bitwise operations\n'
+            '*************************\n'
+            '\n'
+            'Each of the three bitwise operations has a different priority '
+            'level:\n'
+            '\n'
+            '   and_expr ::= shift_expr | and_expr "&" shift_expr\n'
+            '   xor_expr ::= and_expr | xor_expr "^" and_expr\n'
+            '   or_expr  ::= xor_expr | or_expr "|" xor_expr\n'
+            '\n'
+            'The "&" operator yields the bitwise AND of its arguments, which '
+            'must\n'
+            'be plain or long integers.  The arguments are converted to a '
+            'common\n'
+            'type.\n'
+            '\n'
+            'The "^" operator yields the bitwise XOR (exclusive OR) of its\n'
+            'arguments, which must be plain or long integers.  The arguments '
+            'are\n'
+            'converted to a common type.\n'
+            '\n'
+            'The "|" operator yields the bitwise (inclusive) OR of its '
+            'arguments,\n'
+            'which must be plain or long integers.  The arguments are '
+            'converted to\n'
+            'a common type.\n',
+ 'bltin-code-objects': '\n'
+                       'Code Objects\n'
+                       '************\n'
+                       '\n'
+                       'Code objects are used by the implementation to '
+                       'represent "pseudo-\n'
+                       'compiled" executable Python code such as a function '
+                       'body. They differ\n'
+                       "from function objects because they don't contain a "
+                       'reference to their\n'
+                       'global execution environment.  Code objects are '
+                       'returned by the built-\n'
+                       'in "compile()" function and can be extracted from '
+                       'function objects\n'
+                       'through their "func_code" attribute. See also the '
+                       '"code" module.\n'
+                       '\n'
+                       'A code object can be executed or evaluated by '
+                       'passing it (instead of a\n'
+                       'source string) to the "exec" statement or the '
+                       'built-in "eval()"\n'
+                       'function.\n'
+                       '\n'
+                       'See The standard type hierarchy for more '
+                       'information.\n',
+ 'bltin-ellipsis-object': '\n'
+                          'The Ellipsis Object\n'
+                          '*******************\n'
+                          '\n'
+                          'This object is used by extended slice notation '
+                          '(see Slicings).  It\n'
+                          'supports no special operations.  There is exactly '
+                          'one ellipsis object,\n'
+                          'named "Ellipsis" (a built-in name).\n'
+                          '\n'
+                          'It is written as "Ellipsis".  When in a '
+                          'subscript, it can also be\n'
+                          'written as "...", for example "seq[...]".\n',
+ 'bltin-null-object': '\n'
+                      'The Null Object\n'
+                      '***************\n'
+                      '\n'
+                      "This object is returned by functions that don't "
+                      'explicitly return a\n'
+                      'value.  It supports no special operations.  There is '
+                      'exactly one null\n'
+                      'object, named "None" (a built-in name).\n'
+                      '\n'
+                      'It is written as "None".\n',
+ 'bltin-type-objects': '\n'
+                       'Type Objects\n'
+                       '************\n'
+                       '\n'
+                       'Type objects represent the various object types.  An '
+                       "object's type is\n"
+                       'accessed by the built-in function "type()".  There '
+                       'are no special\n'
+                       'operations on types.  The standard module "types" '
+                       'defines names for\n'
+                       'all standard built-in types.\n'
+                       '\n'
+                       'Types are written like this: "<type \'int\'>".\n',
+ 'booleans': '\n'
+             'Boolean operations\n'
+             '******************\n'
+             '\n'
+             '   or_test  ::= and_test | or_test "or" and_test\n'
+             '   and_test ::= not_test | and_test "and" not_test\n'
+             '   not_test ::= comparison | "not" not_test\n'
+             '\n'
+             'In the context of Boolean operations, and also when '
+             'expressions are\n'
+             'used by control flow statements, the following values are '
+             'interpreted\n'
+             'as false: "False", "None", numeric zero of all types, and '
+             'empty\n'
+             'strings and containers (including strings, tuples, lists,\n'
+             'dictionaries, sets and frozensets).  All other values are '
+             'interpreted\n'
+             'as true.  (See the "__nonzero__()" special method for a way to '
+             'change\n'
+             'this.)\n'
+             '\n'
+             'The operator "not" yields "True" if its argument is false, '
+             '"False"\n'
+             'otherwise.\n'
+             '\n'
+             'The expression "x and y" first evaluates *x*; if *x* is false, '
+             'its\n'
+             'value is returned; otherwise, *y* is evaluated and the '
+             'resulting value\n'
+             'is returned.\n'
+             '\n'
+             'The expression "x or y" first evaluates *x*; if *x* is true, '
+             'its value\n'
+             'is returned; otherwise, *y* is evaluated and the resulting '
+             'value is\n'
+             'returned.\n'
+             '\n'
+             '(Note that neither "and" nor "or" restrict the value and type '
+             'they\n'
+             'return to "False" and "True", but rather return the last '
+             'evaluated\n'
+             'argument. This is sometimes useful, e.g., if "s" is a string '
+             'that\n'
+             'should be replaced by a default value if it is empty, the '
+             'expression\n'
+             '"s or \'foo\'" yields the desired value.  Because "not" has to '
+             'invent a\n'
+             'value anyway, it does not bother to return a value of the same '
+             'type as\n'
+             'its argument, so e.g., "not \'foo\'" yields "False", not '
+             '"\'\'".)\n',
+ 'break': '\n'
+          'The "break" statement\n'
+          '*********************\n'
+          '\n'
+          '   break_stmt ::= "break"\n'
+          '\n'
+          '"break" may only occur syntactically nested in a "for" or '
+          '"while"\n'
+          'loop, but not nested in a function or class definition within '
+          'that\n'
+          'loop.\n'
+          '\n'
+          'It terminates the nearest enclosing loop, skipping the optional '
+          '"else"\n'
+          'clause if the loop has one.\n'
+          '\n'
+          'If a "for" loop is terminated by "break", the loop control '
+          'target\n'
+          'keeps its current value.\n'
+          '\n'
+          'When "break" passes control out of a "try" statement with a '
+          '"finally"\n'
+          'clause, that "finally" clause is executed before really leaving '
+          'the\n'
+          'loop.\n',
+ 'callable-types': '\n'
+                   'Emulating callable objects\n'
+                   '**************************\n'
+                   '\n'
+                   'object.__call__(self[, args...])\n'
+                   '\n'
+                   '   Called when the instance is "called" as a function; '
+                   'if this method\n'
+                   '   is defined, "x(arg1, arg2, ...)" is a shorthand for\n'
+                   '   "x.__call__(arg1, arg2, ...)".\n',
+ 'calls': '\n'
+          'Calls\n'
+          '*****\n'
+          '\n'
+          'A call calls a callable object (e.g., a *function*) with a '
+          'possibly\n'
+          'empty series of *arguments*:\n'
+          '\n'
+          '   call                 ::= primary "(" [argument_list [","]\n'
+          '            | expression genexpr_for] ")"\n'
+          '   argument_list        ::= positional_arguments ["," '
+          'keyword_arguments]\n'
+          '                       ["," "*" expression] ["," '
+          'keyword_arguments]\n'
+          '                       ["," "**" expression]\n'
+          '                     | keyword_arguments ["," "*" expression]\n'
+          '                       ["," "**" expression]\n'
+          '                     | "*" expression ["," keyword_arguments] '
+          '["," "**" expression]\n'
+          '                     | "**" expression\n'
+          '   positional_arguments ::= expression ("," expression)*\n'
+          '   keyword_arguments    ::= keyword_item ("," keyword_item)*\n'
+          '   keyword_item         ::= identifier "=" expression\n'
+          '\n'
+          'A trailing comma may be present after the positional and keyword\n'
+          'arguments but does not affect the semantics.\n'
+          '\n'
+          'The primary must evaluate to a callable object (user-defined\n'
+          'functions, built-in functions, methods of built-in objects, '
+          'class\n'
+          'objects, methods of class instances, and certain class instances\n'
+          'themselves are callable; extensions may define additional '
+          'callable\n'
+          'object types).  All argument expressions are evaluated before the '
+          'call\n'
+          'is attempted.  Please refer to section Function definitions for '
+          'the\n'
+          'syntax of formal *parameter* lists.\n'
+          '\n'
+          'If keyword arguments are present, they are first converted to\n'
+          'positional arguments, as follows.  First, a list of unfilled '
+          'slots is\n'
+          'created for the formal parameters.  If there are N positional\n'
+          'arguments, they are placed in the first N slots.  Next, for each\n'
+          'keyword argument, the identifier is used to determine the\n'
+          'corresponding slot (if the identifier is the same as the first '
+          'formal\n'
+          'parameter name, the first slot is used, and so on).  If the slot '
+          'is\n'
+          'already filled, a "TypeError" exception is raised. Otherwise, '
+          'the\n'
+          'value of the argument is placed in the slot, filling it (even if '
+          'the\n'
+          'expression is "None", it fills the slot).  When all arguments '
+          'have\n'
+          'been processed, the slots that are still unfilled are filled with '
+          'the\n'
+          'corresponding default value from the function definition.  '
+          '(Default\n'
+          'values are calculated, once, when the function is defined; thus, '
+          'a\n'
+          'mutable object such as a list or dictionary used as default value '
+          'will\n'
+          "be shared by all calls that don't specify an argument value for "
+          'the\n'
+          'corresponding slot; this should usually be avoided.)  If there '
+          'are any\n'
+          'unfilled slots for which no default value is specified, a '
+          '"TypeError"\n'
+          'exception is raised.  Otherwise, the list of filled slots is used '
+          'as\n'
+          'the argument list for the call.\n'
+          '\n'
+          '**CPython implementation detail:** An implementation may provide\n'
+          'built-in functions whose positional parameters do not have names, '
+          'even\n'
+          "if they are 'named' for the purpose of documentation, and which\n"
+          'therefore cannot be supplied by keyword.  In CPython, this is the '
+          'case\n'
+          'for functions implemented in C that use "PyArg_ParseTuple()" to '
+          'parse\n'
+          'their arguments.\n'
+          '\n'
+          'If there are more positional arguments than there are formal '
+          'parameter\n'
+          'slots, a "TypeError" exception is raised, unless a formal '
+          'parameter\n'
+          'using the syntax "*identifier" is present; in this case, that '
+          'formal\n'
+          'parameter receives a tuple containing the excess positional '
+          'arguments\n'
+          '(or an empty tuple if there were no excess positional '
+          'arguments).\n'
+          '\n'
+          'If any keyword argument does not correspond to a formal '
+          'parameter\n'
+          'name, a "TypeError" exception is raised, unless a formal '
+          'parameter\n'
+          'using the syntax "**identifier" is present; in this case, that '
+          'formal\n'
+          'parameter receives a dictionary containing the excess keyword\n'
+          'arguments (using the keywords as keys and the argument values as\n'
+          'corresponding values), or a (new) empty dictionary if there were '
+          'no\n'
+          'excess keyword arguments.\n'
+          '\n'
+          'If the syntax "*expression" appears in the function call, '
+          '"expression"\n'
+          'must evaluate to an iterable.  Elements from this iterable are '
+          'treated\n'
+          'as if they were additional positional arguments; if there are\n'
+          'positional arguments *x1*, ..., *xN*, and "expression" evaluates '
+          'to a\n'
+          'sequence *y1*, ..., *yM*, this is equivalent to a call with M+N\n'
+          'positional arguments *x1*, ..., *xN*, *y1*, ..., *yM*.\n'
+          '\n'
+          'A consequence of this is that although the "*expression" syntax '
+          'may\n'
+          'appear *after* some keyword arguments, it is processed *before* '
+          'the\n'
+          'keyword arguments (and the "**expression" argument, if any -- '
+          'see\n'
+          'below).  So:\n'
+          '\n'
+          '   >>> def f(a, b):\n'
+          '   ...  print a, b\n'
+          '   ...\n'
+          '   >>> f(b=1, *(2,))\n'
+          '   2 1\n'
+          '   >>> f(a=1, *(2,))\n'
+          '   Traceback (most recent call last):\n'
+          '     File "<stdin>", line 1, in ?\n'
+          "   TypeError: f() got multiple values for keyword argument 'a'\n"
+          '   >>> f(1, *(2,))\n'
+          '   1 2\n'
+          '\n'
+          'It is unusual for both keyword arguments and the "*expression" '
+          'syntax\n'
+          'to be used in the same call, so in practice this confusion does '
+          'not\n'
+          'arise.\n'
+          '\n'
+          'If the syntax "**expression" appears in the function call,\n'
+          '"expression" must evaluate to a mapping, the contents of which '
+          'are\n'
+          'treated as additional keyword arguments.  In the case of a '
+          'keyword\n'
+          'appearing in both "expression" and as an explicit keyword '
+          'argument, a\n'
+          '"TypeError" exception is raised.\n'
+          '\n'
+          'Formal parameters using the syntax "*identifier" or '
+          '"**identifier"\n'
+          'cannot be used as positional argument slots or as keyword '
+          'argument\n'
+          'names.  Formal parameters using the syntax "(sublist)" cannot be '
+          'used\n'
+          'as keyword argument names; the outermost sublist corresponds to '
+          'a\n'
+          'single unnamed argument slot, and the argument value is assigned '
+          'to\n'
+          'the sublist using the usual tuple assignment rules after all '
+          'other\n'
+          'parameter processing is done.\n'
+          '\n'
+          'A call always returns some value, possibly "None", unless it '
+          'raises an\n'
+          'exception.  How this value is computed depends on the type of '
+          'the\n'
+          'callable object.\n'
+          '\n'
+          'If it is---\n'
+          '\n'
+          'a user-defined function:\n'
+          '   The code block for the function is executed, passing it the\n'
+          '   argument list.  The first thing the code block will do is bind '
+          'the\n'
+          '   formal parameters to the arguments; this is described in '
+          'section\n'
+          '   Function definitions.  When the code block executes a '
+          '"return"\n'
+          '   statement, this specifies the return value of the function '
+          'call.\n'
+          '\n'
+          'a built-in function or method:\n'
+          '   The result is up to the interpreter; see Built-in Functions '
+          'for the\n'
+          '   descriptions of built-in functions and methods.\n'
+          '\n'
+          'a class object:\n'
+          '   A new instance of that class is returned.\n'
+          '\n'
+          'a class instance method:\n'
+          '   The corresponding user-defined function is called, with an '
+          'argument\n'
+          '   list that is one longer than the argument list of the call: '
+          'the\n'
+          '   instance becomes the first argument.\n'
+          '\n'
+          'a class instance:\n'
+          '   The class must define a "__call__()" method; the effect is '
+          'then the\n'
+          '   same as if that method was called.\n',
+ 'class': '\n'
+          'Class definitions\n'
+          '*****************\n'
+          '\n'
+          'A class definition defines a class object (see section The '
+          'standard\n'
+          'type hierarchy):\n'
+          '\n'
+          '   classdef    ::= "class" classname [inheritance] ":" suite\n'
+          '   inheritance ::= "(" [expression_list] ")"\n'
+          '   classname   ::= identifier\n'
+          '\n'
+          'A class definition is an executable statement.  It first '
+          'evaluates the\n'
+          'inheritance list, if present.  Each item in the inheritance list\n'
+          'should evaluate to a class object or class type which allows\n'
+          "subclassing.  The class's suite is then executed in a new "
+          'execution\n'
+          'frame (see section Naming and binding), using a newly created '
+          'local\n'
+          'namespace and the original global namespace. (Usually, the suite\n'
+          "contains only function definitions.)  When the class's suite "
+          'finishes\n'
+          'execution, its execution frame is discarded but its local '
+          'namespace is\n'
+          'saved. [4] A class object is then created using the inheritance '
+          'list\n'
+          'for the base classes and the saved local namespace for the '
+          'attribute\n'
+          'dictionary.  The class name is bound to this class object in the\n'
+          'original local namespace.\n'
+          '\n'
+          "**Programmer's note:** Variables defined in the class definition "
+          'are\n'
+          'class variables; they are shared by all instances.  To create '
+          'instance\n'
+          'variables, they can be set in a method with "self.name = value".  '
+          'Both\n'
+          'class and instance variables are accessible through the notation\n'
+          '""self.name"", and an instance variable hides a class variable '
+          'with\n'
+          'the same name when accessed in this way. Class variables can be '
+          'used\n'
+          'as defaults for instance variables, but using mutable values '
+          'there can\n'
+          'lead to unexpected results.  For *new-style class*es, descriptors '
+          'can\n'
+          'be used to create instance variables with different '
+          'implementation\n'
+          'details.\n'
+          '\n'
+          'Class definitions, like function definitions, may be wrapped by '
+          'one or\n'
+          'more *decorator* expressions.  The evaluation rules for the '
+          'decorator\n'
+          'expressions are the same as for functions.  The result must be a '
+          'class\n'
+          'object, which is then bound to the class name.\n'
+          '\n'
+          '-[ Footnotes ]-\n'
+          '\n'
+          '[1] The exception is propagated to the invocation stack unless\n'
+          '    there is a "finally" clause which happens to raise another\n'
+          '    exception. That new exception causes the old one to be lost.\n'
+          '\n'
+          '[2] Currently, control "flows off the end" except in the case of\n'
+          '    an exception or the execution of a "return", "continue", or\n'
+          '    "break" statement.\n'
+          '\n'
+          '[3] A string literal appearing as the first statement in the\n'
+          '    function body is transformed into the function\'s "__doc__"\n'
+          "    attribute and therefore the function's *docstring*.\n"
+          '\n'
+          '[4] A string literal appearing as the first statement in the '
+          'class\n'
+          '    body is transformed into the namespace\'s "__doc__" item and\n'
+          "    therefore the class's *docstring*.\n",
+ 'comparisons': '\n'
+                'Comparisons\n'
+                '***********\n'
+                '\n'
+                'Unlike C, all comparison operations in Python have the same '
+                'priority,\n'
+                'which is lower than that of any arithmetic, shifting or '
+                'bitwise\n'
+                'operation.  Also unlike C, expressions like "a < b < c" '
+                'have the\n'
+                'interpretation that is conventional in mathematics:\n'
+                '\n'
+                '   comparison    ::= or_expr ( comp_operator or_expr )*\n'
+                '   comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "<>" '
+                '| "!="\n'
+                '                     | "is" ["not"] | ["not"] "in"\n'
+                '\n'
+                'Comparisons yield boolean values: "True" or "False".\n'
+                '\n'
+                'Comparisons can be chained arbitrarily, e.g., "x < y <= z" '
+                'is\n'
+                'equivalent to "x < y and y <= z", except that "y" is '
+                'evaluated only\n'
+                'once (but in both cases "z" is not evaluated at all when "x '
+                '< y" is\n'
+                'found to be false).\n'
+                '\n'
+                'Formally, if *a*, *b*, *c*, ..., *y*, *z* are expressions '
+                'and *op1*,\n'
+                '*op2*, ..., *opN* are comparison operators, then "a op1 b '
+                'op2 c ... y\n'
+                'opN z" is equivalent to "a op1 b and b op2 c and ... y opN '
+                'z", except\n'
+                'that each expression is evaluated at most once.\n'
+                '\n'
+                'Note that "a op1 b op2 c" doesn\'t imply any kind of '
+                'comparison between\n'
+                '*a* and *c*, so that, e.g., "x < y > z" is perfectly legal '
+                '(though\n'
+                'perhaps not pretty).\n'
+                '\n'
+                'The forms "<>" and "!=" are equivalent; for consistency '
+                'with C, "!="\n'
+                'is preferred; where "!=" is mentioned below "<>" is also '
+                'accepted.\n'
+                'The "<>" spelling is considered obsolescent.\n'
+                '\n'
+                'The operators "<", ">", "==", ">=", "<=", and "!=" compare '
+                'the values\n'
+                'of two objects.  The objects need not have the same type. '
+                'If both are\n'
+                'numbers, they are converted to a common type.  Otherwise, '
+                'objects of\n'
+                'different types *always* compare unequal, and are ordered '
+                'consistently\n'
+                'but arbitrarily. You can control comparison behavior of '
+                'objects of\n'
+                'non-built-in types by defining a "__cmp__" method or rich '
+                'comparison\n'
+                'methods like "__gt__", described in section Special method '
+                'names.\n'
+                '\n'
+                '(This unusual definition of comparison was used to simplify '
+                'the\n'
+                'definition of operations like sorting and the "in" and "not '
+                'in"\n'
+                'operators. In the future, the comparison rules for objects '
+                'of\n'
+                'different types are likely to change.)\n'
+                '\n'
+                'Comparison of objects of the same type depends on the '
+                'type:\n'
+                '\n'
+                '* Numbers are compared arithmetically.\n'
+                '\n'
+                '* Strings are compared lexicographically using the numeric\n'
+                '  equivalents (the result of the built-in function "ord()") '
+                'of their\n'
+                '  characters. Unicode and 8-bit strings are fully '
+                'interoperable in\n'
+                '  this behavior. [4]\n'
+                '\n'
+                '* Tuples and lists are compared lexicographically using '
+                'comparison\n'
+                '  of corresponding elements.  This means that to compare '
+                'equal, each\n'
+                '  element must compare equal and the two sequences must be '
+                'of the same\n'
+                '  type and have the same length.\n'
+                '\n'
+                '  If not equal, the sequences are ordered the same as their '
+                'first\n'
+                '  differing elements.  For example, "cmp([1,2,x], [1,2,y])" '
+                'returns\n'
+                '  the same as "cmp(x,y)".  If the corresponding element '
+                'does not\n'
+                '  exist, the shorter sequence is ordered first (for '
+                'example, "[1,2] <\n'
+                '  [1,2,3]").\n'
+                '\n'
+                '* Mappings (dictionaries) compare equal if and only if '
+                'their sorted\n'
+                '  (key, value) lists compare equal. [5] Outcomes other than '
+                'equality\n'
+                '  are resolved consistently, but are not otherwise defined. '
+                '[6]\n'
+                '\n'
+                '* Most other objects of built-in types compare unequal '
+                'unless they\n'
+                '  are the same object; the choice whether one object is '
+                'considered\n'
+                '  smaller or larger than another one is made arbitrarily '
+                'but\n'
+                '  consistently within one execution of a program.\n'
+                '\n'
+                'The operators "in" and "not in" test for collection '
+                'membership.  "x in\n'
+                's" evaluates to true if *x* is a member of the collection '
+                '*s*, and\n'
+                'false otherwise.  "x not in s" returns the negation of "x '
+                'in s". The\n'
+                'collection membership test has traditionally been bound to '
+                'sequences;\n'
+                'an object is a member of a collection if the collection is '
+                'a sequence\n'
+                'and contains an element equal to that object.  However, it '
+                'make sense\n'
+                'for many other object types to support membership tests '
+                'without being\n'
+                'a sequence.  In particular, dictionaries (for keys) and '
+                'sets support\n'
+                'membership testing.\n'
+                '\n'
+                'For the list and tuple types, "x in y" is true if and only '
+                'if there\n'
+                'exists an index *i* such that "x == y[i]" is true.\n'
+                '\n'
+                'For the Unicode and string types, "x in y" is true if and '
+                'only if *x*\n'
+                'is a substring of *y*.  An equivalent test is "y.find(x) != '
+                '-1".\n'
+                'Note, *x* and *y* need not be the same type; consequently, '
+                '"u\'ab\' in\n'
+                '\'abc\'" will return "True". Empty strings are always '
+                'considered to be a\n'
+                'substring of any other string, so """ in "abc"" will return '
+                '"True".\n'
+                '\n'
+                'Changed in version 2.3: Previously, *x* was required to be '
+                'a string of\n'
+                'length "1".\n'
+                '\n'
+                'For user-defined classes which define the "__contains__()" '
+                'method, "x\n'
+                'in y" is true if and only if "y.__contains__(x)" is true.\n'
+                '\n'
+                'For user-defined classes which do not define '
+                '"__contains__()" but do\n'
+                'define "__iter__()", "x in y" is true if some value "z" '
+                'with "x == z"\n'
+                'is produced while iterating over "y".  If an exception is '
+                'raised\n'
+                'during the iteration, it is as if "in" raised that '
+                'exception.\n'
+                '\n'
+                'Lastly, the old-style iteration protocol is tried: if a '
+                'class defines\n'
+                '"__getitem__()", "x in y" is true if and only if there is a '
+                'non-\n'
+                'negative integer index *i* such that "x == y[i]", and all '
+                'lower\n'
+                'integer indices do not raise "IndexError" exception. (If '
+                'any other\n'
+                'exception is raised, it is as if "in" raised that '
+                'exception).\n'
+                '\n'
+                'The operator "not in" is defined to have the inverse true '
+                'value of\n'
+                '"in".\n'
+                '\n'
+                'The operators "is" and "is not" test for object identity: '
+                '"x is y" is\n'
+                'true if and only if *x* and *y* are the same object.  "x is '
+                'not y"\n'
+                'yields the inverse truth value. [7]\n',
+ 'compound': '\n'
+             'Compound statements\n'
+             '*******************\n'
+             '\n'
+             'Compound statements contain (groups of) other statements; they '
+             'affect\n'
+             'or control the execution of those other statements in some '
+             'way.  In\n'
+             'general, compound statements span multiple lines, although in '
+             'simple\n'
+             'incarnations a whole compound statement may be contained in '
+             'one line.\n'
+             '\n'
+             'The "if", "while" and "for" statements implement traditional '
+             'control\n'
+             'flow constructs.  "try" specifies exception handlers and/or '
+             'cleanup\n'
+             'code for a group of statements.  Function and class '
+             'definitions are\n'
+             'also syntactically compound statements.\n'
+             '\n'
+             "Compound statements consist of one or more 'clauses.'  A "
+             'clause\n'
+             "consists of a header and a 'suite.'  The clause headers of a\n"
+             'particular compound statement are all at the same indentation '
+             'level.\n'
+             'Each clause header begins with a uniquely identifying keyword '
+             'and ends\n'
+             'with a colon.  A suite is a group of statements controlled by '
+             'a\n'
+             'clause.  A suite can be one or more semicolon-separated '
+             'simple\n'
+             'statements on the same line as the header, following the '
+             "header's\n"
+             'colon, or it can be one or more indented statements on '
+             'subsequent\n'
+             'lines.  Only the latter form of suite can contain nested '
+             'compound\n'
+             'statements; the following is illegal, mostly because it '
+             "wouldn't be\n"
+             'clear to which "if" clause a following "else" clause would '
+             'belong:\n'
+             '\n'
+             '   if test1: if test2: print x\n'
+             '\n'
+             'Also note that the semicolon binds tighter than the colon in '
+             'this\n'
+             'context, so that in the following example, either all or none '
+             'of the\n'
+             '"print" statements are executed:\n'
+             '\n'
+             '   if x < y < z: print x; print y; print z\n'
+             '\n'
+             'Summarizing:\n'
+             '\n'
+             '   compound_stmt ::= if_stmt\n'
+             '                     | while_stmt\n'
+             '                     | for_stmt\n'
+             '                     | try_stmt\n'
+             '                     | with_stmt\n'
+             '                     | funcdef\n'
+             '                     | classdef\n'
+             '                     | decorated\n'
+             '   suite         ::= stmt_list NEWLINE | NEWLINE INDENT '
+             'statement+ DEDENT\n'
+             '   statement     ::= stmt_list NEWLINE | compound_stmt\n'
+             '   stmt_list     ::= simple_stmt (";" simple_stmt)* [";"]\n'
+             '\n'
+             'Note that statements always end in a "NEWLINE" possibly '
+             'followed by a\n'
+             '"DEDENT". Also note that optional continuation clauses always '
+             'begin\n'
+             'with a keyword that cannot start a statement, thus there are '
+             'no\n'
+             'ambiguities (the \'dangling "else"\' problem is solved in '
+             'Python by\n'
+             'requiring nested "if" statements to be indented).\n'
+             '\n'
+             'The formatting of the grammar rules in the following sections '
+             'places\n'
+             'each clause on a separate line for clarity.\n'
+             '\n'
+             '\n'
+             'The "if" statement\n'
+             '==================\n'
+             '\n'
+             'The "if" statement is used for conditional execution:\n'
+             '\n'
+             '   if_stmt ::= "if" expression ":" suite\n'
+             '               ( "elif" expression ":" suite )*\n'
+             '               ["else" ":" suite]\n'
+             '\n'
+             'It selects exactly one of the suites by evaluating the '
+             'expressions one\n'
+             'by one until one is found to be true (see section Boolean '
+             'operations\n'
+             'for the definition of true and false); then that suite is '
+             'executed\n'
+             '(and no other part of the "if" statement is executed or '
+             'evaluated).\n'
+             'If all expressions are false, the suite of the "else" clause, '
+             'if\n'
+             'present, is executed.\n'
+             '\n'
+             '\n'
+             'The "while" statement\n'
+             '=====================\n'
+             '\n'
+             'The "while" statement is used for repeated execution as long '
+             'as an\n'
+             'expression is true:\n'
+             '\n'
+             '   while_stmt ::= "while" expression ":" suite\n'
+             '                  ["else" ":" suite]\n'
+             '\n'
+             'This repeatedly tests the expression and, if it is true, '
+             'executes the\n'
+             'first suite; if the expression is false (which may be the '
+             'first time\n'
+             'it is tested) the suite of the "else" clause, if present, is '
+             'executed\n'
+             'and the loop terminates.\n'
+             '\n'
+             'A "break" statement executed in the first suite terminates the '
+             'loop\n'
+             'without executing the "else" clause\'s suite.  A "continue" '
+             'statement\n'
+             'executed in the first suite skips the rest of the suite and '
+             'goes back\n'
+             'to testing the expression.\n'
+             '\n'
+             '\n'
+             'The "for" statement\n'
+             '===================\n'
+             '\n'
+             'The "for" statement is used to iterate over the elements of a '
+             'sequence\n'
+             '(such as a string, tuple or list) or other iterable object:\n'
+             '\n'
+             '   for_stmt ::= "for" target_list "in" expression_list ":" '
+             'suite\n'
+             '                ["else" ":" suite]\n'
+             '\n'
+             'The expression list is evaluated once; it should yield an '
+             'iterable\n'
+             'object.  An iterator is created for the result of the\n'
+             '"expression_list".  The suite is then executed once for each '
+             'item\n'
+             'provided by the iterator, in the order of ascending indices.  '
+             'Each\n'
+             'item in turn is assigned to the target list using the standard '
+             'rules\n'
+             'for assignments, and then the suite is executed.  When the '
+             'items are\n'
+             'exhausted (which is immediately when the sequence is empty), '
+             'the suite\n'
+             'in the "else" clause, if present, is executed, and the loop\n'
+             'terminates.\n'
+             '\n'
+             'A "break" statement executed in the first suite terminates the '
+             'loop\n'
+             'without executing the "else" clause\'s suite.  A "continue" '
+             'statement\n'
+             'executed in the first suite skips the rest of the suite and '
+             'continues\n'
+             'with the next item, or with the "else" clause if there was no '
+             'next\n'
+             'item.\n'
+             '\n'
+             'The suite may assign to the variable(s) in the target list; '
+             'this does\n'
+             'not affect the next item assigned to it.\n'
+             '\n'
+             'The target list is not deleted when the loop is finished, but '
+             'if the\n'
+             'sequence is empty, it will not have been assigned to at all by '
+             'the\n'
+             'loop.  Hint: the built-in function "range()" returns a '
+             'sequence of\n'
+             'integers suitable to emulate the effect of Pascal\'s "for i := '
+             'a to b\n'
+             'do"; e.g., "range(3)" returns the list "[0, 1, 2]".\n'
+             '\n'
+             'Note: There is a subtlety when the sequence is being modified '
+             'by the\n'
+             '  loop (this can only occur for mutable sequences, i.e. '
+             'lists). An\n'
+             '  internal counter is used to keep track of which item is used '
+             'next,\n'
+             '  and this is incremented on each iteration.  When this '
+             'counter has\n'
+             '  reached the length of the sequence the loop terminates.  '
+             'This means\n'
+             '  that if the suite deletes the current (or a previous) item '
+             'from the\n'
+             '  sequence, the next item will be skipped (since it gets the '
+             'index of\n'
+             '  the current item which has already been treated).  Likewise, '
+             'if the\n'
+             '  suite inserts an item in the sequence before the current '
+             'item, the\n'
+             '  current item will be treated again the next time through the '
+             'loop.\n'
+             '  This can lead to nasty bugs that can be avoided by making a\n'
+             '  temporary copy using a slice of the whole sequence, e.g.,\n'
+             '\n'
+             '     for x in a[:]:\n'
+             '         if x < 0: a.remove(x)\n'
+             '\n'
+             '\n'
+             'The "try" statement\n'
+             '===================\n'
+             '\n'
+             'The "try" statement specifies exception handlers and/or '
+             'cleanup code\n'
+             'for a group of statements:\n'
+             '\n'
+             '   try_stmt  ::= try1_stmt | try2_stmt\n'
+             '   try1_stmt ::= "try" ":" suite\n'
+             '                 ("except" [expression [("as" | ",") '
+             'identifier]] ":" suite)+\n'
+             '                 ["else" ":" suite]\n'
+             '                 ["finally" ":" suite]\n'
+             '   try2_stmt ::= "try" ":" suite\n'
+             '                 "finally" ":" suite\n'
+             '\n'
+             'Changed in version 2.5: In previous versions of Python,\n'
+             '"try"..."except"..."finally" did not work. "try"..."except" '
+             'had to be\n'
+             'nested in "try"..."finally".\n'
+             '\n'
+             'The "except" clause(s) specify one or more exception handlers. '
+             'When no\n'
+             'exception occurs in the "try" clause, no exception handler is\n'
+             'executed. When an exception occurs in the "try" suite, a '
+             'search for an\n'
+             'exception handler is started.  This search inspects the except '
+             'clauses\n'
+             'in turn until one is found that matches the exception.  An '
+             'expression-\n'
+             'less except clause, if present, must be last; it matches any\n'
+             'exception.  For an except clause with an expression, that '
+             'expression\n'
+             'is evaluated, and the clause matches the exception if the '
+             'resulting\n'
+             'object is "compatible" with the exception.  An object is '
+             'compatible\n'
+             'with an exception if it is the class or a base class of the '
+             'exception\n'
+             'object, or a tuple containing an item compatible with the '
+             'exception.\n'
+             '\n'
+             'If no except clause matches the exception, the search for an '
+             'exception\n'
+             'handler continues in the surrounding code and on the '
+             'invocation stack.\n'
+             '[1]\n'
+             '\n'
+             'If the evaluation of an expression in the header of an except '
+             'clause\n'
+             'raises an exception, the original search for a handler is '
+             'canceled and\n'
+             'a search starts for the new exception in the surrounding code '
+             'and on\n'
+             'the call stack (it is treated as if the entire "try" statement '
+             'raised\n'
+             'the exception).\n'
+             '\n'
+             'When a matching except clause is found, the exception is '
+             'assigned to\n'
+             'the target specified in that except clause, if present, and '
+             'the except\n'
+             "clause's suite is executed.  All except clauses must have an\n"
+             'executable block.  When the end of this block is reached, '
+             'execution\n'
+             'continues normally after the entire try statement.  (This '
+             'means that\n'
+             'if two nested handlers exist for the same exception, and the '
+             'exception\n'
+             'occurs in the try clause of the inner handler, the outer '
+             'handler will\n'
+             'not handle the exception.)\n'
+             '\n'
+             "Before an except clause's suite is executed, details about "
+             'the\n'
+             'exception are assigned to three variables in the "sys" '
+             'module:\n'
+             '"sys.exc_type" receives the object identifying the exception;\n'
+             '"sys.exc_value" receives the exception\'s parameter;\n'
+             '"sys.exc_traceback" receives a traceback object (see section '
+             'The\n'
+             'standard type hierarchy) identifying the point in the program '
+             'where\n'
+             'the exception occurred. These details are also available '
+             'through the\n'
+             '"sys.exc_info()" function, which returns a tuple "(exc_type,\n'
+             'exc_value, exc_traceback)".  Use of the corresponding '
+             'variables is\n'
+             'deprecated in favor of this function, since their use is '
+             'unsafe in a\n'
+             'threaded program.  As of Python 1.5, the variables are '
+             'restored to\n'
+             'their previous values (before the call) when returning from a '
+             'function\n'
+             'that handled an exception.\n'
+             '\n'
+             'The optional "else" clause is executed if and when control '
+             'flows off\n'
+             'the end of the "try" clause. [2] Exceptions in the "else" '
+             'clause are\n'
+             'not handled by the preceding "except" clauses.\n'
+             '\n'
+             'If "finally" is present, it specifies a \'cleanup\' handler.  '
+             'The "try"\n'
+             'clause is executed, including any "except" and "else" '
+             'clauses.  If an\n'
+             'exception occurs in any of the clauses and is not handled, '
+             'the\n'
+             'exception is temporarily saved. The "finally" clause is '
+             'executed.  If\n'
+             'there is a saved exception, it is re-raised at the end of the\n'
+             '"finally" clause. If the "finally" clause raises another '
+             'exception or\n'
+             'executes a "return" or "break" statement, the saved exception '
+             'is\n'
+             'discarded:\n'
+             '\n'
+             '   >>> def f():\n'
+             '   ...     try:\n'
+             '   ...         1/0\n'
+             '   ...     finally:\n'
+             '   ...         return 42\n'
+             '   ...\n'
+             '   >>> f()\n'
+             '   42\n'
+             '\n'
+             'The exception information is not available to the program '
+             'during\n'
+             'execution of the "finally" clause.\n'
+             '\n'
+             'When a "return", "break" or "continue" statement is executed '
+             'in the\n'
+             '"try" suite of a "try"..."finally" statement, the "finally" '
+             'clause is\n'
+             'also executed \'on the way out.\' A "continue" statement is '
+             'illegal in\n'
+             'the "finally" clause. (The reason is a problem with the '
+             'current\n'
+             'implementation --- this restriction may be lifted in the '
+             'future).\n'
+             '\n'
+             'The return value of a function is determined by the last '
+             '"return"\n'
+             'statement executed.  Since the "finally" clause always '
+             'executes, a\n'
+             '"return" statement executed in the "finally" clause will '
+             'always be the\n'
+             'last one executed:\n'
+             '\n'
+             '   >>> def foo():\n'
+             '   ...     try:\n'
+             "   ...         return 'try'\n"
+             '   ...     finally:\n'
+             "   ...         return 'finally'\n"
+             '   ...\n'
+             '   >>> foo()\n'
+             "   'finally'\n"
+             '\n'
+             'Additional information on exceptions can be found in section\n'
+             'Exceptions, and information on using the "raise" statement to '
+             'generate\n'
+             'exceptions may be found in section The raise statement.\n'
+             '\n'
+             '\n'
+             'The "with" statement\n'
+             '====================\n'
+             '\n'
+             'New in version 2.5.\n'
+             '\n'
+             'The "with" statement is used to wrap the execution of a block '
+             'with\n'
+             'methods defined by a context manager (see section With '
+             'Statement\n'
+             'Context Managers). This allows common '
+             '"try"..."except"..."finally"\n'
+             'usage patterns to be encapsulated for convenient reuse.\n'
+             '\n'
+             '   with_stmt ::= "with" with_item ("," with_item)* ":" suite\n'
+             '   with_item ::= expression ["as" target]\n'
+             '\n'
+             'The execution of the "with" statement with one "item" proceeds '
+             'as\n'
+             'follows:\n'
+             '\n'
+             '1. The context expression (the expression given in the '
+             '"with_item")\n'
+             '   is evaluated to obtain a context manager.\n'
+             '\n'
+             '2. The context manager\'s "__exit__()" is loaded for later '
+             'use.\n'
+             '\n'
+             '3. The context manager\'s "__enter__()" method is invoked.\n'
+             '\n'
+             '4. If a target was included in the "with" statement, the '
+             'return\n'
+             '   value from "__enter__()" is assigned to it.\n'
+             '\n'
+             '   Note: The "with" statement guarantees that if the '
+             '"__enter__()"\n'
+             '     method returns without an error, then "__exit__()" will '
+             'always be\n'
+             '     called. Thus, if an error occurs during the assignment to '
+             'the\n'
+             '     target list, it will be treated the same as an error '
+             'occurring\n'
+             '     within the suite would be. See step 6 below.\n'
+             '\n'
+             '5. The suite is executed.\n'
+             '\n'
+             '6. The context manager\'s "__exit__()" method is invoked. If '
+             'an\n'
+             '   exception caused the suite to be exited, its type, value, '
+             'and\n'
+             '   traceback are passed as arguments to "__exit__()". '
+             'Otherwise, three\n'
+             '   "None" arguments are supplied.\n'
+             '\n'
+             '   If the suite was exited due to an exception, and the return '
+             'value\n'
+             '   from the "__exit__()" method was false, the exception is '
+             'reraised.\n'
+             '   If the return value was true, the exception is suppressed, '
+             'and\n'
+             '   execution continues with the statement following the '
+             '"with"\n'
+             '   statement.\n'
+             '\n'
+             '   If the suite was exited for any reason other than an '
+             'exception, the\n'
+             '   return value from "__exit__()" is ignored, and execution '
+             'proceeds\n'
+             '   at the normal location for the kind of exit that was '
+             'taken.\n'
+             '\n'
+             'With more than one item, the context managers are processed as '
+             'if\n'
+             'multiple "with" statements were nested:\n'
+             '\n'
+             '   with A() as a, B() as b:\n'
+             '       suite\n'
+             '\n'
+             'is equivalent to\n'
+             '\n'
+             '   with A() as a:\n'
+             '       with B() as b:\n'
+             '           suite\n'
+             '\n'
+             'Note: In Python 2.5, the "with" statement is only allowed when '
+             'the\n'
+             '  "with_statement" feature has been enabled.  It is always '
+             'enabled in\n'
+             '  Python 2.6.\n'
+             '\n'
+             'Changed in version 2.7: Support for multiple context '
+             'expressions.\n'
+             '\n'
+             'See also: **PEP 0343** - The "with" statement\n'
+             '\n'
+             '     The specification, background, and examples for the '
+             'Python "with"\n'
+             '     statement.\n'
+             '\n'
+             '\n'
+             'Function definitions\n'
+             '====================\n'
+             '\n'
+             'A function definition defines a user-defined function object '
+             '(see\n'
+             'section The standard type hierarchy):\n'
+             '\n'
+             '   decorated      ::= decorators (classdef | funcdef)\n'
+             '   decorators     ::= decorator+\n'
+             '   decorator      ::= "@" dotted_name ["(" [argument_list '
+             '[","]] ")"] NEWLINE\n'
+             '   funcdef        ::= "def" funcname "(" [parameter_list] ")" '
+             '":" suite\n'
+             '   dotted_name    ::= identifier ("." identifier)*\n'
+             '   parameter_list ::= (defparameter ",")*\n'
+             '                      (  "*" identifier ["," "**" identifier]\n'
+             '                      | "**" identifier\n'
+             '                      | defparameter [","] )\n'
+             '   defparameter   ::= parameter ["=" expression]\n'
+             '   sublist        ::= parameter ("," parameter)* [","]\n'
+             '   parameter      ::= identifier | "(" sublist ")"\n'
+             '   funcname       ::= identifier\n'
+             '\n'
+             'A function definition is an executable statement.  Its '
+             'execution binds\n'
+             'the function name in the current local namespace to a function '
+             'object\n'
+             '(a wrapper around the executable code for the function).  '
+             'This\n'
+             'function object contains a reference to the current global '
+             'namespace\n'
+             'as the global namespace to be used when the function is '
+             'called.\n'
+             '\n'
+             'The function definition does not execute the function body; '
+             'this gets\n'
+             'executed only when the function is called. [3]\n'
+             '\n'
+             'A function definition may be wrapped by one or more '
+             '*decorator*\n'
+             'expressions. Decorator expressions are evaluated when the '
+             'function is\n'
+             'defined, in the scope that contains the function definition.  '
+             'The\n'
+             'result must be a callable, which is invoked with the function '
+             'object\n'
+             'as the only argument. The returned value is bound to the '
+             'function name\n'
+             'instead of the function object.  Multiple decorators are '
+             'applied in\n'
+             'nested fashion. For example, the following code:\n'
+             '\n'
+             '   @f1(arg)\n'
+             '   @f2\n'
+             '   def func(): pass\n'
+             '\n'
+             'is equivalent to:\n'
+             '\n'
+             '   def func(): pass\n'
+             '   func = f1(arg)(f2(func))\n'
+             '\n'
+             'When one or more top-level *parameters* have the form '
+             '*parameter* "="\n'
+             '*expression*, the function is said to have "default parameter '
+             'values."\n'
+             'For a parameter with a default value, the corresponding '
+             '*argument* may\n'
+             "be omitted from a call, in which case the parameter's default "
+             'value is\n'
+             'substituted.  If a parameter has a default value, all '
+             'following\n'
+             'parameters must also have a default value --- this is a '
+             'syntactic\n'
+             'restriction that is not expressed by the grammar.\n'
+             '\n'
+             '**Default parameter values are evaluated when the function '
+             'definition\n'
+             'is executed.**  This means that the expression is evaluated '
+             'once, when\n'
+             'the function is defined, and that the same "pre-computed" '
+             'value is\n'
+             'used for each call.  This is especially important to '
+             'understand when a\n'
+             'default parameter is a mutable object, such as a list or a '
+             'dictionary:\n'
+             'if the function modifies the object (e.g. by appending an item '
+             'to a\n'
+             'list), the default value is in effect modified. This is '
+             'generally not\n'
+             'what was intended.  A way around this  is to use "None" as '
+             'the\n'
+             'default, and explicitly test for it in the body of the '
+             'function, e.g.:\n'
+             '\n'
+             '   def whats_on_the_telly(penguin=None):\n'
+             '       if penguin is None:\n'
+             '           penguin = []\n'
+             '       penguin.append("property of the zoo")\n'
+             '       return penguin\n'
+             '\n'
+             'Function call semantics are described in more detail in '
+             'section Calls.\n'
+             'A function call always assigns values to all parameters '
+             'mentioned in\n'
+             'the parameter list, either from position arguments, from '
+             'keyword\n'
+             'arguments, or from default values.  If the form '
+             '""*identifier"" is\n'
+             'present, it is initialized to a tuple receiving any excess '
+             'positional\n'
+             'parameters, defaulting to the empty tuple.  If the form\n'
+             '""**identifier"" is present, it is initialized to a new '
+             'dictionary\n'
+             'receiving any excess keyword arguments, defaulting to a new '
+             'empty\n'
+             'dictionary.\n'
+             '\n'
+             'It is also possible to create anonymous functions (functions '
+             'not bound\n'
+             'to a name), for immediate use in expressions.  This uses '
+             'lambda\n'
+             'expressions, described in section Lambdas.  Note that the '
+             'lambda\n'
+             'expression is merely a shorthand for a simplified function '
+             'definition;\n'
+             'a function defined in a ""def"" statement can be passed around '
+             'or\n'
+             'assigned to another name just like a function defined by a '
+             'lambda\n'
+             'expression.  The ""def"" form is actually more powerful since '
+             'it\n'
+             'allows the execution of multiple statements.\n'
+             '\n'
+             "**Programmer's note:** Functions are first-class objects.  A "
+             '""def""\n'
+             'form executed inside a function definition defines a local '
+             'function\n'
+             'that can be returned or passed around.  Free variables used in '
+             'the\n'
+             'nested function can access the local variables of the '
+             'function\n'
+             'containing the def.  See section Naming and binding for '
+             'details.\n'
+             '\n'
+             '\n'
+             'Class definitions\n'
+             '=================\n'
+             '\n'
+             'A class definition defines a class object (see section The '
+             'standard\n'
+             'type hierarchy):\n'
+             '\n'
+             '   classdef    ::= "class" classname [inheritance] ":" suite\n'
+             '   inheritance ::= "(" [expression_list] ")"\n'
+             '   classname   ::= identifier\n'
+             '\n'
+             'A class definition is an executable statement.  It first '
+             'evaluates the\n'
+             'inheritance list, if present.  Each item in the inheritance '
+             'list\n'
+             'should evaluate to a class object or class type which allows\n'
+             "subclassing.  The class's suite is then executed in a new "
+             'execution\n'
+             'frame (see section Naming and binding), using a newly created '
+             'local\n'
+             'namespace and the original global namespace. (Usually, the '
+             'suite\n'
+             "contains only function definitions.)  When the class's suite "
+             'finishes\n'
+             'execution, its execution frame is discarded but its local '
+             'namespace is\n'
+             'saved. [4] A class object is then created using the '
+             'inheritance list\n'
+             'for the base classes and the saved local namespace for the '
+             'attribute\n'
+             'dictionary.  The class name is bound to this class object in '
+             'the\n'
+             'original local namespace.\n'
+             '\n'
+             "**Programmer's note:** Variables defined in the class "
+             'definition are\n'
+             'class variables; they are shared by all instances.  To create '
+             'instance\n'
+             'variables, they can be set in a method with "self.name = '
+             'value".  Both\n'
+             'class and instance variables are accessible through the '
+             'notation\n'
+             '""self.name"", and an instance variable hides a class variable '
+             'with\n'
+             'the same name when accessed in this way. Class variables can '
+             'be used\n'
+             'as defaults for instance variables, but using mutable values '
+             'there can\n'
+             'lead to unexpected results.  For *new-style class*es, '
+             'descriptors can\n'
+             'be used to create instance variables with different '
+             'implementation\n'
+             'details.\n'
+             '\n'
+             'Class definitions, like function definitions, may be wrapped '
+             'by one or\n'
+             'more *decorator* expressions.  The evaluation rules for the '
+             'decorator\n'
+             'expressions are the same as for functions.  The result must be '
+             'a class\n'
+             'object, which is then bound to the class name.\n'
+             '\n'
+             '-[ Footnotes ]-\n'
+             '\n'
+             '[1] The exception is propagated to the invocation stack '
+             'unless\n'
+             '    there is a "finally" clause which happens to raise '
+             'another\n'
+             '    exception. That new exception causes the old one to be '
+             'lost.\n'
+             '\n'
+             '[2] Currently, control "flows off the end" except in the case '
+             'of\n'
+             '    an exception or the execution of a "return", "continue", '
+             'or\n'
+             '    "break" statement.\n'
+             '\n'
+             '[3] A string literal appearing as the first statement in the\n'
+             "    function body is transformed into the function's "
+             '"__doc__"\n'
+             "    attribute and therefore the function's *docstring*.\n"
+             '\n'
+             '[4] A string literal appearing as the first statement in the '
+             'class\n'
+             '    body is transformed into the namespace\'s "__doc__" item '
+             'and\n'
+             "    therefore the class's *docstring*.\n",
+ 'context-managers': '\n'
+                     'With Statement Context Managers\n'
+                     '*******************************\n'
+                     '\n'
+                     'New in version 2.5.\n'
+                     '\n'
+                     'A *context manager* is an object that defines the '
+                     'runtime context to\n'
+                     'be established when executing a "with" statement. The '
+                     'context manager\n'
+                     'handles the entry into, and the exit from, the desired '
+                     'runtime context\n'
+                     'for the execution of the block of code.  Context '
+                     'managers are normally\n'
+                     'invoked using the "with" statement (described in '
+                     'section The with\n'
+                     'statement), but can also be used by directly invoking '
+                     'their methods.\n'
+                     '\n'
+                     'Typical uses of context managers include saving and '
+                     'restoring various\n'
+                     'kinds of global state, locking and unlocking '
+                     'resources, closing opened\n'
+                     'files, etc.\n'
+                     '\n'
+                     'For more information on context managers, see Context '
+                     'Manager Types.\n'
+                     '\n'
+                     'object.__enter__(self)\n'
+                     '\n'
+                     '   Enter the runtime context related to this object. '
+                     'The "with"\n'
+                     "   statement will bind this method's return value to "
+                     'the target(s)\n'
+                     '   specified in the "as" clause of the statement, if '
+                     'any.\n'
+                     '\n'
+                     'object.__exit__(self, exc_type, exc_value, traceback)\n'
+                     '\n'
+                     '   Exit the runtime context related to this object. '
+                     'The parameters\n'
+                     '   describe the exception that caused the context to '
+                     'be exited. If the\n'
+                     '   context was exited without an exception, all three '
+                     'arguments will\n'
+                     '   be "None".\n'
+                     '\n'
+                     '   If an exception is supplied, and the method wishes '
+                     'to suppress the\n'
+                     '   exception (i.e., prevent it from being propagated), '
+                     'it should\n'
+                     '   return a true value. Otherwise, the exception will '
+                     'be processed\n'
+                     '   normally upon exit from this method.\n'
+                     '\n'
+                     '   Note that "__exit__()" methods should not reraise '
+                     'the passed-in\n'
+                     "   exception; this is the caller's responsibility.\n"
+                     '\n'
+                     'See also: **PEP 0343** - The "with" statement\n'
+                     '\n'
+                     '     The specification, background, and examples for '
+                     'the Python "with"\n'
+                     '     statement.\n',
+ 'continue': '\n'
+             'The "continue" statement\n'
+             '************************\n'
+             '\n'
+             '   continue_stmt ::= "continue"\n'
+             '\n'
+             '"continue" may only occur syntactically nested in a "for" or '
+             '"while"\n'
+             'loop, but not nested in a function or class definition or '
+             '"finally"\n'
+             'clause within that loop.  It continues with the next cycle of '
+             'the\n'
+             'nearest enclosing loop.\n'
+             '\n'
+             'When "continue" passes control out of a "try" statement with '
+             'a\n'
+             '"finally" clause, that "finally" clause is executed before '
+             'really\n'
+             'starting the next loop cycle.\n',
+ 'conversions': '\n'
+                'Arithmetic conversions\n'
+                '**********************\n'
+                '\n'
+                'When a description of an arithmetic operator below uses the '
+                'phrase\n'
+                '"the numeric arguments are converted to a common type," the '
+                'arguments\n'
+                'are coerced using the coercion rules listed at  Coercion '
+                'rules.  If\n'
+                'both arguments are standard numeric types, the following '
+                'coercions are\n'
+                'applied:\n'
+                '\n'
+                '* If either argument is a complex number, the other is '
+                'converted to\n'
+                '  complex;\n'
+                '\n'
+                '* otherwise, if either argument is a floating point number, '
+                'the\n'
+                '  other is converted to floating point;\n'
+                '\n'
+                '* otherwise, if either argument is a long integer, the '
+                'other is\n'
+                '  converted to long integer;\n'
+                '\n'
+                '* otherwise, both must be plain integers and no conversion '
+                'is\n'
+                '  necessary.\n'
+                '\n'
+                'Some additional rules apply for certain operators (e.g., a '
+                'string left\n'
+                "argument to the '%' operator). Extensions can define their "
+                'own\n'
+                'coercions.\n',
+ 'customization': '\n'
+                  'Basic customization\n'
+                  '*******************\n'
+                  '\n'
+                  'object.__new__(cls[, ...])\n'
+                  '\n'
+                  '   Called to create a new instance of class *cls*.  '
+                  '"__new__()" is a\n'
+                  '   static method (special-cased so you need not declare '
+                  'it as such)\n'
+                  '   that takes the class of which an instance was '
+                  'requested as its\n'
+                  '   first argument.  The remaining arguments are those '
+                  'passed to the\n'
+                  '   object constructor expression (the call to the '
+                  'class).  The return\n'
+                  '   value of "__new__()" should be the new object instance '
+                  '(usually an\n'
+                  '   instance of *cls*).\n'
+                  '\n'
+                  '   Typical implementations create a new instance of the '
+                  'class by\n'
+                  '   invoking the superclass\'s "__new__()" method using\n'
+                  '   "super(currentclass, cls).__new__(cls[, ...])" with '
+                  'appropriate\n'
+                  '   arguments and then modifying the newly-created '
+                  'instance as\n'
+                  '   necessary before returning it.\n'
+                  '\n'
+                  '   If "__new__()" returns an instance of *cls*, then the '
+                  'new\n'
+                  '   instance\'s "__init__()" method will be invoked like\n'
+                  '   "__init__(self[, ...])", where *self* is the new '
+                  'instance and the\n'
+                  '   remaining arguments are the same as were passed to '
+                  '"__new__()".\n'
+                  '\n'
+                  '   If "__new__()" does not return an instance of *cls*, '
+                  'then the new\n'
+                  '   instance\'s "__init__()" method will not be invoked.\n'
+                  '\n'
+                  '   "__new__()" is intended mainly to allow subclasses of '
+                  'immutable\n'
+                  '   types (like int, str, or tuple) to customize instance '
+                  'creation.  It\n'
+                  '   is also commonly overridden in custom metaclasses in '
+                  'order to\n'
+                  '   customize class creation.\n'
+                  '\n'
+                  'object.__init__(self[, ...])\n'
+                  '\n'
+                  '   Called after the instance has been created (by '
+                  '"__new__()"), but\n'
+                  '   before it is returned to the caller.  The arguments '
+                  'are those\n'
+                  '   passed to the class constructor expression.  If a base '
+                  'class has an\n'
+                  '   "__init__()" method, the derived class\'s "__init__()" '
+                  'method, if\n'
+                  '   any, must explicitly call it to ensure proper '
+                  'initialization of the\n'
+                  '   base class part of the instance; for example:\n'
+                  '   "BaseClass.__init__(self, [args...])".\n'
+                  '\n'
+                  '   Because "__new__()" and "__init__()" work together in '
+                  'constructing\n'
+                  '   objects ("__new__()" to create it, and "__init__()" to '
+                  'customise\n'
+                  '   it), no non-"None" value may be returned by '
+                  '"__init__()"; doing so\n'
+                  '   will cause a "TypeError" to be raised at runtime.\n'
+                  '\n'
+                  'object.__del__(self)\n'
+                  '\n'
+                  '   Called when the instance is about to be destroyed.  '
+                  'This is also\n'
+                  '   called a destructor.  If a base class has a '
+                  '"__del__()" method, the\n'
+                  '   derived class\'s "__del__()" method, if any, must '
+                  'explicitly call it\n'
+                  '   to ensure proper deletion of the base class part of '
+                  'the instance.\n'
+                  '   Note that it is possible (though not recommended!) for '
+                  'the\n'
+                  '   "__del__()" method to postpone destruction of the '
+                  'instance by\n'
+                  '   creating a new reference to it.  It may then be called '
+                  'at a later\n'
+                  '   time when this new reference is deleted.  It is not '
+                  'guaranteed that\n'
+                  '   "__del__()" methods are called for objects that still '
+                  'exist when\n'
+                  '   the interpreter exits.\n'
+                  '\n'
+                  '   Note: "del x" doesn\'t directly call "x.__del__()" --- '
+                  'the former\n'
+                  '     decrements the reference count for "x" by one, and '
+                  'the latter is\n'
+                  '     only called when "x"\'s reference count reaches '
+                  'zero.  Some common\n'
+                  '     situations that may prevent the reference count of '
+                  'an object from\n'
+                  '     going to zero include: circular references between '
+                  'objects (e.g.,\n'
+                  '     a doubly-linked list or a tree data structure with '
+                  'parent and\n'
+                  '     child pointers); a reference to the object on the '
+                  'stack frame of\n'
+                  '     a function that caught an exception (the traceback '
+                  'stored in\n'
+                  '     "sys.exc_traceback" keeps the stack frame alive); or '
+                  'a reference\n'
+                  '     to the object on the stack frame that raised an '
+                  'unhandled\n'
+                  '     exception in interactive mode (the traceback stored '
+                  'in\n'
+                  '     "sys.last_traceback" keeps the stack frame alive).  '
+                  'The first\n'
+                  '     situation can only be remedied by explicitly '
+                  'breaking the cycles;\n'
+                  '     the latter two situations can be resolved by storing '
+                  '"None" in\n'
+                  '     "sys.exc_traceback" or "sys.last_traceback".  '
+                  'Circular references\n'
+                  '     which are garbage are detected when the option cycle '
+                  'detector is\n'
+                  "     enabled (it's on by default), but can only be "
+                  'cleaned up if there\n'
+                  '     are no Python-level "__del__()" methods involved. '
+                  'Refer to the\n'
+                  '     documentation for the "gc" module for more '
+                  'information about how\n'
+                  '     "__del__()" methods are handled by the cycle '
+                  'detector,\n'
+                  '     particularly the description of the "garbage" '
+                  'value.\n'
+                  '\n'
+                  '   Warning: Due to the precarious circumstances under '
+                  'which\n'
+                  '     "__del__()" methods are invoked, exceptions that '
+                  'occur during\n'
+                  '     their execution are ignored, and a warning is '
+                  'printed to\n'
+                  '     "sys.stderr" instead. Also, when "__del__()" is '
+                  'invoked in\n'
+                  '     response to a module being deleted (e.g., when '
+                  'execution of the\n'
+                  '     program is done), other globals referenced by the '
+                  '"__del__()"\n'
+                  '     method may already have been deleted or in the '
+                  'process of being\n'
+                  '     torn down (e.g. the import machinery shutting '
+                  'down).  For this\n'
+                  '     reason, "__del__()" methods should do the absolute '
+                  'minimum needed\n'
+                  '     to maintain external invariants.  Starting with '
+                  'version 1.5,\n'
+                  '     Python guarantees that globals whose name begins '
+                  'with a single\n'
+                  '     underscore are deleted from their module before '
+                  'other globals are\n'
+                  '     deleted; if no other references to such globals '
+                  'exist, this may\n'
+                  '     help in assuring that imported modules are still '
+                  'available at the\n'
+                  '     time when the "__del__()" method is called.\n'
+                  '\n'
+                  '   See also the "-R" command-line option.\n'
+                  '\n'
+                  'object.__repr__(self)\n'
+                  '\n'
+                  '   Called by the "repr()" built-in function and by string '
+                  'conversions\n'
+                  '   (reverse quotes) to compute the "official" string '
+                  'representation of\n'
+                  '   an object.  If at all possible, this should look like '
+                  'a valid\n'
+                  '   Python expression that could be used to recreate an '
+                  'object with the\n'
+                  '   same value (given an appropriate environment).  If '
+                  'this is not\n'
+                  '   possible, a string of the form "<...some useful '
+                  'description...>"\n'
+                  '   should be returned.  The return value must be a string '
+                  'object. If a\n'
+                  '   class defines "__repr__()" but not "__str__()", then '
+                  '"__repr__()"\n'
+                  '   is also used when an "informal" string representation '
+                  'of instances\n'
+                  '   of that class is required.\n'
+                  '\n'
+                  '   This is typically used for debugging, so it is '
+                  'important that the\n'
+                  '   representation is information-rich and unambiguous.\n'
+                  '\n'
+                  'object.__str__(self)\n'
+                  '\n'
+                  '   Called by the "str()" built-in function and by the '
+                  '"print"\n'
+                  '   statement to compute the "informal" string '
+                  'representation of an\n'
+                  '   object.  This differs from "__repr__()" in that it '
+                  'does not have to\n'
+                  '   be a valid Python expression: a more convenient or '
+                  'concise\n'
+                  '   representation may be used instead. The return value '
+                  'must be a\n'
+                  '   string object.\n'
+                  '\n'
+                  'object.__lt__(self, other)\n'
+                  'object.__le__(self, other)\n'
+                  'object.__eq__(self, other)\n'
+                  'object.__ne__(self, other)\n'
+                  'object.__gt__(self, other)\n'
+                  'object.__ge__(self, other)\n'
+                  '\n'
+                  '   New in version 2.1.\n'
+                  '\n'
+                  '   These are the so-called "rich comparison" methods, and '
+                  'are called\n'
+                  '   for comparison operators in preference to "__cmp__()" '
+                  'below. The\n'
+                  '   correspondence between operator symbols and method '
+                  'names is as\n'
+                  '   follows: "x<y" calls "x.__lt__(y)", "x<=y" calls '
+                  '"x.__le__(y)",\n'
+                  '   "x==y" calls "x.__eq__(y)", "x!=y" and "x<>y" call '
+                  '"x.__ne__(y)",\n'
+                  '   "x>y" calls "x.__gt__(y)", and "x>=y" calls '
+                  '"x.__ge__(y)".\n'
+                  '\n'
+                  '   A rich comparison method may return the singleton '
+                  '"NotImplemented"\n'
+                  '   if it does not implement the operation for a given '
+                  'pair of\n'
+                  '   arguments. By convention, "False" and "True" are '
+                  'returned for a\n'
+                  '   successful comparison. However, these methods can '
+                  'return any value,\n'
+                  '   so if the comparison operator is used in a Boolean '
+                  'context (e.g.,\n'
+                  '   in the condition of an "if" statement), Python will '
+                  'call "bool()"\n'
+                  '   on the value to determine if the result is true or '
+                  'false.\n'
+                  '\n'
+                  '   There are no implied relationships among the '
+                  'comparison operators.\n'
+                  '   The truth of "x==y" does not imply that "x!=y" is '
+                  'false.\n'
+                  '   Accordingly, when defining "__eq__()", one should also '
+                  'define\n'
+                  '   "__ne__()" so that the operators will behave as '
+                  'expected.  See the\n'
+                  '   paragraph on "__hash__()" for some important notes on '
+                  'creating\n'
+                  '   *hashable* objects which support custom comparison '
+                  'operations and\n'
+                  '   are usable as dictionary keys.\n'
+                  '\n'
+                  '   There are no swapped-argument versions of these '
+                  'methods (to be used\n'
+                  '   when the left argument does not support the operation '
+                  'but the right\n'
+                  '   argument does); rather, "__lt__()" and "__gt__()" are '
+                  "each other's\n"
+                  '   reflection, "__le__()" and "__ge__()" are each '
+                  "other's reflection,\n"
+                  '   and "__eq__()" and "__ne__()" are their own '
+                  'reflection.\n'
+                  '\n'
+                  '   Arguments to rich comparison methods are never '
+                  'coerced.\n'
+                  '\n'
+                  '   To automatically generate ordering operations from a '
+                  'single root\n'
+                  '   operation, see "functools.total_ordering()".\n'
+                  '\n'
+                  'object.__cmp__(self, other)\n'
+                  '\n'
+                  '   Called by comparison operations if rich comparison '
+                  '(see above) is\n'
+                  '   not defined.  Should return a negative integer if '
+                  '"self < other",\n'
+                  '   zero if "self == other", a positive integer if "self > '
+                  'other".  If\n'
+                  '   no "__cmp__()", "__eq__()" or "__ne__()" operation is '
+                  'defined,\n'
+                  '   class instances are compared by object identity '
+                  '("address").  See\n'
+                  '   also the description of "__hash__()" for some '
+                  'important notes on\n'
+                  '   creating *hashable* objects which support custom '
+                  'comparison\n'
+                  '   operations and are usable as dictionary keys. (Note: '
+                  'the\n'
+                  '   restriction that exceptions are not propagated by '
+                  '"__cmp__()" has\n'
+                  '   been removed since Python 1.5.)\n'
+                  '\n'
+                  'object.__rcmp__(self, other)\n'
+                  '\n'
+                  '   Changed in version 2.1: No longer supported.\n'
+                  '\n'
+                  'object.__hash__(self)\n'
+                  '\n'
+                  '   Called by built-in function "hash()" and for '
+                  'operations on members\n'
+                  '   of hashed collections including "set", "frozenset", '
+                  'and "dict".\n'
+                  '   "__hash__()" should return an integer.  The only '
+                  'required property\n'
+                  '   is that objects which compare equal have the same hash '
+                  'value; it is\n'
+                  '   advised to somehow mix together (e.g. using exclusive '
+                  'or) the hash\n'
+                  '   values for the components of the object that also play '
+                  'a part in\n'
+                  '   comparison of objects.\n'
+                  '\n'
+                  '   If a class does not define a "__cmp__()" or "__eq__()" '
+                  'method it\n'
+                  '   should not define a "__hash__()" operation either; if '
+                  'it defines\n'
+                  '   "__cmp__()" or "__eq__()" but not "__hash__()", its '
+                  'instances will\n'
+                  '   not be usable in hashed collections.  If a class '
+                  'defines mutable\n'
+                  '   objects and implements a "__cmp__()" or "__eq__()" '
+                  'method, it\n'
+                  '   should not implement "__hash__()", since hashable '
+                  'collection\n'
+                  "   implementations require that a object's hash value is "
+                  'immutable (if\n'
+                  "   the object's hash value changes, it will be in the "
+                  'wrong hash\n'
+                  '   bucket).\n'
+                  '\n'
+                  '   User-defined classes have "__cmp__()" and "__hash__()" '
+                  'methods by\n'
+                  '   default; with them, all objects compare unequal '
+                  '(except with\n'
+                  '   themselves) and "x.__hash__()" returns a result '
+                  'derived from\n'
+                  '   "id(x)".\n'
+                  '\n'
+                  '   Classes which inherit a "__hash__()" method from a '
+                  'parent class but\n'
+                  '   change the meaning of "__cmp__()" or "__eq__()" such '
+                  'that the hash\n'
+                  '   value returned is no longer appropriate (e.g. by '
+                  'switching to a\n'
+                  '   value-based concept of equality instead of the default '
+                  'identity\n'
+                  '   based equality) can explicitly flag themselves as '
+                  'being unhashable\n'
+                  '   by setting "__hash__ = None" in the class definition. '
+                  'Doing so\n'
+                  '   means that not only will instances of the class raise '
+                  'an\n'
+                  '   appropriate "TypeError" when a program attempts to '
+                  'retrieve their\n'
+                  '   hash value, but they will also be correctly identified '
+                  'as\n'
+                  '   unhashable when checking "isinstance(obj, '
+                  'collections.Hashable)"\n'
+                  '   (unlike classes which define their own "__hash__()" to '
+                  'explicitly\n'
+                  '   raise "TypeError").\n'
+                  '\n'
+                  '   Changed in version 2.5: "__hash__()" may now also '
+                  'return a long\n'
+                  '   integer object; the 32-bit integer is then derived '
+                  'from the hash of\n'
+                  '   that object.\n'
+                  '\n'
+                  '   Changed in version 2.6: "__hash__" may now be set to '
+                  '"None" to\n'
+                  '   explicitly flag instances of a class as unhashable.\n'
+                  '\n'
+                  'object.__nonzero__(self)\n'
+                  '\n'
+                  '   Called to implement truth value testing and the '
+                  'built-in operation\n'
+                  '   "bool()"; should return "False" or "True", or their '
+                  'integer\n'
+                  '   equivalents "0" or "1".  When this method is not '
+                  'defined,\n'
+                  '   "__len__()" is called, if it is defined, and the '
+                  'object is\n'
+                  '   considered true if its result is nonzero. If a class '
+                  'defines\n'
+                  '   neither "__len__()" nor "__nonzero__()", all its '
+                  'instances are\n'
+                  '   considered true.\n'
+                  '\n'
+                  'object.__unicode__(self)\n'
+                  '\n'
+                  '   Called to implement "unicode()" built-in; should '
+                  'return a Unicode\n'
+                  '   object. When this method is not defined, string '
+                  'conversion is\n'
+                  '   attempted, and the result of string conversion is '
+                  'converted to\n'
+                  '   Unicode using the system default encoding.\n',
+ 'debugger': '\n'
+             '"pdb" --- The Python Debugger\n'
+             '*****************************\n'
+             '\n'
+             '**Source code:** Lib/pdb.py\n'
+             '\n'
+             '======================================================================\n'
+             '\n'
+             'The module "pdb" defines an interactive source code debugger '
+             'for\n'
+             'Python programs.  It supports setting (conditional) '
+             'breakpoints and\n'
+             'single stepping at the source line level, inspection of stack '
+             'frames,\n'
+             'source code listing, and evaluation of arbitrary Python code '
+             'in the\n'
+             'context of any stack frame.  It also supports post-mortem '
+             'debugging\n'
+             'and can be called under program control.\n'
+             '\n'
+             'The debugger is extensible --- it is actually defined as the '
+             'class\n'
+             '"Pdb". This is currently undocumented but easily understood by '
+             'reading\n'
+             'the source.  The extension interface uses the modules "bdb" '
+             'and "cmd".\n'
+             '\n'
+             'The debugger\'s prompt is "(Pdb)". Typical usage to run a '
+             'program under\n'
+             'control of the debugger is:\n'
+             '\n'
+             '   >>> import pdb\n'
+             '   >>> import mymodule\n'
+             "   >>> pdb.run('mymodule.test()')\n"
+             '   > <string>(0)?()\n'
+             '   (Pdb) continue\n'
+             '   > <string>(1)?()\n'
+             '   (Pdb) continue\n'
+             "   NameError: 'spam'\n"
+             '   > <string>(1)?()\n'
+             '   (Pdb)\n'
+             '\n'
+             '"pdb.py" can also be invoked as a script to debug other '
+             'scripts.  For\n'
+             'example:\n'
+             '\n'
+             '   python -m pdb myscript.py\n'
+             '\n'
+             'When invoked as a script, pdb will automatically enter '
+             'post-mortem\n'
+             'debugging if the program being debugged exits abnormally. '
+             'After post-\n'
+             'mortem debugging (or after normal exit of the program), pdb '
+             'will\n'
+             "restart the program. Automatic restarting preserves pdb's "
+             'state (such\n'
+             'as breakpoints) and in most cases is more useful than quitting '
+             'the\n'
+             "debugger upon program's exit.\n"
+             '\n'
+             'New in version 2.4: Restarting post-mortem behavior added.\n'
+             '\n'
+             'The typical usage to break into the debugger from a running '
+             'program is\n'
+             'to insert\n'
+             '\n'
+             '   import pdb; pdb.set_trace()\n'
+             '\n'
+             'at the location you want to break into the debugger.  You can '
+             'then\n'
+             'step through the code following this statement, and continue '
+             'running\n'
+             'without the debugger using the "c" command.\n'
+             '\n'
+             'The typical usage to inspect a crashed program is:\n'
+             '\n'
+             '   >>> import pdb\n'
+             '   >>> import mymodule\n'
+             '   >>> mymodule.test()\n'
+             '   Traceback (most recent call last):\n'
+             '     File "<stdin>", line 1, in ?\n'
+             '     File "./mymodule.py", line 4, in test\n'
+             '       test2()\n'
+             '     File "./mymodule.py", line 3, in test2\n'
+             '       print spam\n'
+             '   NameError: spam\n'
+             '   >>> pdb.pm()\n'
+             '   > ./mymodule.py(3)test2()\n'
+             '   -> print spam\n'
+             '   (Pdb)\n'
+             '\n'
+             'The module defines the following functions; each enters the '
+             'debugger\n'
+             'in a slightly different way:\n'
+             '\n'
+             'pdb.run(statement[, globals[, locals]])\n'
+             '\n'
+             '   Execute the *statement* (given as a string) under debugger '
+             'control.\n'
+             '   The debugger prompt appears before any code is executed; '
+             'you can\n'
+             '   set breakpoints and type "continue", or you can step '
+             'through the\n'
+             '   statement using "step" or "next" (all these commands are '
+             'explained\n'
+             '   below).  The optional *globals* and *locals* arguments '
+             'specify the\n'
+             '   environment in which the code is executed; by default the\n'
+             '   dictionary of the module "__main__" is used.  (See the '
+             'explanation\n'
+             '   of the "exec" statement or the "eval()" built-in '
+             'function.)\n'
+             '\n'
+             'pdb.runeval(expression[, globals[, locals]])\n'
+             '\n'
+             '   Evaluate the *expression* (given as a string) under '
+             'debugger\n'
+             '   control.  When "runeval()" returns, it returns the value of '
+             'the\n'
+             '   expression.  Otherwise this function is similar to '
+             '"run()".\n'
+             '\n'
+             'pdb.runcall(function[, argument, ...])\n'
+             '\n'
+             '   Call the *function* (a function or method object, not a '
+             'string)\n'
+             '   with the given arguments.  When "runcall()" returns, it '
+             'returns\n'
+             '   whatever the function call returned.  The debugger prompt '
+             'appears\n'
+             '   as soon as the function is entered.\n'
+             '\n'
+             'pdb.set_trace()\n'
+             '\n'
+             '   Enter the debugger at the calling stack frame.  This is '
+             'useful to\n'
+             '   hard-code a breakpoint at a given point in a program, even '
+             'if the\n'
+             '   code is not otherwise being debugged (e.g. when an '
+             'assertion\n'
+             '   fails).\n'
+             '\n'
+             'pdb.post_mortem([traceback])\n'
+             '\n'
+             '   Enter post-mortem debugging of the given *traceback* '
+             'object.  If no\n'
+             '   *traceback* is given, it uses the one of the exception that '
+             'is\n'
+             '   currently being handled (an exception must be being handled '
+             'if the\n'
+             '   default is to be used).\n'
+             '\n'
+             'pdb.pm()\n'
+             '\n'
+             '   Enter post-mortem debugging of the traceback found in\n'
+             '   "sys.last_traceback".\n'
+             '\n'
+             'The "run*" functions and "set_trace()" are aliases for '
+             'instantiating\n'
+             'the "Pdb" class and calling the method of the same name.  If '
+             'you want\n'
+             'to access further features, you have to do this yourself:\n'
+             '\n'
+             "class class pdb.Pdb(completekey='tab', stdin=None, "
+             'stdout=None, skip=None)\n'
+             '\n'
+             '   "Pdb" is the debugger class.\n'
+             '\n'
+             '   The *completekey*, *stdin* and *stdout* arguments are '
+             'passed to the\n'
+             '   underlying "cmd.Cmd" class; see the description there.\n'
+             '\n'
+             '   The *skip* argument, if given, must be an iterable of '
+             'glob-style\n'
+             '   module name patterns.  The debugger will not step into '
+             'frames that\n'
+             '   originate in a module that matches one of these patterns. '
+             '[1]\n'
+             '\n'
+             '   Example call to enable tracing with *skip*:\n'
+             '\n'
+             "      import pdb; pdb.Pdb(skip=['django.*']).set_trace()\n"
+             '\n'
+             '   New in version 2.7: The *skip* argument.\n'
+             '\n'
+             '   run(statement[, globals[, locals]])\n'
+             '   runeval(expression[, globals[, locals]])\n'
+             '   runcall(function[, argument, ...])\n'
+             '   set_trace()\n'
+             '\n'
+             '      See the documentation for the functions explained '
+             'above.\n',
+ 'del': '\n'
+        'The "del" statement\n'
+        '*******************\n'
+        '\n'
+        '   del_stmt ::= "del" target_list\n'
+        '\n'
+        'Deletion is recursively defined very similar to the way assignment '
+        'is\n'
+        'defined. Rather than spelling it out in full details, here are '
+        'some\n'
+        'hints.\n'
+        '\n'
+        'Deletion of a target list recursively deletes each target, from '
+        'left\n'
+        'to right.\n'
+        '\n'
+        'Deletion of a name removes the binding of that name  from the local '
+        'or\n'
+        'global namespace, depending on whether the name occurs in a '
+        '"global"\n'
+        'statement in the same code block.  If the name is unbound, a\n'
+        '"NameError" exception will be raised.\n'
+        '\n'
+        'It is illegal to delete a name from the local namespace if it '
+        'occurs\n'
+        'as a free variable in a nested block.\n'
+        '\n'
+        'Deletion of attribute references, subscriptions and slicings is '
+        'passed\n'
+        'to the primary object involved; deletion of a slicing is in '
+        'general\n'
+        'equivalent to assignment of an empty slice of the right type (but '
+        'even\n'
+        'this is determined by the sliced object).\n',
+ 'dict': '\n'
+         'Dictionary displays\n'
+         '*******************\n'
+         '\n'
+         'A dictionary display is a possibly empty series of key/datum '
+         'pairs\n'
+         'enclosed in curly braces:\n'
+         '\n'
+         '   dict_display       ::= "{" [key_datum_list | '
+         'dict_comprehension] "}"\n'
+         '   key_datum_list     ::= key_datum ("," key_datum)* [","]\n'
+         '   key_datum          ::= expression ":" expression\n'
+         '   dict_comprehension ::= expression ":" expression comp_for\n'
+         '\n'
+         'A dictionary display yields a new dictionary object.\n'
+         '\n'
+         'If a comma-separated sequence of key/datum pairs is given, they '
+         'are\n'
+         'evaluated from left to right to define the entries of the '
+         'dictionary:\n'
+         'each key object is used as a key into the dictionary to store the\n'
+         'corresponding datum.  This means that you can specify the same '
+         'key\n'
+         "multiple times in the key/datum list, and the final dictionary's "
+         'value\n'
+         'for that key will be the last one given.\n'
+         '\n'
+         'A dict comprehension, in contrast to list and set comprehensions,\n'
+         'needs two expressions separated with a colon followed by the '
+         'usual\n'
+         '"for" and "if" clauses. When the comprehension is run, the '
+         'resulting\n'
+         'key and value elements are inserted in the new dictionary in the '
+         'order\n'
+         'they are produced.\n'
+         '\n'
+         'Restrictions on the types of the key values are listed earlier in\n'
+         'section The standard type hierarchy.  (To summarize, the key type\n'
+         'should be *hashable*, which excludes all mutable objects.)  '
+         'Clashes\n'
+         'between duplicate keys are not detected; the last datum '
+         '(textually\n'
+         'rightmost in the display) stored for a given key value prevails.\n',
+ 'dynamic-features': '\n'
+                     'Interaction with dynamic features\n'
+                     '*********************************\n'
+                     '\n'
+                     'There are several cases where Python statements are '
+                     'illegal when used\n'
+                     'in conjunction with nested scopes that contain free '
+                     'variables.\n'
+                     '\n'
+                     'If a variable is referenced in an enclosing scope, it '
+                     'is illegal to\n'
+                     'delete the name.  An error will be reported at compile '
+                     'time.\n'
+                     '\n'
+                     'If the wild card form of import --- "import *" --- is '
+                     'used in a\n'
+                     'function and the function contains or is a nested '
+                     'block with free\n'
+                     'variables, the compiler will raise a "SyntaxError".\n'
+                     '\n'
+                     'If "exec" is used in a function and the function '
+                     'contains or is a\n'
+                     'nested block with free variables, the compiler will '
+                     'raise a\n'
+                     '"SyntaxError" unless the exec explicitly specifies the '
+                     'local namespace\n'
+                     'for the "exec".  (In other words, "exec obj" would be '
+                     'illegal, but\n'
+                     '"exec obj in ns" would be legal.)\n'
+                     '\n'
+                     'The "eval()", "execfile()", and "input()" functions '
+                     'and the "exec"\n'
+                     'statement do not have access to the full environment '
+                     'for resolving\n'
+                     'names.  Names may be resolved in the local and global '
+                     'namespaces of\n'
+                     'the caller.  Free variables are not resolved in the '
+                     'nearest enclosing\n'
+                     'namespace, but in the global namespace. [1] The "exec" '
+                     'statement and\n'
+                     'the "eval()" and "execfile()" functions have optional '
+                     'arguments to\n'
+                     'override the global and local namespace.  If only one '
+                     'namespace is\n'
+                     'specified, it is used for both.\n',
+ 'else': '\n'
+         'The "if" statement\n'
+         '******************\n'
+         '\n'
+         'The "if" statement is used for conditional execution:\n'
+         '\n'
+         '   if_stmt ::= "if" expression ":" suite\n'
+         '               ( "elif" expression ":" suite )*\n'
+         '               ["else" ":" suite]\n'
+         '\n'
+         'It selects exactly one of the suites by evaluating the expressions '
+         'one\n'
+         'by one until one is found to be true (see section Boolean '
+         'operations\n'
+         'for the definition of true and false); then that suite is '
+         'executed\n'
+         '(and no other part of the "if" statement is executed or '
+         'evaluated).\n'
+         'If all expressions are false, the suite of the "else" clause, if\n'
+         'present, is executed.\n',
+ 'exceptions': '\n'
+               'Exceptions\n'
+               '**********\n'
+               '\n'
+               'Exceptions are a means of breaking out of the normal flow of '
+               'control\n'
+               'of a code block in order to handle errors or other '
+               'exceptional\n'
+               'conditions.  An exception is *raised* at the point where the '
+               'error is\n'
+               'detected; it may be *handled* by the surrounding code block '
+               'or by any\n'
+               'code block that directly or indirectly invoked the code '
+               'block where\n'
+               'the error occurred.\n'
+               '\n'
+               'The Python interpreter raises an exception when it detects a '
+               'run-time\n'
+               'error (such as division by zero).  A Python program can '
+               'also\n'
+               'explicitly raise an exception with the "raise" statement. '
+               'Exception\n'
+               'handlers are specified with the "try" ... "except" '
+               'statement.  The\n'
+               '"finally" clause of such a statement can be used to specify '
+               'cleanup\n'
+               'code which does not handle the exception, but is executed '
+               'whether an\n'
+               'exception occurred or not in the preceding code.\n'
+               '\n'
+               'Python uses the "termination" model of error handling: an '
+               'exception\n'
+               'handler can find out what happened and continue execution at '
+               'an outer\n'
+               'level, but it cannot repair the cause of the error and retry '
+               'the\n'
+               'failing operation (except by re-entering the offending piece '
+               'of code\n'
+               'from the top).\n'
+               '\n'
+               'When an exception is not handled at all, the interpreter '
+               'terminates\n'
+               'execution of the program, or returns to its interactive main '
+               'loop.  In\n'
+               'either case, it prints a stack backtrace, except when the '
+               'exception is\n'
+               '"SystemExit".\n'
+               '\n'
+               'Exceptions are identified by class instances.  The "except" '
+               'clause is\n'
+               'selected depending on the class of the instance: it must '
+               'reference the\n'
+               'class of the instance or a base class thereof.  The instance '
+               'can be\n'
+               'received by the handler and can carry additional information '
+               'about the\n'
+               'exceptional condition.\n'
+               '\n'
+               'Exceptions can also be identified by strings, in which case '
+               'the\n'
+               '"except" clause is selected by object identity.  An '
+               'arbitrary value\n'
+               'can be raised along with the identifying string which can be '
+               'passed to\n'
+               'the handler.\n'
+               '\n'
+               'Note: Messages to exceptions are not part of the Python '
+               'API.  Their\n'
+               '  contents may change from one version of Python to the next '
+               'without\n'
+               '  warning and should not be relied on by code which will run '
+               'under\n'
+               '  multiple versions of the interpreter.\n'
+               '\n'
+               'See also the description of the "try" statement in section '
+               'The try\n'
+               'statement and "raise" statement in section The raise '
+               'statement.\n'
+               '\n'
+               '-[ Footnotes ]-\n'
+               '\n'
+               '[1] This limitation occurs because the code that is executed '
+               'by\n'
+               '    these operations is not available at the time the module '
+               'is\n'
+               '    compiled.\n',
+ 'exec': '\n'
+         'The "exec" statement\n'
+         '********************\n'
+         '\n'
+         '   exec_stmt ::= "exec" or_expr ["in" expression ["," '
+         'expression]]\n'
+         '\n'
+         'This statement supports dynamic execution of Python code.  The '
+         'first\n'
+         'expression should evaluate to either a Unicode string, a '
+         '*Latin-1*\n'
+         'encoded string, an open file object, a code object, or a tuple.  '
+         'If it\n'
+         'is a string, the string is parsed as a suite of Python statements\n'
+         'which is then executed (unless a syntax error occurs). [1] If it '
+         'is an\n'
+         'open file, the file is parsed until EOF and executed. If it is a '
+         'code\n'
+         'object, it is simply executed.  For the interpretation of a tuple, '
+         'see\n'
+         "below.  In all cases, the code that's executed is expected to be "
+         'valid\n'
+         'as file input (see section File input).  Be aware that the '
+         '"return"\n'
+         'and "yield" statements may not be used outside of function '
+         'definitions\n'
+         'even within the context of code passed to the "exec" statement.\n'
+         '\n'
+         'In all cases, if the optional parts are omitted, the code is '
+         'executed\n'
+         'in the current scope.  If only the first expression after "in" is\n'
+         'specified, it should be a dictionary, which will be used for both '
+         'the\n'
+         'global and the local variables.  If two expressions are given, '
+         'they\n'
+         'are used for the global and local variables, respectively. If\n'
+         'provided, *locals* can be any mapping object. Remember that at '
+         'module\n'
+         'level, globals and locals are the same dictionary. If two '
+         'separate\n'
+         'objects are given as *globals* and *locals*, the code will be '
+         'executed\n'
+         'as if it were embedded in a class definition.\n'
+         '\n'
+         'The first expression may also be a tuple of length 2 or 3.  In '
+         'this\n'
+         'case, the optional parts must be omitted.  The form "exec(expr,\n'
+         'globals)" is equivalent to "exec expr in globals", while the form\n'
+         '"exec(expr, globals, locals)" is equivalent to "exec expr in '
+         'globals,\n'
+         'locals".  The tuple form of "exec" provides compatibility with '
+         'Python\n'
+         '3, where "exec" is a function rather than a statement.\n'
+         '\n'
+         'Changed in version 2.4: Formerly, *locals* was required to be a\n'
+         'dictionary.\n'
+         '\n'
+         'As a side effect, an implementation may insert additional keys '
+         'into\n'
+         'the dictionaries given besides those corresponding to variable '
+         'names\n'
+         'set by the executed code.  For example, the current implementation '
+         'may\n'
+         'add a reference to the dictionary of the built-in module '
+         '"__builtin__"\n'
+         'under the key "__builtins__" (!).\n'
+         '\n'
+         "**Programmer's hints:** dynamic evaluation of expressions is "
+         'supported\n'
+         'by the built-in function "eval()".  The built-in functions '
+         '"globals()"\n'
+         'and "locals()" return the current global and local dictionary,\n'
+         'respectively, which may be useful to pass around for use by '
+         '"exec".\n'
+         '\n'
+         '-[ Footnotes ]-\n'
+         '\n'
+         '[1] Note that the parser only accepts the Unix-style end of line\n'
+         '    convention. If you are reading the code from a file, make sure '
+         'to\n'
+         '    use *universal newlines* mode to convert Windows or Mac-style\n'
+         '    newlines.\n',
+ 'execmodel': '\n'
+              'Execution model\n'
+              '***************\n'
+              '\n'
+              '\n'
+              'Naming and binding\n'
+              '==================\n'
+              '\n'
+              '*Names* refer to objects.  Names are introduced by name '
+              'binding\n'
+              'operations. Each occurrence of a name in the program text '
+              'refers to\n'
+              'the *binding* of that name established in the innermost '
+              'function block\n'
+              'containing the use.\n'
+              '\n'
+              'A *block* is a piece of Python program text that is executed '
+              'as a\n'
+              'unit. The following are blocks: a module, a function body, '
+              'and a class\n'
+              'definition. Each command typed interactively is a block.  A '
+              'script\n'
+              'file (a file given as standard input to the interpreter or '
+              'specified\n'
+              'on the interpreter command line the first argument) is a code '
+              'block.\n'
+              'A script command (a command specified on the interpreter '
+              'command line\n'
+              "with the '**-c**' option) is a code block.  The file read by "
+              'the\n'
+              'built-in function "execfile()" is a code block.  The string '
+              'argument\n'
+              'passed to the built-in function "eval()" and to the "exec" '
+              'statement\n'
+              'is a code block. The expression read and evaluated by the '
+              'built-in\n'
+              'function "input()" is a code block.\n'
+              '\n'
+              'A code block is executed in an *execution frame*.  A frame '
+              'contains\n'
+              'some administrative information (used for debugging) and '
+              'determines\n'
+              "where and how execution continues after the code block's "
+              'execution has\n'
+              'completed.\n'
+              '\n'
+              'A *scope* defines the visibility of a name within a block.  '
+              'If a local\n'
+              'variable is defined in a block, its scope includes that '
+              'block.  If the\n'
+              'definition occurs in a function block, the scope extends to '
+              'any blocks\n'
+              'contained within the defining one, unless a contained block '
+              'introduces\n'
+              'a different binding for the name.  The scope of names defined '
+              'in a\n'
+              'class block is limited to the class block; it does not extend '
+              'to the\n'
+              'code blocks of methods -- this includes generator expressions '
+              'since\n'
+              'they are implemented using a function scope.  This means that '
+              'the\n'
+              'following will fail:\n'
+              '\n'
+              '   class A:\n'
+              '       a = 42\n'
+              '       b = list(a + i for i in range(10))\n'
+              '\n'
+              'When a name is used in a code block, it is resolved using the '
+              'nearest\n'
+              'enclosing scope.  The set of all such scopes visible to a '
+              'code block\n'
+              "is called the block's *environment*.\n"
+              '\n'
+              'If a name is bound in a block, it is a local variable of that '
+              'block.\n'
+              'If a name is bound at the module level, it is a global '
+              'variable.  (The\n'
+              'variables of the module code block are local and global.)  If '
+              'a\n'
+              'variable is used in a code block but not defined there, it is '
+              'a *free\n'
+              'variable*.\n'
+              '\n'
+              'When a name is not found at all, a "NameError" exception is '
+              'raised.\n'
+              'If the name refers to a local variable that has not been '
+              'bound, a\n'
+              '"UnboundLocalError" exception is raised.  "UnboundLocalError" '
+              'is a\n'
+              'subclass of "NameError".\n'
+              '\n'
+              'The following constructs bind names: formal parameters to '
+              'functions,\n'
+              '"import" statements, class and function definitions (these '
+              'bind the\n'
+              'class or function name in the defining block), and targets '
+              'that are\n'
+              'identifiers if occurring in an assignment, "for" loop header, '
+              'in the\n'
+              'second position of an "except" clause header or after "as" in '
+              'a "with"\n'
+              'statement.  The "import" statement of the form "from ... '
+              'import *"\n'
+              'binds all names defined in the imported module, except those '
+              'beginning\n'
+              'with an underscore.  This form may only be used at the module '
+              'level.\n'
+              '\n'
+              'A target occurring in a "del" statement is also considered '
+              'bound for\n'
+              'this purpose (though the actual semantics are to unbind the '
+              'name).  It\n'
+              'is illegal to unbind a name that is referenced by an '
+              'enclosing scope;\n'
+              'the compiler will report a "SyntaxError".\n'
+              '\n'
+              'Each assignment or import statement occurs within a block '
+              'defined by a\n'
+              'class or function definition or at the module level (the '
+              'top-level\n'
+              'code block).\n'
+              '\n'
+              'If a name binding operation occurs anywhere within a code '
+              'block, all\n'
+              'uses of the name within the block are treated as references '
+              'to the\n'
+              'current block.  This can lead to errors when a name is used '
+              'within a\n'
+              'block before it is bound. This rule is subtle.  Python lacks\n'
+              'declarations and allows name binding operations to occur '
+              'anywhere\n'
+              'within a code block.  The local variables of a code block can '
+              'be\n'
+              'determined by scanning the entire text of the block for name '
+              'binding\n'
+              'operations.\n'
+              '\n'
+              'If the global statement occurs within a block, all uses of '
+              'the name\n'
+              'specified in the statement refer to the binding of that name '
+              'in the\n'
+              'top-level namespace. Names are resolved in the top-level '
+              'namespace by\n'
+              'searching the global namespace, i.e. the namespace of the '
+              'module\n'
+              'containing the code block, and the builtins namespace, the '
+              'namespace\n'
+              'of the module "__builtin__".  The global namespace is '
+              'searched first.\n'
+              'If the name is not found there, the builtins namespace is '
+              'searched.\n'
+              'The global statement must precede all uses of the name.\n'
+              '\n'
+              'The builtins namespace associated with the execution of a '
+              'code block\n'
+              'is actually found by looking up the name "__builtins__" in '
+              'its global\n'
+              'namespace; this should be a dictionary or a module (in the '
+              'latter case\n'
+              "the module's dictionary is used).  By default, when in the "
+              '"__main__"\n'
+              'module, "__builtins__" is the built-in module "__builtin__" '
+              '(note: no\n'
+              '\'s\'); when in any other module, "__builtins__" is an alias '
+              'for the\n'
+              'dictionary of the "__builtin__" module itself.  '
+              '"__builtins__" can be\n'
+              'set to a user-created dictionary to create a weak form of '
+              'restricted\n'
+              'execution.\n'
+              '\n'
+              '**CPython implementation detail:** Users should not touch\n'
+              '"__builtins__"; it is strictly an implementation detail.  '
+              'Users\n'
+              'wanting to override values in the builtins namespace should '
+              '"import"\n'
+              'the "__builtin__" (no \'s\') module and modify its '
+              'attributes\n'
+              'appropriately.\n'
+              '\n'
+              'The namespace for a module is automatically created the first '
+              'time a\n'
+              'module is imported.  The main module for a script is always '
+              'called\n'
+              '"__main__".\n'
+              '\n'
+              'The "global" statement has the same scope as a name binding '
+              'operation\n'
+              'in the same block.  If the nearest enclosing scope for a free '
+              'variable\n'
+              'contains a global statement, the free variable is treated as '
+              'a global.\n'
+              '\n'
+              'A class definition is an executable statement that may use '
+              'and define\n'
+              'names. These references follow the normal rules for name '
+              'resolution.\n'
+              'The namespace of the class definition becomes the attribute '
+              'dictionary\n'
+              'of the class.  Names defined at the class scope are not '
+              'visible in\n'
+              'methods.\n'
+              '\n'
+              '\n'
+              'Interaction with dynamic features\n'
+              '---------------------------------\n'
+              '\n'
+              'There are several cases where Python statements are illegal '
+              'when used\n'
+              'in conjunction with nested scopes that contain free '
+              'variables.\n'
+              '\n'
+              'If a variable is referenced in an enclosing scope, it is '
+              'illegal to\n'
+              'delete the name.  An error will be reported at compile time.\n'
+              '\n'
+              'If the wild card form of import --- "import *" --- is used in '
+              'a\n'
+              'function and the function contains or is a nested block with '
+              'free\n'
+              'variables, the compiler will raise a "SyntaxError".\n'
+              '\n'
+              'If "exec" is used in a function and the function contains or '
+              'is a\n'
+              'nested block with free variables, the compiler will raise a\n'
+              '"SyntaxError" unless the exec explicitly specifies the local '
+              'namespace\n'
+              'for the "exec".  (In other words, "exec obj" would be '
+              'illegal, but\n'
+              '"exec obj in ns" would be legal.)\n'
+              '\n'
+              'The "eval()", "execfile()", and "input()" functions and the '
+              '"exec"\n'
+              'statement do not have access to the full environment for '
+              'resolving\n'
+              'names.  Names may be resolved in the local and global '
+              'namespaces of\n'
+              'the caller.  Free variables are not resolved in the nearest '
+              'enclosing\n'
+              'namespace, but in the global namespace. [1] The "exec" '
+              'statement and\n'
+              'the "eval()" and "execfile()" functions have optional '
+              'arguments to\n'
+              'override the global and local namespace.  If only one '
+              'namespace is\n'
+              'specified, it is used for both.\n'
+              '\n'
+              '\n'
+              'Exceptions\n'
+              '==========\n'
+              '\n'
+              'Exceptions are a means of breaking out of the normal flow of '
+              'control\n'
+              'of a code block in order to handle errors or other '
+              'exceptional\n'
+              'conditions.  An exception is *raised* at the point where the '
+              'error is\n'
+              'detected; it may be *handled* by the surrounding code block '
+              'or by any\n'
+              'code block that directly or indirectly invoked the code block '
+              'where\n'
+              'the error occurred.\n'
+              '\n'
+              'The Python interpreter raises an exception when it detects a '
+              'run-time\n'
+              'error (such as division by zero).  A Python program can also\n'
+              'explicitly raise an exception with the "raise" statement. '
+              'Exception\n'
+              'handlers are specified with the "try" ... "except" '
+              'statement.  The\n'
+              '"finally" clause of such a statement can be used to specify '
+              'cleanup\n'
+              'code which does not handle the exception, but is executed '
+              'whether an\n'
+              'exception occurred or not in the preceding code.\n'
+              '\n'
+              'Python uses the "termination" model of error handling: an '
+              'exception\n'
+              'handler can find out what happened and continue execution at '
+              'an outer\n'
+              'level, but it cannot repair the cause of the error and retry '
+              'the\n'
+              'failing operation (except by re-entering the offending piece '
+              'of code\n'
+              'from the top).\n'
+              '\n'
+              'When an exception is not handled at all, the interpreter '
+              'terminates\n'
+              'execution of the program, or returns to its interactive main '
+              'loop.  In\n'
+              'either case, it prints a stack backtrace, except when the '
+              'exception is\n'
+              '"SystemExit".\n'
+              '\n'
+              'Exceptions are identified by class instances.  The "except" '
+              'clause is\n'
+              'selected depending on the class of the instance: it must '
+              'reference the\n'
+              'class of the instance or a base class thereof.  The instance '
+              'can be\n'
+              'received by the handler and can carry additional information '
+              'about the\n'
+              'exceptional condition.\n'
+              '\n'
+              'Exceptions can also be identified by strings, in which case '
+              'the\n'
+              '"except" clause is selected by object identity.  An arbitrary '
+              'value\n'
+              'can be raised along with the identifying string which can be '
+              'passed to\n'
+              'the handler.\n'
+              '\n'
+              'Note: Messages to exceptions are not part of the Python API.  '
+              'Their\n'
+              '  contents may change from one version of Python to the next '
+              'without\n'
+              '  warning and should not be relied on by code which will run '
+              'under\n'
+              '  multiple versions of the interpreter.\n'
+              '\n'
+              'See also the description of the "try" statement in section '
+              'The try\n'
+              'statement and "raise" statement in section The raise '
+              'statement.\n'
+              '\n'
+              '-[ Footnotes ]-\n'
+              '\n'
+              '[1] This limitation occurs because the code that is executed '
+              'by\n'
+              '    these operations is not available at the time the module '
+              'is\n'
+              '    compiled.\n',
+ 'exprlists': '\n'
+              'Expression lists\n'
+              '****************\n'
+              '\n'
+              '   expression_list ::= expression ( "," expression )* [","]\n'
+              '\n'
+              'An expression list containing at least one comma yields a '
+              'tuple.  The\n'
+              'length of the tuple is the number of expressions in the '
+              'list.  The\n'
+              'expressions are evaluated from left to right.\n'
+              '\n'
+              'The trailing comma is required only to create a single tuple '
+              '(a.k.a. a\n'
+              '*singleton*); it is optional in all other cases.  A single '
+              'expression\n'
+              "without a trailing comma doesn't create a tuple, but rather "
+              'yields the\n'
+              'value of that expression. (To create an empty tuple, use an '
+              'empty pair\n'
+              'of parentheses: "()".)\n',
+ 'floating': '\n'
+             'Floating point literals\n'
+             '***********************\n'
+             '\n'
+             'Floating point literals are described by the following '
+             'lexical\n'
+             'definitions:\n'
+             '\n'
+             '   floatnumber   ::= pointfloat | exponentfloat\n'
+             '   pointfloat    ::= [intpart] fraction | intpart "."\n'
+             '   exponentfloat ::= (intpart | pointfloat) exponent\n'
+             '   intpart       ::= digit+\n'
+             '   fraction      ::= "." digit+\n'
+             '   exponent      ::= ("e" | "E") ["+" | "-"] digit+\n'
+             '\n'
+             'Note that the integer and exponent parts of floating point '
+             'numbers can\n'
+             'look like octal integers, but are interpreted using radix 10.  '
+             'For\n'
+             'example, "077e010" is legal, and denotes the same number as '
+             '"77e10".\n'
+             'The allowed range of floating point literals is '
+             'implementation-\n'
+             'dependent. Some examples of floating point literals:\n'
+             '\n'
+             '   3.14    10.    .001    1e100    3.14e-10    0e0\n'
+             '\n'
+             'Note that numeric literals do not include a sign; a phrase '
+             'like "-1"\n'
+             'is actually an expression composed of the unary operator "-" '
+             'and the\n'
+             'literal "1".\n',
+ 'for': '\n'
+        'The "for" statement\n'
+        '*******************\n'
+        '\n'
+        'The "for" statement is used to iterate over the elements of a '
+        'sequence\n'
+        '(such as a string, tuple or list) or other iterable object:\n'
+        '\n'
+        '   for_stmt ::= "for" target_list "in" expression_list ":" suite\n'
+        '                ["else" ":" suite]\n'
+        '\n'
+        'The expression list is evaluated once; it should yield an iterable\n'
+        'object.  An iterator is created for the result of the\n'
+        '"expression_list".  The suite is then executed once for each item\n'
+        'provided by the iterator, in the order of ascending indices.  Each\n'
+        'item in turn is assigned to the target list using the standard '
+        'rules\n'
+        'for assignments, and then the suite is executed.  When the items '
+        'are\n'
+        'exhausted (which is immediately when the sequence is empty), the '
+        'suite\n'
+        'in the "else" clause, if present, is executed, and the loop\n'
+        'terminates.\n'
+        '\n'
+        'A "break" statement executed in the first suite terminates the '
+        'loop\n'
+        'without executing the "else" clause\'s suite.  A "continue" '
+        'statement\n'
+        'executed in the first suite skips the rest of the suite and '
+        'continues\n'
+        'with the next item, or with the "else" clause if there was no next\n'
+        'item.\n'
+        '\n'
+        'The suite may assign to the variable(s) in the target list; this '
+        'does\n'
+        'not affect the next item assigned to it.\n'
+        '\n'
+        'The target list is not deleted when the loop is finished, but if '
+        'the\n'
+        'sequence is empty, it will not have been assigned to at all by the\n'
+        'loop.  Hint: the built-in function "range()" returns a sequence of\n'
+        'integers suitable to emulate the effect of Pascal\'s "for i := a to '
+        'b\n'
+        'do"; e.g., "range(3)" returns the list "[0, 1, 2]".\n'
+        '\n'
+        'Note: There is a subtlety when the sequence is being modified by '
+        'the\n'
+        '  loop (this can only occur for mutable sequences, i.e. lists). An\n'
+        '  internal counter is used to keep track of which item is used '
+        'next,\n'
+        '  and this is incremented on each iteration.  When this counter '
+        'has\n'
+        '  reached the length of the sequence the loop terminates.  This '
+        'means\n'
+        '  that if the suite deletes the current (or a previous) item from '
+        'the\n'
+        '  sequence, the next item will be skipped (since it gets the index '
+        'of\n'
+        '  the current item which has already been treated).  Likewise, if '
+        'the\n'
+        '  suite inserts an item in the sequence before the current item, '
+        'the\n'
+        '  current item will be treated again the next time through the '
+        'loop.\n'
+        '  This can lead to nasty bugs that can be avoided by making a\n'
+        '  temporary copy using a slice of the whole sequence, e.g.,\n'
+        '\n'
+        '     for x in a[:]:\n'
+        '         if x < 0: a.remove(x)\n',
+ 'formatstrings': '\n'
+                  'Format String Syntax\n'
+                  '********************\n'
+                  '\n'
+                  'The "str.format()" method and the "Formatter" class share '
+                  'the same\n'
+                  'syntax for format strings (although in the case of '
+                  '"Formatter",\n'
+                  'subclasses can define their own format string syntax).\n'
+                  '\n'
+                  'Format strings contain "replacement fields" surrounded by '
+                  'curly braces\n'
+                  '"{}". Anything that is not contained in braces is '
+                  'considered literal\n'
+                  'text, which is copied unchanged to the output.  If you '
+                  'need to include\n'
+                  'a brace character in the literal text, it can be escaped '
+                  'by doubling:\n'
+                  '"{{" and "}}".\n'
+                  '\n'
+                  'The grammar for a replacement field is as follows:\n'
+                  '\n'
+                  '      replacement_field ::= "{" [field_name] ["!" '
+                  'conversion] [":" format_spec] "}"\n'
+                  '      field_name        ::= arg_name ("." attribute_name '
+                  '| "[" element_index "]")*\n'
+                  '      arg_name          ::= [identifier | integer]\n'
+                  '      attribute_name    ::= identifier\n'
+                  '      element_index     ::= integer | index_string\n'
+                  '      index_string      ::= <any source character except '
+                  '"]"> +\n'
+                  '      conversion        ::= "r" | "s"\n'
+                  '      format_spec       ::= <described in the next '
+                  'section>\n'
+                  '\n'
+                  'In less formal terms, the replacement field can start '
+                  'with a\n'
+                  '*field_name* that specifies the object whose value is to '
+                  'be formatted\n'
+                  'and inserted into the output instead of the replacement '
+                  'field. The\n'
+                  '*field_name* is optionally followed by a  *conversion* '
+                  'field, which is\n'
+                  'preceded by an exclamation point "\'!\'", and a '
+                  '*format_spec*, which is\n'
+                  'preceded by a colon "\':\'".  These specify a non-default '
+                  'format for the\n'
+                  'replacement value.\n'
+                  '\n'
+                  'See also the Format Specification Mini-Language section.\n'
+                  '\n'
+                  'The *field_name* itself begins with an *arg_name* that is '
+                  'either a\n'
+                  "number or a keyword.  If it's a number, it refers to a "
+                  'positional\n'
+                  "argument, and if it's a keyword, it refers to a named "
+                  'keyword\n'
+                  'argument.  If the numerical arg_names in a format string '
+                  'are 0, 1, 2,\n'
+                  '... in sequence, they can all be omitted (not just some) '
+                  'and the\n'
+                  'numbers 0, 1, 2, ... will be automatically inserted in '
+                  'that order.\n'
+                  'Because *arg_name* is not quote-delimited, it is not '
+                  'possible to\n'
+                  'specify arbitrary dictionary keys (e.g., the strings '
+                  '"\'10\'" or\n'
+                  '"\':-]\'") within a format string. The *arg_name* can be '
+                  'followed by any\n'
+                  'number of index or attribute expressions. An expression '
+                  'of the form\n'
+                  '"\'.name\'" selects the named attribute using '
+                  '"getattr()", while an\n'
+                  'expression of the form "\'[index]\'" does an index lookup '
+                  'using\n'
+                  '"__getitem__()".\n'
+                  '\n'
+                  'Changed in version 2.7: The positional argument '
+                  'specifiers can be\n'
+                  'omitted, so "\'{} {}\'" is equivalent to "\'{0} {1}\'".\n'
+                  '\n'
+                  'Some simple format string examples:\n'
+                  '\n'
+                  '   "First, thou shalt count to {0}" # References first '
+                  'positional argument\n'
+                  '   "Bring me a {}"                  # Implicitly '
+                  'references the first positional argument\n'
+                  '   "From {} to {}"                  # Same as "From {0} '
+                  'to {1}"\n'
+                  '   "My quest is {name}"             # References keyword '
+                  "argument 'name'\n"
+                  '   "Weight in tons {0.weight}"      # \'weight\' '
+                  'attribute of first positional arg\n'
+                  '   "Units destroyed: {players[0]}"  # First element of '
+                  "keyword argument 'players'.\n"
+                  '\n'
+                  'The *conversion* field causes a type coercion before '
+                  'formatting.\n'
+                  'Normally, the job of formatting a value is done by the '
+                  '"__format__()"\n'
+                  'method of the value itself.  However, in some cases it is '
+                  'desirable to\n'
+                  'force a type to be formatted as a string, overriding its '
+                  'own\n'
+                  'definition of formatting.  By converting the value to a '
+                  'string before\n'
+                  'calling "__format__()", the normal formatting logic is '
+                  'bypassed.\n'
+                  '\n'
+                  'Two conversion flags are currently supported: "\'!s\'" '
+                  'which calls\n'
+                  '"str()" on the value, and "\'!r\'" which calls "repr()".\n'
+                  '\n'
+                  'Some examples:\n'
+                  '\n'
+                  '   "Harold\'s a clever {0!s}"        # Calls str() on the '
+                  'argument first\n'
+                  '   "Bring out the holy {name!r}"    # Calls repr() on the '
+                  'argument first\n'
+                  '\n'
+                  'The *format_spec* field contains a specification of how '
+                  'the value\n'
+                  'should be presented, including such details as field '
+                  'width, alignment,\n'
+                  'padding, decimal precision and so on.  Each value type '
+                  'can define its\n'
+                  'own "formatting mini-language" or interpretation of the '
+                  '*format_spec*.\n'
+                  '\n'
+                  'Most built-in types support a common formatting '
+                  'mini-language, which\n'
+                  'is described in the next section.\n'
+                  '\n'
+                  'A *format_spec* field can also include nested replacement '
+                  'fields\n'
+                  'within it. These nested replacement fields can contain '
+                  'only a field\n'
+                  'name; conversion flags and format specifications are not '
+                  'allowed.  The\n'
+                  'replacement fields within the format_spec are substituted '
+                  'before the\n'
+                  '*format_spec* string is interpreted. This allows the '
+                  'formatting of a\n'
+                  'value to be dynamically specified.\n'
+                  '\n'
+                  'See the Format examples section for some examples.\n'
+                  '\n'
+                  '\n'
+                  'Format Specification Mini-Language\n'
+                  '==================================\n'
+                  '\n'
+                  '"Format specifications" are used within replacement '
+                  'fields contained\n'
+                  'within a format string to define how individual values '
+                  'are presented\n'
+                  '(see Format String Syntax).  They can also be passed '
+                  'directly to the\n'
+                  'built-in "format()" function.  Each formattable type may '
+                  'define how\n'
+                  'the format specification is to be interpreted.\n'
+                  '\n'
+                  'Most built-in types implement the following options for '
+                  'format\n'
+                  'specifications, although some of the formatting options '
+                  'are only\n'
+                  'supported by the numeric types.\n'
+                  '\n'
+                  'A general convention is that an empty format string '
+                  '("""") produces\n'
+                  'the same result as if you had called "str()" on the '
+                  'value. A non-empty\n'
+                  'format string typically modifies the result.\n'
+                  '\n'
+                  'The general form of a *standard format specifier* is:\n'
+                  '\n'
+                  '   format_spec ::= '
+                  '[[fill]align][sign][#][0][width][,][.precision][type]\n'
+                  '   fill        ::= <any character>\n'
+                  '   align       ::= "<" | ">" | "=" | "^"\n'
+                  '   sign        ::= "+" | "-" | " "\n'
+                  '   width       ::= integer\n'
+                  '   precision   ::= integer\n'
+                  '   type        ::= "b" | "c" | "d" | "e" | "E" | "f" | '
+                  '"F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"\n'
+                  '\n'
+                  'If a valid *align* value is specified, it can be preceded '
+                  'by a *fill*\n'
+                  'character that can be any character and defaults to a '
+                  'space if\n'
+                  'omitted. Note that it is not possible to use "{" and "}" '
+                  'as *fill*\n'
+                  'char while using the "str.format()" method; this '
+                  'limitation however\n'
+                  'doesn\'t affect the "format()" function.\n'
+                  '\n'
+                  'The meaning of the various alignment options is as '
+                  'follows:\n'
+                  '\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | Option    | '
+                  'Meaning                                                    '
+                  '|\n'
+                  '   '
+                  '+===========+============================================================+\n'
+                  '   | "\'<\'"     | Forces the field to be left-aligned '
+                  'within the available   |\n'
+                  '   |           | space (this is the default for most '
+                  'objects).              |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'>\'"     | Forces the field to be right-aligned '
+                  'within the available  |\n'
+                  '   |           | space (this is the default for '
+                  'numbers).                   |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'=\'"     | Forces the padding to be placed after '
+                  'the sign (if any)    |\n'
+                  '   |           | but before the digits.  This is used for '
+                  'printing fields   |\n'
+                  "   |           | in the form '+000000120'. This alignment "
+                  'option is only    |\n'
+                  '   |           | valid for numeric '
+                  'types.                                   |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'^\'"     | Forces the field to be centered within '
+                  'the available       |\n'
+                  '   |           | '
+                  'space.                                                     '
+                  '|\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '\n'
+                  'Note that unless a minimum field width is defined, the '
+                  'field width\n'
+                  'will always be the same size as the data to fill it, so '
+                  'that the\n'
+                  'alignment option has no meaning in this case.\n'
+                  '\n'
+                  'The *sign* option is only valid for number types, and can '
+                  'be one of\n'
+                  'the following:\n'
+                  '\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | Option    | '
+                  'Meaning                                                    '
+                  '|\n'
+                  '   '
+                  '+===========+============================================================+\n'
+                  '   | "\'+\'"     | indicates that a sign should be used '
+                  'for both positive as  |\n'
+                  '   |           | well as negative '
+                  'numbers.                                  |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'-\'"     | indicates that a sign should be used '
+                  'only for negative     |\n'
+                  '   |           | numbers (this is the default '
+                  'behavior).                    |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | space     | indicates that a leading space should be '
+                  'used on positive  |\n'
+                  '   |           | numbers, and a minus sign on negative '
+                  'numbers.             |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '\n'
+                  'The "\'#\'" option is only valid for integers, and only '
+                  'for binary,\n'
+                  'octal, or hexadecimal output.  If present, it specifies '
+                  'that the\n'
+                  'output will be prefixed by "\'0b\'", "\'0o\'", or '
+                  '"\'0x\'", respectively.\n'
+                  '\n'
+                  'The "\',\'" option signals the use of a comma for a '
+                  'thousands separator.\n'
+                  'For a locale aware separator, use the "\'n\'" integer '
+                  'presentation type\n'
+                  'instead.\n'
+                  '\n'
+                  'Changed in version 2.7: Added the "\',\'" option (see '
+                  'also **PEP 378**).\n'
+                  '\n'
+                  '*width* is a decimal integer defining the minimum field '
+                  'width.  If not\n'
+                  'specified, then the field width will be determined by the '
+                  'content.\n'
+                  '\n'
+                  'Preceding the *width* field by a zero ("\'0\'") character '
+                  'enables sign-\n'
+                  'aware zero-padding for numeric types.  This is equivalent '
+                  'to a *fill*\n'
+                  'character of "\'0\'" with an *alignment* type of '
+                  '"\'=\'".\n'
+                  '\n'
+                  'The *precision* is a decimal number indicating how many '
+                  'digits should\n'
+                  'be displayed after the decimal point for a floating point '
+                  'value\n'
+                  'formatted with "\'f\'" and "\'F\'", or before and after '
+                  'the decimal point\n'
+                  'for a floating point value formatted with "\'g\'" or '
+                  '"\'G\'".  For non-\n'
+                  'number types the field indicates the maximum field size - '
+                  'in other\n'
+                  'words, how many characters will be used from the field '
+                  'content. The\n'
+                  '*precision* is not allowed for integer values.\n'
+                  '\n'
+                  'Finally, the *type* determines how the data should be '
+                  'presented.\n'
+                  '\n'
+                  'The available string presentation types are:\n'
+                  '\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | Type      | '
+                  'Meaning                                                    '
+                  '|\n'
+                  '   '
+                  '+===========+============================================================+\n'
+                  '   | "\'s\'"     | String format. This is the default '
+                  'type for strings and    |\n'
+                  '   |           | may be '
+                  'omitted.                                            |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | None      | The same as '
+                  '"\'s\'".                                         |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '\n'
+                  'The available integer presentation types are:\n'
+                  '\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | Type      | '
+                  'Meaning                                                    '
+                  '|\n'
+                  '   '
+                  '+===========+============================================================+\n'
+                  '   | "\'b\'"     | Binary format. Outputs the number in '
+                  'base 2.               |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'c\'"     | Character. Converts the integer to the '
+                  'corresponding       |\n'
+                  '   |           | unicode character before '
+                  'printing.                         |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'d\'"     | Decimal Integer. Outputs the number in '
+                  'base 10.            |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'o\'"     | Octal format. Outputs the number in '
+                  'base 8.                |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'x\'"     | Hex format. Outputs the number in base '
+                  '16, using lower-    |\n'
+                  '   |           | case letters for the digits above '
+                  '9.                       |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'X\'"     | Hex format. Outputs the number in base '
+                  '16, using upper-    |\n'
+                  '   |           | case letters for the digits above '
+                  '9.                       |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'n\'"     | Number. This is the same as "\'d\'", '
+                  'except that it uses the |\n'
+                  '   |           | current locale setting to insert the '
+                  'appropriate number    |\n'
+                  '   |           | separator '
+                  'characters.                                      |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | None      | The same as '
+                  '"\'d\'".                                         |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '\n'
+                  'In addition to the above presentation types, integers can '
+                  'be formatted\n'
+                  'with the floating point presentation types listed below '
+                  '(except "\'n\'"\n'
+                  'and None). When doing so, "float()" is used to convert '
+                  'the integer to\n'
+                  'a floating point number before formatting.\n'
+                  '\n'
+                  'The available presentation types for floating point and '
+                  'decimal values\n'
+                  'are:\n'
+                  '\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | Type      | '
+                  'Meaning                                                    '
+                  '|\n'
+                  '   '
+                  '+===========+============================================================+\n'
+                  '   | "\'e\'"     | Exponent notation. Prints the number '
+                  'in scientific         |\n'
+                  "   |           | notation using the letter 'e' to "
+                  'indicate the exponent.    |\n'
+                  '   |           | The default precision is '
+                  '"6".                              |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'E\'"     | Exponent notation. Same as "\'e\'" '
+                  'except it uses an upper   |\n'
+                  "   |           | case 'E' as the separator "
+                  'character.                       |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'f\'"     | Fixed point. Displays the number as a '
+                  'fixed-point number.  |\n'
+                  '   |           | The default precision is '
+                  '"6".                              |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'F\'"     | Fixed point. Same as '
+                  '"\'f\'".                                |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'g\'"     | General format.  For a given precision '
+                  '"p >= 1", this      |\n'
+                  '   |           | rounds the number to "p" significant '
+                  'digits and then       |\n'
+                  '   |           | formats the result in either fixed-point '
+                  'format or in      |\n'
+                  '   |           | scientific notation, depending on its '
+                  'magnitude.  The      |\n'
+                  '   |           | precise rules are as follows: suppose '
+                  'that the result      |\n'
+                  '   |           | formatted with presentation type "\'e\'" '
+                  'and precision "p-1" |\n'
+                  '   |           | would have exponent "exp".  Then if "-4 '
+                  '<= exp < p", the   |\n'
+                  '   |           | number is formatted with presentation '
+                  'type "\'f\'" and       |\n'
+                  '   |           | precision "p-1-exp".  Otherwise, the '
+                  'number is formatted   |\n'
+                  '   |           | with presentation type "\'e\'" and '
+                  'precision "p-1". In both  |\n'
+                  '   |           | cases insignificant trailing zeros are '
+                  'removed from the    |\n'
+                  '   |           | significand, and the decimal point is '
+                  'also removed if      |\n'
+                  '   |           | there are no remaining digits following '
+                  'it.  Positive and  |\n'
+                  '   |           | negative infinity, positive and negative '
+                  'zero, and nans,   |\n'
+                  '   |           | are formatted as "inf", "-inf", "0", '
+                  '"-0" and "nan"        |\n'
+                  '   |           | respectively, regardless of the '
+                  'precision.  A precision of |\n'
+                  '   |           | "0" is treated as equivalent to a '
+                  'precision of "1". The    |\n'
+                  '   |           | default precision is '
+                  '"6".                                  |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'G\'"     | General format. Same as "\'g\'" except '
+                  'switches to "\'E\'" if  |\n'
+                  '   |           | the number gets too large. The '
+                  'representations of infinity |\n'
+                  '   |           | and NaN are uppercased, '
+                  'too.                               |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'n\'"     | Number. This is the same as "\'g\'", '
+                  'except that it uses the |\n'
+                  '   |           | current locale setting to insert the '
+                  'appropriate number    |\n'
+                  '   |           | separator '
+                  'characters.                                      |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | "\'%\'"     | Percentage. Multiplies the number by '
+                  '100 and displays in   |\n'
+                  '   |           | fixed ("\'f\'") format, followed by a '
+                  'percent sign.          |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '   | None      | The same as '
+                  '"\'g\'".                                         |\n'
+                  '   '
+                  '+-----------+------------------------------------------------------------+\n'
+                  '\n'
+                  '\n'
+                  'Format examples\n'
+                  '===============\n'
+                  '\n'
+                  'This section contains examples of the new format syntax '
+                  'and comparison\n'
+                  'with the old "%"-formatting.\n'
+                  '\n'
+                  'In most of the cases the syntax is similar to the old '
+                  '"%"-formatting,\n'
+                  'with the addition of the "{}" and with ":" used instead '
+                  'of "%". For\n'
+                  'example, "\'%03.2f\'" can be translated to '
+                  '"\'{:03.2f}\'".\n'
+                  '\n'
+                  'The new format syntax also supports new and different '
+                  'options, shown\n'
+                  'in the follow examples.\n'
+                  '\n'
+                  'Accessing arguments by position:\n'
+                  '\n'
+                  "   >>> '{0}, {1}, {2}'.format('a', 'b', 'c')\n"
+                  "   'a, b, c'\n"
+                  "   >>> '{}, {}, {}'.format('a', 'b', 'c')  # 2.7+ only\n"
+                  "   'a, b, c'\n"
+                  "   >>> '{2}, {1}, {0}'.format('a', 'b', 'c')\n"
+                  "   'c, b, a'\n"
+                  "   >>> '{2}, {1}, {0}'.format(*'abc')      # unpacking "
+                  'argument sequence\n'
+                  "   'c, b, a'\n"
+                  "   >>> '{0}{1}{0}'.format('abra', 'cad')   # arguments' "
+                  'indices can be repeated\n'
+                  "   'abracadabra'\n"
+                  '\n'
+                  'Accessing arguments by name:\n'
+                  '\n'
+                  "   >>> 'Coordinates: {latitude}, "
+                  "{longitude}'.format(latitude='37.24N', "
+                  "longitude='-115.81W')\n"
+                  "   'Coordinates: 37.24N, -115.81W'\n"
+                  "   >>> coord = {'latitude': '37.24N', 'longitude': "
+                  "'-115.81W'}\n"
+                  "   >>> 'Coordinates: {latitude}, "
+                  "{longitude}'.format(**coord)\n"
+                  "   'Coordinates: 37.24N, -115.81W'\n"
+                  '\n'
+                  "Accessing arguments' attributes:\n"
+                  '\n'
+                  '   >>> c = 3-5j\n'
+                  "   >>> ('The complex number {0} is formed from the real "
+                  "part {0.real} '\n"
+                  "   ...  'and the imaginary part {0.imag}.').format(c)\n"
+                  "   'The complex number (3-5j) is formed from the real "
+                  "part 3.0 and the imaginary part -5.0.'\n"
+                  '   >>> class Point(object):\n'
+                  '   ...     def __init__(self, x, y):\n'
+                  '   ...         self.x, self.y = x, y\n'
+                  '   ...     def __str__(self):\n'
+                  "   ...         return 'Point({self.x}, "
+                  "{self.y})'.format(self=self)\n"
+                  '   ...\n'
+                  '   >>> str(Point(4, 2))\n'
+                  "   'Point(4, 2)'\n"
+                  '\n'
+                  "Accessing arguments' items:\n"
+                  '\n'
+                  '   >>> coord = (3, 5)\n'
+                  "   >>> 'X: {0[0]};  Y: {0[1]}'.format(coord)\n"
+                  "   'X: 3;  Y: 5'\n"
+                  '\n'
+                  'Replacing "%s" and "%r":\n'
+                  '\n'
+                  '   >>> "repr() shows quotes: {!r}; str() doesn\'t: '
+                  '{!s}".format(\'test1\', \'test2\')\n'
+                  '   "repr() shows quotes: \'test1\'; str() doesn\'t: '
+                  'test2"\n'
+                  '\n'
+                  'Aligning the text and specifying a width:\n'
+                  '\n'
+                  "   >>> '{:<30}'.format('left aligned')\n"
+                  "   'left aligned                  '\n"
+                  "   >>> '{:>30}'.format('right aligned')\n"
+                  "   '                 right aligned'\n"
+                  "   >>> '{:^30}'.format('centered')\n"
+                  "   '           centered           '\n"
+                  "   >>> '{:*^30}'.format('centered')  # use '*' as a fill "
+                  'char\n'
+                  "   '***********centered***********'\n"
+                  '\n'
+                  'Replacing "%+f", "%-f", and "% f" and specifying a sign:\n'
+                  '\n'
+                  "   >>> '{:+f}; {:+f}'.format(3.14, -3.14)  # show it "
+                  'always\n'
+                  "   '+3.140000; -3.140000'\n"
+                  "   >>> '{: f}; {: f}'.format(3.14, -3.14)  # show a space "
+                  'for positive numbers\n'
+                  "   ' 3.140000; -3.140000'\n"
+                  "   >>> '{:-f}; {:-f}'.format(3.14, -3.14)  # show only "
+                  "the minus -- same as '{:f}; {:f}'\n"
+                  "   '3.140000; -3.140000'\n"
+                  '\n'
+                  'Replacing "%x" and "%o" and converting the value to '
+                  'different bases:\n'
+                  '\n'
+                  '   >>> # format also supports binary numbers\n'
+                  '   >>> "int: {0:d};  hex: {0:x};  oct: {0:o};  bin: '
+                  '{0:b}".format(42)\n'
+                  "   'int: 42;  hex: 2a;  oct: 52;  bin: 101010'\n"
+                  '   >>> # with 0x, 0o, or 0b as prefix:\n'
+                  '   >>> "int: {0:d};  hex: {0:#x};  oct: {0:#o};  bin: '
+                  '{0:#b}".format(42)\n'
+                  "   'int: 42;  hex: 0x2a;  oct: 0o52;  bin: 0b101010'\n"
+                  '\n'
+                  'Using the comma as a thousands separator:\n'
+                  '\n'
+                  "   >>> '{:,}'.format(1234567890)\n"
+                  "   '1,234,567,890'\n"
+                  '\n'
+                  'Expressing a percentage:\n'
+                  '\n'
+                  '   >>> points = 19.5\n'
+                  '   >>> total = 22\n'
+                  "   >>> 'Correct answers: {:.2%}'.format(points/total)\n"
+                  "   'Correct answers: 88.64%'\n"
+                  '\n'
+                  'Using type-specific formatting:\n'
+                  '\n'
+                  '   >>> import datetime\n'
+                  '   >>> d = datetime.datetime(2010, 7, 4, 12, 15, 58)\n'
+                  "   >>> '{:%Y-%m-%d %H:%M:%S}'.format(d)\n"
+                  "   '2010-07-04 12:15:58'\n"
+                  '\n'
+                  'Nesting arguments and more complex examples:\n'
+                  '\n'
+                  "   >>> for align, text in zip('<^>', ['left', 'center', "
+                  "'right']):\n"
+                  "   ...     '{0:{fill}{align}16}'.format(text, fill=align, "
+                  'align=align)\n'
+                  '   ...\n'
+                  "   'left<<<<<<<<<<<<'\n"
+                  "   '^^^^^center^^^^^'\n"
+                  "   '>>>>>>>>>>>right'\n"
+                  '   >>>\n'
+                  '   >>> octets = [192, 168, 0, 1]\n'
+                  "   >>> '{:02X}{:02X}{:02X}{:02X}'.format(*octets)\n"
+                  "   'C0A80001'\n"
+                  '   >>> int(_, 16)\n'
+                  '   3232235521\n'
+                  '   >>>\n'
+                  '   >>> width = 5\n'
+                  '   >>> for num in range(5,12):\n'
+                  "   ...     for base in 'dXob':\n"
+                  "   ...         print '{0:{width}{base}}'.format(num, "
+                  'base=base, width=width),\n'
+                  '   ...     print\n'
+                  '   ...\n'
+                  '       5     5     5   101\n'
+                  '       6     6     6   110\n'
+                  '       7     7     7   111\n'
+                  '       8     8    10  1000\n'
+                  '       9     9    11  1001\n'
+                  '      10     A    12  1010\n'
+                  '      11     B    13  1011\n',
+ 'function': '\n'
+             'Function definitions\n'
+             '********************\n'
+             '\n'
+             'A function definition defines a user-defined function object '
+             '(see\n'
+             'section The standard type hierarchy):\n'
+             '\n'
+             '   decorated      ::= decorators (classdef | funcdef)\n'
+             '   decorators     ::= decorator+\n'
+             '   decorator      ::= "@" dotted_name ["(" [argument_list '
+             '[","]] ")"] NEWLINE\n'
+             '   funcdef        ::= "def" funcname "(" [parameter_list] ")" '
+             '":" suite\n'
+             '   dotted_name    ::= identifier ("." identifier)*\n'
+             '   parameter_list ::= (defparameter ",")*\n'
+             '                      (  "*" identifier ["," "**" identifier]\n'
+             '                      | "**" identifier\n'
+             '                      | defparameter [","] )\n'
+             '   defparameter   ::= parameter ["=" expression]\n'
+             '   sublist        ::= parameter ("," parameter)* [","]\n'
+             '   parameter      ::= identifier | "(" sublist ")"\n'
+             '   funcname       ::= identifier\n'
+             '\n'
+             'A function definition is an executable statement.  Its '
+             'execution binds\n'
+             'the function name in the current local namespace to a function '
+             'object\n'
+             '(a wrapper around the executable code for the function).  '
+             'This\n'
+             'function object contains a reference to the current global '
+             'namespace\n'
+             'as the global namespace to be used when the function is '
+             'called.\n'
+             '\n'
+             'The function definition does not execute the function body; '
+             'this gets\n'
+             'executed only when the function is called. [3]\n'
+             '\n'
+             'A function definition may be wrapped by one or more '
+             '*decorator*\n'
+             'expressions. Decorator expressions are evaluated when the '
+             'function is\n'
+             'defined, in the scope that contains the function definition.  '
+             'The\n'
+             'result must be a callable, which is invoked with the function '
+             'object\n'
+             'as the only argument. The returned value is bound to the '
+             'function name\n'
+             'instead of the function object.  Multiple decorators are '
+             'applied in\n'
+             'nested fashion. For example, the following code:\n'
+             '\n'
+             '   @f1(arg)\n'
+             '   @f2\n'
+             '   def func(): pass\n'
+             '\n'
+             'is equivalent to:\n'
+             '\n'
+             '   def func(): pass\n'
+             '   func = f1(arg)(f2(func))\n'
+             '\n'
+             'When one or more top-level *parameters* have the form '
+             '*parameter* "="\n'
+             '*expression*, the function is said to have "default parameter '
+             'values."\n'
+             'For a parameter with a default value, the corresponding '
+             '*argument* may\n'
+             "be omitted from a call, in which case the parameter's default "
+             'value is\n'
+             'substituted.  If a parameter has a default value, all '
+             'following\n'
+             'parameters must also have a default value --- this is a '
+             'syntactic\n'
+             'restriction that is not expressed by the grammar.\n'
+             '\n'
+             '**Default parameter values are evaluated when the function '
+             'definition\n'
+             'is executed.**  This means that the expression is evaluated '
+             'once, when\n'
+             'the function is defined, and that the same "pre-computed" '
+             'value is\n'
+             'used for each call.  This is especially important to '
+             'understand when a\n'
+             'default parameter is a mutable object, such as a list or a '
+             'dictionary:\n'
+             'if the function modifies the object (e.g. by appending an item '
+             'to a\n'
+             'list), the default value is in effect modified. This is '
+             'generally not\n'
+             'what was intended.  A way around this  is to use "None" as '
+             'the\n'
+             'default, and explicitly test for it in the body of the '
+             'function, e.g.:\n'
+             '\n'
+             '   def whats_on_the_telly(penguin=None):\n'
+             '       if penguin is None:\n'
+             '           penguin = []\n'
+             '       penguin.append("property of the zoo")\n'
+             '       return penguin\n'
+             '\n'
+             'Function call semantics are described in more detail in '
+             'section Calls.\n'
+             'A function call always assigns values to all parameters '
+             'mentioned in\n'
+             'the parameter list, either from position arguments, from '
+             'keyword\n'
+             'arguments, or from default values.  If the form '
+             '""*identifier"" is\n'
+             'present, it is initialized to a tuple receiving any excess '
+             'positional\n'
+             'parameters, defaulting to the empty tuple.  If the form\n'
+             '""**identifier"" is present, it is initialized to a new '
+             'dictionary\n'
+             'receiving any excess keyword arguments, defaulting to a new '
+             'empty\n'
+             'dictionary.\n'
+             '\n'
+             'It is also possible to create anonymous functions (functions '
+             'not bound\n'
+             'to a name), for immediate use in expressions.  This uses '
+             'lambda\n'
+             'expressions, described in section Lambdas.  Note that the '
+             'lambda\n'
+             'expression is merely a shorthand for a simplified function '
+             'definition;\n'
+             'a function defined in a ""def"" statement can be passed around '
+             'or\n'
+             'assigned to another name just like a function defined by a '
+             'lambda\n'
+             'expression.  The ""def"" form is actually more powerful since '
+             'it\n'
+             'allows the execution of multiple statements.\n'
+             '\n'
+             "**Programmer's note:** Functions are first-class objects.  A "
+             '""def""\n'
+             'form executed inside a function definition defines a local '
+             'function\n'
+             'that can be returned or passed around.  Free variables used in '
+             'the\n'
+             'nested function can access the local variables of the '
+             'function\n'
+             'containing the def.  See section Naming and binding for '
+             'details.\n',
+ 'global': '\n'
+           'The "global" statement\n'
+           '**********************\n'
+           '\n'
+           '   global_stmt ::= "global" identifier ("," identifier)*\n'
+           '\n'
+           'The "global" statement is a declaration which holds for the '
+           'entire\n'
+           'current code block.  It means that the listed identifiers are to '
+           'be\n'
+           'interpreted as globals.  It would be impossible to assign to a '
+           'global\n'
+           'variable without "global", although free variables may refer to\n'
+           'globals without being declared global.\n'
+           '\n'
+           'Names listed in a "global" statement must not be used in the '
+           'same code\n'
+           'block textually preceding that "global" statement.\n'
+           '\n'
+           'Names listed in a "global" statement must not be defined as '
+           'formal\n'
+           'parameters or in a "for" loop control target, "class" '
+           'definition,\n'
+           'function definition, or "import" statement.\n'
+           '\n'
+           '**CPython implementation detail:** The current implementation '
+           'does not\n'
+           'enforce the latter two restrictions, but programs should not '
+           'abuse\n'
+           'this freedom, as future implementations may enforce them or '
+           'silently\n'
+           'change the meaning of the program.\n'
+           '\n'
+           '**Programmer\'s note:** the "global" is a directive to the '
+           'parser.  It\n'
+           'applies only to code parsed at the same time as the "global"\n'
+           'statement. In particular, a "global" statement contained in an '
+           '"exec"\n'
+           'statement does not affect the code block *containing* the '
+           '"exec"\n'
+           'statement, and code contained in an "exec" statement is '
+           'unaffected by\n'
+           '"global" statements in the code containing the "exec" '
+           'statement.  The\n'
+           'same applies to the "eval()", "execfile()" and "compile()" '
+           'functions.\n',
+ 'id-classes': '\n'
+               'Reserved classes of identifiers\n'
+               '*******************************\n'
+               '\n'
+               'Certain classes of identifiers (besides keywords) have '
+               'special\n'
+               'meanings.  These classes are identified by the patterns of '
+               'leading and\n'
+               'trailing underscore characters:\n'
+               '\n'
+               '"_*"\n'
+               '   Not imported by "from module import *".  The special '
+               'identifier "_"\n'
+               '   is used in the interactive interpreter to store the '
+               'result of the\n'
+               '   last evaluation; it is stored in the "__builtin__" '
+               'module.  When\n'
+               '   not in interactive mode, "_" has no special meaning and '
+               'is not\n'
+               '   defined. See section The import statement.\n'
+               '\n'
+               '   Note: The name "_" is often used in conjunction with\n'
+               '     internationalization; refer to the documentation for '
+               'the\n'
+               '     "gettext" module for more information on this '
+               'convention.\n'
+               '\n'
+               '"__*__"\n'
+               '   System-defined names. These names are defined by the '
+               'interpreter\n'
+               '   and its implementation (including the standard library).  '
+               'Current\n'
+               '   system names are discussed in the Special method names '
+               'section and\n'
+               '   elsewhere.  More will likely be defined in future '
+               'versions of\n'
+               '   Python.  *Any* use of "__*__" names, in any context, that '
+               'does not\n'
+               '   follow explicitly documented use, is subject to breakage '
+               'without\n'
+               '   warning.\n'
+               '\n'
+               '"__*"\n'
+               '   Class-private names.  Names in this category, when used '
+               'within the\n'
+               '   context of a class definition, are re-written to use a '
+               'mangled form\n'
+               '   to help avoid name clashes between "private" attributes '
+               'of base and\n'
+               '   derived classes. See section Identifiers (Names).\n',
+ 'identifiers': '\n'
+                'Identifiers and keywords\n'
+                '************************\n'
+                '\n'
+                'Identifiers (also referred to as *names*) are described by '
+                'the\n'
+                'following lexical definitions:\n'
+                '\n'
+                '   identifier ::= (letter|"_") (letter | digit | "_")*\n'
+                '   letter     ::= lowercase | uppercase\n'
+                '   lowercase  ::= "a"..."z"\n'
+                '   uppercase  ::= "A"..."Z"\n'
+                '   digit      ::= "0"..."9"\n'
+                '\n'
+                'Identifiers are unlimited in length.  Case is significant.\n'
+                '\n'
+                '\n'
+                'Keywords\n'
+                '========\n'
+                '\n'
+                'The following identifiers are used as reserved words, or '
+                '*keywords* of\n'
+                'the language, and cannot be used as ordinary identifiers.  '
+                'They must\n'
+                'be spelled exactly as written here:\n'
+                '\n'
+                '   and       del       from      not       while\n'
+                '   as        elif      global    or        with\n'
+                '   assert    else      if        pass      yield\n'
+                '   break     except    import    print\n'
+                '   class     exec      in        raise\n'
+                '   continue  finally   is        return\n'
+                '   def       for       lambda    try\n'
+                '\n'
+                'Changed in version 2.4: "None" became a constant and is now '
+                'recognized\n'
+                'by the compiler as a name for the built-in object "None".  '
+                'Although it\n'
+                'is not a keyword, you cannot assign a different object to '
+                'it.\n'
+                '\n'
+                'Changed in version 2.5: Using "as" and "with" as '
+                'identifiers triggers\n'
+                'a warning.  To use them as keywords, enable the '
+                '"with_statement"\n'
+                'future feature .\n'
+                '\n'
+                'Changed in version 2.6: "as" and "with" are full keywords.\n'
+                '\n'
+                '\n'
+                'Reserved classes of identifiers\n'
+                '===============================\n'
+                '\n'
+                'Certain classes of identifiers (besides keywords) have '
+                'special\n'
+                'meanings.  These classes are identified by the patterns of '
+                'leading and\n'
+                'trailing underscore characters:\n'
+                '\n'
+                '"_*"\n'
+                '   Not imported by "from module import *".  The special '
+                'identifier "_"\n'
+                '   is used in the interactive interpreter to store the '
+                'result of the\n'
+                '   last evaluation; it is stored in the "__builtin__" '
+                'module.  When\n'
+                '   not in interactive mode, "_" has no special meaning and '
+                'is not\n'
+                '   defined. See section The import statement.\n'
+                '\n'
+                '   Note: The name "_" is often used in conjunction with\n'
+                '     internationalization; refer to the documentation for '
+                'the\n'
+                '     "gettext" module for more information on this '
+                'convention.\n'
+                '\n'
+                '"__*__"\n'
+                '   System-defined names. These names are defined by the '
+                'interpreter\n'
+                '   and its implementation (including the standard '
+                'library).  Current\n'
+                '   system names are discussed in the Special method names '
+                'section and\n'
+                '   elsewhere.  More will likely be defined in future '
+                'versions of\n'
+                '   Python.  *Any* use of "__*__" names, in any context, '
+                'that does not\n'
+                '   follow explicitly documented use, is subject to breakage '
+                'without\n'
+                '   warning.\n'
+                '\n'
+                '"__*"\n'
+                '   Class-private names.  Names in this category, when used '
+                'within the\n'
+                '   context of a class definition, are re-written to use a '
+                'mangled form\n'
+                '   to help avoid name clashes between "private" attributes '
+                'of base and\n'
+                '   derived classes. See section Identifiers (Names).\n',
+ 'if': '\n'
+       'The "if" statement\n'
+       '******************\n'
+       '\n'
+       'The "if" statement is used for conditional execution:\n'
+       '\n'
+       '   if_stmt ::= "if" expression ":" suite\n'
+       '               ( "elif" expression ":" suite )*\n'
+       '               ["else" ":" suite]\n'
+       '\n'
+       'It selects exactly one of the suites by evaluating the expressions '
+       'one\n'
+       'by one until one is found to be true (see section Boolean '
+       'operations\n'
+       'for the definition of true and false); then that suite is executed\n'
+       '(and no other part of the "if" statement is executed or evaluated).\n'
+       'If all expressions are false, the suite of the "else" clause, if\n'
+       'present, is executed.\n',
+ 'imaginary': '\n'
+              'Imaginary literals\n'
+              '******************\n'
+              '\n'
+              'Imaginary literals are described by the following lexical '
+              'definitions:\n'
+              '\n'
+              '   imagnumber ::= (floatnumber | intpart) ("j" | "J")\n'
+              '\n'
+              'An imaginary literal yields a complex number with a real part '
+              'of 0.0.\n'
+              'Complex numbers are represented as a pair of floating point '
+              'numbers\n'
+              'and have the same restrictions on their range.  To create a '
+              'complex\n'
+              'number with a nonzero real part, add a floating point number '
+              'to it,\n'
+              'e.g., "(3+4j)".  Some examples of imaginary literals:\n'
+              '\n'
+              '   3.14j   10.j    10j     .001j   1e100j  3.14e-10j\n',
+ 'import': '\n'
+           'The "import" statement\n'
+           '**********************\n'
+           '\n'
+           '   import_stmt     ::= "import" module ["as" name] ( "," module '
+           '["as" name] )*\n'
+           '                   | "from" relative_module "import" identifier '
+           '["as" name]\n'
+           '                   ( "," identifier ["as" name] )*\n'
+           '                   | "from" relative_module "import" "(" '
+           'identifier ["as" name]\n'
+           '                   ( "," identifier ["as" name] )* [","] ")"\n'
+           '                   | "from" module "import" "*"\n'
+           '   module          ::= (identifier ".")* identifier\n'
+           '   relative_module ::= "."* module | "."+\n'
+           '   name            ::= identifier\n'
+           '\n'
+           'Import statements are executed in two steps: (1) find a module, '
+           'and\n'
+           'initialize it if necessary; (2) define a name or names in the '
+           'local\n'
+           'namespace (of the scope where the "import" statement occurs). '
+           'The\n'
+           'statement comes in two forms differing on whether it uses the '
+           '"from"\n'
+           'keyword. The first form (without "from") repeats these steps for '
+           'each\n'
+           'identifier in the list. The form with "from" performs step (1) '
+           'once,\n'
+           'and then performs step (2) repeatedly.\n'
+           '\n'
+           'To understand how step (1) occurs, one must first understand '
+           'how\n'
+           'Python handles hierarchical naming of modules. To help organize\n'
+           'modules and provide a hierarchy in naming, Python has a concept '
+           'of\n'
+           'packages. A package can contain other packages and modules '
+           'while\n'
+           'modules cannot contain other modules or packages. From a file '
+           'system\n'
+           'perspective, packages are directories and modules are files.\n'
+           '\n'
+           'Once the name of the module is known (unless otherwise '
+           'specified, the\n'
+           'term "module" will refer to both packages and modules), '
+           'searching for\n'
+           'the module or package can begin. The first place checked is\n'
+           '"sys.modules", the cache of all modules that have been imported\n'
+           'previously. If the module is found there then it is used in step '
+           '(2)\n'
+           'of import.\n'
+           '\n'
+           'If the module is not found in the cache, then "sys.meta_path" '
+           'is\n'
+           'searched (the specification for "sys.meta_path" can be found in '
+           '**PEP\n'
+           '302**). The object is a list of *finder* objects which are '
+           'queried in\n'
+           'order as to whether they know how to load the module by calling '
+           'their\n'
+           '"find_module()" method with the name of the module. If the '
+           'module\n'
+           'happens to be contained within a package (as denoted by the '
+           'existence\n'
+           'of a dot in the name), then a second argument to "find_module()" '
+           'is\n'
+           'given as the value of the "__path__" attribute from the parent '
+           'package\n'
+           '(everything up to the last dot in the name of the module being\n'
+           'imported). If a finder can find the module it returns a '
+           '*loader*\n'
+           '(discussed later) or returns "None".\n'
+           '\n'
+           'If none of the finders on "sys.meta_path" are able to find the '
+           'module\n'
+           'then some implicitly defined finders are queried. '
+           'Implementations of\n'
+           'Python vary in what implicit meta path finders are defined. The '
+           'one\n'
+           'they all do define, though, is one that handles '
+           '"sys.path_hooks",\n'
+           '"sys.path_importer_cache", and "sys.path".\n'
+           '\n'
+           'The implicit finder searches for the requested module in the '
+           '"paths"\n'
+           'specified in one of two places ("paths" do not have to be file '
+           'system\n'
+           'paths). If the module being imported is supposed to be '
+           'contained\n'
+           'within a package then the second argument passed to '
+           '"find_module()",\n'
+           '"__path__" on the parent package, is used as the source of '
+           'paths. If\n'
+           'the module is not contained in a package then "sys.path" is used '
+           'as\n'
+           'the source of paths.\n'
+           '\n'
+           'Once the source of paths is chosen it is iterated over to find '
+           'a\n'
+           'finder that can handle that path. The dict at\n'
+           '"sys.path_importer_cache" caches finders for paths and is '
+           'checked for\n'
+           'a finder. If the path does not have a finder cached then\n'
+           '"sys.path_hooks" is searched by calling each object in the list '
+           'with a\n'
+           'single argument of the path, returning a finder or raises\n'
+           '"ImportError". If a finder is returned then it is cached in\n'
+           '"sys.path_importer_cache" and then used for that path entry. If '
+           'no\n'
+           'finder can be found but the path exists then a value of "None" '
+           'is\n'
+           'stored in "sys.path_importer_cache" to signify that an implicit, '
+           'file-\n'
+           'based finder that handles modules stored as individual files '
+           'should be\n'
+           'used for that path. If the path does not exist then a finder '
+           'which\n'
+           'always returns "None" is placed in the cache for the path.\n'
+           '\n'
+           'If no finder can find the module then "ImportError" is raised.\n'
+           'Otherwise some finder returned a loader whose "load_module()" '
+           'method\n'
+           'is called with the name of the module to load (see **PEP 302** '
+           'for the\n'
+           'original definition of loaders). A loader has several '
+           'responsibilities\n'
+           'to perform on a module it loads. First, if the module already '
+           'exists\n'
+           'in "sys.modules" (a possibility if the loader is called outside '
+           'of the\n'
+           'import machinery) then it is to use that module for '
+           'initialization and\n'
+           'not a new module. But if the module does not exist in '
+           '"sys.modules"\n'
+           'then it is to be added to that dict before initialization '
+           'begins. If\n'
+           'an error occurs during loading of the module and it was added '
+           'to\n'
+           '"sys.modules" it is to be removed from the dict. If an error '
+           'occurs\n'
+           'but the module was already in "sys.modules" it is left in the '
+           'dict.\n'
+           '\n'
+           'The loader must set several attributes on the module. "__name__" '
+           'is to\n'
+           'be set to the name of the module. "__file__" is to be the "path" '
+           'to\n'
+           'the file unless the module is built-in (and thus listed in\n'
+           '"sys.builtin_module_names") in which case the attribute is not '
+           'set. If\n'
+           'what is being imported is a package then "__path__" is to be set '
+           'to a\n'
+           'list of paths to be searched when looking for modules and '
+           'packages\n'
+           'contained within the package being imported. "__package__" is '
+           'optional\n'
+           'but should be set to the name of package that contains the '
+           'module or\n'
+           'package (the empty string is used for module not contained in a\n'
+           'package). "__loader__" is also optional but should be set to '
+           'the\n'
+           'loader object that is loading the module.\n'
+           '\n'
+           'If an error occurs during loading then the loader raises '
+           '"ImportError"\n'
+           'if some other exception is not already being propagated. '
+           'Otherwise the\n'
+           'loader returns the module that was loaded and initialized.\n'
+           '\n'
+           'When step (1) finishes without raising an exception, step (2) '
+           'can\n'
+           'begin.\n'
+           '\n'
+           'The first form of "import" statement binds the module name in '
+           'the\n'
+           'local namespace to the module object, and then goes on to import '
+           'the\n'
+           'next identifier, if any.  If the module name is followed by '
+           '"as", the\n'
+           'name following "as" is used as the local name for the module.\n'
+           '\n'
+           'The "from" form does not bind the module name: it goes through '
+           'the\n'
+           'list of identifiers, looks each one of them up in the module '
+           'found in\n'
+           'step (1), and binds the name in the local namespace to the '
+           'object thus\n'
+           'found.  As with the first form of "import", an alternate local '
+           'name\n'
+           'can be supplied by specifying ""as" localname".  If a name is '
+           'not\n'
+           'found, "ImportError" is raised.  If the list of identifiers is\n'
+           'replaced by a star ("\'*\'"), all public names defined in the '
+           'module are\n'
+           'bound in the local namespace of the "import" statement..\n'
+           '\n'
+           'The *public names* defined by a module are determined by '
+           'checking the\n'
+           'module\'s namespace for a variable named "__all__"; if defined, '
+           'it must\n'
+           'be a sequence of strings which are names defined or imported by '
+           'that\n'
+           'module.  The names given in "__all__" are all considered public '
+           'and\n'
+           'are required to exist.  If "__all__" is not defined, the set of '
+           'public\n'
+           "names includes all names found in the module's namespace which "
+           'do not\n'
+           'begin with an underscore character ("\'_\'"). "__all__" should '
+           'contain\n'
+           'the entire public API. It is intended to avoid accidentally '
+           'exporting\n'
+           'items that are not part of the API (such as library modules '
+           'which were\n'
+           'imported and used within the module).\n'
+           '\n'
+           'The "from" form with "*" may only occur in a module scope.  If '
+           'the\n'
+           'wild card form of import --- "import *" --- is used in a '
+           'function and\n'
+           'the function contains or is a nested block with free variables, '
+           'the\n'
+           'compiler will raise a "SyntaxError".\n'
+           '\n'
+           'When specifying what module to import you do not have to specify '
+           'the\n'
+           'absolute name of the module. When a module or package is '
+           'contained\n'
+           'within another package it is possible to make a relative import '
+           'within\n'
+           'the same top package without having to mention the package name. '
+           'By\n'
+           'using leading dots in the specified module or package after '
+           '"from" you\n'
+           'can specify how high to traverse up the current package '
+           'hierarchy\n'
+           'without specifying exact names. One leading dot means the '
+           'current\n'
+           'package where the module making the import exists. Two dots '
+           'means up\n'
+           'one package level. Three dots is up two levels, etc. So if you '
+           'execute\n'
+           '"from . import mod" from a module in the "pkg" package then you '
+           'will\n'
+           'end up importing "pkg.mod". If you execute "from ..subpkg2 '
+           'import mod"\n'
+           'from within "pkg.subpkg1" you will import "pkg.subpkg2.mod". '
+           'The\n'
+           'specification for relative imports is contained within **PEP '
+           '328**.\n'
+           '\n'
+           '"importlib.import_module()" is provided to support applications '
+           'that\n'
+           'determine which modules need to be loaded dynamically.\n'
+           '\n'
+           '\n'
+           'Future statements\n'
+           '=================\n'
+           '\n'
+           'A *future statement* is a directive to the compiler that a '
+           'particular\n'
+           'module should be compiled using syntax or semantics that will '
+           'be\n'
+           'available in a specified future release of Python.  The future\n'
+           'statement is intended to ease migration to future versions of '
+           'Python\n'
+           'that introduce incompatible changes to the language.  It allows '
+           'use of\n'
+           'the new features on a per-module basis before the release in '
+           'which the\n'
+           'feature becomes standard.\n'
+           '\n'
+           '   future_statement ::= "from" "__future__" "import" feature '
+           '["as" name]\n'
+           '                        ("," feature ["as" name])*\n'
+           '                        | "from" "__future__" "import" "(" '
+           'feature ["as" name]\n'
+           '                        ("," feature ["as" name])* [","] ")"\n'
+           '   feature          ::= identifier\n'
+           '   name             ::= identifier\n'
+           '\n'
+           'A future statement must appear near the top of the module.  The '
+           'only\n'
+           'lines that can appear before a future statement are:\n'
+           '\n'
+           '* the module docstring (if any),\n'
+           '\n'
+           '* comments,\n'
+           '\n'
+           '* blank lines, and\n'
+           '\n'
+           '* other future statements.\n'
+           '\n'
+           'The features recognized by Python 2.6 are "unicode_literals",\n'
+           '"print_function", "absolute_import", "division", "generators",\n'
+           '"nested_scopes" and "with_statement".  "generators", '
+           '"with_statement",\n'
+           '"nested_scopes" are redundant in Python version 2.6 and above '
+           'because\n'
+           'they are always enabled.\n'
+           '\n'
+           'A future statement is recognized and treated specially at '
+           'compile\n'
+           'time: Changes to the semantics of core constructs are often\n'
+           'implemented by generating different code.  It may even be the '
+           'case\n'
+           'that a new feature introduces new incompatible syntax (such as a '
+           'new\n'
+           'reserved word), in which case the compiler may need to parse '
+           'the\n'
+           'module differently.  Such decisions cannot be pushed off until\n'
+           'runtime.\n'
+           '\n'
+           'For any given release, the compiler knows which feature names '
+           'have\n'
+           'been defined, and raises a compile-time error if a future '
+           'statement\n'
+           'contains a feature not known to it.\n'
+           '\n'
+           'The direct runtime semantics are the same as for any import '
+           'statement:\n'
+           'there is a standard module "__future__", described later, and it '
+           'will\n'
+           'be imported in the usual way at the time the future statement '
+           'is\n'
+           'executed.\n'
+           '\n'
+           'The interesting runtime semantics depend on the specific '
+           'feature\n'
+           'enabled by the future statement.\n'
+           '\n'
+           'Note that there is nothing special about the statement:\n'
+           '\n'
+           '   import __future__ [as name]\n'
+           '\n'
+           "That is not a future statement; it's an ordinary import "
+           'statement with\n'
+           'no special semantics or syntax restrictions.\n'
+           '\n'
+           'Code compiled by an "exec" statement or calls to the built-in\n'
+           'functions "compile()" and "execfile()" that occur in a module '
+           '"M"\n'
+           'containing a future statement will, by default, use the new  '
+           'syntax or\n'
+           'semantics associated with the future statement.  This can, '
+           'starting\n'
+           'with Python 2.2 be controlled by optional arguments to '
+           '"compile()" ---\n'
+           'see the documentation of that function for details.\n'
+           '\n'
+           'A future statement typed at an interactive interpreter prompt '
+           'will\n'
+           'take effect for the rest of the interpreter session.  If an\n'
+           'interpreter is started with the "-i" option, is passed a script '
+           'name\n'
+           'to execute, and the script includes a future statement, it will '
+           'be in\n'
+           'effect in the interactive session started after the script is\n'
+           'executed.\n'
+           '\n'
+           'See also: **PEP 236** - Back to the __future__\n'
+           '\n'
+           '     The original proposal for the __future__ mechanism.\n',
+ 'in': '\n'
+       'Comparisons\n'
+       '***********\n'
+       '\n'
+       'Unlike C, all comparison operations in Python have the same '
+       'priority,\n'
+       'which is lower than that of any arithmetic, shifting or bitwise\n'
+       'operation.  Also unlike C, expressions like "a < b < c" have the\n'
+       'interpretation that is conventional in mathematics:\n'
+       '\n'
+       '   comparison    ::= or_expr ( comp_operator or_expr )*\n'
+       '   comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "<>" | "!="\n'
+       '                     | "is" ["not"] | ["not"] "in"\n'
+       '\n'
+       'Comparisons yield boolean values: "True" or "False".\n'
+       '\n'
+       'Comparisons can be chained arbitrarily, e.g., "x < y <= z" is\n'
+       'equivalent to "x < y and y <= z", except that "y" is evaluated only\n'
+       'once (but in both cases "z" is not evaluated at all when "x < y" is\n'
+       'found to be false).\n'
+       '\n'
+       'Formally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and '
+       '*op1*,\n'
+       '*op2*, ..., *opN* are comparison operators, then "a op1 b op2 c ... '
+       'y\n'
+       'opN z" is equivalent to "a op1 b and b op2 c and ... y opN z", '
+       'except\n'
+       'that each expression is evaluated at most once.\n'
+       '\n'
+       'Note that "a op1 b op2 c" doesn\'t imply any kind of comparison '
+       'between\n'
+       '*a* and *c*, so that, e.g., "x < y > z" is perfectly legal (though\n'
+       'perhaps not pretty).\n'
+       '\n'
+       'The forms "<>" and "!=" are equivalent; for consistency with C, '
+       '"!="\n'
+       'is preferred; where "!=" is mentioned below "<>" is also accepted.\n'
+       'The "<>" spelling is considered obsolescent.\n'
+       '\n'
+       'The operators "<", ">", "==", ">=", "<=", and "!=" compare the '
+       'values\n'
+       'of two objects.  The objects need not have the same type. If both '
+       'are\n'
+       'numbers, they are converted to a common type.  Otherwise, objects '
+       'of\n'
+       'different types *always* compare unequal, and are ordered '
+       'consistently\n'
+       'but arbitrarily. You can control comparison behavior of objects of\n'
+       'non-built-in types by defining a "__cmp__" method or rich '
+       'comparison\n'
+       'methods like "__gt__", described in section Special method names.\n'
+       '\n'
+       '(This unusual definition of comparison was used to simplify the\n'
+       'definition of operations like sorting and the "in" and "not in"\n'
+       'operators. In the future, the comparison rules for objects of\n'
+       'different types are likely to change.)\n'
+       '\n'
+       'Comparison of objects of the same type depends on the type:\n'
+       '\n'
+       '* Numbers are compared arithmetically.\n'
+       '\n'
+       '* Strings are compared lexicographically using the numeric\n'
+       '  equivalents (the result of the built-in function "ord()") of '
+       'their\n'
+       '  characters. Unicode and 8-bit strings are fully interoperable in\n'
+       '  this behavior. [4]\n'
+       '\n'
+       '* Tuples and lists are compared lexicographically using comparison\n'
+       '  of corresponding elements.  This means that to compare equal, '
+       'each\n'
+       '  element must compare equal and the two sequences must be of the '
+       'same\n'
+       '  type and have the same length.\n'
+       '\n'
+       '  If not equal, the sequences are ordered the same as their first\n'
+       '  differing elements.  For example, "cmp([1,2,x], [1,2,y])" returns\n'
+       '  the same as "cmp(x,y)".  If the corresponding element does not\n'
+       '  exist, the shorter sequence is ordered first (for example, "[1,2] '
+       '<\n'
+       '  [1,2,3]").\n'
+       '\n'
+       '* Mappings (dictionaries) compare equal if and only if their sorted\n'
+       '  (key, value) lists compare equal. [5] Outcomes other than '
+       'equality\n'
+       '  are resolved consistently, but are not otherwise defined. [6]\n'
+       '\n'
+       '* Most other objects of built-in types compare unequal unless they\n'
+       '  are the same object; the choice whether one object is considered\n'
+       '  smaller or larger than another one is made arbitrarily but\n'
+       '  consistently within one execution of a program.\n'
+       '\n'
+       'The operators "in" and "not in" test for collection membership.  "x '
+       'in\n'
+       's" evaluates to true if *x* is a member of the collection *s*, and\n'
+       'false otherwise.  "x not in s" returns the negation of "x in s". '
+       'The\n'
+       'collection membership test has traditionally been bound to '
+       'sequences;\n'
+       'an object is a member of a collection if the collection is a '
+       'sequence\n'
+       'and contains an element equal to that object.  However, it make '
+       'sense\n'
+       'for many other object types to support membership tests without '
+       'being\n'
+       'a sequence.  In particular, dictionaries (for keys) and sets '
+       'support\n'
+       'membership testing.\n'
+       '\n'
+       'For the list and tuple types, "x in y" is true if and only if there\n'
+       'exists an index *i* such that "x == y[i]" is true.\n'
+       '\n'
+       'For the Unicode and string types, "x in y" is true if and only if '
+       '*x*\n'
+       'is a substring of *y*.  An equivalent test is "y.find(x) != -1".\n'
+       'Note, *x* and *y* need not be the same type; consequently, "u\'ab\' '
+       'in\n'
+       '\'abc\'" will return "True". Empty strings are always considered to '
+       'be a\n'
+       'substring of any other string, so """ in "abc"" will return "True".\n'
+       '\n'
+       'Changed in version 2.3: Previously, *x* was required to be a string '
+       'of\n'
+       'length "1".\n'
+       '\n'
+       'For user-defined classes which define the "__contains__()" method, '
+       '"x\n'
+       'in y" is true if and only if "y.__contains__(x)" is true.\n'
+       '\n'
+       'For user-defined classes which do not define "__contains__()" but '
+       'do\n'
+       'define "__iter__()", "x in y" is true if some value "z" with "x == '
+       'z"\n'
+       'is produced while iterating over "y".  If an exception is raised\n'
+       'during the iteration, it is as if "in" raised that exception.\n'
+       '\n'
+       'Lastly, the old-style iteration protocol is tried: if a class '
+       'defines\n'
+       '"__getitem__()", "x in y" is true if and only if there is a non-\n'
+       'negative integer index *i* such that "x == y[i]", and all lower\n'
+       'integer indices do not raise "IndexError" exception. (If any other\n'
+       'exception is raised, it is as if "in" raised that exception).\n'
+       '\n'
+       'The operator "not in" is defined to have the inverse true value of\n'
+       '"in".\n'
+       '\n'
+       'The operators "is" and "is not" test for object identity: "x is y" '
+       'is\n'
+       'true if and only if *x* and *y* are the same object.  "x is not y"\n'
+       'yields the inverse truth value. [7]\n',
+ 'integers': '\n'
+             'Integer and long integer literals\n'
+             '*********************************\n'
+             '\n'
+             'Integer and long integer literals are described by the '
+             'following\n'
+             'lexical definitions:\n'
+             '\n'
+             '   longinteger    ::= integer ("l" | "L")\n'
+             '   integer        ::= decimalinteger | octinteger | hexinteger '
+             '| bininteger\n'
+             '   decimalinteger ::= nonzerodigit digit* | "0"\n'
+             '   octinteger     ::= "0" ("o" | "O") octdigit+ | "0" '
+             'octdigit+\n'
+             '   hexinteger     ::= "0" ("x" | "X") hexdigit+\n'
+             '   bininteger     ::= "0" ("b" | "B") bindigit+\n'
+             '   nonzerodigit   ::= "1"..."9"\n'
+             '   octdigit       ::= "0"..."7"\n'
+             '   bindigit       ::= "0" | "1"\n'
+             '   hexdigit       ::= digit | "a"..."f" | "A"..."F"\n'
+             '\n'
+             'Although both lower case "\'l\'" and upper case "\'L\'" are '
+             'allowed as\n'
+             'suffix for long integers, it is strongly recommended to always '
+             'use\n'
+             '"\'L\'", since the letter "\'l\'" looks too much like the '
+             'digit "\'1\'".\n'
+             '\n'
+             'Plain integer literals that are above the largest '
+             'representable plain\n'
+             'integer (e.g., 2147483647 when using 32-bit arithmetic) are '
+             'accepted\n'
+             'as if they were long integers instead. [1]  There is no limit '
+             'for long\n'
+             'integer literals apart from what can be stored in available '
+             'memory.\n'
+             '\n'
+             'Some examples of plain integer literals (first row) and long '
+             'integer\n'
+             'literals (second and third rows):\n'
+             '\n'
+             '   7     2147483647                        0177\n'
+             '   3L    79228162514264337593543950336L    0377L   '
+             '0x100000000L\n'
+             '         79228162514264337593543950336             0xdeadbeef\n',
+ 'lambda': '\n'
+           'Lambdas\n'
+           '*******\n'
+           '\n'
+           '   lambda_expr     ::= "lambda" [parameter_list]: expression\n'
+           '   old_lambda_expr ::= "lambda" [parameter_list]: '
+           'old_expression\n'
+           '\n'
+           'Lambda expressions (sometimes called lambda forms) have the '
+           'same\n'
+           'syntactic position as expressions.  They are a shorthand to '
+           'create\n'
+           'anonymous functions; the expression "lambda arguments: '
+           'expression"\n'
+           'yields a function object.  The unnamed object behaves like a '
+           'function\n'
+           'object defined with\n'
+           '\n'
+           '   def name(arguments):\n'
+           '       return expression\n'
+           '\n'
+           'See section Function definitions for the syntax of parameter '
+           'lists.\n'
+           'Note that functions created with lambda expressions cannot '
+           'contain\n'
+           'statements.\n',
+ 'lists': '\n'
+          'List displays\n'
+          '*************\n'
+          '\n'
+          'A list display is a possibly empty series of expressions enclosed '
+          'in\n'
+          'square brackets:\n'
+          '\n'
+          '   list_display        ::= "[" [expression_list | '
+          'list_comprehension] "]"\n'
+          '   list_comprehension  ::= expression list_for\n'
+          '   list_for            ::= "for" target_list "in" '
+          'old_expression_list [list_iter]\n'
+          '   old_expression_list ::= old_expression [("," old_expression)+ '
+          '[","]]\n'
+          '   old_expression      ::= or_test | old_lambda_expr\n'
+          '   list_iter           ::= list_for | list_if\n'
+          '   list_if             ::= "if" old_expression [list_iter]\n'
+          '\n'
+          'A list display yields a new list object.  Its contents are '
+          'specified\n'
+          'by providing either a list of expressions or a list '
+          'comprehension.\n'
+          'When a comma-separated list of expressions is supplied, its '
+          'elements\n'
+          'are evaluated from left to right and placed into the list object '
+          'in\n'
+          'that order.  When a list comprehension is supplied, it consists '
+          'of a\n'
+          'single expression followed by at least one "for" clause and zero '
+          'or\n'
+          'more "for" or "if" clauses.  In this case, the elements of the '
+          'new\n'
+          'list are those that would be produced by considering each of the '
+          '"for"\n'
+          'or "if" clauses a block, nesting from left to right, and '
+          'evaluating\n'
+          'the expression to produce a list element each time the innermost '
+          'block\n'
+          'is reached [1].\n',
+ 'naming': '\n'
+           'Naming and binding\n'
+           '******************\n'
+           '\n'
+           '*Names* refer to objects.  Names are introduced by name binding\n'
+           'operations. Each occurrence of a name in the program text refers '
+           'to\n'
+           'the *binding* of that name established in the innermost function '
+           'block\n'
+           'containing the use.\n'
+           '\n'
+           'A *block* is a piece of Python program text that is executed as '
+           'a\n'
+           'unit. The following are blocks: a module, a function body, and a '
+           'class\n'
+           'definition. Each command typed interactively is a block.  A '
+           'script\n'
+           'file (a file given as standard input to the interpreter or '
+           'specified\n'
+           'on the interpreter command line the first argument) is a code '
+           'block.\n'
+           'A script command (a command specified on the interpreter command '
+           'line\n'
+           "with the '**-c**' option) is a code block.  The file read by "
+           'the\n'
+           'built-in function "execfile()" is a code block.  The string '
+           'argument\n'
+           'passed to the built-in function "eval()" and to the "exec" '
+           'statement\n'
+           'is a code block. The expression read and evaluated by the '
+           'built-in\n'
+           'function "input()" is a code block.\n'
+           '\n'
+           'A code block is executed in an *execution frame*.  A frame '
+           'contains\n'
+           'some administrative information (used for debugging) and '
+           'determines\n'
+           "where and how execution continues after the code block's "
+           'execution has\n'
+           'completed.\n'
+           '\n'
+           'A *scope* defines the visibility of a name within a block.  If a '
+           'local\n'
+           'variable is defined in a block, its scope includes that block.  '
+           'If the\n'
+           'definition occurs in a function block, the scope extends to any '
+           'blocks\n'
+           'contained within the defining one, unless a contained block '
+           'introduces\n'
+           'a different binding for the name.  The scope of names defined in '
+           'a\n'
+           'class block is limited to the class block; it does not extend to '
+           'the\n'
+           'code blocks of methods -- this includes generator expressions '
+           'since\n'
+           'they are implemented using a function scope.  This means that '
+           'the\n'
+           'following will fail:\n'
+           '\n'
+           '   class A:\n'
+           '       a = 42\n'
+           '       b = list(a + i for i in range(10))\n'
+           '\n'
+           'When a name is used in a code block, it is resolved using the '
+           'nearest\n'
+           'enclosing scope.  The set of all such scopes visible to a code '
+           'block\n'
+           "is called the block's *environment*.\n"
+           '\n'
+           'If a name is bound in a block, it is a local variable of that '
+           'block.\n'
+           'If a name is bound at the module level, it is a global '
+           'variable.  (The\n'
+           'variables of the module code block are local and global.)  If a\n'
+           'variable is used in a code block but not defined there, it is a '
+           '*free\n'
+           'variable*.\n'
+           '\n'
+           'When a name is not found at all, a "NameError" exception is '
+           'raised.\n'
+           'If the name refers to a local variable that has not been bound, '
+           'a\n'
+           '"UnboundLocalError" exception is raised.  "UnboundLocalError" is '
+           'a\n'
+           'subclass of "NameError".\n'
+           '\n'
+           'The following constructs bind names: formal parameters to '
+           'functions,\n'
+           '"import" statements, class and function definitions (these bind '
+           'the\n'
+           'class or function name in the defining block), and targets that '
+           'are\n'
+           'identifiers if occurring in an assignment, "for" loop header, in '
+           'the\n'
+           'second position of an "except" clause header or after "as" in a '
+           '"with"\n'
+           'statement.  The "import" statement of the form "from ... import '
+           '*"\n'
+           'binds all names defined in the imported module, except those '
+           'beginning\n'
+           'with an underscore.  This form may only be used at the module '
+           'level.\n'
+           '\n'
+           'A target occurring in a "del" statement is also considered bound '
+           'for\n'
+           'this purpose (though the actual semantics are to unbind the '
+           'name).  It\n'
+           'is illegal to unbind a name that is referenced by an enclosing '
+           'scope;\n'
+           'the compiler will report a "SyntaxError".\n'
+           '\n'
+           'Each assignment or import statement occurs within a block '
+           'defined by a\n'
+           'class or function definition or at the module level (the '
+           'top-level\n'
+           'code block).\n'
+           '\n'
+           'If a name binding operation occurs anywhere within a code block, '
+           'all\n'
+           'uses of the name within the block are treated as references to '
+           'the\n'
+           'current block.  This can lead to errors when a name is used '
+           'within a\n'
+           'block before it is bound. This rule is subtle.  Python lacks\n'
+           'declarations and allows name binding operations to occur '
+           'anywhere\n'
+           'within a code block.  The local variables of a code block can '
+           'be\n'
+           'determined by scanning the entire text of the block for name '
+           'binding\n'
+           'operations.\n'
+           '\n'
+           'If the global statement occurs within a block, all uses of the '
+           'name\n'
+           'specified in the statement refer to the binding of that name in '
+           'the\n'
+           'top-level namespace. Names are resolved in the top-level '
+           'namespace by\n'
+           'searching the global namespace, i.e. the namespace of the '
+           'module\n'
+           'containing the code block, and the builtins namespace, the '
+           'namespace\n'
+           'of the module "__builtin__".  The global namespace is searched '
+           'first.\n'
+           'If the name is not found there, the builtins namespace is '
+           'searched.\n'
+           'The global statement must precede all uses of the name.\n'
+           '\n'
+           'The builtins namespace associated with the execution of a code '
+           'block\n'
+           'is actually found by looking up the name "__builtins__" in its '
+           'global\n'
+           'namespace; this should be a dictionary or a module (in the '
+           'latter case\n'
+           "the module's dictionary is used).  By default, when in the "
+           '"__main__"\n'
+           'module, "__builtins__" is the built-in module "__builtin__" '
+           '(note: no\n'
+           '\'s\'); when in any other module, "__builtins__" is an alias for '
+           'the\n'
+           'dictionary of the "__builtin__" module itself.  "__builtins__" '
+           'can be\n'
+           'set to a user-created dictionary to create a weak form of '
+           'restricted\n'
+           'execution.\n'
+           '\n'
+           '**CPython implementation detail:** Users should not touch\n'
+           '"__builtins__"; it is strictly an implementation detail.  Users\n'
+           'wanting to override values in the builtins namespace should '
+           '"import"\n'
+           'the "__builtin__" (no \'s\') module and modify its attributes\n'
+           'appropriately.\n'
+           '\n'
+           'The namespace for a module is automatically created the first '
+           'time a\n'
+           'module is imported.  The main module for a script is always '
+           'called\n'
+           '"__main__".\n'
+           '\n'
+           'The "global" statement has the same scope as a name binding '
+           'operation\n'
+           'in the same block.  If the nearest enclosing scope for a free '
+           'variable\n'
+           'contains a global statement, the free variable is treated as a '
+           'global.\n'
+           '\n'
+           'A class definition is an executable statement that may use and '
+           'define\n'
+           'names. These references follow the normal rules for name '
+           'resolution.\n'
+           'The namespace of the class definition becomes the attribute '
+           'dictionary\n'
+           'of the class.  Names defined at the class scope are not visible '
+           'in\n'
+           'methods.\n'
+           '\n'
+           '\n'
+           'Interaction with dynamic features\n'
+           '=================================\n'
+           '\n'
+           'There are several cases where Python statements are illegal when '
+           'used\n'
+           'in conjunction with nested scopes that contain free variables.\n'
+           '\n'
+           'If a variable is referenced in an enclosing scope, it is illegal '
+           'to\n'
+           'delete the name.  An error will be reported at compile time.\n'
+           '\n'
+           'If the wild card form of import --- "import *" --- is used in a\n'
+           'function and the function contains or is a nested block with '
+           'free\n'
+           'variables, the compiler will raise a "SyntaxError".\n'
+           '\n'
+           'If "exec" is used in a function and the function contains or is '
+           'a\n'
+           'nested block with free variables, the compiler will raise a\n'
+           '"SyntaxError" unless the exec explicitly specifies the local '
+           'namespace\n'
+           'for the "exec".  (In other words, "exec obj" would be illegal, '
+           'but\n'
+           '"exec obj in ns" would be legal.)\n'
+           '\n'
+           'The "eval()", "execfile()", and "input()" functions and the '
+           '"exec"\n'
+           'statement do not have access to the full environment for '
+           'resolving\n'
+           'names.  Names may be resolved in the local and global namespaces '
+           'of\n'
+           'the caller.  Free variables are not resolved in the nearest '
+           'enclosing\n'
+           'namespace, but in the global namespace. [1] The "exec" statement '
+           'and\n'
+           'the "eval()" and "execfile()" functions have optional arguments '
+           'to\n'
+           'override the global and local namespace.  If only one namespace '
+           'is\n'
+           'specified, it is used for both.\n',
+ 'numbers': '\n'
+            'Numeric literals\n'
+            '****************\n'
+            '\n'
+            'There are four types of numeric literals: plain integers, long\n'
+            'integers, floating point numbers, and imaginary numbers.  There '
+            'are no\n'
+            'complex literals (complex numbers can be formed by adding a '
+            'real\n'
+            'number and an imaginary number).\n'
+            '\n'
+            'Note that numeric literals do not include a sign; a phrase like '
+            '"-1"\n'
+            'is actually an expression composed of the unary operator '
+            '\'"-"\' and the\n'
+            'literal "1".\n',
+ 'numeric-types': '\n'
+                  'Emulating numeric types\n'
+                  '***********************\n'
+                  '\n'
+                  'The following methods can be defined to emulate numeric '
+                  'objects.\n'
+                  'Methods corresponding to operations that are not '
+                  'supported by the\n'
+                  'particular kind of number implemented (e.g., bitwise '
+                  'operations for\n'
+                  'non-integral numbers) should be left undefined.\n'
+                  '\n'
+                  'object.__add__(self, other)\n'
+                  'object.__sub__(self, other)\n'
+                  'object.__mul__(self, other)\n'
+                  'object.__floordiv__(self, other)\n'
+                  'object.__mod__(self, other)\n'
+                  'object.__divmod__(self, other)\n'
+                  'object.__pow__(self, other[, modulo])\n'
+                  'object.__lshift__(self, other)\n'
+                  'object.__rshift__(self, other)\n'
+                  'object.__and__(self, other)\n'
+                  'object.__xor__(self, other)\n'
+                  'object.__or__(self, other)\n'
+                  '\n'
+                  '   These methods are called to implement the binary '
+                  'arithmetic\n'
+                  '   operations ("+", "-", "*", "//", "%", "divmod()", '
+                  '"pow()", "**",\n'
+                  '   "<<", ">>", "&", "^", "|").  For instance, to evaluate '
+                  'the\n'
+                  '   expression "x + y", where *x* is an instance of a '
+                  'class that has an\n'
+                  '   "__add__()" method, "x.__add__(y)" is called.  The '
+                  '"__divmod__()"\n'
+                  '   method should be the equivalent to using '
+                  '"__floordiv__()" and\n'
+                  '   "__mod__()"; it should not be related to '
+                  '"__truediv__()" (described\n'
+                  '   below).  Note that "__pow__()" should be defined to '
+                  'accept an\n'
+                  '   optional third argument if the ternary version of the '
+                  'built-in\n'
+                  '   "pow()" function is to be supported.\n'
+                  '\n'
+                  '   If one of those methods does not support the operation '
+                  'with the\n'
+                  '   supplied arguments, it should return '
+                  '"NotImplemented".\n'
+                  '\n'
+                  'object.__div__(self, other)\n'
+                  'object.__truediv__(self, other)\n'
+                  '\n'
+                  '   The division operator ("/") is implemented by these '
+                  'methods.  The\n'
+                  '   "__truediv__()" method is used when '
+                  '"__future__.division" is in\n'
+                  '   effect, otherwise "__div__()" is used.  If only one of '
+                  'these two\n'
+                  '   methods is defined, the object will not support '
+                  'division in the\n'
+                  '   alternate context; "TypeError" will be raised '
+                  'instead.\n'
+                  '\n'
+                  'object.__radd__(self, other)\n'
+                  'object.__rsub__(self, other)\n'
+                  'object.__rmul__(self, other)\n'
+                  'object.__rdiv__(self, other)\n'
+                  'object.__rtruediv__(self, other)\n'
+                  'object.__rfloordiv__(self, other)\n'
+                  'object.__rmod__(self, other)\n'
+                  'object.__rdivmod__(self, other)\n'
+                  'object.__rpow__(self, other)\n'
+                  'object.__rlshift__(self, other)\n'
+                  'object.__rrshift__(self, other)\n'
+                  'object.__rand__(self, other)\n'
+                  'object.__rxor__(self, other)\n'
+                  'object.__ror__(self, other)\n'
+                  '\n'
+                  '   These methods are called to implement the binary '
+                  'arithmetic\n'
+                  '   operations ("+", "-", "*", "/", "%", "divmod()", '
+                  '"pow()", "**",\n'
+                  '   "<<", ">>", "&", "^", "|") with reflected (swapped) '
+                  'operands.\n'
+                  '   These functions are only called if the left operand '
+                  'does not\n'
+                  '   support the corresponding operation and the operands '
+                  'are of\n'
+                  '   different types. [2] For instance, to evaluate the '
+                  'expression "x -\n'
+                  '   y", where *y* is an instance of a class that has an '
+                  '"__rsub__()"\n'
+                  '   method, "y.__rsub__(x)" is called if "x.__sub__(y)" '
+                  'returns\n'
+                  '   *NotImplemented*.\n'
+                  '\n'
+                  '   Note that ternary "pow()" will not try calling '
+                  '"__rpow__()" (the\n'
+                  '   coercion rules would become too complicated).\n'
+                  '\n'
+                  "   Note: If the right operand's type is a subclass of the "
+                  'left\n'
+                  "     operand's type and that subclass provides the "
+                  'reflected method\n'
+                  '     for the operation, this method will be called before '
+                  'the left\n'
+                  "     operand's non-reflected method.  This behavior "
+                  'allows subclasses\n'
+                  "     to override their ancestors' operations.\n"
+                  '\n'
+                  'object.__iadd__(self, other)\n'
+                  'object.__isub__(self, other)\n'
+                  'object.__imul__(self, other)\n'
+                  'object.__idiv__(self, other)\n'
+                  'object.__itruediv__(self, other)\n'
+                  'object.__ifloordiv__(self, other)\n'
+                  'object.__imod__(self, other)\n'
+                  'object.__ipow__(self, other[, modulo])\n'
+                  'object.__ilshift__(self, other)\n'
+                  'object.__irshift__(self, other)\n'
+                  'object.__iand__(self, other)\n'
+                  'object.__ixor__(self, other)\n'
+                  'object.__ior__(self, other)\n'
+                  '\n'
+                  '   These methods are called to implement the augmented '
+                  'arithmetic\n'
+                  '   assignments ("+=", "-=", "*=", "/=", "//=", "%=", '
+                  '"**=", "<<=",\n'
+                  '   ">>=", "&=", "^=", "|=").  These methods should '
+                  'attempt to do the\n'
+                  '   operation in-place (modifying *self*) and return the '
+                  'result (which\n'
+                  '   could be, but does not have to be, *self*).  If a '
+                  'specific method\n'
+                  '   is not defined, the augmented assignment falls back to '
+                  'the normal\n'
+                  '   methods.  For instance, to execute the statement "x += '
+                  'y", where\n'
+                  '   *x* is an instance of a class that has an "__iadd__()" '
+                  'method,\n'
+                  '   "x.__iadd__(y)" is called.  If *x* is an instance of a '
+                  'class that\n'
+                  '   does not define a "__iadd__()" method, "x.__add__(y)" '
+                  'and\n'
+                  '   "y.__radd__(x)" are considered, as with the evaluation '
+                  'of "x + y".\n'
+                  '\n'
+                  'object.__neg__(self)\n'
+                  'object.__pos__(self)\n'
+                  'object.__abs__(self)\n'
+                  'object.__invert__(self)\n'
+                  '\n'
+                  '   Called to implement the unary arithmetic operations '
+                  '("-", "+",\n'
+                  '   "abs()" and "~").\n'
+                  '\n'
+                  'object.__complex__(self)\n'
+                  'object.__int__(self)\n'
+                  'object.__long__(self)\n'
+                  'object.__float__(self)\n'
+                  '\n'
+                  '   Called to implement the built-in functions '
+                  '"complex()", "int()",\n'
+                  '   "long()", and "float()".  Should return a value of the '
+                  'appropriate\n'
+                  '   type.\n'
+                  '\n'
+                  'object.__oct__(self)\n'
+                  'object.__hex__(self)\n'
+                  '\n'
+                  '   Called to implement the built-in functions "oct()" and '
+                  '"hex()".\n'
+                  '   Should return a string value.\n'
+                  '\n'
+                  'object.__index__(self)\n'
+                  '\n'
+                  '   Called to implement "operator.index()".  Also called '
+                  'whenever\n'
+                  '   Python needs an integer object (such as in slicing).  '
+                  'Must return\n'
+                  '   an integer (int or long).\n'
+                  '\n'
+                  '   New in version 2.5.\n'
+                  '\n'
+                  'object.__coerce__(self, other)\n'
+                  '\n'
+                  '   Called to implement "mixed-mode" numeric arithmetic.  '
+                  'Should either\n'
+                  '   return a 2-tuple containing *self* and *other* '
+                  'converted to a\n'
+                  '   common numeric type, or "None" if conversion is '
+                  'impossible.  When\n'
+                  '   the common type would be the type of "other", it is '
+                  'sufficient to\n'
+                  '   return "None", since the interpreter will also ask the '
+                  'other object\n'
+                  '   to attempt a coercion (but sometimes, if the '
+                  'implementation of the\n'
+                  '   other type cannot be changed, it is useful to do the '
+                  'conversion to\n'
+                  '   the other type here).  A return value of '
+                  '"NotImplemented" is\n'
+                  '   equivalent to returning "None".\n',
+ 'objects': '\n'
+            'Objects, values and types\n'
+            '*************************\n'
+            '\n'
+            "*Objects* are Python's abstraction for data.  All data in a "
+            'Python\n'
+            'program is represented by objects or by relations between '
+            'objects. (In\n'
+            "a sense, and in conformance to Von Neumann's model of a "
+            '"stored\n'
+            'program computer," code is also represented by objects.)\n'
+            '\n'
+            "Every object has an identity, a type and a value.  An object's\n"
+            '*identity* never changes once it has been created; you may '
+            'think of it\n'
+            'as the object\'s address in memory.  The \'"is"\' operator '
+            'compares the\n'
+            'identity of two objects; the "id()" function returns an '
+            'integer\n'
+            'representing its identity (currently implemented as its '
+            'address). An\n'
+            "object's *type* is also unchangeable. [1] An object's type "
+            'determines\n'
+            'the operations that the object supports (e.g., "does it have a\n'
+            'length?") and also defines the possible values for objects of '
+            'that\n'
+            'type.  The "type()" function returns an object\'s type (which '
+            'is an\n'
+            'object itself).  The *value* of some objects can change.  '
+            'Objects\n'
+            'whose value can change are said to be *mutable*; objects whose '
+            'value\n'
+            'is unchangeable once they are created are called *immutable*. '
+            '(The\n'
+            'value of an immutable container object that contains a '
+            'reference to a\n'
+            "mutable object can change when the latter's value is changed; "
+            'however\n'
+            'the container is still considered immutable, because the '
+            'collection of\n'
+            'objects it contains cannot be changed.  So, immutability is '
+            'not\n'
+            'strictly the same as having an unchangeable value, it is more '
+            'subtle.)\n'
+            "An object's mutability is determined by its type; for "
+            'instance,\n'
+            'numbers, strings and tuples are immutable, while dictionaries '
+            'and\n'
+            'lists are mutable.\n'
+            '\n'
+            'Objects are never explicitly destroyed; however, when they '
+            'become\n'
+            'unreachable they may be garbage-collected.  An implementation '
+            'is\n'
+            'allowed to postpone garbage collection or omit it altogether '
+            '--- it is\n'
+            'a matter of implementation quality how garbage collection is\n'
+            'implemented, as long as no objects are collected that are '
+            'still\n'
+            'reachable.\n'
+            '\n'
+            '**CPython implementation detail:** CPython currently uses a '
+            'reference-\n'
+            'counting scheme with (optional) delayed detection of cyclically '
+            'linked\n'
+            'garbage, which collects most objects as soon as they become\n'
+            'unreachable, but is not guaranteed to collect garbage '
+            'containing\n'
+            'circular references.  See the documentation of the "gc" module '
+            'for\n'
+            'information on controlling the collection of cyclic garbage. '
+            'Other\n'
+            'implementations act differently and CPython may change. Do not '
+            'depend\n'
+            'on immediate finalization of objects when they become '
+            'unreachable (ex:\n'
+            'always close files).\n'
+            '\n'
+            "Note that the use of the implementation's tracing or debugging\n"
+            'facilities may keep objects alive that would normally be '
+            'collectable.\n'
+            'Also note that catching an exception with a '
+            '\'"try"..."except"\'\n'
+            'statement may keep objects alive.\n'
+            '\n'
+            'Some objects contain references to "external" resources such as '
+            'open\n'
+            'files or windows.  It is understood that these resources are '
+            'freed\n'
+            'when the object is garbage-collected, but since garbage '
+            'collection is\n'
+            'not guaranteed to happen, such objects also provide an explicit '
+            'way to\n'
+            'release the external resource, usually a "close()" method. '
+            'Programs\n'
+            'are strongly recommended to explicitly close such objects.  '
+            'The\n'
+            '\'"try"..."finally"\' statement provides a convenient way to do '
+            'this.\n'
+            '\n'
+            'Some objects contain references to other objects; these are '
+            'called\n'
+            '*containers*. Examples of containers are tuples, lists and\n'
+            "dictionaries.  The references are part of a container's value.  "
+            'In\n'
+            'most cases, when we talk about the value of a container, we '
+            'imply the\n'
+            'values, not the identities of the contained objects; however, '
+            'when we\n'
+            'talk about the mutability of a container, only the identities '
+            'of the\n'
+            'immediately contained objects are implied.  So, if an '
+            'immutable\n'
+            'container (like a tuple) contains a reference to a mutable '
+            'object, its\n'
+            'value changes if that mutable object is changed.\n'
+            '\n'
+            'Types affect almost all aspects of object behavior.  Even the\n'
+            'importance of object identity is affected in some sense: for '
+            'immutable\n'
+            'types, operations that compute new values may actually return '
+            'a\n'
+            'reference to any existing object with the same type and value, '
+            'while\n'
+            'for mutable objects this is not allowed.  E.g., after "a = 1; b '
+            '= 1",\n'
+            '"a" and "b" may or may not refer to the same object with the '
+            'value\n'
+            'one, depending on the implementation, but after "c = []; d = '
+            '[]", "c"\n'
+            'and "d" are guaranteed to refer to two different, unique, '
+            'newly\n'
+            'created empty lists. (Note that "c = d = []" assigns the same '
+            'object\n'
+            'to both "c" and "d".)\n',
+ 'operator-summary': '\n'
+                     'Operator precedence\n'
+                     '*******************\n'
+                     '\n'
+                     'The following table summarizes the operator '
+                     'precedences in Python,\n'
+                     'from lowest precedence (least binding) to highest '
+                     'precedence (most\n'
+                     'binding). Operators in the same box have the same '
+                     'precedence.  Unless\n'
+                     'the syntax is explicitly given, operators are binary.  '
+                     'Operators in\n'
+                     'the same box group left to right (except for '
+                     'comparisons, including\n'
+                     'tests, which all have the same precedence and chain '
+                     'from left to right\n'
+                     '--- see section Comparisons --- and exponentiation, '
+                     'which groups from\n'
+                     'right to left).\n'
+                     '\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| Operator                                        | '
+                     'Description                           |\n'
+                     '+=================================================+=======================================+\n'
+                     '| "lambda"                                        | '
+                     'Lambda expression                     |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "if" -- "else"                                  | '
+                     'Conditional expression                |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "or"                                            | '
+                     'Boolean OR                            |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "and"                                           | '
+                     'Boolean AND                           |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "not" "x"                                       | '
+                     'Boolean NOT                           |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "in", "not in", "is", "is not", "<", "<=", ">", | '
+                     'Comparisons, including membership     |\n'
+                     '| ">=", "<>", "!=", "=="                          | '
+                     'tests and identity tests              |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "|"                                             | '
+                     'Bitwise OR                            |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "^"                                             | '
+                     'Bitwise XOR                           |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "&"                                             | '
+                     'Bitwise AND                           |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "<<", ">>"                                      | '
+                     'Shifts                                |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "+", "-"                                        | '
+                     'Addition and subtraction              |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "*", "/", "//", "%"                             | '
+                     'Multiplication, division, remainder   |\n'
+                     '|                                                 | '
+                     '[8]                                   |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "+x", "-x", "~x"                                | '
+                     'Positive, negative, bitwise NOT       |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "**"                                            | '
+                     'Exponentiation [9]                    |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "x[index]", "x[index:index]",                   | '
+                     'Subscription, slicing, call,          |\n'
+                     '| "x(arguments...)", "x.attribute"                | '
+                     'attribute reference                   |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '| "(expressions...)", "[expressions...]", "{key:  | '
+                     'Binding or tuple display, list        |\n'
+                     '| value...}", "`expressions...`"                  | '
+                     'display, dictionary display, string   |\n'
+                     '|                                                 | '
+                     'conversion                            |\n'
+                     '+-------------------------------------------------+---------------------------------------+\n'
+                     '\n'
+                     '-[ Footnotes ]-\n'
+                     '\n'
+                     '[1] In Python 2.3 and later releases, a list '
+                     'comprehension "leaks"\n'
+                     '    the control variables of each "for" it contains '
+                     'into the\n'
+                     '    containing scope.  However, this behavior is '
+                     'deprecated, and\n'
+                     '    relying on it will not work in Python 3.\n'
+                     '\n'
+                     '[2] While "abs(x%y) < abs(y)" is true mathematically, '
+                     'for floats\n'
+                     '    it may not be true numerically due to roundoff.  '
+                     'For example, and\n'
+                     '    assuming a platform on which a Python float is an '
+                     'IEEE 754 double-\n'
+                     '    precision number, in order that "-1e-100 % 1e100" '
+                     'have the same\n'
+                     '    sign as "1e100", the computed result is "-1e-100 + '
+                     '1e100", which\n'
+                     '    is numerically exactly equal to "1e100".  The '
+                     'function\n'
+                     '    "math.fmod()" returns a result whose sign matches '
+                     'the sign of the\n'
+                     '    first argument instead, and so returns "-1e-100" '
+                     'in this case.\n'
+                     '    Which approach is more appropriate depends on the '
+                     'application.\n'
+                     '\n'
+                     '[3] If x is very close to an exact integer multiple of '
+                     "y, it's\n"
+                     '    possible for "floor(x/y)" to be one larger than '
+                     '"(x-x%y)/y" due to\n'
+                     '    rounding.  In such cases, Python returns the '
+                     'latter result, in\n'
+                     '    order to preserve that "divmod(x,y)[0] * y + x % '
+                     'y" be very close\n'
+                     '    to "x".\n'
+                     '\n'
+                     '[4] While comparisons between unicode strings make '
+                     'sense at the\n'
+                     '    byte level, they may be counter-intuitive to '
+                     'users. For example,\n'
+                     '    the strings "u"\\u00C7"" and "u"\\u0043\\u0327"" '
+                     'compare differently,\n'
+                     '    even though they both represent the same unicode '
+                     'character (LATIN\n'
+                     '    CAPITAL LETTER C WITH CEDILLA). To compare strings '
+                     'in a human\n'
+                     '    recognizable way, compare using '
+                     '"unicodedata.normalize()".\n'
+                     '\n'
+                     '[5] The implementation computes this efficiently, '
+                     'without\n'
+                     '    constructing lists or sorting.\n'
+                     '\n'
+                     '[6] Earlier versions of Python used lexicographic '
+                     'comparison of\n'
+                     '    the sorted (key, value) lists, but this was very '
+                     'expensive for the\n'
+                     '    common case of comparing for equality.  An even '
+                     'earlier version of\n'
+                     '    Python compared dictionaries by identity only, but '
+                     'this caused\n'
+                     '    surprises because people expected to be able to '
+                     'test a dictionary\n'
+                     '    for emptiness by comparing it to "{}".\n'
+                     '\n'
+                     '[7] Due to automatic garbage-collection, free lists, '
+                     'and the\n'
+                     '    dynamic nature of descriptors, you may notice '
+                     'seemingly unusual\n'
+                     '    behaviour in certain uses of the "is" operator, '
+                     'like those\n'
+                     '    involving comparisons between instance methods, or '
+                     'constants.\n'
+                     '    Check their documentation for more info.\n'
+                     '\n'
+                     '[8] The "%" operator is also used for string '
+                     'formatting; the same\n'
+                     '    precedence applies.\n'
+                     '\n'
+                     '[9] The power operator "**" binds less tightly than an '
+                     'arithmetic\n'
+                     '    or bitwise unary operator on its right, that is, '
+                     '"2**-1" is "0.5".\n',
+ 'pass': '\n'
+         'The "pass" statement\n'
+         '********************\n'
+         '\n'
+         '   pass_stmt ::= "pass"\n'
+         '\n'
+         '"pass" is a null operation --- when it is executed, nothing '
+         'happens.\n'
+         'It is useful as a placeholder when a statement is required\n'
+         'syntactically, but no code needs to be executed, for example:\n'
+         '\n'
+         '   def f(arg): pass    # a function that does nothing (yet)\n'
+         '\n'
+         '   class C: pass       # a class with no methods (yet)\n',
+ 'power': '\n'
+          'The power operator\n'
+          '******************\n'
+          '\n'
+          'The power operator binds more tightly than unary operators on '
+          'its\n'
+          'left; it binds less tightly than unary operators on its right.  '
+          'The\n'
+          'syntax is:\n'
+          '\n'
+          '   power ::= primary ["**" u_expr]\n'
+          '\n'
+          'Thus, in an unparenthesized sequence of power and unary '
+          'operators, the\n'
+          'operators are evaluated from right to left (this does not '
+          'constrain\n'
+          'the evaluation order for the operands): "-1**2" results in "-1".\n'
+          '\n'
+          'The power operator has the same semantics as the built-in '
+          '"pow()"\n'
+          'function, when called with two arguments: it yields its left '
+          'argument\n'
+          'raised to the power of its right argument.  The numeric arguments '
+          'are\n'
+          'first converted to a common type.  The result type is that of '
+          'the\n'
+          'arguments after coercion.\n'
+          '\n'
+          'With mixed operand types, the coercion rules for binary '
+          'arithmetic\n'
+          'operators apply. For int and long int operands, the result has '
+          'the\n'
+          'same type as the operands (after coercion) unless the second '
+          'argument\n'
+          'is negative; in that case, all arguments are converted to float '
+          'and a\n'
+          'float result is delivered. For example, "10**2" returns "100", '
+          'but\n'
+          '"10**-2" returns "0.01". (This last feature was added in Python '
+          '2.2.\n'
+          'In Python 2.1 and before, if both arguments were of integer types '
+          'and\n'
+          'the second argument was negative, an exception was raised).\n'
+          '\n'
+          'Raising "0.0" to a negative power results in a '
+          '"ZeroDivisionError".\n'
+          'Raising a negative number to a fractional power results in a\n'
+          '"ValueError".\n',
+ 'print': '\n'
+          'The "print" statement\n'
+          '*********************\n'
+          '\n'
+          '   print_stmt ::= "print" ([expression ("," expression)* [","]]\n'
+          '                  | ">>" expression [("," expression)+ [","]])\n'
+          '\n'
+          '"print" evaluates each expression in turn and writes the '
+          'resulting\n'
+          'object to standard output (see below).  If an object is not a '
+          'string,\n'
+          'it is first converted to a string using the rules for string\n'
+          'conversions.  The (resulting or original) string is then '
+          'written.  A\n'
+          'space is written before each object is (converted and) written, '
+          'unless\n'
+          'the output system believes it is positioned at the beginning of '
+          'a\n'
+          'line.  This is the case (1) when no characters have yet been '
+          'written\n'
+          'to standard output, (2) when the last character written to '
+          'standard\n'
+          'output is a whitespace character except "\' \'", or (3) when the '
+          'last\n'
+          'write operation on standard output was not a "print" statement. '
+          '(In\n'
+          'some cases it may be functional to write an empty string to '
+          'standard\n'
+          'output for this reason.)\n'
+          '\n'
+          'Note: Objects which act like file objects but which are not the\n'
+          '  built-in file objects often do not properly emulate this aspect '
+          'of\n'
+          "  the file object's behavior, so it is best not to rely on this.\n"
+          '\n'
+          'A "\'\\n\'" character is written at the end, unless the "print" '
+          'statement\n'
+          'ends with a comma.  This is the only action if the statement '
+          'contains\n'
+          'just the keyword "print".\n'
+          '\n'
+          'Standard output is defined as the file object named "stdout" in '
+          'the\n'
+          'built-in module "sys".  If no such object exists, or if it does '
+          'not\n'
+          'have a "write()" method, a "RuntimeError" exception is raised.\n'
+          '\n'
+          '"print" also has an extended form, defined by the second portion '
+          'of\n'
+          'the syntax described above. This form is sometimes referred to '
+          'as\n'
+          '""print" chevron." In this form, the first expression after the '
+          '">>"\n'
+          'must evaluate to a "file-like" object, specifically an object '
+          'that has\n'
+          'a "write()" method as described above.  With this extended form, '
+          'the\n'
+          'subsequent expressions are printed to this file object.  If the '
+          'first\n'
+          'expression evaluates to "None", then "sys.stdout" is used as the '
+          'file\n'
+          'for output.\n',
+ 'raise': '\n'
+          'The "raise" statement\n'
+          '*********************\n'
+          '\n'
+          '   raise_stmt ::= "raise" [expression ["," expression ["," '
+          'expression]]]\n'
+          '\n'
+          'If no expressions are present, "raise" re-raises the last '
+          'exception\n'
+          'that was active in the current scope.  If no exception is active '
+          'in\n'
+          'the current scope, a "TypeError" exception is raised indicating '
+          'that\n'
+          'this is an error (if running under IDLE, a "Queue.Empty" '
+          'exception is\n'
+          'raised instead).\n'
+          '\n'
+          'Otherwise, "raise" evaluates the expressions to get three '
+          'objects,\n'
+          'using "None" as the value of omitted expressions.  The first two\n'
+          'objects are used to determine the *type* and *value* of the '
+          'exception.\n'
+          '\n'
+          'If the first object is an instance, the type of the exception is '
+          'the\n'
+          'class of the instance, the instance itself is the value, and the\n'
+          'second object must be "None".\n'
+          '\n'
+          'If the first object is a class, it becomes the type of the '
+          'exception.\n'
+          'The second object is used to determine the exception value: If it '
+          'is\n'
+          'an instance of the class, the instance becomes the exception '
+          'value. If\n'
+          'the second object is a tuple, it is used as the argument list for '
+          'the\n'
+          'class constructor; if it is "None", an empty argument list is '
+          'used,\n'
+          'and any other object is treated as a single argument to the\n'
+          'constructor.  The instance so created by calling the constructor '
+          'is\n'
+          'used as the exception value.\n'
+          '\n'
+          'If a third object is present and not "None", it must be a '
+          'traceback\n'
+          'object (see section The standard type hierarchy), and it is\n'
+          'substituted instead of the current location as the place where '
+          'the\n'
+          'exception occurred.  If the third object is present and not a\n'
+          'traceback object or "None", a "TypeError" exception is raised.  '
+          'The\n'
+          'three-expression form of "raise" is useful to re-raise an '
+          'exception\n'
+          'transparently in an except clause, but "raise" with no '
+          'expressions\n'
+          'should be preferred if the exception to be re-raised was the '
+          'most\n'
+          'recently active exception in the current scope.\n'
+          '\n'
+          'Additional information on exceptions can be found in section\n'
+          'Exceptions, and information about handling exceptions is in '
+          'section\n'
+          'The try statement.\n',
+ 'return': '\n'
+           'The "return" statement\n'
+           '**********************\n'
+           '\n'
+           '   return_stmt ::= "return" [expression_list]\n'
+           '\n'
+           '"return" may only occur syntactically nested in a function '
+           'definition,\n'
+           'not within a nested class definition.\n'
+           '\n'
+           'If an expression list is present, it is evaluated, else "None" '
+           'is\n'
+           'substituted.\n'
+           '\n'
+           '"return" leaves the current function call with the expression '
+           'list (or\n'
+           '"None") as return value.\n'
+           '\n'
+           'When "return" passes control out of a "try" statement with a '
+           '"finally"\n'
+           'clause, that "finally" clause is executed before really leaving '
+           'the\n'
+           'function.\n'
+           '\n'
+           'In a generator function, the "return" statement is not allowed '
+           'to\n'
+           'include an "expression_list".  In that context, a bare "return"\n'
+           'indicates that the generator is done and will cause '
+           '"StopIteration" to\n'
+           'be raised.\n',
+ 'sequence-types': '\n'
+                   'Emulating container types\n'
+                   '*************************\n'
+                   '\n'
+                   'The following methods can be defined to implement '
+                   'container objects.\n'
+                   'Containers usually are sequences (such as lists or '
+                   'tuples) or mappings\n'
+                   '(like dictionaries), but can represent other containers '
+                   'as well.  The\n'
+                   'first set of methods is used either to emulate a '
+                   'sequence or to\n'
+                   'emulate a mapping; the difference is that for a '
+                   'sequence, the\n'
+                   'allowable keys should be the integers *k* for which "0 '
+                   '<= k < N" where\n'
+                   '*N* is the length of the sequence, or slice objects, '
+                   'which define a\n'
+                   'range of items. (For backwards compatibility, the '
+                   'method\n'
+                   '"__getslice__()" (see below) can also be defined to '
+                   'handle simple, but\n'
+                   'not extended slices.) It is also recommended that '
+                   'mappings provide the\n'
+                   'methods "keys()", "values()", "items()", "has_key()", '
+                   '"get()",\n'
+                   '"clear()", "setdefault()", "iterkeys()", '
+                   '"itervalues()",\n'
+                   '"iteritems()", "pop()", "popitem()", "copy()", and '
+                   '"update()" behaving\n'
+                   "similar to those for Python's standard dictionary "
+                   'objects.  The\n'
+                   '"UserDict" module provides a "DictMixin" class to help '
+                   'create those\n'
+                   'methods from a base set of "__getitem__()", '
+                   '"__setitem__()",\n'
+                   '"__delitem__()", and "keys()". Mutable sequences should '
+                   'provide\n'
+                   'methods "append()", "count()", "index()", "extend()", '
+                   '"insert()",\n'
+                   '"pop()", "remove()", "reverse()" and "sort()", like '
+                   'Python standard\n'
+                   'list objects.  Finally, sequence types should implement '
+                   'addition\n'
+                   '(meaning concatenation) and multiplication (meaning '
+                   'repetition) by\n'
+                   'defining the methods "__add__()", "__radd__()", '
+                   '"__iadd__()",\n'
+                   '"__mul__()", "__rmul__()" and "__imul__()" described '
+                   'below; they\n'
+                   'should not define "__coerce__()" or other numerical '
+                   'operators.  It is\n'
+                   'recommended that both mappings and sequences implement '
+                   'the\n'
+                   '"__contains__()" method to allow efficient use of the '
+                   '"in" operator;\n'
+                   'for mappings, "in" should be equivalent of "has_key()"; '
+                   'for sequences,\n'
+                   'it should search through the values.  It is further '
+                   'recommended that\n'
+                   'both mappings and sequences implement the "__iter__()" '
+                   'method to allow\n'
+                   'efficient iteration through the container; for mappings, '
+                   '"__iter__()"\n'
+                   'should be the same as "iterkeys()"; for sequences, it '
+                   'should iterate\n'
+                   'through the values.\n'
+                   '\n'
+                   'object.__len__(self)\n'
+                   '\n'
+                   '   Called to implement the built-in function "len()".  '
+                   'Should return\n'
+                   '   the length of the object, an integer ">=" 0.  Also, '
+                   'an object that\n'
+                   '   doesn\'t define a "__nonzero__()" method and whose '
+                   '"__len__()"\n'
+                   '   method returns zero is considered to be false in a '
+                   'Boolean context.\n'
+                   '\n'
+                   'object.__getitem__(self, key)\n'
+                   '\n'
+                   '   Called to implement evaluation of "self[key]". For '
+                   'sequence types,\n'
+                   '   the accepted keys should be integers and slice '
+                   'objects.  Note that\n'
+                   '   the special interpretation of negative indexes (if '
+                   'the class wishes\n'
+                   '   to emulate a sequence type) is up to the '
+                   '"__getitem__()" method. If\n'
+                   '   *key* is of an inappropriate type, "TypeError" may be '
+                   'raised; if of\n'
+                   '   a value outside the set of indexes for the sequence '
+                   '(after any\n'
+                   '   special interpretation of negative values), '
+                   '"IndexError" should be\n'
+                   '   raised. For mapping types, if *key* is missing (not '
+                   'in the\n'
+                   '   container), "KeyError" should be raised.\n'
+                   '\n'
+                   '   Note: "for" loops expect that an "IndexError" will be '
+                   'raised for\n'
+                   '     illegal indexes to allow proper detection of the '
+                   'end of the\n'
+                   '     sequence.\n'
+                   '\n'
+                   'object.__missing__(self, key)\n'
+                   '\n'
+                   '   Called by "dict"."__getitem__()" to implement '
+                   '"self[key]" for dict\n'
+                   '   subclasses when key is not in the dictionary.\n'
+                   '\n'
+                   'object.__setitem__(self, key, value)\n'
+                   '\n'
+                   '   Called to implement assignment to "self[key]".  Same '
+                   'note as for\n'
+                   '   "__getitem__()".  This should only be implemented for '
+                   'mappings if\n'
+                   '   the objects support changes to the values for keys, '
+                   'or if new keys\n'
+                   '   can be added, or for sequences if elements can be '
+                   'replaced.  The\n'
+                   '   same exceptions should be raised for improper *key* '
+                   'values as for\n'
+                   '   the "__getitem__()" method.\n'
+                   '\n'
+                   'object.__delitem__(self, key)\n'
+                   '\n'
+                   '   Called to implement deletion of "self[key]".  Same '
+                   'note as for\n'
+                   '   "__getitem__()".  This should only be implemented for '
+                   'mappings if\n'
+                   '   the objects support removal of keys, or for sequences '
+                   'if elements\n'
+                   '   can be removed from the sequence.  The same '
+                   'exceptions should be\n'
+                   '   raised for improper *key* values as for the '
+                   '"__getitem__()" method.\n'
+                   '\n'
+                   'object.__iter__(self)\n'
+                   '\n'
+                   '   This method is called when an iterator is required '
+                   'for a container.\n'
+                   '   This method should return a new iterator object that '
+                   'can iterate\n'
+                   '   over all the objects in the container.  For mappings, '
+                   'it should\n'
+                   '   iterate over the keys of the container, and should '
+                   'also be made\n'
+                   '   available as the method "iterkeys()".\n'
+                   '\n'
+                   '   Iterator objects also need to implement this method; '
+                   'they are\n'
+                   '   required to return themselves.  For more information '
+                   'on iterator\n'
+                   '   objects, see Iterator Types.\n'
+                   '\n'
+                   'object.__reversed__(self)\n'
+                   '\n'
+                   '   Called (if present) by the "reversed()" built-in to '
+                   'implement\n'
+                   '   reverse iteration.  It should return a new iterator '
+                   'object that\n'
+                   '   iterates over all the objects in the container in '
+                   'reverse order.\n'
+                   '\n'
+                   '   If the "__reversed__()" method is not provided, the '
+                   '"reversed()"\n'
+                   '   built-in will fall back to using the sequence '
+                   'protocol ("__len__()"\n'
+                   '   and "__getitem__()").  Objects that support the '
+                   'sequence protocol\n'
+                   '   should only provide "__reversed__()" if they can '
+                   'provide an\n'
+                   '   implementation that is more efficient than the one '
+                   'provided by\n'
+                   '   "reversed()".\n'
+                   '\n'
+                   '   New in version 2.6.\n'
+                   '\n'
+                   'The membership test operators ("in" and "not in") are '
+                   'normally\n'
+                   'implemented as an iteration through a sequence.  '
+                   'However, container\n'
+                   'objects can supply the following special method with a '
+                   'more efficient\n'
+                   'implementation, which also does not require the object '
+                   'be a sequence.\n'
+                   '\n'
+                   'object.__contains__(self, item)\n'
+                   '\n'
+                   '   Called to implement membership test operators.  '
+                   'Should return true\n'
+                   '   if *item* is in *self*, false otherwise.  For mapping '
+                   'objects, this\n'
+                   '   should consider the keys of the mapping rather than '
+                   'the values or\n'
+                   '   the key-item pairs.\n'
+                   '\n'
+                   '   For objects that don\'t define "__contains__()", the '
+                   'membership test\n'
+                   '   first tries iteration via "__iter__()", then the old '
+                   'sequence\n'
+                   '   iteration protocol via "__getitem__()", see this '
+                   'section in the\n'
+                   '   language reference.\n',
+ 'shifting': '\n'
+             'Shifting operations\n'
+             '*******************\n'
+             '\n'
+             'The shifting operations have lower priority than the '
+             'arithmetic\n'
+             'operations:\n'
+             '\n'
+             '   shift_expr ::= a_expr | shift_expr ( "<<" | ">>" ) a_expr\n'
+             '\n'
+             'These operators accept plain or long integers as arguments.  '
+             'The\n'
+             'arguments are converted to a common type.  They shift the '
+             'first\n'
+             'argument to the left or right by the number of bits given by '
+             'the\n'
+             'second argument.\n'
+             '\n'
+             'A right shift by *n* bits is defined as division by "pow(2, '
+             'n)".  A\n'
+             'left shift by *n* bits is defined as multiplication with '
+             '"pow(2, n)".\n'
+             'Negative shift counts raise a "ValueError" exception.\n'
+             '\n'
+             'Note: In the current implementation, the right-hand operand '
+             'is\n'
+             '  required to be at most "sys.maxsize".  If the right-hand '
+             'operand is\n'
+             '  larger than "sys.maxsize" an "OverflowError" exception is '
+             'raised.\n',
+ 'slicings': '\n'
+             'Slicings\n'
+             '********\n'
+             '\n'
+             'A slicing selects a range of items in a sequence object (e.g., '
+             'a\n'
+             'string, tuple or list).  Slicings may be used as expressions '
+             'or as\n'
+             'targets in assignment or "del" statements.  The syntax for a '
+             'slicing:\n'
+             '\n'
+             '   slicing          ::= simple_slicing | extended_slicing\n'
+             '   simple_slicing   ::= primary "[" short_slice "]"\n'
+             '   extended_slicing ::= primary "[" slice_list "]"\n'
+             '   slice_list       ::= slice_item ("," slice_item)* [","]\n'
+             '   slice_item       ::= expression | proper_slice | ellipsis\n'
+             '   proper_slice     ::= short_slice | long_slice\n'
+             '   short_slice      ::= [lower_bound] ":" [upper_bound]\n'
+             '   long_slice       ::= short_slice ":" [stride]\n'
+             '   lower_bound      ::= expression\n'
+             '   upper_bound      ::= expression\n'
+             '   stride           ::= expression\n'
+             '   ellipsis         ::= "..."\n'
+             '\n'
+             'There is ambiguity in the formal syntax here: anything that '
+             'looks like\n'
+             'an expression list also looks like a slice list, so any '
+             'subscription\n'
+             'can be interpreted as a slicing.  Rather than further '
+             'complicating the\n'
+             'syntax, this is disambiguated by defining that in this case '
+             'the\n'
+             'interpretation as a subscription takes priority over the\n'
+             'interpretation as a slicing (this is the case if the slice '
+             'list\n'
+             'contains no proper slice nor ellipses).  Similarly, when the '
+             'slice\n'
+             'list has exactly one short slice and no trailing comma, the\n'
+             'interpretation as a simple slicing takes priority over that as '
+             'an\n'
+             'extended slicing.\n'
+             '\n'
+             'The semantics for a simple slicing are as follows.  The '
+             'primary must\n'
+             'evaluate to a sequence object.  The lower and upper bound '
+             'expressions,\n'
+             'if present, must evaluate to plain integers; defaults are zero '
+             'and the\n'
+             '"sys.maxint", respectively.  If either bound is negative, the\n'
+             "sequence's length is added to it.  The slicing now selects all "
+             'items\n'
+             'with index *k* such that "i <= k < j" where *i* and *j* are '
+             'the\n'
+             'specified lower and upper bounds.  This may be an empty '
+             'sequence.  It\n'
+             'is not an error if *i* or *j* lie outside the range of valid '
+             'indexes\n'
+             "(such items don't exist so they aren't selected).\n"
+             '\n'
+             'The semantics for an extended slicing are as follows.  The '
+             'primary\n'
+             'must evaluate to a mapping object, and it is indexed with a '
+             'key that\n'
+             'is constructed from the slice list, as follows.  If the slice '
+             'list\n'
+             'contains at least one comma, the key is a tuple containing '
+             'the\n'
+             'conversion of the slice items; otherwise, the conversion of '
+             'the lone\n'
+             'slice item is the key.  The conversion of a slice item that is '
+             'an\n'
+             'expression is that expression.  The conversion of an ellipsis '
+             'slice\n'
+             'item is the built-in "Ellipsis" object.  The conversion of a '
+             'proper\n'
+             'slice is a slice object (see section The standard type '
+             'hierarchy)\n'
+             'whose "start", "stop" and "step" attributes are the values of '
+             'the\n'
+             'expressions given as lower bound, upper bound and stride,\n'
+             'respectively, substituting "None" for missing expressions.\n',
+ 'specialattrs': '\n'
+                 'Special Attributes\n'
+                 '******************\n'
+                 '\n'
+                 'The implementation adds a few special read-only attributes '
+                 'to several\n'
+                 'object types, where they are relevant.  Some of these are '
+                 'not reported\n'
+                 'by the "dir()" built-in function.\n'
+                 '\n'
+                 'object.__dict__\n'
+                 '\n'
+                 '   A dictionary or other mapping object used to store an '
+                 "object's\n"
+                 '   (writable) attributes.\n'
+                 '\n'
+                 'object.__methods__\n'
+                 '\n'
+                 '   Deprecated since version 2.2: Use the built-in function '
+                 '"dir()" to\n'
+                 "   get a list of an object's attributes. This attribute is "
+                 'no longer\n'
+                 '   available.\n'
+                 '\n'
+                 'object.__members__\n'
+                 '\n'
+                 '   Deprecated since version 2.2: Use the built-in function '
+                 '"dir()" to\n'
+                 "   get a list of an object's attributes. This attribute is "
+                 'no longer\n'
+                 '   available.\n'
+                 '\n'
+                 'instance.__class__\n'
+                 '\n'
+                 '   The class to which a class instance belongs.\n'
+                 '\n'
+                 'class.__bases__\n'
+                 '\n'
+                 '   The tuple of base classes of a class object.\n'
+                 '\n'
+                 'class.__name__\n'
+                 '\n'
+                 '   The name of the class or type.\n'
+                 '\n'
+                 'The following attributes are only supported by *new-style '
+                 'class*es.\n'
+                 '\n'
+                 'class.__mro__\n'
+                 '\n'
+                 '   This attribute is a tuple of classes that are '
+                 'considered when\n'
+                 '   looking for base classes during method resolution.\n'
+                 '\n'
+                 'class.mro()\n'
+                 '\n'
+                 '   This method can be overridden by a metaclass to '
+                 'customize the\n'
+                 '   method resolution order for its instances.  It is '
+                 'called at class\n'
+                 '   instantiation, and its result is stored in "__mro__".\n'
+                 '\n'
+                 'class.__subclasses__()\n'
+                 '\n'
+                 '   Each new-style class keeps a list of weak references to '
+                 'its\n'
+                 '   immediate subclasses.  This method returns a list of '
+                 'all those\n'
+                 '   references still alive. Example:\n'
+                 '\n'
+                 '      >>> int.__subclasses__()\n'
+                 "      [<type 'bool'>]\n"
+                 '\n'
+                 '-[ Footnotes ]-\n'
+                 '\n'
+                 '[1] Additional information on these special methods may be '
+                 'found\n'
+                 '    in the Python Reference Manual (Basic customization).\n'
+                 '\n'
+                 '[2] As a consequence, the list "[1, 2]" is considered '
+                 'equal to\n'
+                 '    "[1.0, 2.0]", and similarly for tuples.\n'
+                 '\n'
+                 "[3] They must have since the parser can't tell the type of "
+                 'the\n'
+                 '    operands.\n'
+                 '\n'
+                 '[4] Cased characters are those with general category '
+                 'property\n'
+                 '    being one of "Lu" (Letter, uppercase), "Ll" (Letter, '
+                 'lowercase),\n'
+                 '    or "Lt" (Letter, titlecase).\n'
+                 '\n'
+                 '[5] To format only a tuple you should therefore provide a\n'
+                 '    singleton tuple whose only element is the tuple to be '
+                 'formatted.\n'
+                 '\n'
+                 '[6] The advantage of leaving the newline on is that '
+                 'returning an\n'
+                 '    empty string is then an unambiguous EOF indication.  '
+                 'It is also\n'
+                 '    possible (in cases where it might matter, for example, '
+                 'if you want\n'
+                 '    to make an exact copy of a file while scanning its '
+                 'lines) to tell\n'
+                 '    whether the last line of a file ended in a newline or '
+                 'not (yes\n'
+                 '    this happens!).\n',
+ 'specialnames': '\n'
+                 'Special method names\n'
+                 '********************\n'
+                 '\n'
+                 'A class can implement certain operations that are invoked '
+                 'by special\n'
+                 'syntax (such as arithmetic operations or subscripting and '
+                 'slicing) by\n'
+                 "defining methods with special names. This is Python's "
+                 'approach to\n'
+                 '*operator overloading*, allowing classes to define their '
+                 'own behavior\n'
+                 'with respect to language operators.  For instance, if a '
+                 'class defines\n'
+                 'a method named "__getitem__()", and "x" is an instance of '
+                 'this class,\n'
+                 'then "x[i]" is roughly equivalent to "x.__getitem__(i)" '
+                 'for old-style\n'
+                 'classes and "type(x).__getitem__(x, i)" for new-style '
+                 'classes.  Except\n'
+                 'where mentioned, attempts to execute an operation raise an '
+                 'exception\n'
+                 'when no appropriate method is defined (typically '
+                 '"AttributeError" or\n'
+                 '"TypeError").\n'
+                 '\n'
+                 'When implementing a class that emulates any built-in type, '
+                 'it is\n'
+                 'important that the emulation only be implemented to the '
+                 'degree that it\n'
+                 'makes sense for the object being modelled.  For example, '
+                 'some\n'
+                 'sequences may work well with retrieval of individual '
+                 'elements, but\n'
+                 'extracting a slice may not make sense.  (One example of '
+                 'this is the\n'
+                 '"NodeList" interface in the W3C\'s Document Object '
+                 'Model.)\n'
+                 '\n'
+                 '\n'
+                 'Basic customization\n'
+                 '===================\n'
+                 '\n'
+                 'object.__new__(cls[, ...])\n'
+                 '\n'
+                 '   Called to create a new instance of class *cls*.  '
+                 '"__new__()" is a\n'
+                 '   static method (special-cased so you need not declare it '
+                 'as such)\n'
+                 '   that takes the class of which an instance was requested '
+                 'as its\n'
+                 '   first argument.  The remaining arguments are those '
+                 'passed to the\n'
+                 '   object constructor expression (the call to the class).  '
+                 'The return\n'
+                 '   value of "__new__()" should be the new object instance '
+                 '(usually an\n'
+                 '   instance of *cls*).\n'
+                 '\n'
+                 '   Typical implementations create a new instance of the '
+                 'class by\n'
+                 '   invoking the superclass\'s "__new__()" method using\n'
+                 '   "super(currentclass, cls).__new__(cls[, ...])" with '
+                 'appropriate\n'
+                 '   arguments and then modifying the newly-created instance '
+                 'as\n'
+                 '   necessary before returning it.\n'
+                 '\n'
+                 '   If "__new__()" returns an instance of *cls*, then the '
+                 'new\n'
+                 '   instance\'s "__init__()" method will be invoked like\n'
+                 '   "__init__(self[, ...])", where *self* is the new '
+                 'instance and the\n'
+                 '   remaining arguments are the same as were passed to '
+                 '"__new__()".\n'
+                 '\n'
+                 '   If "__new__()" does not return an instance of *cls*, '
+                 'then the new\n'
+                 '   instance\'s "__init__()" method will not be invoked.\n'
+                 '\n'
+                 '   "__new__()" is intended mainly to allow subclasses of '
+                 'immutable\n'
+                 '   types (like int, str, or tuple) to customize instance '
+                 'creation.  It\n'
+                 '   is also commonly overridden in custom metaclasses in '
+                 'order to\n'
+                 '   customize class creation.\n'
+                 '\n'
+                 'object.__init__(self[, ...])\n'
+                 '\n'
+                 '   Called after the instance has been created (by '
+                 '"__new__()"), but\n'
+                 '   before it is returned to the caller.  The arguments are '
+                 'those\n'
+                 '   passed to the class constructor expression.  If a base '
+                 'class has an\n'
+                 '   "__init__()" method, the derived class\'s "__init__()" '
+                 'method, if\n'
+                 '   any, must explicitly call it to ensure proper '
+                 'initialization of the\n'
+                 '   base class part of the instance; for example:\n'
+                 '   "BaseClass.__init__(self, [args...])".\n'
+                 '\n'
+                 '   Because "__new__()" and "__init__()" work together in '
+                 'constructing\n'
+                 '   objects ("__new__()" to create it, and "__init__()" to '
+                 'customise\n'
+                 '   it), no non-"None" value may be returned by '
+                 '"__init__()"; doing so\n'
+                 '   will cause a "TypeError" to be raised at runtime.\n'
+                 '\n'
+                 'object.__del__(self)\n'
+                 '\n'
+                 '   Called when the instance is about to be destroyed.  '
+                 'This is also\n'
+                 '   called a destructor.  If a base class has a "__del__()" '
+                 'method, the\n'
+                 '   derived class\'s "__del__()" method, if any, must '
+                 'explicitly call it\n'
+                 '   to ensure proper deletion of the base class part of the '
+                 'instance.\n'
+                 '   Note that it is possible (though not recommended!) for '
+                 'the\n'
+                 '   "__del__()" method to postpone destruction of the '
+                 'instance by\n'
+                 '   creating a new reference to it.  It may then be called '
+                 'at a later\n'
+                 '   time when this new reference is deleted.  It is not '
+                 'guaranteed that\n'
+                 '   "__del__()" methods are called for objects that still '
+                 'exist when\n'
+                 '   the interpreter exits.\n'
+                 '\n'
+                 '   Note: "del x" doesn\'t directly call "x.__del__()" --- '
+                 'the former\n'
+                 '     decrements the reference count for "x" by one, and '
+                 'the latter is\n'
+                 '     only called when "x"\'s reference count reaches '
+                 'zero.  Some common\n'
+                 '     situations that may prevent the reference count of an '
+                 'object from\n'
+                 '     going to zero include: circular references between '
+                 'objects (e.g.,\n'
+                 '     a doubly-linked list or a tree data structure with '
+                 'parent and\n'
+                 '     child pointers); a reference to the object on the '
+                 'stack frame of\n'
+                 '     a function that caught an exception (the traceback '
+                 'stored in\n'
+                 '     "sys.exc_traceback" keeps the stack frame alive); or '
+                 'a reference\n'
+                 '     to the object on the stack frame that raised an '
+                 'unhandled\n'
+                 '     exception in interactive mode (the traceback stored '
+                 'in\n'
+                 '     "sys.last_traceback" keeps the stack frame alive).  '
+                 'The first\n'
+                 '     situation can only be remedied by explicitly breaking '
+                 'the cycles;\n'
+                 '     the latter two situations can be resolved by storing '
+                 '"None" in\n'
+                 '     "sys.exc_traceback" or "sys.last_traceback".  '
+                 'Circular references\n'
+                 '     which are garbage are detected when the option cycle '
+                 'detector is\n'
+                 "     enabled (it's on by default), but can only be cleaned "
+                 'up if there\n'
+                 '     are no Python-level "__del__()" methods involved. '
+                 'Refer to the\n'
+                 '     documentation for the "gc" module for more '
+                 'information about how\n'
+                 '     "__del__()" methods are handled by the cycle '
+                 'detector,\n'
+                 '     particularly the description of the "garbage" value.\n'
+                 '\n'
+                 '   Warning: Due to the precarious circumstances under '
+                 'which\n'
+                 '     "__del__()" methods are invoked, exceptions that '
+                 'occur during\n'
+                 '     their execution are ignored, and a warning is printed '
+                 'to\n'
+                 '     "sys.stderr" instead. Also, when "__del__()" is '
+                 'invoked in\n'
+                 '     response to a module being deleted (e.g., when '
+                 'execution of the\n'
+                 '     program is done), other globals referenced by the '
+                 '"__del__()"\n'
+                 '     method may already have been deleted or in the '
+                 'process of being\n'
+                 '     torn down (e.g. the import machinery shutting down).  '
+                 'For this\n'
+                 '     reason, "__del__()" methods should do the absolute '
+                 'minimum needed\n'
+                 '     to maintain external invariants.  Starting with '
+                 'version 1.5,\n'
+                 '     Python guarantees that globals whose name begins with '
+                 'a single\n'
+                 '     underscore are deleted from their module before other '
+                 'globals are\n'
+                 '     deleted; if no other references to such globals '
+                 'exist, this may\n'
+                 '     help in assuring that imported modules are still '
+                 'available at the\n'
+                 '     time when the "__del__()" method is called.\n'
+                 '\n'
+                 '   See also the "-R" command-line option.\n'
+                 '\n'
+                 'object.__repr__(self)\n'
+                 '\n'
+                 '   Called by the "repr()" built-in function and by string '
+                 'conversions\n'
+                 '   (reverse quotes) to compute the "official" string '
+                 'representation of\n'
+                 '   an object.  If at all possible, this should look like a '
+                 'valid\n'
+                 '   Python expression that could be used to recreate an '
+                 'object with the\n'
+                 '   same value (given an appropriate environment).  If this '
+                 'is not\n'
+                 '   possible, a string of the form "<...some useful '
+                 'description...>"\n'
+                 '   should be returned.  The return value must be a string '
+                 'object. If a\n'
+                 '   class defines "__repr__()" but not "__str__()", then '
+                 '"__repr__()"\n'
+                 '   is also used when an "informal" string representation '
+                 'of instances\n'
+                 '   of that class is required.\n'
+                 '\n'
+                 '   This is typically used for debugging, so it is '
+                 'important that the\n'
+                 '   representation is information-rich and unambiguous.\n'
+                 '\n'
+                 'object.__str__(self)\n'
+                 '\n'
+                 '   Called by the "str()" built-in function and by the '
+                 '"print"\n'
+                 '   statement to compute the "informal" string '
+                 'representation of an\n'
+                 '   object.  This differs from "__repr__()" in that it does '
+                 'not have to\n'
+                 '   be a valid Python expression: a more convenient or '
+                 'concise\n'
+                 '   representation may be used instead. The return value '
+                 'must be a\n'
+                 '   string object.\n'
+                 '\n'
+                 'object.__lt__(self, other)\n'
+                 'object.__le__(self, other)\n'
+                 'object.__eq__(self, other)\n'
+                 'object.__ne__(self, other)\n'
+                 'object.__gt__(self, other)\n'
+                 'object.__ge__(self, other)\n'
+                 '\n'
+                 '   New in version 2.1.\n'
+                 '\n'
+                 '   These are the so-called "rich comparison" methods, and '
+                 'are called\n'
+                 '   for comparison operators in preference to "__cmp__()" '
+                 'below. The\n'
+                 '   correspondence between operator symbols and method '
+                 'names is as\n'
+                 '   follows: "x<y" calls "x.__lt__(y)", "x<=y" calls '
+                 '"x.__le__(y)",\n'
+                 '   "x==y" calls "x.__eq__(y)", "x!=y" and "x<>y" call '
+                 '"x.__ne__(y)",\n'
+                 '   "x>y" calls "x.__gt__(y)", and "x>=y" calls '
+                 '"x.__ge__(y)".\n'
+                 '\n'
+                 '   A rich comparison method may return the singleton '
+                 '"NotImplemented"\n'
+                 '   if it does not implement the operation for a given pair '
+                 'of\n'
+                 '   arguments. By convention, "False" and "True" are '
+                 'returned for a\n'
+                 '   successful comparison. However, these methods can '
+                 'return any value,\n'
+                 '   so if the comparison operator is used in a Boolean '
+                 'context (e.g.,\n'
+                 '   in the condition of an "if" statement), Python will '
+                 'call "bool()"\n'
+                 '   on the value to determine if the result is true or '
+                 'false.\n'
+                 '\n'
+                 '   There are no implied relationships among the comparison '
+                 'operators.\n'
+                 '   The truth of "x==y" does not imply that "x!=y" is '
+                 'false.\n'
+                 '   Accordingly, when defining "__eq__()", one should also '
+                 'define\n'
+                 '   "__ne__()" so that the operators will behave as '
+                 'expected.  See the\n'
+                 '   paragraph on "__hash__()" for some important notes on '
+                 'creating\n'
+                 '   *hashable* objects which support custom comparison '
+                 'operations and\n'
+                 '   are usable as dictionary keys.\n'
+                 '\n'
+                 '   There are no swapped-argument versions of these methods '
+                 '(to be used\n'
+                 '   when the left argument does not support the operation '
+                 'but the right\n'
+                 '   argument does); rather, "__lt__()" and "__gt__()" are '
+                 "each other's\n"
+                 '   reflection, "__le__()" and "__ge__()" are each other\'s '
+                 'reflection,\n'
+                 '   and "__eq__()" and "__ne__()" are their own '
+                 'reflection.\n'
+                 '\n'
+                 '   Arguments to rich comparison methods are never '
+                 'coerced.\n'
+                 '\n'
+                 '   To automatically generate ordering operations from a '
+                 'single root\n'
+                 '   operation, see "functools.total_ordering()".\n'
+                 '\n'
+                 'object.__cmp__(self, other)\n'
+                 '\n'
+                 '   Called by comparison operations if rich comparison (see '
+                 'above) is\n'
+                 '   not defined.  Should return a negative integer if "self '
+                 '< other",\n'
+                 '   zero if "self == other", a positive integer if "self > '
+                 'other".  If\n'
+                 '   no "__cmp__()", "__eq__()" or "__ne__()" operation is '
+                 'defined,\n'
+                 '   class instances are compared by object identity '
+                 '("address").  See\n'
+                 '   also the description of "__hash__()" for some important '
+                 'notes on\n'
+                 '   creating *hashable* objects which support custom '
+                 'comparison\n'
+                 '   operations and are usable as dictionary keys. (Note: '
+                 'the\n'
+                 '   restriction that exceptions are not propagated by '
+                 '"__cmp__()" has\n'
+                 '   been removed since Python 1.5.)\n'
+                 '\n'
+                 'object.__rcmp__(self, other)\n'
+                 '\n'
+                 '   Changed in version 2.1: No longer supported.\n'
+                 '\n'
+                 'object.__hash__(self)\n'
+                 '\n'
+                 '   Called by built-in function "hash()" and for operations '
+                 'on members\n'
+                 '   of hashed collections including "set", "frozenset", and '
+                 '"dict".\n'
+                 '   "__hash__()" should return an integer.  The only '
+                 'required property\n'
+                 '   is that objects which compare equal have the same hash '
+                 'value; it is\n'
+                 '   advised to somehow mix together (e.g. using exclusive '
+                 'or) the hash\n'
+                 '   values for the components of the object that also play '
+                 'a part in\n'
+                 '   comparison of objects.\n'
+                 '\n'
+                 '   If a class does not define a "__cmp__()" or "__eq__()" '
+                 'method it\n'
+                 '   should not define a "__hash__()" operation either; if '
+                 'it defines\n'
+                 '   "__cmp__()" or "__eq__()" but not "__hash__()", its '
+                 'instances will\n'
+                 '   not be usable in hashed collections.  If a class '
+                 'defines mutable\n'
+                 '   objects and implements a "__cmp__()" or "__eq__()" '
+                 'method, it\n'
+                 '   should not implement "__hash__()", since hashable '
+                 'collection\n'
+                 "   implementations require that a object's hash value is "
+                 'immutable (if\n'
+                 "   the object's hash value changes, it will be in the "
+                 'wrong hash\n'
+                 '   bucket).\n'
+                 '\n'
+                 '   User-defined classes have "__cmp__()" and "__hash__()" '
+                 'methods by\n'
+                 '   default; with them, all objects compare unequal (except '
+                 'with\n'
+                 '   themselves) and "x.__hash__()" returns a result derived '
+                 'from\n'
+                 '   "id(x)".\n'
+                 '\n'
+                 '   Classes which inherit a "__hash__()" method from a '
+                 'parent class but\n'
+                 '   change the meaning of "__cmp__()" or "__eq__()" such '
+                 'that the hash\n'
+                 '   value returned is no longer appropriate (e.g. by '
+                 'switching to a\n'
+                 '   value-based concept of equality instead of the default '
+                 'identity\n'
+                 '   based equality) can explicitly flag themselves as being '
+                 'unhashable\n'
+                 '   by setting "__hash__ = None" in the class definition. '
+                 'Doing so\n'
+                 '   means that not only will instances of the class raise '
+                 'an\n'
+                 '   appropriate "TypeError" when a program attempts to '
+                 'retrieve their\n'
+                 '   hash value, but they will also be correctly identified '
+                 'as\n'
+                 '   unhashable when checking "isinstance(obj, '
+                 'collections.Hashable)"\n'
+                 '   (unlike classes which define their own "__hash__()" to '
+                 'explicitly\n'
+                 '   raise "TypeError").\n'
+                 '\n'
+                 '   Changed in version 2.5: "__hash__()" may now also '
+                 'return a long\n'
+                 '   integer object; the 32-bit integer is then derived from '
+                 'the hash of\n'
+                 '   that object.\n'
+                 '\n'
+                 '   Changed in version 2.6: "__hash__" may now be set to '
+                 '"None" to\n'
+                 '   explicitly flag instances of a class as unhashable.\n'
+                 '\n'
+                 'object.__nonzero__(self)\n'
+                 '\n'
+                 '   Called to implement truth value testing and the '
+                 'built-in operation\n'
+                 '   "bool()"; should return "False" or "True", or their '
+                 'integer\n'
+                 '   equivalents "0" or "1".  When this method is not '
+                 'defined,\n'
+                 '   "__len__()" is called, if it is defined, and the object '
+                 'is\n'
+                 '   considered true if its result is nonzero. If a class '
+                 'defines\n'
+                 '   neither "__len__()" nor "__nonzero__()", all its '
+                 'instances are\n'
+                 '   considered true.\n'
+                 '\n'
+                 'object.__unicode__(self)\n'
+                 '\n'
+                 '   Called to implement "unicode()" built-in; should return '
+                 'a Unicode\n'
+                 '   object. When this method is not defined, string '
+                 'conversion is\n'
+                 '   attempted, and the result of string conversion is '
+                 'converted to\n'
+                 '   Unicode using the system default encoding.\n'
+                 '\n'
+                 '\n'
+                 'Customizing attribute access\n'
+                 '============================\n'
+                 '\n'
+                 'The following methods can be defined to customize the '
+                 'meaning of\n'
+                 'attribute access (use of, assignment to, or deletion of '
+                 '"x.name") for\n'
+                 'class instances.\n'
+                 '\n'
+                 'object.__getattr__(self, name)\n'
+                 '\n'
+                 '   Called when an attribute lookup has not found the '
+                 'attribute in the\n'
+                 '   usual places (i.e. it is not an instance attribute nor '
+                 'is it found\n'
+                 '   in the class tree for "self").  "name" is the attribute '
+                 'name. This\n'
+                 '   method should return the (computed) attribute value or '
+                 'raise an\n'
+                 '   "AttributeError" exception.\n'
+                 '\n'
+                 '   Note that if the attribute is found through the normal '
+                 'mechanism,\n'
+                 '   "__getattr__()" is not called.  (This is an intentional '
+                 'asymmetry\n'
+                 '   between "__getattr__()" and "__setattr__()".) This is '
+                 'done both for\n'
+                 '   efficiency reasons and because otherwise '
+                 '"__getattr__()" would have\n'
+                 '   no way to access other attributes of the instance.  '
+                 'Note that at\n'
+                 '   least for instance variables, you can fake total '
+                 'control by not\n'
+                 '   inserting any values in the instance attribute '
+                 'dictionary (but\n'
+                 '   instead inserting them in another object).  See the\n'
+                 '   "__getattribute__()" method below for a way to actually '
+                 'get total\n'
+                 '   control in new-style classes.\n'
+                 '\n'
+                 'object.__setattr__(self, name, value)\n'
+                 '\n'
+                 '   Called when an attribute assignment is attempted.  This '
+                 'is called\n'
+                 '   instead of the normal mechanism (i.e. store the value '
+                 'in the\n'
+                 '   instance dictionary).  *name* is the attribute name, '
+                 '*value* is the\n'
+                 '   value to be assigned to it.\n'
+                 '\n'
+                 '   If "__setattr__()" wants to assign to an instance '
+                 'attribute, it\n'
+                 '   should not simply execute "self.name = value" --- this '
+                 'would cause\n'
+                 '   a recursive call to itself.  Instead, it should insert '
+                 'the value in\n'
+                 '   the dictionary of instance attributes, e.g., '
+                 '"self.__dict__[name] =\n'
+                 '   value".  For new-style classes, rather than accessing '
+                 'the instance\n'
+                 '   dictionary, it should call the base class method with '
+                 'the same\n'
+                 '   name, for example, "object.__setattr__(self, name, '
+                 'value)".\n'
+                 '\n'
+                 'object.__delattr__(self, name)\n'
+                 '\n'
+                 '   Like "__setattr__()" but for attribute deletion instead '
+                 'of\n'
+                 '   assignment.  This should only be implemented if "del '
+                 'obj.name" is\n'
+                 '   meaningful for the object.\n'
+                 '\n'
+                 '\n'
+                 'More attribute access for new-style classes\n'
+                 '-------------------------------------------\n'
+                 '\n'
+                 'The following methods only apply to new-style classes.\n'
+                 '\n'
+                 'object.__getattribute__(self, name)\n'
+                 '\n'
+                 '   Called unconditionally to implement attribute accesses '
+                 'for\n'
+                 '   instances of the class. If the class also defines '
+                 '"__getattr__()",\n'
+                 '   the latter will not be called unless '
+                 '"__getattribute__()" either\n'
+                 '   calls it explicitly or raises an "AttributeError". This '
+                 'method\n'
+                 '   should return the (computed) attribute value or raise '
+                 'an\n'
+                 '   "AttributeError" exception. In order to avoid infinite '
+                 'recursion in\n'
+                 '   this method, its implementation should always call the '
+                 'base class\n'
+                 '   method with the same name to access any attributes it '
+                 'needs, for\n'
+                 '   example, "object.__getattribute__(self, name)".\n'
+                 '\n'
+                 '   Note: This method may still be bypassed when looking up '
+                 'special\n'
+                 '     methods as the result of implicit invocation via '
+                 'language syntax\n'
+                 '     or built-in functions. See Special method lookup for '
+                 'new-style\n'
+                 '     classes.\n'
+                 '\n'
+                 '\n'
+                 'Implementing Descriptors\n'
+                 '------------------------\n'
+                 '\n'
+                 'The following methods only apply when an instance of the '
+                 'class\n'
+                 'containing the method (a so-called *descriptor* class) '
+                 'appears in an\n'
+                 '*owner* class (the descriptor must be in either the '
+                 "owner's class\n"
+                 'dictionary or in the class dictionary for one of its '
+                 'parents).  In the\n'
+                 'examples below, "the attribute" refers to the attribute '
+                 'whose name is\n'
+                 'the key of the property in the owner class\' "__dict__".\n'
+                 '\n'
+                 'object.__get__(self, instance, owner)\n'
+                 '\n'
+                 '   Called to get the attribute of the owner class (class '
+                 'attribute\n'
+                 '   access) or of an instance of that class (instance '
+                 'attribute\n'
+                 '   access). *owner* is always the owner class, while '
+                 '*instance* is the\n'
+                 '   instance that the attribute was accessed through, or '
+                 '"None" when\n'
+                 '   the attribute is accessed through the *owner*.  This '
+                 'method should\n'
+                 '   return the (computed) attribute value or raise an '
+                 '"AttributeError"\n'
+                 '   exception.\n'
+                 '\n'
+                 'object.__set__(self, instance, value)\n'
+                 '\n'
+                 '   Called to set the attribute on an instance *instance* '
+                 'of the owner\n'
+                 '   class to a new value, *value*.\n'
+                 '\n'
+                 'object.__delete__(self, instance)\n'
+                 '\n'
+                 '   Called to delete the attribute on an instance '
+                 '*instance* of the\n'
+                 '   owner class.\n'
+                 '\n'
+                 '\n'
+                 'Invoking Descriptors\n'
+                 '--------------------\n'
+                 '\n'
+                 'In general, a descriptor is an object attribute with '
+                 '"binding\n'
+                 'behavior", one whose attribute access has been overridden '
+                 'by methods\n'
+                 'in the descriptor protocol:  "__get__()", "__set__()", '
+                 'and\n'
+                 '"__delete__()". If any of those methods are defined for an '
+                 'object, it\n'
+                 'is said to be a descriptor.\n'
+                 '\n'
+                 'The default behavior for attribute access is to get, set, '
+                 'or delete\n'
+                 "the attribute from an object's dictionary. For instance, "
+                 '"a.x" has a\n'
+                 'lookup chain starting with "a.__dict__[\'x\']", then\n'
+                 '"type(a).__dict__[\'x\']", and continuing through the base '
+                 'classes of\n'
+                 '"type(a)" excluding metaclasses.\n'
+                 '\n'
+                 'However, if the looked-up value is an object defining one '
+                 'of the\n'
+                 'descriptor methods, then Python may override the default '
+                 'behavior and\n'
+                 'invoke the descriptor method instead.  Where this occurs '
+                 'in the\n'
+                 'precedence chain depends on which descriptor methods were '
+                 'defined and\n'
+                 'how they were called.  Note that descriptors are only '
+                 'invoked for new\n'
+                 'style objects or classes (ones that subclass "object()" or '
+                 '"type()").\n'
+                 '\n'
+                 'The starting point for descriptor invocation is a binding, '
+                 '"a.x". How\n'
+                 'the arguments are assembled depends on "a":\n'
+                 '\n'
+                 'Direct Call\n'
+                 '   The simplest and least common call is when user code '
+                 'directly\n'
+                 '   invokes a descriptor method:    "x.__get__(a)".\n'
+                 '\n'
+                 'Instance Binding\n'
+                 '   If binding to a new-style object instance, "a.x" is '
+                 'transformed\n'
+                 '   into the call: "type(a).__dict__[\'x\'].__get__(a, '
+                 'type(a))".\n'
+                 '\n'
+                 'Class Binding\n'
+                 '   If binding to a new-style class, "A.x" is transformed '
+                 'into the\n'
+                 '   call: "A.__dict__[\'x\'].__get__(None, A)".\n'
+                 '\n'
+                 'Super Binding\n'
+                 '   If "a" is an instance of "super", then the binding '
+                 '"super(B,\n'
+                 '   obj).m()" searches "obj.__class__.__mro__" for the base '
+                 'class "A"\n'
+                 '   immediately preceding "B" and then invokes the '
+                 'descriptor with the\n'
+                 '   call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n'
+                 '\n'
+                 'For instance bindings, the precedence of descriptor '
+                 'invocation depends\n'
+                 'on the which descriptor methods are defined.  A descriptor '
+                 'can define\n'
+                 'any combination of "__get__()", "__set__()" and '
+                 '"__delete__()".  If it\n'
+                 'does not define "__get__()", then accessing the attribute '
+                 'will return\n'
+                 'the descriptor object itself unless there is a value in '
+                 "the object's\n"
+                 'instance dictionary.  If the descriptor defines '
+                 '"__set__()" and/or\n'
+                 '"__delete__()", it is a data descriptor; if it defines '
+                 'neither, it is\n'
+                 'a non-data descriptor.  Normally, data descriptors define '
+                 'both\n'
+                 '"__get__()" and "__set__()", while non-data descriptors '
+                 'have just the\n'
+                 '"__get__()" method.  Data descriptors with "__set__()" and '
+                 '"__get__()"\n'
+                 'defined always override a redefinition in an instance '
+                 'dictionary.  In\n'
+                 'contrast, non-data descriptors can be overridden by '
+                 'instances.\n'
+                 '\n'
+                 'Python methods (including "staticmethod()" and '
+                 '"classmethod()") are\n'
+                 'implemented as non-data descriptors.  Accordingly, '
+                 'instances can\n'
+                 'redefine and override methods.  This allows individual '
+                 'instances to\n'
+                 'acquire behaviors that differ from other instances of the '
+                 'same class.\n'
+                 '\n'
+                 'The "property()" function is implemented as a data '
+                 'descriptor.\n'
+                 'Accordingly, instances cannot override the behavior of a '
+                 'property.\n'
+                 '\n'
+                 '\n'
+                 '__slots__\n'
+                 '---------\n'
+                 '\n'
+                 'By default, instances of both old and new-style classes '
+                 'have a\n'
+                 'dictionary for attribute storage.  This wastes space for '
+                 'objects\n'
+                 'having very few instance variables.  The space consumption '
+                 'can become\n'
+                 'acute when creating large numbers of instances.\n'
+                 '\n'
+                 'The default can be overridden by defining *__slots__* in a '
+                 'new-style\n'
+                 'class definition.  The *__slots__* declaration takes a '
+                 'sequence of\n'
+                 'instance variables and reserves just enough space in each '
+                 'instance to\n'
+                 'hold a value for each variable.  Space is saved because '
+                 '*__dict__* is\n'
+                 'not created for each instance.\n'
+                 '\n'
+                 '__slots__\n'
+                 '\n'
+                 '   This class variable can be assigned a string, iterable, '
+                 'or sequence\n'
+                 '   of strings with variable names used by instances.  If '
+                 'defined in a\n'
+                 '   new-style class, *__slots__* reserves space for the '
+                 'declared\n'
+                 '   variables and prevents the automatic creation of '
+                 '*__dict__* and\n'
+                 '   *__weakref__* for each instance.\n'
+                 '\n'
+                 '   New in version 2.2.\n'
+                 '\n'
+                 'Notes on using *__slots__*\n'
+                 '\n'
+                 '* When inheriting from a class without *__slots__*, the '
+                 '*__dict__*\n'
+                 '  attribute of that class will always be accessible, so a '
+                 '*__slots__*\n'
+                 '  definition in the subclass is meaningless.\n'
+                 '\n'
+                 '* Without a *__dict__* variable, instances cannot be '
+                 'assigned new\n'
+                 '  variables not listed in the *__slots__* definition.  '
+                 'Attempts to\n'
+                 '  assign to an unlisted variable name raises '
+                 '"AttributeError". If\n'
+                 '  dynamic assignment of new variables is desired, then '
+                 'add\n'
+                 '  "\'__dict__\'" to the sequence of strings in the '
+                 '*__slots__*\n'
+                 '  declaration.\n'
+                 '\n'
+                 '  Changed in version 2.3: Previously, adding '
+                 '"\'__dict__\'" to the\n'
+                 '  *__slots__* declaration would not enable the assignment '
+                 'of new\n'
+                 '  attributes not specifically listed in the sequence of '
+                 'instance\n'
+                 '  variable names.\n'
+                 '\n'
+                 '* Without a *__weakref__* variable for each instance, '
+                 'classes\n'
+                 '  defining *__slots__* do not support weak references to '
+                 'its\n'
+                 '  instances. If weak reference support is needed, then '
+                 'add\n'
+                 '  "\'__weakref__\'" to the sequence of strings in the '
+                 '*__slots__*\n'
+                 '  declaration.\n'
+                 '\n'
+                 '  Changed in version 2.3: Previously, adding '
+                 '"\'__weakref__\'" to the\n'
+                 '  *__slots__* declaration would not enable support for '
+                 'weak\n'
+                 '  references.\n'
+                 '\n'
+                 '* *__slots__* are implemented at the class level by '
+                 'creating\n'
+                 '  descriptors (Implementing Descriptors) for each variable '
+                 'name.  As a\n'
+                 '  result, class attributes cannot be used to set default '
+                 'values for\n'
+                 '  instance variables defined by *__slots__*; otherwise, '
+                 'the class\n'
+                 '  attribute would overwrite the descriptor assignment.\n'
+                 '\n'
+                 '* The action of a *__slots__* declaration is limited to '
+                 'the class\n'
+                 '  where it is defined.  As a result, subclasses will have '
+                 'a *__dict__*\n'
+                 '  unless they also define *__slots__* (which must only '
+                 'contain names\n'
+                 '  of any *additional* slots).\n'
+                 '\n'
+                 '* If a class defines a slot also defined in a base class, '
+                 'the\n'
+                 '  instance variable defined by the base class slot is '
+                 'inaccessible\n'
+                 '  (except by retrieving its descriptor directly from the '
+                 'base class).\n'
+                 '  This renders the meaning of the program undefined.  In '
+                 'the future, a\n'
+                 '  check may be added to prevent this.\n'
+                 '\n'
+                 '* Nonempty *__slots__* does not work for classes derived '
+                 'from\n'
+                 '  "variable-length" built-in types such as "long", "str" '
+                 'and "tuple".\n'
+                 '\n'
+                 '* Any non-string iterable may be assigned to *__slots__*. '
+                 'Mappings\n'
+                 '  may also be used; however, in the future, special '
+                 'meaning may be\n'
+                 '  assigned to the values corresponding to each key.\n'
+                 '\n'
+                 '* *__class__* assignment works only if both classes have '
+                 'the same\n'
+                 '  *__slots__*.\n'
+                 '\n'
+                 '  Changed in version 2.6: Previously, *__class__* '
+                 'assignment raised an\n'
+                 '  error if either new or old class had *__slots__*.\n'
+                 '\n'
+                 '\n'
+                 'Customizing class creation\n'
+                 '==========================\n'
+                 '\n'
+                 'By default, new-style classes are constructed using '
+                 '"type()". A class\n'
+                 'definition is read into a separate namespace and the value '
+                 'of class\n'
+                 'name is bound to the result of "type(name, bases, dict)".\n'
+                 '\n'
+                 'When the class definition is read, if *__metaclass__* is '
+                 'defined then\n'
+                 'the callable assigned to it will be called instead of '
+                 '"type()". This\n'
+                 'allows classes or functions to be written which monitor or '
+                 'alter the\n'
+                 'class creation process:\n'
+                 '\n'
+                 '* Modifying the class dictionary prior to the class being '
+                 'created.\n'
+                 '\n'
+                 '* Returning an instance of another class -- essentially '
+                 'performing\n'
+                 '  the role of a factory function.\n'
+                 '\n'
+                 "These steps will have to be performed in the metaclass's "
+                 '"__new__()"\n'
+                 'method -- "type.__new__()" can then be called from this '
+                 'method to\n'
+                 'create a class with different properties.  This example '
+                 'adds a new\n'
+                 'element to the class dictionary before creating the '
+                 'class:\n'
+                 '\n'
+                 '   class metacls(type):\n'
+                 '       def __new__(mcs, name, bases, dict):\n'
+                 "           dict['foo'] = 'metacls was here'\n"
+                 '           return type.__new__(mcs, name, bases, dict)\n'
+                 '\n'
+                 'You can of course also override other class methods (or '
+                 'add new\n'
+                 'methods); for example defining a custom "__call__()" '
+                 'method in the\n'
+                 'metaclass allows custom behavior when the class is called, '
+                 'e.g. not\n'
+                 'always creating a new instance.\n'
+                 '\n'
+                 '__metaclass__\n'
+                 '\n'
+                 '   This variable can be any callable accepting arguments '
+                 'for "name",\n'
+                 '   "bases", and "dict".  Upon class creation, the callable '
+                 'is used\n'
+                 '   instead of the built-in "type()".\n'
+                 '\n'
+                 '   New in version 2.2.\n'
+                 '\n'
+                 'The appropriate metaclass is determined by the following '
+                 'precedence\n'
+                 'rules:\n'
+                 '\n'
+                 '* If "dict[\'__metaclass__\']" exists, it is used.\n'
+                 '\n'
+                 '* Otherwise, if there is at least one base class, its '
+                 'metaclass is\n'
+                 '  used (this looks for a *__class__* attribute first and '
+                 'if not found,\n'
+                 '  uses its type).\n'
+                 '\n'
+                 '* Otherwise, if a global variable named __metaclass__ '
+                 'exists, it is\n'
+                 '  used.\n'
+                 '\n'
+                 '* Otherwise, the old-style, classic metaclass '
+                 '(types.ClassType) is\n'
+                 '  used.\n'
+                 '\n'
+                 'The potential uses for metaclasses are boundless. Some '
+                 'ideas that have\n'
+                 'been explored including logging, interface checking, '
+                 'automatic\n'
+                 'delegation, automatic property creation, proxies, '
+                 'frameworks, and\n'
+                 'automatic resource locking/synchronization.\n'
+                 '\n'
+                 '\n'
+                 'Customizing instance and subclass checks\n'
+                 '========================================\n'
+                 '\n'
+                 'New in version 2.6.\n'
+                 '\n'
+                 'The following methods are used to override the default '
+                 'behavior of the\n'
+                 '"isinstance()" and "issubclass()" built-in functions.\n'
+                 '\n'
+                 'In particular, the metaclass "abc.ABCMeta" implements '
+                 'these methods in\n'
+                 'order to allow the addition of Abstract Base Classes '
+                 '(ABCs) as\n'
+                 '"virtual base classes" to any class or type (including '
+                 'built-in\n'
+                 'types), including other ABCs.\n'
+                 '\n'
+                 'class.__instancecheck__(self, instance)\n'
+                 '\n'
+                 '   Return true if *instance* should be considered a '
+                 '(direct or\n'
+                 '   indirect) instance of *class*. If defined, called to '
+                 'implement\n'
+                 '   "isinstance(instance, class)".\n'
+                 '\n'
+                 'class.__subclasscheck__(self, subclass)\n'
+                 '\n'
+                 '   Return true if *subclass* should be considered a '
+                 '(direct or\n'
+                 '   indirect) subclass of *class*.  If defined, called to '
+                 'implement\n'
+                 '   "issubclass(subclass, class)".\n'
+                 '\n'
+                 'Note that these methods are looked up on the type '
+                 '(metaclass) of a\n'
+                 'class.  They cannot be defined as class methods in the '
+                 'actual class.\n'
+                 'This is consistent with the lookup of special methods that '
+                 'are called\n'
+                 'on instances, only in this case the instance is itself a '
+                 'class.\n'
+                 '\n'
+                 'See also: **PEP 3119** - Introducing Abstract Base '
+                 'Classes\n'
+                 '\n'
+                 '     Includes the specification for customizing '
+                 '"isinstance()" and\n'
+                 '     "issubclass()" behavior through "__instancecheck__()" '
+                 'and\n'
+                 '     "__subclasscheck__()", with motivation for this '
+                 'functionality in\n'
+                 '     the context of adding Abstract Base Classes (see the '
+                 '"abc"\n'
+                 '     module) to the language.\n'
+                 '\n'
+                 '\n'
+                 'Emulating callable objects\n'
+                 '==========================\n'
+                 '\n'
+                 'object.__call__(self[, args...])\n'
+                 '\n'
+                 '   Called when the instance is "called" as a function; if '
+                 'this method\n'
+                 '   is defined, "x(arg1, arg2, ...)" is a shorthand for\n'
+                 '   "x.__call__(arg1, arg2, ...)".\n'
+                 '\n'
+                 '\n'
+                 'Emulating container types\n'
+                 '=========================\n'
+                 '\n'
+                 'The following methods can be defined to implement '
+                 'container objects.\n'
+                 'Containers usually are sequences (such as lists or tuples) '
+                 'or mappings\n'
+                 '(like dictionaries), but can represent other containers as '
+                 'well.  The\n'
+                 'first set of methods is used either to emulate a sequence '
+                 'or to\n'
+                 'emulate a mapping; the difference is that for a sequence, '
+                 'the\n'
+                 'allowable keys should be the integers *k* for which "0 <= '
+                 'k < N" where\n'
+                 '*N* is the length of the sequence, or slice objects, which '
+                 'define a\n'
+                 'range of items. (For backwards compatibility, the method\n'
+                 '"__getslice__()" (see below) can also be defined to handle '
+                 'simple, but\n'
+                 'not extended slices.) It is also recommended that mappings '
+                 'provide the\n'
+                 'methods "keys()", "values()", "items()", "has_key()", '
+                 '"get()",\n'
+                 '"clear()", "setdefault()", "iterkeys()", "itervalues()",\n'
+                 '"iteritems()", "pop()", "popitem()", "copy()", and '
+                 '"update()" behaving\n'
+                 "similar to those for Python's standard dictionary "
+                 'objects.  The\n'
+                 '"UserDict" module provides a "DictMixin" class to help '
+                 'create those\n'
+                 'methods from a base set of "__getitem__()", '
+                 '"__setitem__()",\n'
+                 '"__delitem__()", and "keys()". Mutable sequences should '
+                 'provide\n'
+                 'methods "append()", "count()", "index()", "extend()", '
+                 '"insert()",\n'
+                 '"pop()", "remove()", "reverse()" and "sort()", like Python '
+                 'standard\n'
+                 'list objects.  Finally, sequence types should implement '
+                 'addition\n'
+                 '(meaning concatenation) and multiplication (meaning '
+                 'repetition) by\n'
+                 'defining the methods "__add__()", "__radd__()", '
+                 '"__iadd__()",\n'
+                 '"__mul__()", "__rmul__()" and "__imul__()" described '
+                 'below; they\n'
+                 'should not define "__coerce__()" or other numerical '
+                 'operators.  It is\n'
+                 'recommended that both mappings and sequences implement '
+                 'the\n'
+                 '"__contains__()" method to allow efficient use of the "in" '
+                 'operator;\n'
+                 'for mappings, "in" should be equivalent of "has_key()"; '
+                 'for sequences,\n'
+                 'it should search through the values.  It is further '
+                 'recommended that\n'
+                 'both mappings and sequences implement the "__iter__()" '
+                 'method to allow\n'
+                 'efficient iteration through the container; for mappings, '
+                 '"__iter__()"\n'
+                 'should be the same as "iterkeys()"; for sequences, it '
+                 'should iterate\n'
+                 'through the values.\n'
+                 '\n'
+                 'object.__len__(self)\n'
+                 '\n'
+                 '   Called to implement the built-in function "len()".  '
+                 'Should return\n'
+                 '   the length of the object, an integer ">=" 0.  Also, an '
+                 'object that\n'
+                 '   doesn\'t define a "__nonzero__()" method and whose '
+                 '"__len__()"\n'
+                 '   method returns zero is considered to be false in a '
+                 'Boolean context.\n'
+                 '\n'
+                 'object.__getitem__(self, key)\n'
+                 '\n'
+                 '   Called to implement evaluation of "self[key]". For '
+                 'sequence types,\n'
+                 '   the accepted keys should be integers and slice '
+                 'objects.  Note that\n'
+                 '   the special interpretation of negative indexes (if the '
+                 'class wishes\n'
+                 '   to emulate a sequence type) is up to the '
+                 '"__getitem__()" method. If\n'
+                 '   *key* is of an inappropriate type, "TypeError" may be '
+                 'raised; if of\n'
+                 '   a value outside the set of indexes for the sequence '
+                 '(after any\n'
+                 '   special interpretation of negative values), '
+                 '"IndexError" should be\n'
+                 '   raised. For mapping types, if *key* is missing (not in '
+                 'the\n'
+                 '   container), "KeyError" should be raised.\n'
+                 '\n'
+                 '   Note: "for" loops expect that an "IndexError" will be '
+                 'raised for\n'
+                 '     illegal indexes to allow proper detection of the end '
+                 'of the\n'
+                 '     sequence.\n'
+                 '\n'
+                 'object.__missing__(self, key)\n'
+                 '\n'
+                 '   Called by "dict"."__getitem__()" to implement '
+                 '"self[key]" for dict\n'
+                 '   subclasses when key is not in the dictionary.\n'
+                 '\n'
+                 'object.__setitem__(self, key, value)\n'
+                 '\n'
+                 '   Called to implement assignment to "self[key]".  Same '
+                 'note as for\n'
+                 '   "__getitem__()".  This should only be implemented for '
+                 'mappings if\n'
+                 '   the objects support changes to the values for keys, or '
+                 'if new keys\n'
+                 '   can be added, or for sequences if elements can be '
+                 'replaced.  The\n'
+                 '   same exceptions should be raised for improper *key* '
+                 'values as for\n'
+                 '   the "__getitem__()" method.\n'
+                 '\n'
+                 'object.__delitem__(self, key)\n'
+                 '\n'
+                 '   Called to implement deletion of "self[key]".  Same note '
+                 'as for\n'
+                 '   "__getitem__()".  This should only be implemented for '
+                 'mappings if\n'
+                 '   the objects support removal of keys, or for sequences '
+                 'if elements\n'
+                 '   can be removed from the sequence.  The same exceptions '
+                 'should be\n'
+                 '   raised for improper *key* values as for the '
+                 '"__getitem__()" method.\n'
+                 '\n'
+                 'object.__iter__(self)\n'
+                 '\n'
+                 '   This method is called when an iterator is required for '
+                 'a container.\n'
+                 '   This method should return a new iterator object that '
+                 'can iterate\n'
+                 '   over all the objects in the container.  For mappings, '
+                 'it should\n'
+                 '   iterate over the keys of the container, and should also '
+                 'be made\n'
+                 '   available as the method "iterkeys()".\n'
+                 '\n'
+                 '   Iterator objects also need to implement this method; '
+                 'they are\n'
+                 '   required to return themselves.  For more information on '
+                 'iterator\n'
+                 '   objects, see Iterator Types.\n'
+                 '\n'
+                 'object.__reversed__(self)\n'
+                 '\n'
+                 '   Called (if present) by the "reversed()" built-in to '
+                 'implement\n'
+                 '   reverse iteration.  It should return a new iterator '
+                 'object that\n'
+                 '   iterates over all the objects in the container in '
+                 'reverse order.\n'
+                 '\n'
+                 '   If the "__reversed__()" method is not provided, the '
+                 '"reversed()"\n'
+                 '   built-in will fall back to using the sequence protocol '
+                 '("__len__()"\n'
+                 '   and "__getitem__()").  Objects that support the '
+                 'sequence protocol\n'
+                 '   should only provide "__reversed__()" if they can '
+                 'provide an\n'
+                 '   implementation that is more efficient than the one '
+                 'provided by\n'
+                 '   "reversed()".\n'
+                 '\n'
+                 '   New in version 2.6.\n'
+                 '\n'
+                 'The membership test operators ("in" and "not in") are '
+                 'normally\n'
+                 'implemented as an iteration through a sequence.  However, '
+                 'container\n'
+                 'objects can supply the following special method with a '
+                 'more efficient\n'
+                 'implementation, which also does not require the object be '
+                 'a sequence.\n'
+                 '\n'
+                 'object.__contains__(self, item)\n'
+                 '\n'
+                 '   Called to implement membership test operators.  Should '
+                 'return true\n'
+                 '   if *item* is in *self*, false otherwise.  For mapping '
+                 'objects, this\n'
+                 '   should consider the keys of the mapping rather than the '
+                 'values or\n'
+                 '   the key-item pairs.\n'
+                 '\n'
+                 '   For objects that don\'t define "__contains__()", the '
+                 'membership test\n'
+                 '   first tries iteration via "__iter__()", then the old '
+                 'sequence\n'
+                 '   iteration protocol via "__getitem__()", see this '
+                 'section in the\n'
+                 '   language reference.\n'
+                 '\n'
+                 '\n'
+                 'Additional methods for emulation of sequence types\n'
+                 '==================================================\n'
+                 '\n'
+                 'The following optional methods can be defined to further '
+                 'emulate\n'
+                 'sequence objects.  Immutable sequences methods should at '
+                 'most only\n'
+                 'define "__getslice__()"; mutable sequences might define '
+                 'all three\n'
+                 'methods.\n'
+                 '\n'
+                 'object.__getslice__(self, i, j)\n'
+                 '\n'
+                 '   Deprecated since version 2.0: Support slice objects as '
+                 'parameters\n'
+                 '   to the "__getitem__()" method. (However, built-in types '
+                 'in CPython\n'
+                 '   currently still implement "__getslice__()".  Therefore, '
+                 'you have to\n'
+                 '   override it in derived classes when implementing '
+                 'slicing.)\n'
+                 '\n'
+                 '   Called to implement evaluation of "self[i:j]". The '
+                 'returned object\n'
+                 '   should be of the same type as *self*.  Note that '
+                 'missing *i* or *j*\n'
+                 '   in the slice expression are replaced by zero or '
+                 '"sys.maxsize",\n'
+                 '   respectively.  If negative indexes are used in the '
+                 'slice, the\n'
+                 '   length of the sequence is added to that index. If the '
+                 'instance does\n'
+                 '   not implement the "__len__()" method, an '
+                 '"AttributeError" is\n'
+                 '   raised. No guarantee is made that indexes adjusted this '
+                 'way are not\n'
+                 '   still negative.  Indexes which are greater than the '
+                 'length of the\n'
+                 '   sequence are not modified. If no "__getslice__()" is '
+                 'found, a slice\n'
+                 '   object is created instead, and passed to '
+                 '"__getitem__()" instead.\n'
+                 '\n'
+                 'object.__setslice__(self, i, j, sequence)\n'
+                 '\n'
+                 '   Called to implement assignment to "self[i:j]". Same '
+                 'notes for *i*\n'
+                 '   and *j* as for "__getslice__()".\n'
+                 '\n'
+                 '   This method is deprecated. If no "__setslice__()" is '
+                 'found, or for\n'
+                 '   extended slicing of the form "self[i:j:k]", a slice '
+                 'object is\n'
+                 '   created, and passed to "__setitem__()", instead of '
+                 '"__setslice__()"\n'
+                 '   being called.\n'
+                 '\n'
+                 'object.__delslice__(self, i, j)\n'
+                 '\n'
+                 '   Called to implement deletion of "self[i:j]". Same notes '
+                 'for *i* and\n'
+                 '   *j* as for "__getslice__()". This method is deprecated. '
+                 'If no\n'
+                 '   "__delslice__()" is found, or for extended slicing of '
+                 'the form\n'
+                 '   "self[i:j:k]", a slice object is created, and passed '
+                 'to\n'
+                 '   "__delitem__()", instead of "__delslice__()" being '
+                 'called.\n'
+                 '\n'
+                 'Notice that these methods are only invoked when a single '
+                 'slice with a\n'
+                 'single colon is used, and the slice method is available.  '
+                 'For slice\n'
+                 'operations involving extended slice notation, or in '
+                 'absence of the\n'
+                 'slice methods, "__getitem__()", "__setitem__()" or '
+                 '"__delitem__()" is\n'
+                 'called with a slice object as argument.\n'
+                 '\n'
+                 'The following example demonstrate how to make your program '
+                 'or module\n'
+                 'compatible with earlier versions of Python (assuming that '
+                 'methods\n'
+                 '"__getitem__()", "__setitem__()" and "__delitem__()" '
+                 'support slice\n'
+                 'objects as arguments):\n'
+                 '\n'
+                 '   class MyClass:\n'
+                 '       ...\n'
+                 '       def __getitem__(self, index):\n'
+                 '           ...\n'
+                 '       def __setitem__(self, index, value):\n'
+                 '           ...\n'
+                 '       def __delitem__(self, index):\n'
+                 '           ...\n'
+                 '\n'
+                 '       if sys.version_info < (2, 0):\n'
+                 "           # They won't be defined if version is at least "
+                 '2.0 final\n'
+                 '\n'
+                 '           def __getslice__(self, i, j):\n'
+                 '               return self[max(0, i):max(0, j):]\n'
+                 '           def __setslice__(self, i, j, seq):\n'
+                 '               self[max(0, i):max(0, j):] = seq\n'
+                 '           def __delslice__(self, i, j):\n'
+                 '               del self[max(0, i):max(0, j):]\n'
+                 '       ...\n'
+                 '\n'
+                 'Note the calls to "max()"; these are necessary because of '
+                 'the handling\n'
+                 'of negative indices before the "__*slice__()" methods are '
+                 'called.\n'
+                 'When negative indexes are used, the "__*item__()" methods '
+                 'receive them\n'
+                 'as provided, but the "__*slice__()" methods get a "cooked" '
+                 'form of the\n'
+                 'index values.  For each negative index value, the length '
+                 'of the\n'
+                 'sequence is added to the index before calling the method '
+                 '(which may\n'
+                 'still result in a negative index); this is the customary '
+                 'handling of\n'
+                 'negative indexes by the built-in sequence types, and the '
+                 '"__*item__()"\n'
+                 'methods are expected to do this as well.  However, since '
+                 'they should\n'
+                 'already be doing that, negative indexes cannot be passed '
+                 'in; they must\n'
+                 'be constrained to the bounds of the sequence before being '
+                 'passed to\n'
+                 'the "__*item__()" methods. Calling "max(0, i)" '
+                 'conveniently returns\n'
+                 'the proper value.\n'
+                 '\n'
+                 '\n'
+                 'Emulating numeric types\n'
+                 '=======================\n'
+                 '\n'
+                 'The following methods can be defined to emulate numeric '
+                 'objects.\n'
+                 'Methods corresponding to operations that are not supported '
+                 'by the\n'
+                 'particular kind of number implemented (e.g., bitwise '
+                 'operations for\n'
+                 'non-integral numbers) should be left undefined.\n'
+                 '\n'
+                 'object.__add__(self, other)\n'
+                 'object.__sub__(self, other)\n'
+                 'object.__mul__(self, other)\n'
+                 'object.__floordiv__(self, other)\n'
+                 'object.__mod__(self, other)\n'
+                 'object.__divmod__(self, other)\n'
+                 'object.__pow__(self, other[, modulo])\n'
+                 'object.__lshift__(self, other)\n'
+                 'object.__rshift__(self, other)\n'
+                 'object.__and__(self, other)\n'
+                 'object.__xor__(self, other)\n'
+                 'object.__or__(self, other)\n'
+                 '\n'
+                 '   These methods are called to implement the binary '
+                 'arithmetic\n'
+                 '   operations ("+", "-", "*", "//", "%", "divmod()", '
+                 '"pow()", "**",\n'
+                 '   "<<", ">>", "&", "^", "|").  For instance, to evaluate '
+                 'the\n'
+                 '   expression "x + y", where *x* is an instance of a class '
+                 'that has an\n'
+                 '   "__add__()" method, "x.__add__(y)" is called.  The '
+                 '"__divmod__()"\n'
+                 '   method should be the equivalent to using '
+                 '"__floordiv__()" and\n'
+                 '   "__mod__()"; it should not be related to '
+                 '"__truediv__()" (described\n'
+                 '   below).  Note that "__pow__()" should be defined to '
+                 'accept an\n'
+                 '   optional third argument if the ternary version of the '
+                 'built-in\n'
+                 '   "pow()" function is to be supported.\n'
+                 '\n'
+                 '   If one of those methods does not support the operation '
+                 'with the\n'
+                 '   supplied arguments, it should return "NotImplemented".\n'
+                 '\n'
+                 'object.__div__(self, other)\n'
+                 'object.__truediv__(self, other)\n'
+                 '\n'
+                 '   The division operator ("/") is implemented by these '
+                 'methods.  The\n'
+                 '   "__truediv__()" method is used when '
+                 '"__future__.division" is in\n'
+                 '   effect, otherwise "__div__()" is used.  If only one of '
+                 'these two\n'
+                 '   methods is defined, the object will not support '
+                 'division in the\n'
+                 '   alternate context; "TypeError" will be raised instead.\n'
+                 '\n'
+                 'object.__radd__(self, other)\n'
+                 'object.__rsub__(self, other)\n'
+                 'object.__rmul__(self, other)\n'
+                 'object.__rdiv__(self, other)\n'
+                 'object.__rtruediv__(self, other)\n'
+                 'object.__rfloordiv__(self, other)\n'
+                 'object.__rmod__(self, other)\n'
+                 'object.__rdivmod__(self, other)\n'
+                 'object.__rpow__(self, other)\n'
+                 'object.__rlshift__(self, other)\n'
+                 'object.__rrshift__(self, other)\n'
+                 'object.__rand__(self, other)\n'
+                 'object.__rxor__(self, other)\n'
+                 'object.__ror__(self, other)\n'
+                 '\n'
+                 '   These methods are called to implement the binary '
+                 'arithmetic\n'
+                 '   operations ("+", "-", "*", "/", "%", "divmod()", '
+                 '"pow()", "**",\n'
+                 '   "<<", ">>", "&", "^", "|") with reflected (swapped) '
+                 'operands.\n'
+                 '   These functions are only called if the left operand '
+                 'does not\n'
+                 '   support the corresponding operation and the operands '
+                 'are of\n'
+                 '   different types. [2] For instance, to evaluate the '
+                 'expression "x -\n'
+                 '   y", where *y* is an instance of a class that has an '
+                 '"__rsub__()"\n'
+                 '   method, "y.__rsub__(x)" is called if "x.__sub__(y)" '
+                 'returns\n'
+                 '   *NotImplemented*.\n'
+                 '\n'
+                 '   Note that ternary "pow()" will not try calling '
+                 '"__rpow__()" (the\n'
+                 '   coercion rules would become too complicated).\n'
+                 '\n'
+                 "   Note: If the right operand's type is a subclass of the "
+                 'left\n'
+                 "     operand's type and that subclass provides the "
+                 'reflected method\n'
+                 '     for the operation, this method will be called before '
+                 'the left\n'
+                 "     operand's non-reflected method.  This behavior allows "
+                 'subclasses\n'
+                 "     to override their ancestors' operations.\n"
+                 '\n'
+                 'object.__iadd__(self, other)\n'
+                 'object.__isub__(self, other)\n'
+                 'object.__imul__(self, other)\n'
+                 'object.__idiv__(self, other)\n'
+                 'object.__itruediv__(self, other)\n'
+                 'object.__ifloordiv__(self, other)\n'
+                 'object.__imod__(self, other)\n'
+                 'object.__ipow__(self, other[, modulo])\n'
+                 'object.__ilshift__(self, other)\n'
+                 'object.__irshift__(self, other)\n'
+                 'object.__iand__(self, other)\n'
+                 'object.__ixor__(self, other)\n'
+                 'object.__ior__(self, other)\n'
+                 '\n'
+                 '   These methods are called to implement the augmented '
+                 'arithmetic\n'
+                 '   assignments ("+=", "-=", "*=", "/=", "//=", "%=", '
+                 '"**=", "<<=",\n'
+                 '   ">>=", "&=", "^=", "|=").  These methods should attempt '
+                 'to do the\n'
+                 '   operation in-place (modifying *self*) and return the '
+                 'result (which\n'
+                 '   could be, but does not have to be, *self*).  If a '
+                 'specific method\n'
+                 '   is not defined, the augmented assignment falls back to '
+                 'the normal\n'
+                 '   methods.  For instance, to execute the statement "x += '
+                 'y", where\n'
+                 '   *x* is an instance of a class that has an "__iadd__()" '
+                 'method,\n'
+                 '   "x.__iadd__(y)" is called.  If *x* is an instance of a '
+                 'class that\n'
+                 '   does not define a "__iadd__()" method, "x.__add__(y)" '
+                 'and\n'
+                 '   "y.__radd__(x)" are considered, as with the evaluation '
+                 'of "x + y".\n'
+                 '\n'
+                 'object.__neg__(self)\n'
+                 'object.__pos__(self)\n'
+                 'object.__abs__(self)\n'
+                 'object.__invert__(self)\n'
+                 '\n'
+                 '   Called to implement the unary arithmetic operations '
+                 '("-", "+",\n'
+                 '   "abs()" and "~").\n'
+                 '\n'
+                 'object.__complex__(self)\n'
+                 'object.__int__(self)\n'
+                 'object.__long__(self)\n'
+                 'object.__float__(self)\n'
+                 '\n'
+                 '   Called to implement the built-in functions "complex()", '
+                 '"int()",\n'
+                 '   "long()", and "float()".  Should return a value of the '
+                 'appropriate\n'
+                 '   type.\n'
+                 '\n'
+                 'object.__oct__(self)\n'
+                 'object.__hex__(self)\n'
+                 '\n'
+                 '   Called to implement the built-in functions "oct()" and '
+                 '"hex()".\n'
+                 '   Should return a string value.\n'
+                 '\n'
+                 'object.__index__(self)\n'
+                 '\n'
+                 '   Called to implement "operator.index()".  Also called '
+                 'whenever\n'
+                 '   Python needs an integer object (such as in slicing).  '
+                 'Must return\n'
+                 '   an integer (int or long).\n'
+                 '\n'
+                 '   New in version 2.5.\n'
+                 '\n'
+                 'object.__coerce__(self, other)\n'
+                 '\n'
+                 '   Called to implement "mixed-mode" numeric arithmetic.  '
+                 'Should either\n'
+                 '   return a 2-tuple containing *self* and *other* '
+                 'converted to a\n'
+                 '   common numeric type, or "None" if conversion is '
+                 'impossible.  When\n'
+                 '   the common type would be the type of "other", it is '
+                 'sufficient to\n'
+                 '   return "None", since the interpreter will also ask the '
+                 'other object\n'
+                 '   to attempt a coercion (but sometimes, if the '
+                 'implementation of the\n'
+                 '   other type cannot be changed, it is useful to do the '
+                 'conversion to\n'
+                 '   the other type here).  A return value of '
+                 '"NotImplemented" is\n'
+                 '   equivalent to returning "None".\n'
+                 '\n'
+                 '\n'
+                 'Coercion rules\n'
+                 '==============\n'
+                 '\n'
+                 'This section used to document the rules for coercion.  As '
+                 'the language\n'
+                 'has evolved, the coercion rules have become hard to '
+                 'document\n'
+                 'precisely; documenting what one version of one particular\n'
+                 'implementation does is undesirable.  Instead, here are '
+                 'some informal\n'
+                 'guidelines regarding coercion.  In Python 3, coercion will '
+                 'not be\n'
+                 'supported.\n'
+                 '\n'
+                 '* If the left operand of a % operator is a string or '
+                 'Unicode object,\n'
+                 '  no coercion takes place and the string formatting '
+                 'operation is\n'
+                 '  invoked instead.\n'
+                 '\n'
+                 '* It is no longer recommended to define a coercion '
+                 'operation. Mixed-\n'
+                 "  mode operations on types that don't define coercion pass "
+                 'the\n'
+                 '  original arguments to the operation.\n'
+                 '\n'
+                 '* New-style classes (those derived from "object") never '
+                 'invoke the\n'
+                 '  "__coerce__()" method in response to a binary operator; '
+                 'the only\n'
+                 '  time "__coerce__()" is invoked is when the built-in '
+                 'function\n'
+                 '  "coerce()" is called.\n'
+                 '\n'
+                 '* For most intents and purposes, an operator that returns\n'
+                 '  "NotImplemented" is treated the same as one that is not '
+                 'implemented\n'
+                 '  at all.\n'
+                 '\n'
+                 '* Below, "__op__()" and "__rop__()" are used to signify '
+                 'the generic\n'
+                 '  method names corresponding to an operator; "__iop__()" '
+                 'is used for\n'
+                 '  the corresponding in-place operator.  For example, for '
+                 'the operator\n'
+                 '  \'"+"\', "__add__()" and "__radd__()" are used for the '
+                 'left and right\n'
+                 '  variant of the binary operator, and "__iadd__()" for the '
+                 'in-place\n'
+                 '  variant.\n'
+                 '\n'
+                 '* For objects *x* and *y*, first "x.__op__(y)" is tried.  '
+                 'If this is\n'
+                 '  not implemented or returns "NotImplemented", '
+                 '"y.__rop__(x)" is\n'
+                 '  tried.  If this is also not implemented or returns '
+                 '"NotImplemented",\n'
+                 '  a "TypeError" exception is raised.  But see the '
+                 'following exception:\n'
+                 '\n'
+                 '* Exception to the previous item: if the left operand is '
+                 'an instance\n'
+                 '  of a built-in type or a new-style class, and the right '
+                 'operand is an\n'
+                 '  instance of a proper subclass of that type or class and '
+                 'overrides\n'
+                 '  the base\'s "__rop__()" method, the right operand\'s '
+                 '"__rop__()"\n'
+                 '  method is tried *before* the left operand\'s "__op__()" '
+                 'method.\n'
+                 '\n'
+                 '  This is done so that a subclass can completely override '
+                 'binary\n'
+                 '  operators. Otherwise, the left operand\'s "__op__()" '
+                 'method would\n'
+                 '  always accept the right operand: when an instance of a '
+                 'given class\n'
+                 '  is expected, an instance of a subclass of that class is '
+                 'always\n'
+                 '  acceptable.\n'
+                 '\n'
+                 '* When either operand type defines a coercion, this '
+                 'coercion is\n'
+                 '  called before that type\'s "__op__()" or "__rop__()" '
+                 'method is\n'
+                 '  called, but no sooner.  If the coercion returns an '
+                 'object of a\n'
+                 '  different type for the operand whose coercion is '
+                 'invoked, part of\n'
+                 '  the process is redone using the new object.\n'
+                 '\n'
+                 '* When an in-place operator (like \'"+="\') is used, if '
+                 'the left\n'
+                 '  operand implements "__iop__()", it is invoked without '
+                 'any coercion.\n'
+                 '  When the operation falls back to "__op__()" and/or '
+                 '"__rop__()", the\n'
+                 '  normal coercion rules apply.\n'
+                 '\n'
+                 '* In "x + y", if *x* is a sequence that implements '
+                 'sequence\n'
+                 '  concatenation, sequence concatenation is invoked.\n'
+                 '\n'
+                 '* In "x * y", if one operand is a sequence that implements '
+                 'sequence\n'
+                 '  repetition, and the other is an integer ("int" or '
+                 '"long"), sequence\n'
+                 '  repetition is invoked.\n'
+                 '\n'
+                 '* Rich comparisons (implemented by methods "__eq__()" and '
+                 'so on)\n'
+                 '  never use coercion.  Three-way comparison (implemented '
+                 'by\n'
+                 '  "__cmp__()") does use coercion under the same conditions '
+                 'as other\n'
+                 '  binary operations use it.\n'
+                 '\n'
+                 '* In the current implementation, the built-in numeric '
+                 'types "int",\n'
+                 '  "long", "float", and "complex" do not use coercion. All '
+                 'these types\n'
+                 '  implement a "__coerce__()" method, for use by the '
+                 'built-in\n'
+                 '  "coerce()" function.\n'
+                 '\n'
+                 '  Changed in version 2.7: The complex type no longer makes '
+                 'implicit\n'
+                 '  calls to the "__coerce__()" method for mixed-type binary '
+                 'arithmetic\n'
+                 '  operations.\n'
+                 '\n'
+                 '\n'
+                 'With Statement Context Managers\n'
+                 '===============================\n'
+                 '\n'
+                 'New in version 2.5.\n'
+                 '\n'
+                 'A *context manager* is an object that defines the runtime '
+                 'context to\n'
+                 'be established when executing a "with" statement. The '
+                 'context manager\n'
+                 'handles the entry into, and the exit from, the desired '
+                 'runtime context\n'
+                 'for the execution of the block of code.  Context managers '
+                 'are normally\n'
+                 'invoked using the "with" statement (described in section '
+                 'The with\n'
+                 'statement), but can also be used by directly invoking '
+                 'their methods.\n'
+                 '\n'
+                 'Typical uses of context managers include saving and '
+                 'restoring various\n'
+                 'kinds of global state, locking and unlocking resources, '
+                 'closing opened\n'
+                 'files, etc.\n'
+                 '\n'
+                 'For more information on context managers, see Context '
+                 'Manager Types.\n'
+                 '\n'
+                 'object.__enter__(self)\n'
+                 '\n'
+                 '   Enter the runtime context related to this object. The '
+                 '"with"\n'
+                 "   statement will bind this method's return value to the "
+                 'target(s)\n'
+                 '   specified in the "as" clause of the statement, if any.\n'
+                 '\n'
+                 'object.__exit__(self, exc_type, exc_value, traceback)\n'
+                 '\n'
+                 '   Exit the runtime context related to this object. The '
+                 'parameters\n'
+                 '   describe the exception that caused the context to be '
+                 'exited. If the\n'
+                 '   context was exited without an exception, all three '
+                 'arguments will\n'
+                 '   be "None".\n'
+                 '\n'
+                 '   If an exception is supplied, and the method wishes to '
+                 'suppress the\n'
+                 '   exception (i.e., prevent it from being propagated), it '
+                 'should\n'
+                 '   return a true value. Otherwise, the exception will be '
+                 'processed\n'
+                 '   normally upon exit from this method.\n'
+                 '\n'
+                 '   Note that "__exit__()" methods should not reraise the '
+                 'passed-in\n'
+                 "   exception; this is the caller's responsibility.\n"
+                 '\n'
+                 'See also: **PEP 0343** - The "with" statement\n'
+                 '\n'
+                 '     The specification, background, and examples for the '
+                 'Python "with"\n'
+                 '     statement.\n'
+                 '\n'
+                 '\n'
+                 'Special method lookup for old-style classes\n'
+                 '===========================================\n'
+                 '\n'
+                 'For old-style classes, special methods are always looked '
+                 'up in exactly\n'
+                 'the same way as any other method or attribute. This is the '
+                 'case\n'
+                 'regardless of whether the method is being looked up '
+                 'explicitly as in\n'
+                 '"x.__getitem__(i)" or implicitly as in "x[i]".\n'
+                 '\n'
+                 'This behaviour means that special methods may exhibit '
+                 'different\n'
+                 'behaviour for different instances of a single old-style '
+                 'class if the\n'
+                 'appropriate special attributes are set differently:\n'
+                 '\n'
+                 '   >>> class C:\n'
+                 '   ...     pass\n'
+                 '   ...\n'
+                 '   >>> c1 = C()\n'
+                 '   >>> c2 = C()\n'
+                 '   >>> c1.__len__ = lambda: 5\n'
+                 '   >>> c2.__len__ = lambda: 9\n'
+                 '   >>> len(c1)\n'
+                 '   5\n'
+                 '   >>> len(c2)\n'
+                 '   9\n'
+                 '\n'
+                 '\n'
+                 'Special method lookup for new-style classes\n'
+                 '===========================================\n'
+                 '\n'
+                 'For new-style classes, implicit invocations of special '
+                 'methods are\n'
+                 'only guaranteed to work correctly if defined on an '
+                 "object's type, not\n"
+                 "in the object's instance dictionary.  That behaviour is "
+                 'the reason why\n'
+                 'the following code raises an exception (unlike the '
+                 'equivalent example\n'
+                 'with old-style classes):\n'
+                 '\n'
+                 '   >>> class C(object):\n'
+                 '   ...     pass\n'
+                 '   ...\n'
+                 '   >>> c = C()\n'
+                 '   >>> c.__len__ = lambda: 5\n'
+                 '   >>> len(c)\n'
+                 '   Traceback (most recent call last):\n'
+                 '     File "<stdin>", line 1, in <module>\n'
+                 "   TypeError: object of type 'C' has no len()\n"
+                 '\n'
+                 'The rationale behind this behaviour lies with a number of '
+                 'special\n'
+                 'methods such as "__hash__()" and "__repr__()" that are '
+                 'implemented by\n'
+                 'all objects, including type objects. If the implicit '
+                 'lookup of these\n'
+                 'methods used the conventional lookup process, they would '
+                 'fail when\n'
+                 'invoked on the type object itself:\n'
+                 '\n'
+                 '   >>> 1 .__hash__() == hash(1)\n'
+                 '   True\n'
+                 '   >>> int.__hash__() == hash(int)\n'
+                 '   Traceback (most recent call last):\n'
+                 '     File "<stdin>", line 1, in <module>\n'
+                 "   TypeError: descriptor '__hash__' of 'int' object needs "
+                 'an argument\n'
+                 '\n'
+                 'Incorrectly attempting to invoke an unbound method of a '
+                 'class in this\n'
+                 "way is sometimes referred to as 'metaclass confusion', and "
+                 'is avoided\n'
+                 'by bypassing the instance when looking up special '
+                 'methods:\n'
+                 '\n'
+                 '   >>> type(1).__hash__(1) == hash(1)\n'
+                 '   True\n'
+                 '   >>> type(int).__hash__(int) == hash(int)\n'
+                 '   True\n'
+                 '\n'
+                 'In addition to bypassing any instance attributes in the '
+                 'interest of\n'
+                 'correctness, implicit special method lookup generally also '
+                 'bypasses\n'
+                 'the "__getattribute__()" method even of the object\'s '
+                 'metaclass:\n'
+                 '\n'
+                 '   >>> class Meta(type):\n'
+                 '   ...    def __getattribute__(*args):\n'
+                 '   ...       print "Metaclass getattribute invoked"\n'
+                 '   ...       return type.__getattribute__(*args)\n'
+                 '   ...\n'
+                 '   >>> class C(object):\n'
+                 '   ...     __metaclass__ = Meta\n'
+                 '   ...     def __len__(self):\n'
+                 '   ...         return 10\n'
+                 '   ...     def __getattribute__(*args):\n'
+                 '   ...         print "Class getattribute invoked"\n'
+                 '   ...         return object.__getattribute__(*args)\n'
+                 '   ...\n'
+                 '   >>> c = C()\n'
+                 '   >>> c.__len__()                 # Explicit lookup via '
+                 'instance\n'
+                 '   Class getattribute invoked\n'
+                 '   10\n'
+                 '   >>> type(c).__len__(c)          # Explicit lookup via '
+                 'type\n'
+                 '   Metaclass getattribute invoked\n'
+                 '   10\n'
+                 '   >>> len(c)                      # Implicit lookup\n'
+                 '   10\n'
+                 '\n'
+                 'Bypassing the "__getattribute__()" machinery in this '
+                 'fashion provides\n'
+                 'significant scope for speed optimisations within the '
+                 'interpreter, at\n'
+                 'the cost of some flexibility in the handling of special '
+                 'methods (the\n'
+                 'special method *must* be set on the class object itself in '
+                 'order to be\n'
+                 'consistently invoked by the interpreter).\n'
+                 '\n'
+                 '-[ Footnotes ]-\n'
+                 '\n'
+                 "[1] It *is* possible in some cases to change an object's "
+                 'type,\n'
+                 '    under certain controlled conditions. It generally '
+                 "isn't a good\n"
+                 '    idea though, since it can lead to some very strange '
+                 'behaviour if\n'
+                 '    it is handled incorrectly.\n'
+                 '\n'
+                 '[2] For operands of the same type, it is assumed that if '
+                 'the non-\n'
+                 '    reflected method (such as "__add__()") fails the '
+                 'operation is not\n'
+                 '    supported, which is why the reflected method is not '
+                 'called.\n',
+ 'string-methods': '\n'
+                   'String Methods\n'
+                   '**************\n'
+                   '\n'
+                   'Below are listed the string methods which both 8-bit '
+                   'strings and\n'
+                   'Unicode objects support.  Some of them are also '
+                   'available on\n'
+                   '"bytearray" objects.\n'
+                   '\n'
+                   "In addition, Python's strings support the sequence type "
+                   'methods\n'
+                   'described in the Sequence Types --- str, unicode, list, '
+                   'tuple,\n'
+                   'bytearray, buffer, xrange section. To output formatted '
+                   'strings use\n'
+                   'template strings or the "%" operator described in the '
+                   'String\n'
+                   'Formatting Operations section. Also, see the "re" module '
+                   'for string\n'
+                   'functions based on regular expressions.\n'
+                   '\n'
+                   'str.capitalize()\n'
+                   '\n'
+                   '   Return a copy of the string with its first character '
+                   'capitalized\n'
+                   '   and the rest lowercased.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.center(width[, fillchar])\n'
+                   '\n'
+                   '   Return centered in a string of length *width*. '
+                   'Padding is done\n'
+                   '   using the specified *fillchar* (default is a space).\n'
+                   '\n'
+                   '   Changed in version 2.4: Support for the *fillchar* '
+                   'argument.\n'
+                   '\n'
+                   'str.count(sub[, start[, end]])\n'
+                   '\n'
+                   '   Return the number of non-overlapping occurrences of '
+                   'substring *sub*\n'
+                   '   in the range [*start*, *end*].  Optional arguments '
+                   '*start* and\n'
+                   '   *end* are interpreted as in slice notation.\n'
+                   '\n'
+                   'str.decode([encoding[, errors]])\n'
+                   '\n'
+                   '   Decodes the string using the codec registered for '
+                   '*encoding*.\n'
+                   '   *encoding* defaults to the default string encoding.  '
+                   '*errors* may\n'
+                   '   be given to set a different error handling scheme.  '
+                   'The default is\n'
+                   '   "\'strict\'", meaning that encoding errors raise '
+                   '"UnicodeError".\n'
+                   '   Other possible values are "\'ignore\'", "\'replace\'" '
+                   'and any other\n'
+                   '   name registered via "codecs.register_error()", see '
+                   'section Codec\n'
+                   '   Base Classes.\n'
+                   '\n'
+                   '   New in version 2.2.\n'
+                   '\n'
+                   '   Changed in version 2.3: Support for other error '
+                   'handling schemes\n'
+                   '   added.\n'
+                   '\n'
+                   '   Changed in version 2.7: Support for keyword arguments '
+                   'added.\n'
+                   '\n'
+                   'str.encode([encoding[, errors]])\n'
+                   '\n'
+                   '   Return an encoded version of the string.  Default '
+                   'encoding is the\n'
+                   '   current default string encoding.  *errors* may be '
+                   'given to set a\n'
+                   '   different error handling scheme.  The default for '
+                   '*errors* is\n'
+                   '   "\'strict\'", meaning that encoding errors raise a '
+                   '"UnicodeError".\n'
+                   '   Other possible values are "\'ignore\'", '
+                   '"\'replace\'",\n'
+                   '   "\'xmlcharrefreplace\'", "\'backslashreplace\'" and '
+                   'any other name\n'
+                   '   registered via "codecs.register_error()", see section '
+                   'Codec Base\n'
+                   '   Classes. For a list of possible encodings, see '
+                   'section Standard\n'
+                   '   Encodings.\n'
+                   '\n'
+                   '   New in version 2.0.\n'
+                   '\n'
+                   '   Changed in version 2.3: Support for '
+                   '"\'xmlcharrefreplace\'" and\n'
+                   '   "\'backslashreplace\'" and other error handling '
+                   'schemes added.\n'
+                   '\n'
+                   '   Changed in version 2.7: Support for keyword arguments '
+                   'added.\n'
+                   '\n'
+                   'str.endswith(suffix[, start[, end]])\n'
+                   '\n'
+                   '   Return "True" if the string ends with the specified '
+                   '*suffix*,\n'
+                   '   otherwise return "False".  *suffix* can also be a '
+                   'tuple of suffixes\n'
+                   '   to look for.  With optional *start*, test beginning '
+                   'at that\n'
+                   '   position.  With optional *end*, stop comparing at '
+                   'that position.\n'
+                   '\n'
+                   '   Changed in version 2.5: Accept tuples as *suffix*.\n'
+                   '\n'
+                   'str.expandtabs([tabsize])\n'
+                   '\n'
+                   '   Return a copy of the string where all tab characters '
+                   'are replaced\n'
+                   '   by one or more spaces, depending on the current '
+                   'column and the\n'
+                   '   given tab size.  Tab positions occur every *tabsize* '
+                   'characters\n'
+                   '   (default is 8, giving tab positions at columns 0, 8, '
+                   '16 and so on).\n'
+                   '   To expand the string, the current column is set to '
+                   'zero and the\n'
+                   '   string is examined character by character.  If the '
+                   'character is a\n'
+                   '   tab ("\\t"), one or more space characters are '
+                   'inserted in the result\n'
+                   '   until the current column is equal to the next tab '
+                   'position. (The\n'
+                   '   tab character itself is not copied.)  If the '
+                   'character is a newline\n'
+                   '   ("\\n") or return ("\\r"), it is copied and the '
+                   'current column is\n'
+                   '   reset to zero.  Any other character is copied '
+                   'unchanged and the\n'
+                   '   current column is incremented by one regardless of '
+                   'how the\n'
+                   '   character is represented when printed.\n'
+                   '\n'
+                   "   >>> '01\\t012\\t0123\\t01234'.expandtabs()\n"
+                   "   '01      012     0123    01234'\n"
+                   "   >>> '01\\t012\\t0123\\t01234'.expandtabs(4)\n"
+                   "   '01  012 0123    01234'\n"
+                   '\n'
+                   'str.find(sub[, start[, end]])\n'
+                   '\n'
+                   '   Return the lowest index in the string where substring '
+                   '*sub* is\n'
+                   '   found, such that *sub* is contained in the slice '
+                   '"s[start:end]".\n'
+                   '   Optional arguments *start* and *end* are interpreted '
+                   'as in slice\n'
+                   '   notation.  Return "-1" if *sub* is not found.\n'
+                   '\n'
+                   '   Note: The "find()" method should be used only if you '
+                   'need to know\n'
+                   '     the position of *sub*.  To check if *sub* is a '
+                   'substring or not,\n'
+                   '     use the "in" operator:\n'
+                   '\n'
+                   "        >>> 'Py' in 'Python'\n"
+                   '        True\n'
+                   '\n'
+                   'str.format(*args, **kwargs)\n'
+                   '\n'
+                   '   Perform a string formatting operation.  The string on '
+                   'which this\n'
+                   '   method is called can contain literal text or '
+                   'replacement fields\n'
+                   '   delimited by braces "{}".  Each replacement field '
+                   'contains either\n'
+                   '   the numeric index of a positional argument, or the '
+                   'name of a\n'
+                   '   keyword argument.  Returns a copy of the string where '
+                   'each\n'
+                   '   replacement field is replaced with the string value '
+                   'of the\n'
+                   '   corresponding argument.\n'
+                   '\n'
+                   '   >>> "The sum of 1 + 2 is {0}".format(1+2)\n'
+                   "   'The sum of 1 + 2 is 3'\n"
+                   '\n'
+                   '   See Format String Syntax for a description of the '
+                   'various\n'
+                   '   formatting options that can be specified in format '
+                   'strings.\n'
+                   '\n'
+                   '   This method of string formatting is the new standard '
+                   'in Python 3,\n'
+                   '   and should be preferred to the "%" formatting '
+                   'described in String\n'
+                   '   Formatting Operations in new code.\n'
+                   '\n'
+                   '   New in version 2.6.\n'
+                   '\n'
+                   'str.index(sub[, start[, end]])\n'
+                   '\n'
+                   '   Like "find()", but raise "ValueError" when the '
+                   'substring is not\n'
+                   '   found.\n'
+                   '\n'
+                   'str.isalnum()\n'
+                   '\n'
+                   '   Return true if all characters in the string are '
+                   'alphanumeric and\n'
+                   '   there is at least one character, false otherwise.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.isalpha()\n'
+                   '\n'
+                   '   Return true if all characters in the string are '
+                   'alphabetic and\n'
+                   '   there is at least one character, false otherwise.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.isdigit()\n'
+                   '\n'
+                   '   Return true if all characters in the string are '
+                   'digits and there is\n'
+                   '   at least one character, false otherwise.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.islower()\n'
+                   '\n'
+                   '   Return true if all cased characters [4] in the string '
+                   'are lowercase\n'
+                   '   and there is at least one cased character, false '
+                   'otherwise.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.isspace()\n'
+                   '\n'
+                   '   Return true if there are only whitespace characters '
+                   'in the string\n'
+                   '   and there is at least one character, false '
+                   'otherwise.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.istitle()\n'
+                   '\n'
+                   '   Return true if the string is a titlecased string and '
+                   'there is at\n'
+                   '   least one character, for example uppercase characters '
+                   'may only\n'
+                   '   follow uncased characters and lowercase characters '
+                   'only cased ones.\n'
+                   '   Return false otherwise.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.isupper()\n'
+                   '\n'
+                   '   Return true if all cased characters [4] in the string '
+                   'are uppercase\n'
+                   '   and there is at least one cased character, false '
+                   'otherwise.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.join(iterable)\n'
+                   '\n'
+                   '   Return a string which is the concatenation of the '
+                   'strings in the\n'
+                   '   *iterable* *iterable*.  The separator between '
+                   'elements is the\n'
+                   '   string providing this method.\n'
+                   '\n'
+                   'str.ljust(width[, fillchar])\n'
+                   '\n'
+                   '   Return the string left justified in a string of '
+                   'length *width*.\n'
+                   '   Padding is done using the specified *fillchar* '
+                   '(default is a\n'
+                   '   space).  The original string is returned if *width* '
+                   'is less than or\n'
+                   '   equal to "len(s)".\n'
+                   '\n'
+                   '   Changed in version 2.4: Support for the *fillchar* '
+                   'argument.\n'
+                   '\n'
+                   'str.lower()\n'
+                   '\n'
+                   '   Return a copy of the string with all the cased '
+                   'characters [4]\n'
+                   '   converted to lowercase.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.lstrip([chars])\n'
+                   '\n'
+                   '   Return a copy of the string with leading characters '
+                   'removed.  The\n'
+                   '   *chars* argument is a string specifying the set of '
+                   'characters to be\n'
+                   '   removed.  If omitted or "None", the *chars* argument '
+                   'defaults to\n'
+                   '   removing whitespace.  The *chars* argument is not a '
+                   'prefix; rather,\n'
+                   '   all combinations of its values are stripped:\n'
+                   '\n'
+                   "   >>> '   spacious   '.lstrip()\n"
+                   "   'spacious   '\n"
+                   "   >>> 'www.example.com'.lstrip('cmowz.')\n"
+                   "   'example.com'\n"
+                   '\n'
+                   '   Changed in version 2.2.2: Support for the *chars* '
+                   'argument.\n'
+                   '\n'
+                   'str.partition(sep)\n'
+                   '\n'
+                   '   Split the string at the first occurrence of *sep*, '
+                   'and return a\n'
+                   '   3-tuple containing the part before the separator, the '
+                   'separator\n'
+                   '   itself, and the part after the separator.  If the '
+                   'separator is not\n'
+                   '   found, return a 3-tuple containing the string itself, '
+                   'followed by\n'
+                   '   two empty strings.\n'
+                   '\n'
+                   '   New in version 2.5.\n'
+                   '\n'
+                   'str.replace(old, new[, count])\n'
+                   '\n'
+                   '   Return a copy of the string with all occurrences of '
+                   'substring *old*\n'
+                   '   replaced by *new*.  If the optional argument *count* '
+                   'is given, only\n'
+                   '   the first *count* occurrences are replaced.\n'
+                   '\n'
+                   'str.rfind(sub[, start[, end]])\n'
+                   '\n'
+                   '   Return the highest index in the string where '
+                   'substring *sub* is\n'
+                   '   found, such that *sub* is contained within '
+                   '"s[start:end]".\n'
+                   '   Optional arguments *start* and *end* are interpreted '
+                   'as in slice\n'
+                   '   notation.  Return "-1" on failure.\n'
+                   '\n'
+                   'str.rindex(sub[, start[, end]])\n'
+                   '\n'
+                   '   Like "rfind()" but raises "ValueError" when the '
+                   'substring *sub* is\n'
+                   '   not found.\n'
+                   '\n'
+                   'str.rjust(width[, fillchar])\n'
+                   '\n'
+                   '   Return the string right justified in a string of '
+                   'length *width*.\n'
+                   '   Padding is done using the specified *fillchar* '
+                   '(default is a\n'
+                   '   space). The original string is returned if *width* is '
+                   'less than or\n'
+                   '   equal to "len(s)".\n'
+                   '\n'
+                   '   Changed in version 2.4: Support for the *fillchar* '
+                   'argument.\n'
+                   '\n'
+                   'str.rpartition(sep)\n'
+                   '\n'
+                   '   Split the string at the last occurrence of *sep*, and '
+                   'return a\n'
+                   '   3-tuple containing the part before the separator, the '
+                   'separator\n'
+                   '   itself, and the part after the separator.  If the '
+                   'separator is not\n'
+                   '   found, return a 3-tuple containing two empty strings, '
+                   'followed by\n'
+                   '   the string itself.\n'
+                   '\n'
+                   '   New in version 2.5.\n'
+                   '\n'
+                   'str.rsplit([sep[, maxsplit]])\n'
+                   '\n'
+                   '   Return a list of the words in the string, using *sep* '
+                   'as the\n'
+                   '   delimiter string. If *maxsplit* is given, at most '
+                   '*maxsplit* splits\n'
+                   '   are done, the *rightmost* ones.  If *sep* is not '
+                   'specified or\n'
+                   '   "None", any whitespace string is a separator.  Except '
+                   'for splitting\n'
+                   '   from the right, "rsplit()" behaves like "split()" '
+                   'which is\n'
+                   '   described in detail below.\n'
+                   '\n'
+                   '   New in version 2.4.\n'
+                   '\n'
+                   'str.rstrip([chars])\n'
+                   '\n'
+                   '   Return a copy of the string with trailing characters '
+                   'removed.  The\n'
+                   '   *chars* argument is a string specifying the set of '
+                   'characters to be\n'
+                   '   removed.  If omitted or "None", the *chars* argument '
+                   'defaults to\n'
+                   '   removing whitespace.  The *chars* argument is not a '
+                   'suffix; rather,\n'
+                   '   all combinations of its values are stripped:\n'
+                   '\n'
+                   "   >>> '   spacious   '.rstrip()\n"
+                   "   '   spacious'\n"
+                   "   >>> 'mississippi'.rstrip('ipz')\n"
+                   "   'mississ'\n"
+                   '\n'
+                   '   Changed in version 2.2.2: Support for the *chars* '
+                   'argument.\n'
+                   '\n'
+                   'str.split([sep[, maxsplit]])\n'
+                   '\n'
+                   '   Return a list of the words in the string, using *sep* '
+                   'as the\n'
+                   '   delimiter string.  If *maxsplit* is given, at most '
+                   '*maxsplit*\n'
+                   '   splits are done (thus, the list will have at most '
+                   '"maxsplit+1"\n'
+                   '   elements).  If *maxsplit* is not specified or "-1", '
+                   'then there is\n'
+                   '   no limit on the number of splits (all possible splits '
+                   'are made).\n'
+                   '\n'
+                   '   If *sep* is given, consecutive delimiters are not '
+                   'grouped together\n'
+                   '   and are deemed to delimit empty strings (for '
+                   'example,\n'
+                   '   "\'1,,2\'.split(\',\')" returns "[\'1\', \'\', '
+                   '\'2\']").  The *sep* argument\n'
+                   '   may consist of multiple characters (for example,\n'
+                   '   "\'1<>2<>3\'.split(\'<>\')" returns "[\'1\', \'2\', '
+                   '\'3\']"). Splitting an\n'
+                   '   empty string with a specified separator returns '
+                   '"[\'\']".\n'
+                   '\n'
+                   '   If *sep* is not specified or is "None", a different '
+                   'splitting\n'
+                   '   algorithm is applied: runs of consecutive whitespace '
+                   'are regarded\n'
+                   '   as a single separator, and the result will contain no '
+                   'empty strings\n'
+                   '   at the start or end if the string has leading or '
+                   'trailing\n'
+                   '   whitespace.  Consequently, splitting an empty string '
+                   'or a string\n'
+                   '   consisting of just whitespace with a "None" separator '
+                   'returns "[]".\n'
+                   '\n'
+                   '   For example, "\' 1  2   3  \'.split()" returns '
+                   '"[\'1\', \'2\', \'3\']", and\n'
+                   '   "\'  1  2   3  \'.split(None, 1)" returns "[\'1\', '
+                   '\'2   3  \']".\n'
+                   '\n'
+                   'str.splitlines([keepends])\n'
+                   '\n'
+                   '   Return a list of the lines in the string, breaking at '
+                   'line\n'
+                   '   boundaries. This method uses the *universal newlines* '
+                   'approach to\n'
+                   '   splitting lines. Line breaks are not included in the '
+                   'resulting list\n'
+                   '   unless *keepends* is given and true.\n'
+                   '\n'
+                   '   For example, "\'ab c\\n\\nde '
+                   'fg\\rkl\\r\\n\'.splitlines()" returns "[\'ab\n'
+                   '   c\', \'\', \'de fg\', \'kl\']", while the same call '
+                   'with\n'
+                   '   "splitlines(True)" returns "[\'ab c\\n\', \'\\n\', '
+                   '\'de fg\\r\', \'kl\\r\\n\']".\n'
+                   '\n'
+                   '   Unlike "split()" when a delimiter string *sep* is '
+                   'given, this\n'
+                   '   method returns an empty list for the empty string, '
+                   'and a terminal\n'
+                   '   line break does not result in an extra line.\n'
+                   '\n'
+                   'str.startswith(prefix[, start[, end]])\n'
+                   '\n'
+                   '   Return "True" if string starts with the *prefix*, '
+                   'otherwise return\n'
+                   '   "False". *prefix* can also be a tuple of prefixes to '
+                   'look for.\n'
+                   '   With optional *start*, test string beginning at that '
+                   'position.\n'
+                   '   With optional *end*, stop comparing string at that '
+                   'position.\n'
+                   '\n'
+                   '   Changed in version 2.5: Accept tuples as *prefix*.\n'
+                   '\n'
+                   'str.strip([chars])\n'
+                   '\n'
+                   '   Return a copy of the string with the leading and '
+                   'trailing\n'
+                   '   characters removed. The *chars* argument is a string '
+                   'specifying the\n'
+                   '   set of characters to be removed. If omitted or '
+                   '"None", the *chars*\n'
+                   '   argument defaults to removing whitespace. The *chars* '
+                   'argument is\n'
+                   '   not a prefix or suffix; rather, all combinations of '
+                   'its values are\n'
+                   '   stripped:\n'
+                   '\n'
+                   "   >>> '   spacious   '.strip()\n"
+                   "   'spacious'\n"
+                   "   >>> 'www.example.com'.strip('cmowz.')\n"
+                   "   'example'\n"
+                   '\n'
+                   '   Changed in version 2.2.2: Support for the *chars* '
+                   'argument.\n'
+                   '\n'
+                   'str.swapcase()\n'
+                   '\n'
+                   '   Return a copy of the string with uppercase characters '
+                   'converted to\n'
+                   '   lowercase and vice versa.\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.title()\n'
+                   '\n'
+                   '   Return a titlecased version of the string where words '
+                   'start with an\n'
+                   '   uppercase character and the remaining characters are '
+                   'lowercase.\n'
+                   '\n'
+                   '   The algorithm uses a simple language-independent '
+                   'definition of a\n'
+                   '   word as groups of consecutive letters.  The '
+                   'definition works in\n'
+                   '   many contexts but it means that apostrophes in '
+                   'contractions and\n'
+                   '   possessives form word boundaries, which may not be '
+                   'the desired\n'
+                   '   result:\n'
+                   '\n'
+                   '      >>> "they\'re bill\'s friends from the '
+                   'UK".title()\n'
+                   '      "They\'Re Bill\'S Friends From The Uk"\n'
+                   '\n'
+                   '   A workaround for apostrophes can be constructed using '
+                   'regular\n'
+                   '   expressions:\n'
+                   '\n'
+                   '      >>> import re\n'
+                   '      >>> def titlecase(s):\n'
+                   '      ...     return re.sub(r"[A-Za-z]+(\'[A-Za-z]+)?",\n'
+                   '      ...                   lambda mo: '
+                   'mo.group(0)[0].upper() +\n'
+                   '      ...                              '
+                   'mo.group(0)[1:].lower(),\n'
+                   '      ...                   s)\n'
+                   '      ...\n'
+                   '      >>> titlecase("they\'re bill\'s friends.")\n'
+                   '      "They\'re Bill\'s Friends."\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.translate(table[, deletechars])\n'
+                   '\n'
+                   '   Return a copy of the string where all characters '
+                   'occurring in the\n'
+                   '   optional argument *deletechars* are removed, and the '
+                   'remaining\n'
+                   '   characters have been mapped through the given '
+                   'translation table,\n'
+                   '   which must be a string of length 256.\n'
+                   '\n'
+                   '   You can use the "maketrans()" helper function in the '
+                   '"string"\n'
+                   '   module to create a translation table. For string '
+                   'objects, set the\n'
+                   '   *table* argument to "None" for translations that only '
+                   'delete\n'
+                   '   characters:\n'
+                   '\n'
+                   "   >>> 'read this short text'.translate(None, 'aeiou')\n"
+                   "   'rd ths shrt txt'\n"
+                   '\n'
+                   '   New in version 2.6: Support for a "None" *table* '
+                   'argument.\n'
+                   '\n'
+                   '   For Unicode objects, the "translate()" method does '
+                   'not accept the\n'
+                   '   optional *deletechars* argument.  Instead, it returns '
+                   'a copy of the\n'
+                   '   *s* where all characters have been mapped through the '
+                   'given\n'
+                   '   translation table which must be a mapping of Unicode '
+                   'ordinals to\n'
+                   '   Unicode ordinals, Unicode strings or "None". Unmapped '
+                   'characters\n'
+                   '   are left untouched. Characters mapped to "None" are '
+                   'deleted.  Note,\n'
+                   '   a more flexible approach is to create a custom '
+                   'character mapping\n'
+                   '   codec using the "codecs" module (see '
+                   '"encodings.cp1251" for an\n'
+                   '   example).\n'
+                   '\n'
+                   'str.upper()\n'
+                   '\n'
+                   '   Return a copy of the string with all the cased '
+                   'characters [4]\n'
+                   '   converted to uppercase.  Note that '
+                   '"str.upper().isupper()" might be\n'
+                   '   "False" if "s" contains uncased characters or if the '
+                   'Unicode\n'
+                   '   category of the resulting character(s) is not "Lu" '
+                   '(Letter,\n'
+                   '   uppercase), but e.g. "Lt" (Letter, titlecase).\n'
+                   '\n'
+                   '   For 8-bit strings, this method is locale-dependent.\n'
+                   '\n'
+                   'str.zfill(width)\n'
+                   '\n'
+                   '   Return the numeric string left filled with zeros in a '
+                   'string of\n'
+                   '   length *width*.  A sign prefix is handled correctly.  '
+                   'The original\n'
+                   '   string is returned if *width* is less than or equal '
+                   'to "len(s)".\n'
+                   '\n'
+                   '   New in version 2.2.2.\n'
+                   '\n'
+                   'The following methods are present only on unicode '
+                   'objects:\n'
+                   '\n'
+                   'unicode.isnumeric()\n'
+                   '\n'
+                   '   Return "True" if there are only numeric characters in '
+                   'S, "False"\n'
+                   '   otherwise. Numeric characters include digit '
+                   'characters, and all\n'
+                   '   characters that have the Unicode numeric value '
+                   'property, e.g.\n'
+                   '   U+2155, VULGAR FRACTION ONE FIFTH.\n'
+                   '\n'
+                   'unicode.isdecimal()\n'
+                   '\n'
+                   '   Return "True" if there are only decimal characters in '
+                   'S, "False"\n'
+                   '   otherwise. Decimal characters include digit '
+                   'characters, and all\n'
+                   '   characters that can be used to form decimal-radix '
+                   'numbers, e.g.\n'
+                   '   U+0660, ARABIC-INDIC DIGIT ZERO.\n',
+ 'strings': '\n'
+            'String literals\n'
+            '***************\n'
+            '\n'
+            'String literals are described by the following lexical '
+            'definitions:\n'
+            '\n'
+            '   stringliteral   ::= [stringprefix](shortstring | '
+            'longstring)\n'
+            '   stringprefix    ::= "r" | "u" | "ur" | "R" | "U" | "UR" | '
+            '"Ur" | "uR"\n'
+            '                    | "b" | "B" | "br" | "Br" | "bR" | "BR"\n'
+            '   shortstring     ::= "\'" shortstringitem* "\'" | \'"\' '
+            'shortstringitem* \'"\'\n'
+            '   longstring      ::= "\'\'\'" longstringitem* "\'\'\'"\n'
+            '                  | \'"""\' longstringitem* \'"""\'\n'
+            '   shortstringitem ::= shortstringchar | escapeseq\n'
+            '   longstringitem  ::= longstringchar | escapeseq\n'
+            '   shortstringchar ::= <any source character except "\\" or '
+            'newline or the quote>\n'
+            '   longstringchar  ::= <any source character except "\\">\n'
+            '   escapeseq       ::= "\\" <any ASCII character>\n'
+            '\n'
+            'One syntactic restriction not indicated by these productions is '
+            'that\n'
+            'whitespace is not allowed between the "stringprefix" and the '
+            'rest of\n'
+            'the string literal. The source character set is defined by the\n'
+            'encoding declaration; it is ASCII if no encoding declaration is '
+            'given\n'
+            'in the source file; see section Encoding declarations.\n'
+            '\n'
+            'In plain English: String literals can be enclosed in matching '
+            'single\n'
+            'quotes ("\'") or double quotes (""").  They can also be '
+            'enclosed in\n'
+            'matching groups of three single or double quotes (these are '
+            'generally\n'
+            'referred to as *triple-quoted strings*).  The backslash ("\\")\n'
+            'character is used to escape characters that otherwise have a '
+            'special\n'
+            'meaning, such as newline, backslash itself, or the quote '
+            'character.\n'
+            'String literals may optionally be prefixed with a letter '
+            '"\'r\'" or\n'
+            '"\'R\'"; such strings are called *raw strings* and use '
+            'different rules\n'
+            'for interpreting backslash escape sequences.  A prefix of '
+            '"\'u\'" or\n'
+            '"\'U\'" makes the string a Unicode string.  Unicode strings use '
+            'the\n'
+            'Unicode character set as defined by the Unicode Consortium and '
+            'ISO\n'
+            '10646.  Some additional escape sequences, described below, are\n'
+            'available in Unicode strings. A prefix of "\'b\'" or "\'B\'" is '
+            'ignored in\n'
+            'Python 2; it indicates that the literal should become a bytes '
+            'literal\n'
+            'in Python 3 (e.g. when code is automatically converted with '
+            '2to3).  A\n'
+            '"\'u\'" or "\'b\'" prefix may be followed by an "\'r\'" '
+            'prefix.\n'
+            '\n'
+            'In triple-quoted strings, unescaped newlines and quotes are '
+            'allowed\n'
+            '(and are retained), except that three unescaped quotes in a '
+            'row\n'
+            'terminate the string.  (A "quote" is the character used to open '
+            'the\n'
+            'string, i.e. either "\'" or """.)\n'
+            '\n'
+            'Unless an "\'r\'" or "\'R\'" prefix is present, escape '
+            'sequences in\n'
+            'strings are interpreted according to rules similar to those '
+            'used by\n'
+            'Standard C.  The recognized escape sequences are:\n'
+            '\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| Escape Sequence   | Meaning                           | '
+            'Notes   |\n'
+            '+===================+===================================+=========+\n'
+            '| "\\newline"        | Ignored                           '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\\\"              | Backslash ("\\")                   '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\\'"              | Single quote ("\'")                '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\""              | Double quote (""")                '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\a"              | ASCII Bell (BEL)                  '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\b"              | ASCII Backspace (BS)              '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\f"              | ASCII Formfeed (FF)               '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\n"              | ASCII Linefeed (LF)               '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\N{name}"        | Character named *name* in the     '
+            '|         |\n'
+            '|                   | Unicode database (Unicode only)   '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\r"              | ASCII Carriage Return (CR)        '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\t"              | ASCII Horizontal Tab (TAB)        '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\uxxxx"          | Character with 16-bit hex value   | '
+            '(1)     |\n'
+            '|                   | *xxxx* (Unicode only)             '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\Uxxxxxxxx"      | Character with 32-bit hex value   | '
+            '(2)     |\n'
+            '|                   | *xxxxxxxx* (Unicode only)         '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\v"              | ASCII Vertical Tab (VT)           '
+            '|         |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\ooo"            | Character with octal value *ooo*  | '
+            '(3,5)   |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '| "\\xhh"            | Character with hex value *hh*     | '
+            '(4,5)   |\n'
+            '+-------------------+-----------------------------------+---------+\n'
+            '\n'
+            'Notes:\n'
+            '\n'
+            '1. Individual code units which form parts of a surrogate pair '
+            'can\n'
+            '   be encoded using this escape sequence.\n'
+            '\n'
+            '2. Any Unicode character can be encoded this way, but '
+            'characters\n'
+            '   outside the Basic Multilingual Plane (BMP) will be encoded '
+            'using a\n'
+            '   surrogate pair if Python is compiled to use 16-bit code '
+            'units (the\n'
+            '   default).\n'
+            '\n'
+            '3. As in Standard C, up to three octal digits are accepted.\n'
+            '\n'
+            '4. Unlike in Standard C, exactly two hex digits are required.\n'
+            '\n'
+            '5. In a string literal, hexadecimal and octal escapes denote '
+            'the\n'
+            '   byte with the given value; it is not necessary that the '
+            'byte\n'
+            '   encodes a character in the source character set. In a '
+            'Unicode\n'
+            '   literal, these escapes denote a Unicode character with the '
+            'given\n'
+            '   value.\n'
+            '\n'
+            'Unlike Standard C, all unrecognized escape sequences are left '
+            'in the\n'
+            'string unchanged, i.e., *the backslash is left in the string*.  '
+            '(This\n'
+            'behavior is useful when debugging: if an escape sequence is '
+            'mistyped,\n'
+            'the resulting output is more easily recognized as broken.)  It '
+            'is also\n'
+            'important to note that the escape sequences marked as "(Unicode '
+            'only)"\n'
+            'in the table above fall into the category of unrecognized '
+            'escapes for\n'
+            'non-Unicode string literals.\n'
+            '\n'
+            'When an "\'r\'" or "\'R\'" prefix is present, a character '
+            'following a\n'
+            'backslash is included in the string without change, and *all\n'
+            'backslashes are left in the string*.  For example, the string '
+            'literal\n'
+            '"r"\\n"" consists of two characters: a backslash and a '
+            'lowercase "\'n\'".\n'
+            'String quotes can be escaped with a backslash, but the '
+            'backslash\n'
+            'remains in the string; for example, "r"\\""" is a valid string '
+            'literal\n'
+            'consisting of two characters: a backslash and a double quote; '
+            '"r"\\""\n'
+            'is not a valid string literal (even a raw string cannot end in '
+            'an odd\n'
+            'number of backslashes).  Specifically, *a raw string cannot end '
+            'in a\n'
+            'single backslash* (since the backslash would escape the '
+            'following\n'
+            'quote character).  Note also that a single backslash followed '
+            'by a\n'
+            'newline is interpreted as those two characters as part of the '
+            'string,\n'
+            '*not* as a line continuation.\n'
+            '\n'
+            'When an "\'r\'" or "\'R\'" prefix is used in conjunction with a '
+            '"\'u\'" or\n'
+            '"\'U\'" prefix, then the "\\uXXXX" and "\\UXXXXXXXX" escape '
+            'sequences are\n'
+            'processed while  *all other backslashes are left in the '
+            'string*. For\n'
+            'example, the string literal "ur"\\u0062\\n"" consists of three '
+            'Unicode\n'
+            "characters: 'LATIN SMALL LETTER B', 'REVERSE SOLIDUS', and "
+            "'LATIN\n"
+            "SMALL LETTER N'. Backslashes can be escaped with a preceding\n"
+            'backslash; however, both remain in the string.  As a result, '
+            '"\\uXXXX"\n'
+            'escape sequences are only recognized when there are an odd '
+            'number of\n'
+            'backslashes.\n',
+ 'subscriptions': '\n'
+                  'Subscriptions\n'
+                  '*************\n'
+                  '\n'
+                  'A subscription selects an item of a sequence (string, '
+                  'tuple or list)\n'
+                  'or mapping (dictionary) object:\n'
+                  '\n'
+                  '   subscription ::= primary "[" expression_list "]"\n'
+                  '\n'
+                  'The primary must evaluate to an object of a sequence or '
+                  'mapping type.\n'
+                  '\n'
+                  'If the primary is a mapping, the expression list must '
+                  'evaluate to an\n'
+                  'object whose value is one of the keys of the mapping, and '
+                  'the\n'
+                  'subscription selects the value in the mapping that '
+                  'corresponds to that\n'
+                  'key.  (The expression list is a tuple except if it has '
+                  'exactly one\n'
+                  'item.)\n'
+                  '\n'
+                  'If the primary is a sequence, the expression (list) must '
+                  'evaluate to a\n'
+                  'plain integer.  If this value is negative, the length of '
+                  'the sequence\n'
+                  'is added to it (so that, e.g., "x[-1]" selects the last '
+                  'item of "x".)\n'
+                  'The resulting value must be a nonnegative integer less '
+                  'than the number\n'
+                  'of items in the sequence, and the subscription selects '
+                  'the item whose\n'
+                  'index is that value (counting from zero).\n'
+                  '\n'
+                  "A string's items are characters.  A character is not a "
+                  'separate data\n'
+                  'type but a string of exactly one character.\n',
+ 'truth': '\n'
+          'Truth Value Testing\n'
+          '*******************\n'
+          '\n'
+          'Any object can be tested for truth value, for use in an "if" or\n'
+          '"while" condition or as operand of the Boolean operations below. '
+          'The\n'
+          'following values are considered false:\n'
+          '\n'
+          '* "None"\n'
+          '\n'
+          '* "False"\n'
+          '\n'
+          '* zero of any numeric type, for example, "0", "0L", "0.0", "0j".\n'
+          '\n'
+          '* any empty sequence, for example, "\'\'", "()", "[]".\n'
+          '\n'
+          '* any empty mapping, for example, "{}".\n'
+          '\n'
+          '* instances of user-defined classes, if the class defines a\n'
+          '  "__nonzero__()" or "__len__()" method, when that method returns '
+          'the\n'
+          '  integer zero or "bool" value "False". [1]\n'
+          '\n'
+          'All other values are considered true --- so objects of many types '
+          'are\n'
+          'always true.\n'
+          '\n'
+          'Operations and built-in functions that have a Boolean result '
+          'always\n'
+          'return "0" or "False" for false and "1" or "True" for true, '
+          'unless\n'
+          'otherwise stated. (Important exception: the Boolean operations '
+          '"or"\n'
+          'and "and" always return one of their operands.)\n',
+ 'try': '\n'
+        'The "try" statement\n'
+        '*******************\n'
+        '\n'
+        'The "try" statement specifies exception handlers and/or cleanup '
+        'code\n'
+        'for a group of statements:\n'
+        '\n'
+        '   try_stmt  ::= try1_stmt | try2_stmt\n'
+        '   try1_stmt ::= "try" ":" suite\n'
+        '                 ("except" [expression [("as" | ",") identifier]] '
+        '":" suite)+\n'
+        '                 ["else" ":" suite]\n'
+        '                 ["finally" ":" suite]\n'
+        '   try2_stmt ::= "try" ":" suite\n'
+        '                 "finally" ":" suite\n'
+        '\n'
+        'Changed in version 2.5: In previous versions of Python,\n'
+        '"try"..."except"..."finally" did not work. "try"..."except" had to '
+        'be\n'
+        'nested in "try"..."finally".\n'
+        '\n'
+        'The "except" clause(s) specify one or more exception handlers. When '
+        'no\n'
+        'exception occurs in the "try" clause, no exception handler is\n'
+        'executed. When an exception occurs in the "try" suite, a search for '
+        'an\n'
+        'exception handler is started.  This search inspects the except '
+        'clauses\n'
+        'in turn until one is found that matches the exception.  An '
+        'expression-\n'
+        'less except clause, if present, must be last; it matches any\n'
+        'exception.  For an except clause with an expression, that '
+        'expression\n'
+        'is evaluated, and the clause matches the exception if the '
+        'resulting\n'
+        'object is "compatible" with the exception.  An object is '
+        'compatible\n'
+        'with an exception if it is the class or a base class of the '
+        'exception\n'
+        'object, or a tuple containing an item compatible with the '
+        'exception.\n'
+        '\n'
+        'If no except clause matches the exception, the search for an '
+        'exception\n'
+        'handler continues in the surrounding code and on the invocation '
+        'stack.\n'
+        '[1]\n'
+        '\n'
+        'If the evaluation of an expression in the header of an except '
+        'clause\n'
+        'raises an exception, the original search for a handler is canceled '
+        'and\n'
+        'a search starts for the new exception in the surrounding code and '
+        'on\n'
+        'the call stack (it is treated as if the entire "try" statement '
+        'raised\n'
+        'the exception).\n'
+        '\n'
+        'When a matching except clause is found, the exception is assigned '
+        'to\n'
+        'the target specified in that except clause, if present, and the '
+        'except\n'
+        "clause's suite is executed.  All except clauses must have an\n"
+        'executable block.  When the end of this block is reached, '
+        'execution\n'
+        'continues normally after the entire try statement.  (This means '
+        'that\n'
+        'if two nested handlers exist for the same exception, and the '
+        'exception\n'
+        'occurs in the try clause of the inner handler, the outer handler '
+        'will\n'
+        'not handle the exception.)\n'
+        '\n'
+        "Before an except clause's suite is executed, details about the\n"
+        'exception are assigned to three variables in the "sys" module:\n'
+        '"sys.exc_type" receives the object identifying the exception;\n'
+        '"sys.exc_value" receives the exception\'s parameter;\n'
+        '"sys.exc_traceback" receives a traceback object (see section The\n'
+        'standard type hierarchy) identifying the point in the program '
+        'where\n'
+        'the exception occurred. These details are also available through '
+        'the\n'
+        '"sys.exc_info()" function, which returns a tuple "(exc_type,\n'
+        'exc_value, exc_traceback)".  Use of the corresponding variables is\n'
+        'deprecated in favor of this function, since their use is unsafe in '
+        'a\n'
+        'threaded program.  As of Python 1.5, the variables are restored to\n'
+        'their previous values (before the call) when returning from a '
+        'function\n'
+        'that handled an exception.\n'
+        '\n'
+        'The optional "else" clause is executed if and when control flows '
+        'off\n'
+        'the end of the "try" clause. [2] Exceptions in the "else" clause '
+        'are\n'
+        'not handled by the preceding "except" clauses.\n'
+        '\n'
+        'If "finally" is present, it specifies a \'cleanup\' handler.  The '
+        '"try"\n'
+        'clause is executed, including any "except" and "else" clauses.  If '
+        'an\n'
+        'exception occurs in any of the clauses and is not handled, the\n'
+        'exception is temporarily saved. The "finally" clause is executed.  '
+        'If\n'
+        'there is a saved exception, it is re-raised at the end of the\n'
+        '"finally" clause. If the "finally" clause raises another exception '
+        'or\n'
+        'executes a "return" or "break" statement, the saved exception is\n'
+        'discarded:\n'
+        '\n'
+        '   >>> def f():\n'
+        '   ...     try:\n'
+        '   ...         1/0\n'
+        '   ...     finally:\n'
+        '   ...         return 42\n'
+        '   ...\n'
+        '   >>> f()\n'
+        '   42\n'
+        '\n'
+        'The exception information is not available to the program during\n'
+        'execution of the "finally" clause.\n'
+        '\n'
+        'When a "return", "break" or "continue" statement is executed in '
+        'the\n'
+        '"try" suite of a "try"..."finally" statement, the "finally" clause '
+        'is\n'
+        'also executed \'on the way out.\' A "continue" statement is illegal '
+        'in\n'
+        'the "finally" clause. (The reason is a problem with the current\n'
+        'implementation --- this restriction may be lifted in the future).\n'
+        '\n'
+        'The return value of a function is determined by the last "return"\n'
+        'statement executed.  Since the "finally" clause always executes, a\n'
+        '"return" statement executed in the "finally" clause will always be '
+        'the\n'
+        'last one executed:\n'
+        '\n'
+        '   >>> def foo():\n'
+        '   ...     try:\n'
+        "   ...         return 'try'\n"
+        '   ...     finally:\n'
+        "   ...         return 'finally'\n"
+        '   ...\n'
+        '   >>> foo()\n'
+        "   'finally'\n"
+        '\n'
+        'Additional information on exceptions can be found in section\n'
+        'Exceptions, and information on using the "raise" statement to '
+        'generate\n'
+        'exceptions may be found in section The raise statement.\n',
+ 'types': '\n'
+          'The standard type hierarchy\n'
+          '***************************\n'
+          '\n'
+          'Below is a list of the types that are built into Python.  '
+          'Extension\n'
+          'modules (written in C, Java, or other languages, depending on '
+          'the\n'
+          'implementation) can define additional types.  Future versions of\n'
+          'Python may add types to the type hierarchy (e.g., rational '
+          'numbers,\n'
+          'efficiently stored arrays of integers, etc.).\n'
+          '\n'
+          'Some of the type descriptions below contain a paragraph listing\n'
+          "'special attributes.'  These are attributes that provide access "
+          'to the\n'
+          'implementation and are not intended for general use.  Their '
+          'definition\n'
+          'may change in the future.\n'
+          '\n'
+          'None\n'
+          '   This type has a single value.  There is a single object with '
+          'this\n'
+          '   value. This object is accessed through the built-in name '
+          '"None". It\n'
+          '   is used to signify the absence of a value in many situations, '
+          'e.g.,\n'
+          "   it is returned from functions that don't explicitly return\n"
+          '   anything. Its truth value is false.\n'
+          '\n'
+          'NotImplemented\n'
+          '   This type has a single value.  There is a single object with '
+          'this\n'
+          '   value. This object is accessed through the built-in name\n'
+          '   "NotImplemented". Numeric methods and rich comparison methods '
+          'may\n'
+          '   return this value if they do not implement the operation for '
+          'the\n'
+          '   operands provided.  (The interpreter will then try the '
+          'reflected\n'
+          '   operation, or some other fallback, depending on the '
+          'operator.)  Its\n'
+          '   truth value is true.\n'
+          '\n'
+          'Ellipsis\n'
+          '   This type has a single value.  There is a single object with '
+          'this\n'
+          '   value. This object is accessed through the built-in name\n'
+          '   "Ellipsis". It is used to indicate the presence of the "..." '
+          'syntax\n'
+          '   in a slice.  Its truth value is true.\n'
+          '\n'
+          '"numbers.Number"\n'
+          '   These are created by numeric literals and returned as results '
+          'by\n'
+          '   arithmetic operators and arithmetic built-in functions.  '
+          'Numeric\n'
+          '   objects are immutable; once created their value never '
+          'changes.\n'
+          '   Python numbers are of course strongly related to mathematical\n'
+          '   numbers, but subject to the limitations of numerical '
+          'representation\n'
+          '   in computers.\n'
+          '\n'
+          '   Python distinguishes between integers, floating point numbers, '
+          'and\n'
+          '   complex numbers:\n'
+          '\n'
+          '   "numbers.Integral"\n'
+          '      These represent elements from the mathematical set of '
+          'integers\n'
+          '      (positive and negative).\n'
+          '\n'
+          '      There are three types of integers:\n'
+          '\n'
+          '      Plain integers\n'
+          '         These represent numbers in the range -2147483648 '
+          'through\n'
+          '         2147483647. (The range may be larger on machines with a\n'
+          '         larger natural word size, but not smaller.)  When the '
+          'result\n'
+          '         of an operation would fall outside this range, the '
+          'result is\n'
+          '         normally returned as a long integer (in some cases, the\n'
+          '         exception "OverflowError" is raised instead).  For the\n'
+          '         purpose of shift and mask operations, integers are '
+          'assumed to\n'
+          "         have a binary, 2's complement notation using 32 or more "
+          'bits,\n'
+          '         and hiding no bits from the user (i.e., all 4294967296\n'
+          '         different bit patterns correspond to different values).\n'
+          '\n'
+          '      Long integers\n'
+          '         These represent numbers in an unlimited range, subject '
+          'to\n'
+          '         available (virtual) memory only.  For the purpose of '
+          'shift\n'
+          '         and mask operations, a binary representation is assumed, '
+          'and\n'
+          "         negative numbers are represented in a variant of 2's\n"
+          '         complement which gives the illusion of an infinite '
+          'string of\n'
+          '         sign bits extending to the left.\n'
+          '\n'
+          '      Booleans\n'
+          '         These represent the truth values False and True.  The '
+          'two\n'
+          '         objects representing the values "False" and "True" are '
+          'the\n'
+          '         only Boolean objects. The Boolean type is a subtype of '
+          'plain\n'
+          '         integers, and Boolean values behave like the values 0 '
+          'and 1,\n'
+          '         respectively, in almost all contexts, the exception '
+          'being\n'
+          '         that when converted to a string, the strings ""False"" '
+          'or\n'
+          '         ""True"" are returned, respectively.\n'
+          '\n'
+          '      The rules for integer representation are intended to give '
+          'the\n'
+          '      most meaningful interpretation of shift and mask '
+          'operations\n'
+          '      involving negative integers and the least surprises when\n'
+          '      switching between the plain and long integer domains.  Any\n'
+          '      operation, if it yields a result in the plain integer '
+          'domain,\n'
+          '      will yield the same result in the long integer domain or '
+          'when\n'
+          '      using mixed operands.  The switch between domains is '
+          'transparent\n'
+          '      to the programmer.\n'
+          '\n'
+          '   "numbers.Real" ("float")\n'
+          '      These represent machine-level double precision floating '
+          'point\n'
+          '      numbers. You are at the mercy of the underlying machine\n'
+          '      architecture (and C or Java implementation) for the '
+          'accepted\n'
+          '      range and handling of overflow. Python does not support '
+          'single-\n'
+          '      precision floating point numbers; the savings in processor '
+          'and\n'
+          '      memory usage that are usually the reason for using these '
+          'are\n'
+          '      dwarfed by the overhead of using objects in Python, so '
+          'there is\n'
+          '      no reason to complicate the language with two kinds of '
+          'floating\n'
+          '      point numbers.\n'
+          '\n'
+          '   "numbers.Complex"\n'
+          '      These represent complex numbers as a pair of machine-level\n'
+          '      double precision floating point numbers.  The same caveats '
+          'apply\n'
+          '      as for floating point numbers. The real and imaginary parts '
+          'of a\n'
+          '      complex number "z" can be retrieved through the read-only\n'
+          '      attributes "z.real" and "z.imag".\n'
+          '\n'
+          'Sequences\n'
+          '   These represent finite ordered sets indexed by non-negative\n'
+          '   numbers. The built-in function "len()" returns the number of '
+          'items\n'
+          '   of a sequence. When the length of a sequence is *n*, the index '
+          'set\n'
+          '   contains the numbers 0, 1, ..., *n*-1.  Item *i* of sequence '
+          '*a* is\n'
+          '   selected by "a[i]".\n'
+          '\n'
+          '   Sequences also support slicing: "a[i:j]" selects all items '
+          'with\n'
+          '   index *k* such that *i* "<=" *k* "<" *j*.  When used as an\n'
+          '   expression, a slice is a sequence of the same type.  This '
+          'implies\n'
+          '   that the index set is renumbered so that it starts at 0.\n'
+          '\n'
+          '   Some sequences also support "extended slicing" with a third '
+          '"step"\n'
+          '   parameter: "a[i:j:k]" selects all items of *a* with index *x* '
+          'where\n'
+          '   "x = i + n*k", *n* ">=" "0" and *i* "<=" *x* "<" *j*.\n'
+          '\n'
+          '   Sequences are distinguished according to their mutability:\n'
+          '\n'
+          '   Immutable sequences\n'
+          '      An object of an immutable sequence type cannot change once '
+          'it is\n'
+          '      created.  (If the object contains references to other '
+          'objects,\n'
+          '      these other objects may be mutable and may be changed; '
+          'however,\n'
+          '      the collection of objects directly referenced by an '
+          'immutable\n'
+          '      object cannot change.)\n'
+          '\n'
+          '      The following types are immutable sequences:\n'
+          '\n'
+          '      Strings\n'
+          '         The items of a string are characters.  There is no '
+          'separate\n'
+          '         character type; a character is represented by a string '
+          'of one\n'
+          '         item. Characters represent (at least) 8-bit bytes.  The\n'
+          '         built-in functions "chr()" and "ord()" convert between\n'
+          '         characters and nonnegative integers representing the '
+          'byte\n'
+          '         values.  Bytes with the values 0-127 usually represent '
+          'the\n'
+          '         corresponding ASCII values, but the interpretation of '
+          'values\n'
+          '         is up to the program.  The string data type is also used '
+          'to\n'
+          '         represent arrays of bytes, e.g., to hold data read from '
+          'a\n'
+          '         file.\n'
+          '\n'
+          '         (On systems whose native character set is not ASCII, '
+          'strings\n'
+          '         may use EBCDIC in their internal representation, '
+          'provided the\n'
+          '         functions "chr()" and "ord()" implement a mapping '
+          'between\n'
+          '         ASCII and EBCDIC, and string comparison preserves the '
+          'ASCII\n'
+          '         order. Or perhaps someone can propose a better rule?)\n'
+          '\n'
+          '      Unicode\n'
+          '         The items of a Unicode object are Unicode code units.  '
+          'A\n'
+          '         Unicode code unit is represented by a Unicode object of '
+          'one\n'
+          '         item and can hold either a 16-bit or 32-bit value\n'
+          '         representing a Unicode ordinal (the maximum value for '
+          'the\n'
+          '         ordinal is given in "sys.maxunicode", and depends on '
+          'how\n'
+          '         Python is configured at compile time).  Surrogate pairs '
+          'may\n'
+          '         be present in the Unicode object, and will be reported '
+          'as two\n'
+          '         separate items.  The built-in functions "unichr()" and\n'
+          '         "ord()" convert between code units and nonnegative '
+          'integers\n'
+          '         representing the Unicode ordinals as defined in the '
+          'Unicode\n'
+          '         Standard 3.0. Conversion from and to other encodings '
+          'are\n'
+          '         possible through the Unicode method "encode()" and the '
+          'built-\n'
+          '         in function "unicode()".\n'
+          '\n'
+          '      Tuples\n'
+          '         The items of a tuple are arbitrary Python objects. '
+          'Tuples of\n'
+          '         two or more items are formed by comma-separated lists '
+          'of\n'
+          "         expressions.  A tuple of one item (a 'singleton') can "
+          'be\n'
+          '         formed by affixing a comma to an expression (an '
+          'expression by\n'
+          '         itself does not create a tuple, since parentheses must '
+          'be\n'
+          '         usable for grouping of expressions).  An empty tuple can '
+          'be\n'
+          '         formed by an empty pair of parentheses.\n'
+          '\n'
+          '   Mutable sequences\n'
+          '      Mutable sequences can be changed after they are created.  '
+          'The\n'
+          '      subscription and slicing notations can be used as the '
+          'target of\n'
+          '      assignment and "del" (delete) statements.\n'
+          '\n'
+          '      There are currently two intrinsic mutable sequence types:\n'
+          '\n'
+          '      Lists\n'
+          '         The items of a list are arbitrary Python objects.  Lists '
+          'are\n'
+          '         formed by placing a comma-separated list of expressions '
+          'in\n'
+          '         square brackets. (Note that there are no special cases '
+          'needed\n'
+          '         to form lists of length 0 or 1.)\n'
+          '\n'
+          '      Byte Arrays\n'
+          '         A bytearray object is a mutable array. They are created '
+          'by\n'
+          '         the built-in "bytearray()" constructor.  Aside from '
+          'being\n'
+          '         mutable (and hence unhashable), byte arrays otherwise '
+          'provide\n'
+          '         the same interface and functionality as immutable bytes\n'
+          '         objects.\n'
+          '\n'
+          '      The extension module "array" provides an additional example '
+          'of a\n'
+          '      mutable sequence type.\n'
+          '\n'
+          'Set types\n'
+          '   These represent unordered, finite sets of unique, immutable\n'
+          '   objects. As such, they cannot be indexed by any subscript. '
+          'However,\n'
+          '   they can be iterated over, and the built-in function "len()"\n'
+          '   returns the number of items in a set. Common uses for sets are '
+          'fast\n'
+          '   membership testing, removing duplicates from a sequence, and\n'
+          '   computing mathematical operations such as intersection, '
+          'union,\n'
+          '   difference, and symmetric difference.\n'
+          '\n'
+          '   For set elements, the same immutability rules apply as for\n'
+          '   dictionary keys. Note that numeric types obey the normal rules '
+          'for\n'
+          '   numeric comparison: if two numbers compare equal (e.g., "1" '
+          'and\n'
+          '   "1.0"), only one of them can be contained in a set.\n'
+          '\n'
+          '   There are currently two intrinsic set types:\n'
+          '\n'
+          '   Sets\n'
+          '      These represent a mutable set. They are created by the '
+          'built-in\n'
+          '      "set()" constructor and can be modified afterwards by '
+          'several\n'
+          '      methods, such as "add()".\n'
+          '\n'
+          '   Frozen sets\n'
+          '      These represent an immutable set.  They are created by the\n'
+          '      built-in "frozenset()" constructor.  As a frozenset is '
+          'immutable\n'
+          '      and *hashable*, it can be used again as an element of '
+          'another\n'
+          '      set, or as a dictionary key.\n'
+          '\n'
+          'Mappings\n'
+          '   These represent finite sets of objects indexed by arbitrary '
+          'index\n'
+          '   sets. The subscript notation "a[k]" selects the item indexed '
+          'by "k"\n'
+          '   from the mapping "a"; this can be used in expressions and as '
+          'the\n'
+          '   target of assignments or "del" statements. The built-in '
+          'function\n'
+          '   "len()" returns the number of items in a mapping.\n'
+          '\n'
+          '   There is currently a single intrinsic mapping type:\n'
+          '\n'
+          '   Dictionaries\n'
+          '      These represent finite sets of objects indexed by nearly\n'
+          '      arbitrary values.  The only types of values not acceptable '
+          'as\n'
+          '      keys are values containing lists or dictionaries or other\n'
+          '      mutable types that are compared by value rather than by '
+          'object\n'
+          '      identity, the reason being that the efficient '
+          'implementation of\n'
+          "      dictionaries requires a key's hash value to remain "
+          'constant.\n'
+          '      Numeric types used for keys obey the normal rules for '
+          'numeric\n'
+          '      comparison: if two numbers compare equal (e.g., "1" and '
+          '"1.0")\n'
+          '      then they can be used interchangeably to index the same\n'
+          '      dictionary entry.\n'
+          '\n'
+          '      Dictionaries are mutable; they can be created by the '
+          '"{...}"\n'
+          '      notation (see section Dictionary displays).\n'
+          '\n'
+          '      The extension modules "dbm", "gdbm", and "bsddb" provide\n'
+          '      additional examples of mapping types.\n'
+          '\n'
+          'Callable types\n'
+          '   These are the types to which the function call operation (see\n'
+          '   section Calls) can be applied:\n'
+          '\n'
+          '   User-defined functions\n'
+          '      A user-defined function object is created by a function\n'
+          '      definition (see section Function definitions).  It should '
+          'be\n'
+          '      called with an argument list containing the same number of '
+          'items\n'
+          "      as the function's formal parameter list.\n"
+          '\n'
+          '      Special attributes:\n'
+          '\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | Attribute               | Meaning                         '
+          '|             |\n'
+          '      '
+          '+=========================+=================================+=============+\n'
+          '      | "__doc__" "func_doc"    | The function\'s '
+          'documentation    | Writable    |\n'
+          '      |                         | string, or "None" if            '
+          '|             |\n'
+          '      |                         | unavailable.                    '
+          '|             |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | "__name__" "func_name"  | The function\'s '
+          'name.            | Writable    |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | "__module__"            | The name of the module the      '
+          '| Writable    |\n'
+          '      |                         | function was defined in, or     '
+          '|             |\n'
+          '      |                         | "None" if unavailable.          '
+          '|             |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | "__defaults__"          | A tuple containing default      '
+          '| Writable    |\n'
+          '      | "func_defaults"         | argument values for those       '
+          '|             |\n'
+          '      |                         | arguments that have defaults,   '
+          '|             |\n'
+          '      |                         | or "None" if no arguments have  '
+          '|             |\n'
+          '      |                         | a default value.                '
+          '|             |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | "__code__" "func_code"  | The code object representing    '
+          '| Writable    |\n'
+          '      |                         | the compiled function body.     '
+          '|             |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | "__globals__"           | A reference to the dictionary   '
+          '| Read-only   |\n'
+          '      | "func_globals"          | that holds the '
+          "function's       |             |\n"
+          '      |                         | global variables --- the global '
+          '|             |\n'
+          '      |                         | namespace of the module in      '
+          '|             |\n'
+          '      |                         | which the function was defined. '
+          '|             |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | "__dict__" "func_dict"  | The namespace supporting        '
+          '| Writable    |\n'
+          '      |                         | arbitrary function attributes.  '
+          '|             |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '      | "__closure__"           | "None" or a tuple of cells that '
+          '| Read-only   |\n'
+          '      | "func_closure"          | contain bindings for the        '
+          '|             |\n'
+          "      |                         | function's free variables.      "
+          '|             |\n'
+          '      '
+          '+-------------------------+---------------------------------+-------------+\n'
+          '\n'
+          '      Most of the attributes labelled "Writable" check the type '
+          'of the\n'
+          '      assigned value.\n'
+          '\n'
+          '      Changed in version 2.4: "func_name" is now writable.\n'
+          '\n'
+          '      Changed in version 2.6: The double-underscore attributes\n'
+          '      "__closure__", "__code__", "__defaults__", and '
+          '"__globals__"\n'
+          '      were introduced as aliases for the corresponding "func_*"\n'
+          '      attributes for forwards compatibility with Python 3.\n'
+          '\n'
+          '      Function objects also support getting and setting '
+          'arbitrary\n'
+          '      attributes, which can be used, for example, to attach '
+          'metadata\n'
+          '      to functions.  Regular attribute dot-notation is used to '
+          'get and\n'
+          '      set such attributes. *Note that the current implementation '
+          'only\n'
+          '      supports function attributes on user-defined functions. '
+          'Function\n'
+          '      attributes on built-in functions may be supported in the\n'
+          '      future.*\n'
+          '\n'
+          "      Additional information about a function's definition can "
+          'be\n'
+          '      retrieved from its code object; see the description of '
+          'internal\n'
+          '      types below.\n'
+          '\n'
+          '   User-defined methods\n'
+          '      A user-defined method object combines a class, a class '
+          'instance\n'
+          '      (or "None") and any callable object (normally a '
+          'user-defined\n'
+          '      function).\n'
+          '\n'
+          '      Special read-only attributes: "im_self" is the class '
+          'instance\n'
+          '      object, "im_func" is the function object; "im_class" is '
+          'the\n'
+          '      class of "im_self" for bound methods or the class that '
+          'asked for\n'
+          '      the method for unbound methods; "__doc__" is the method\'s\n'
+          '      documentation (same as "im_func.__doc__"); "__name__" is '
+          'the\n'
+          '      method name (same as "im_func.__name__"); "__module__" is '
+          'the\n'
+          '      name of the module the method was defined in, or "None" if\n'
+          '      unavailable.\n'
+          '\n'
+          '      Changed in version 2.2: "im_self" used to refer to the '
+          'class\n'
+          '      that defined the method.\n'
+          '\n'
+          '      Changed in version 2.6: For Python 3 '
+          'forward-compatibility,\n'
+          '      "im_func" is also available as "__func__", and "im_self" '
+          'as\n'
+          '      "__self__".\n'
+          '\n'
+          '      Methods also support accessing (but not setting) the '
+          'arbitrary\n'
+          '      function attributes on the underlying function object.\n'
+          '\n'
+          '      User-defined method objects may be created when getting an\n'
+          '      attribute of a class (perhaps via an instance of that '
+          'class), if\n'
+          '      that attribute is a user-defined function object, an '
+          'unbound\n'
+          '      user-defined method object, or a class method object. When '
+          'the\n'
+          '      attribute is a user-defined method object, a new method '
+          'object\n'
+          '      is only created if the class from which it is being '
+          'retrieved is\n'
+          '      the same as, or a derived class of, the class stored in '
+          'the\n'
+          '      original method object; otherwise, the original method '
+          'object is\n'
+          '      used as it is.\n'
+          '\n'
+          '      When a user-defined method object is created by retrieving '
+          'a\n'
+          '      user-defined function object from a class, its "im_self"\n'
+          '      attribute is "None" and the method object is said to be '
+          'unbound.\n'
+          '      When one is created by retrieving a user-defined function '
+          'object\n'
+          '      from a class via one of its instances, its "im_self" '
+          'attribute\n'
+          '      is the instance, and the method object is said to be bound. '
+          'In\n'
+          '      either case, the new method\'s "im_class" attribute is the '
+          'class\n'
+          '      from which the retrieval takes place, and its "im_func"\n'
+          '      attribute is the original function object.\n'
+          '\n'
+          '      When a user-defined method object is created by retrieving\n'
+          '      another method object from a class or instance, the '
+          'behaviour is\n'
+          '      the same as for a function object, except that the '
+          '"im_func"\n'
+          '      attribute of the new instance is not the original method '
+          'object\n'
+          '      but its "im_func" attribute.\n'
+          '\n'
+          '      When a user-defined method object is created by retrieving '
+          'a\n'
+          '      class method object from a class or instance, its '
+          '"im_self"\n'
+          '      attribute is the class itself, and its "im_func" attribute '
+          'is\n'
+          '      the function object underlying the class method.\n'
+          '\n'
+          '      When an unbound user-defined method object is called, the\n'
+          '      underlying function ("im_func") is called, with the '
+          'restriction\n'
+          '      that the first argument must be an instance of the proper '
+          'class\n'
+          '      ("im_class") or of a derived class thereof.\n'
+          '\n'
+          '      When a bound user-defined method object is called, the\n'
+          '      underlying function ("im_func") is called, inserting the '
+          'class\n'
+          '      instance ("im_self") in front of the argument list.  For\n'
+          '      instance, when "C" is a class which contains a definition '
+          'for a\n'
+          '      function "f()", and "x" is an instance of "C", calling '
+          '"x.f(1)"\n'
+          '      is equivalent to calling "C.f(x, 1)".\n'
+          '\n'
+          '      When a user-defined method object is derived from a class '
+          'method\n'
+          '      object, the "class instance" stored in "im_self" will '
+          'actually\n'
+          '      be the class itself, so that calling either "x.f(1)" or '
+          '"C.f(1)"\n'
+          '      is equivalent to calling "f(C,1)" where "f" is the '
+          'underlying\n'
+          '      function.\n'
+          '\n'
+          '      Note that the transformation from function object to '
+          '(unbound or\n'
+          '      bound) method object happens each time the attribute is\n'
+          '      retrieved from the class or instance. In some cases, a '
+          'fruitful\n'
+          '      optimization is to assign the attribute to a local variable '
+          'and\n'
+          '      call that local variable. Also notice that this '
+          'transformation\n'
+          '      only happens for user-defined functions; other callable '
+          'objects\n'
+          '      (and all non-callable objects) are retrieved without\n'
+          '      transformation.  It is also important to note that '
+          'user-defined\n'
+          '      functions which are attributes of a class instance are not\n'
+          '      converted to bound methods; this *only* happens when the\n'
+          '      function is an attribute of the class.\n'
+          '\n'
+          '   Generator functions\n'
+          '      A function or method which uses the "yield" statement (see\n'
+          '      section The yield statement) is called a *generator '
+          'function*.\n'
+          '      Such a function, when called, always returns an iterator '
+          'object\n'
+          '      which can be used to execute the body of the function:  '
+          'calling\n'
+          '      the iterator\'s "next()" method will cause the function to\n'
+          '      execute until it provides a value using the "yield" '
+          'statement.\n'
+          '      When the function executes a "return" statement or falls '
+          'off the\n'
+          '      end, a "StopIteration" exception is raised and the iterator '
+          'will\n'
+          '      have reached the end of the set of values to be returned.\n'
+          '\n'
+          '   Built-in functions\n'
+          '      A built-in function object is a wrapper around a C '
+          'function.\n'
+          '      Examples of built-in functions are "len()" and '
+          '"math.sin()"\n'
+          '      ("math" is a standard built-in module). The number and type '
+          'of\n'
+          '      the arguments are determined by the C function. Special '
+          'read-\n'
+          '      only attributes: "__doc__" is the function\'s '
+          'documentation\n'
+          '      string, or "None" if unavailable; "__name__" is the '
+          "function's\n"
+          '      name; "__self__" is set to "None" (but see the next item);\n'
+          '      "__module__" is the name of the module the function was '
+          'defined\n'
+          '      in or "None" if unavailable.\n'
+          '\n'
+          '   Built-in methods\n'
+          '      This is really a different disguise of a built-in function, '
+          'this\n'
+          '      time containing an object passed to the C function as an\n'
+          '      implicit extra argument.  An example of a built-in method '
+          'is\n'
+          '      "alist.append()", assuming *alist* is a list object. In '
+          'this\n'
+          '      case, the special read-only attribute "__self__" is set to '
+          'the\n'
+          '      object denoted by *alist*.\n'
+          '\n'
+          '   Class Types\n'
+          '      Class types, or "new-style classes," are callable.  These\n'
+          '      objects normally act as factories for new instances of\n'
+          '      themselves, but variations are possible for class types '
+          'that\n'
+          '      override "__new__()".  The arguments of the call are passed '
+          'to\n'
+          '      "__new__()" and, in the typical case, to "__init__()" to\n'
+          '      initialize the new instance.\n'
+          '\n'
+          '   Classic Classes\n'
+          '      Class objects are described below.  When a class object is\n'
+          '      called, a new class instance (also described below) is '
+          'created\n'
+          "      and returned.  This implies a call to the class's "
+          '"__init__()"\n'
+          '      method if it has one.  Any arguments are passed on to the\n'
+          '      "__init__()" method.  If there is no "__init__()" method, '
+          'the\n'
+          '      class must be called without arguments.\n'
+          '\n'
+          '   Class instances\n'
+          '      Class instances are described below.  Class instances are\n'
+          '      callable only when the class has a "__call__()" method;\n'
+          '      "x(arguments)" is a shorthand for "x.__call__(arguments)".\n'
+          '\n'
+          'Modules\n'
+          '   Modules are imported by the "import" statement (see section '
+          'The\n'
+          '   import statement). A module object has a namespace implemented '
+          'by a\n'
+          '   dictionary object (this is the dictionary referenced by the\n'
+          '   func_globals attribute of functions defined in the module).\n'
+          '   Attribute references are translated to lookups in this '
+          'dictionary,\n'
+          '   e.g., "m.x" is equivalent to "m.__dict__["x"]". A module '
+          'object\n'
+          '   does not contain the code object used to initialize the '
+          'module\n'
+          "   (since it isn't needed once the initialization is done).\n"
+          '\n'
+          "   Attribute assignment updates the module's namespace "
+          'dictionary,\n'
+          '   e.g., "m.x = 1" is equivalent to "m.__dict__["x"] = 1".\n'
+          '\n'
+          '   Special read-only attribute: "__dict__" is the module\'s '
+          'namespace\n'
+          '   as a dictionary object.\n'
+          '\n'
+          '   **CPython implementation detail:** Because of the way CPython\n'
+          '   clears module dictionaries, the module dictionary will be '
+          'cleared\n'
+          '   when the module falls out of scope even if the dictionary '
+          'still has\n'
+          '   live references.  To avoid this, copy the dictionary or keep '
+          'the\n'
+          '   module around while using its dictionary directly.\n'
+          '\n'
+          '   Predefined (writable) attributes: "__name__" is the module\'s '
+          'name;\n'
+          '   "__doc__" is the module\'s documentation string, or "None" if\n'
+          '   unavailable; "__file__" is the pathname of the file from which '
+          'the\n'
+          '   module was loaded, if it was loaded from a file. The '
+          '"__file__"\n'
+          '   attribute is not present for C modules that are statically '
+          'linked\n'
+          '   into the interpreter; for extension modules loaded dynamically '
+          'from\n'
+          '   a shared library, it is the pathname of the shared library '
+          'file.\n'
+          '\n'
+          'Classes\n'
+          '   Both class types (new-style classes) and class objects (old-\n'
+          '   style/classic classes) are typically created by class '
+          'definitions\n'
+          '   (see section Class definitions).  A class has a namespace\n'
+          '   implemented by a dictionary object. Class attribute references '
+          'are\n'
+          '   translated to lookups in this dictionary, e.g., "C.x" is '
+          'translated\n'
+          '   to "C.__dict__["x"]" (although for new-style classes in '
+          'particular\n'
+          '   there are a number of hooks which allow for other means of '
+          'locating\n'
+          '   attributes). When the attribute name is not found there, the\n'
+          '   attribute search continues in the base classes.  For '
+          'old-style\n'
+          '   classes, the search is depth-first, left-to-right in the order '
+          'of\n'
+          '   occurrence in the base class list. New-style classes use the '
+          'more\n'
+          '   complex C3 method resolution order which behaves correctly '
+          'even in\n'
+          "   the presence of 'diamond' inheritance structures where there "
+          'are\n'
+          '   multiple inheritance paths leading back to a common ancestor.\n'
+          '   Additional details on the C3 MRO used by new-style classes can '
+          'be\n'
+          '   found in the documentation accompanying the 2.3 release at\n'
+          '   https://www.python.org/download/releases/2.3/mro/.\n'
+          '\n'
+          '   When a class attribute reference (for class "C", say) would '
+          'yield a\n'
+          '   user-defined function object or an unbound user-defined '
+          'method\n'
+          '   object whose associated class is either "C" or one of its '
+          'base\n'
+          '   classes, it is transformed into an unbound user-defined '
+          'method\n'
+          '   object whose "im_class" attribute is "C". When it would yield '
+          'a\n'
+          '   class method object, it is transformed into a bound '
+          'user-defined\n'
+          '   method object whose "im_self" attribute is "C".  When it '
+          'would\n'
+          '   yield a static method object, it is transformed into the '
+          'object\n'
+          '   wrapped by the static method object. See section Implementing\n'
+          '   Descriptors for another way in which attributes retrieved from '
+          'a\n'
+          '   class may differ from those actually contained in its '
+          '"__dict__"\n'
+          '   (note that only new-style classes support descriptors).\n'
+          '\n'
+          "   Class attribute assignments update the class's dictionary, "
+          'never\n'
+          '   the dictionary of a base class.\n'
+          '\n'
+          '   A class object can be called (see above) to yield a class '
+          'instance\n'
+          '   (see below).\n'
+          '\n'
+          '   Special attributes: "__name__" is the class name; "__module__" '
+          'is\n'
+          '   the module name in which the class was defined; "__dict__" is '
+          'the\n'
+          '   dictionary containing the class\'s namespace; "__bases__" is a '
+          'tuple\n'
+          '   (possibly empty or a singleton) containing the base classes, '
+          'in the\n'
+          '   order of their occurrence in the base class list; "__doc__" is '
+          'the\n'
+          "   class's documentation string, or None if undefined.\n"
+          '\n'
+          'Class instances\n'
+          '   A class instance is created by calling a class object (see '
+          'above).\n'
+          '   A class instance has a namespace implemented as a dictionary '
+          'which\n'
+          '   is the first place in which attribute references are '
+          'searched.\n'
+          "   When an attribute is not found there, and the instance's class "
+          'has\n'
+          '   an attribute by that name, the search continues with the '
+          'class\n'
+          '   attributes.  If a class attribute is found that is a '
+          'user-defined\n'
+          '   function object or an unbound user-defined method object '
+          'whose\n'
+          '   associated class is the class (call it "C") of the instance '
+          'for\n'
+          '   which the attribute reference was initiated or one of its '
+          'bases, it\n'
+          '   is transformed into a bound user-defined method object whose\n'
+          '   "im_class" attribute is "C" and whose "im_self" attribute is '
+          'the\n'
+          '   instance. Static method and class method objects are also\n'
+          '   transformed, as if they had been retrieved from class "C"; '
+          'see\n'
+          '   above under "Classes". See section Implementing Descriptors '
+          'for\n'
+          '   another way in which attributes of a class retrieved via its\n'
+          '   instances may differ from the objects actually stored in the\n'
+          '   class\'s "__dict__". If no class attribute is found, and the\n'
+          '   object\'s class has a "__getattr__()" method, that is called '
+          'to\n'
+          '   satisfy the lookup.\n'
+          '\n'
+          "   Attribute assignments and deletions update the instance's\n"
+          "   dictionary, never a class's dictionary.  If the class has a\n"
+          '   "__setattr__()" or "__delattr__()" method, this is called '
+          'instead\n'
+          '   of updating the instance dictionary directly.\n'
+          '\n'
+          '   Class instances can pretend to be numbers, sequences, or '
+          'mappings\n'
+          '   if they have methods with certain special names.  See section\n'
+          '   Special method names.\n'
+          '\n'
+          '   Special attributes: "__dict__" is the attribute dictionary;\n'
+          '   "__class__" is the instance\'s class.\n'
+          '\n'
+          'Files\n'
+          '   A file object represents an open file.  File objects are '
+          'created by\n'
+          '   the "open()" built-in function, and also by "os.popen()",\n'
+          '   "os.fdopen()", and the "makefile()" method of socket objects '
+          '(and\n'
+          '   perhaps by other functions or methods provided by extension\n'
+          '   modules).  The objects "sys.stdin", "sys.stdout" and '
+          '"sys.stderr"\n'
+          '   are initialized to file objects corresponding to the '
+          "interpreter's\n"
+          '   standard input, output and error streams.  See File Objects '
+          'for\n'
+          '   complete documentation of file objects.\n'
+          '\n'
+          'Internal types\n'
+          '   A few types used internally by the interpreter are exposed to '
+          'the\n'
+          '   user. Their definitions may change with future versions of '
+          'the\n'
+          '   interpreter, but they are mentioned here for completeness.\n'
+          '\n'
+          '   Code objects\n'
+          '      Code objects represent *byte-compiled* executable Python '
+          'code,\n'
+          '      or *bytecode*. The difference between a code object and a\n'
+          '      function object is that the function object contains an '
+          'explicit\n'
+          "      reference to the function's globals (the module in which it "
+          'was\n'
+          '      defined), while a code object contains no context; also '
+          'the\n'
+          '      default argument values are stored in the function object, '
+          'not\n'
+          '      in the code object (because they represent values '
+          'calculated at\n'
+          '      run-time).  Unlike function objects, code objects are '
+          'immutable\n'
+          '      and contain no references (directly or indirectly) to '
+          'mutable\n'
+          '      objects.\n'
+          '\n'
+          '      Special read-only attributes: "co_name" gives the function '
+          'name;\n'
+          '      "co_argcount" is the number of positional arguments '
+          '(including\n'
+          '      arguments with default values); "co_nlocals" is the number '
+          'of\n'
+          '      local variables used by the function (including '
+          'arguments);\n'
+          '      "co_varnames" is a tuple containing the names of the local\n'
+          '      variables (starting with the argument names); "co_cellvars" '
+          'is a\n'
+          '      tuple containing the names of local variables that are\n'
+          '      referenced by nested functions; "co_freevars" is a tuple\n'
+          '      containing the names of free variables; "co_code" is a '
+          'string\n'
+          '      representing the sequence of bytecode instructions; '
+          '"co_consts"\n'
+          '      is a tuple containing the literals used by the bytecode;\n'
+          '      "co_names" is a tuple containing the names used by the '
+          'bytecode;\n'
+          '      "co_filename" is the filename from which the code was '
+          'compiled;\n'
+          '      "co_firstlineno" is the first line number of the function;\n'
+          '      "co_lnotab" is a string encoding the mapping from bytecode\n'
+          '      offsets to line numbers (for details see the source code of '
+          'the\n'
+          '      interpreter); "co_stacksize" is the required stack size\n'
+          '      (including local variables); "co_flags" is an integer '
+          'encoding a\n'
+          '      number of flags for the interpreter.\n'
+          '\n'
+          '      The following flag bits are defined for "co_flags": bit '
+          '"0x04"\n'
+          '      is set if the function uses the "*arguments" syntax to '
+          'accept an\n'
+          '      arbitrary number of positional arguments; bit "0x08" is set '
+          'if\n'
+          '      the function uses the "**keywords" syntax to accept '
+          'arbitrary\n'
+          '      keyword arguments; bit "0x20" is set if the function is a\n'
+          '      generator.\n'
+          '\n'
+          '      Future feature declarations ("from __future__ import '
+          'division")\n'
+          '      also use bits in "co_flags" to indicate whether a code '
+          'object\n'
+          '      was compiled with a particular feature enabled: bit '
+          '"0x2000" is\n'
+          '      set if the function was compiled with future division '
+          'enabled;\n'
+          '      bits "0x10" and "0x1000" were used in earlier versions of\n'
+          '      Python.\n'
+          '\n'
+          '      Other bits in "co_flags" are reserved for internal use.\n'
+          '\n'
+          '      If a code object represents a function, the first item in\n'
+          '      "co_consts" is the documentation string of the function, '
+          'or\n'
+          '      "None" if undefined.\n'
+          '\n'
+          '   Frame objects\n'
+          '      Frame objects represent execution frames.  They may occur '
+          'in\n'
+          '      traceback objects (see below).\n'
+          '\n'
+          '      Special read-only attributes: "f_back" is to the previous '
+          'stack\n'
+          '      frame (towards the caller), or "None" if this is the '
+          'bottom\n'
+          '      stack frame; "f_code" is the code object being executed in '
+          'this\n'
+          '      frame; "f_locals" is the dictionary used to look up local\n'
+          '      variables; "f_globals" is used for global variables;\n'
+          '      "f_builtins" is used for built-in (intrinsic) names;\n'
+          '      "f_restricted" is a flag indicating whether the function '
+          'is\n'
+          '      executing in restricted execution mode; "f_lasti" gives '
+          'the\n'
+          '      precise instruction (this is an index into the bytecode '
+          'string\n'
+          '      of the code object).\n'
+          '\n'
+          '      Special writable attributes: "f_trace", if not "None", is '
+          'a\n'
+          '      function called at the start of each source code line (this '
+          'is\n'
+          '      used by the debugger); "f_exc_type", "f_exc_value",\n'
+          '      "f_exc_traceback" represent the last exception raised in '
+          'the\n'
+          '      parent frame provided another exception was ever raised in '
+          'the\n'
+          '      current frame (in all other cases they are None); '
+          '"f_lineno" is\n'
+          '      the current line number of the frame --- writing to this '
+          'from\n'
+          '      within a trace function jumps to the given line (only for '
+          'the\n'
+          '      bottom-most frame).  A debugger can implement a Jump '
+          'command\n'
+          '      (aka Set Next Statement) by writing to f_lineno.\n'
+          '\n'
+          '   Traceback objects\n'
+          '      Traceback objects represent a stack trace of an exception.  '
+          'A\n'
+          '      traceback object is created when an exception occurs.  When '
+          'the\n'
+          '      search for an exception handler unwinds the execution '
+          'stack, at\n'
+          '      each unwound level a traceback object is inserted in front '
+          'of\n'
+          '      the current traceback.  When an exception handler is '
+          'entered,\n'
+          '      the stack trace is made available to the program. (See '
+          'section\n'
+          '      The try statement.) It is accessible as '
+          '"sys.exc_traceback", and\n'
+          '      also as the third item of the tuple returned by\n'
+          '      "sys.exc_info()".  The latter is the preferred interface, '
+          'since\n'
+          '      it works correctly when the program is using multiple '
+          'threads.\n'
+          '      When the program contains no suitable handler, the stack '
+          'trace\n'
+          '      is written (nicely formatted) to the standard error stream; '
+          'if\n'
+          '      the interpreter is interactive, it is also made available '
+          'to the\n'
+          '      user as "sys.last_traceback".\n'
+          '\n'
+          '      Special read-only attributes: "tb_next" is the next level '
+          'in the\n'
+          '      stack trace (towards the frame where the exception '
+          'occurred), or\n'
+          '      "None" if there is no next level; "tb_frame" points to the\n'
+          '      execution frame of the current level; "tb_lineno" gives the '
+          'line\n'
+          '      number where the exception occurred; "tb_lasti" indicates '
+          'the\n'
+          '      precise instruction.  The line number and last instruction '
+          'in\n'
+          '      the traceback may differ from the line number of its frame\n'
+          '      object if the exception occurred in a "try" statement with '
+          'no\n'
+          '      matching except clause or with a finally clause.\n'
+          '\n'
+          '   Slice objects\n'
+          '      Slice objects are used to represent slices when *extended '
+          'slice\n'
+          '      syntax* is used. This is a slice using two colons, or '
+          'multiple\n'
+          '      slices or ellipses separated by commas, e.g., '
+          '"a[i:j:step]",\n'
+          '      "a[i:j, k:l]", or "a[..., i:j]".  They are also created by '
+          'the\n'
+          '      built-in "slice()" function.\n'
+          '\n'
+          '      Special read-only attributes: "start" is the lower bound; '
+          '"stop"\n'
+          '      is the upper bound; "step" is the step value; each is '
+          '"None" if\n'
+          '      omitted.  These attributes can have any type.\n'
+          '\n'
+          '      Slice objects support one method:\n'
+          '\n'
+          '      slice.indices(self, length)\n'
+          '\n'
+          '         This method takes a single integer argument *length* '
+          'and\n'
+          '         computes information about the extended slice that the '
+          'slice\n'
+          '         object would describe if applied to a sequence of '
+          '*length*\n'
+          '         items.  It returns a tuple of three integers; '
+          'respectively\n'
+          '         these are the *start* and *stop* indices and the *step* '
+          'or\n'
+          '         stride length of the slice. Missing or out-of-bounds '
+          'indices\n'
+          '         are handled in a manner consistent with regular slices.\n'
+          '\n'
+          '         New in version 2.3.\n'
+          '\n'
+          '   Static method objects\n'
+          '      Static method objects provide a way of defeating the\n'
+          '      transformation of function objects to method objects '
+          'described\n'
+          '      above. A static method object is a wrapper around any '
+          'other\n'
+          '      object, usually a user-defined method object. When a '
+          'static\n'
+          '      method object is retrieved from a class or a class '
+          'instance, the\n'
+          '      object actually returned is the wrapped object, which is '
+          'not\n'
+          '      subject to any further transformation. Static method '
+          'objects are\n'
+          '      not themselves callable, although the objects they wrap '
+          'usually\n'
+          '      are. Static method objects are created by the built-in\n'
+          '      "staticmethod()" constructor.\n'
+          '\n'
+          '   Class method objects\n'
+          '      A class method object, like a static method object, is a '
+          'wrapper\n'
+          '      around another object that alters the way in which that '
+          'object\n'
+          '      is retrieved from classes and class instances. The '
+          'behaviour of\n'
+          '      class method objects upon such retrieval is described '
+          'above,\n'
+          '      under "User-defined methods". Class method objects are '
+          'created\n'
+          '      by the built-in "classmethod()" constructor.\n',
+ 'typesfunctions': '\n'
+                   'Functions\n'
+                   '*********\n'
+                   '\n'
+                   'Function objects are created by function definitions.  '
+                   'The only\n'
+                   'operation on a function object is to call it: '
+                   '"func(argument-list)".\n'
+                   '\n'
+                   'There are really two flavors of function objects: '
+                   'built-in functions\n'
+                   'and user-defined functions.  Both support the same '
+                   'operation (to call\n'
+                   'the function), but the implementation is different, '
+                   'hence the\n'
+                   'different object types.\n'
+                   '\n'
+                   'See Function definitions for more information.\n',
+ 'typesmapping': '\n'
+                 'Mapping Types --- "dict"\n'
+                 '************************\n'
+                 '\n'
+                 'A *mapping* object maps *hashable* values to arbitrary '
+                 'objects.\n'
+                 'Mappings are mutable objects.  There is currently only one '
+                 'standard\n'
+                 'mapping type, the *dictionary*.  (For other containers see '
+                 'the built\n'
+                 'in "list", "set", and "tuple" classes, and the '
+                 '"collections" module.)\n'
+                 '\n'
+                 "A dictionary's keys are *almost* arbitrary values.  Values "
+                 'that are\n'
+                 'not *hashable*, that is, values containing lists, '
+                 'dictionaries or\n'
+                 'other mutable types (that are compared by value rather '
+                 'than by object\n'
+                 'identity) may not be used as keys.  Numeric types used for '
+                 'keys obey\n'
+                 'the normal rules for numeric comparison: if two numbers '
+                 'compare equal\n'
+                 '(such as "1" and "1.0") then they can be used '
+                 'interchangeably to index\n'
+                 'the same dictionary entry.  (Note however, that since '
+                 'computers store\n'
+                 'floating-point numbers as approximations it is usually '
+                 'unwise to use\n'
+                 'them as dictionary keys.)\n'
+                 '\n'
+                 'Dictionaries can be created by placing a comma-separated '
+                 'list of "key:\n'
+                 'value" pairs within braces, for example: "{\'jack\': 4098, '
+                 "'sjoerd':\n"
+                 '4127}" or "{4098: \'jack\', 4127: \'sjoerd\'}", or by the '
+                 '"dict"\n'
+                 'constructor.\n'
+                 '\n'
+                 'class class dict(**kwarg)\n'
+                 'class class dict(mapping, **kwarg)\n'
+                 'class class dict(iterable, **kwarg)\n'
+                 '\n'
+                 '   Return a new dictionary initialized from an optional '
+                 'positional\n'
+                 '   argument and a possibly empty set of keyword '
+                 'arguments.\n'
+                 '\n'
+                 '   If no positional argument is given, an empty dictionary '
+                 'is created.\n'
+                 '   If a positional argument is given and it is a mapping '
+                 'object, a\n'
+                 '   dictionary is created with the same key-value pairs as '
+                 'the mapping\n'
+                 '   object.  Otherwise, the positional argument must be an '
+                 '*iterable*\n'
+                 '   object.  Each item in the iterable must itself be an '
+                 'iterable with\n'
+                 '   exactly two objects.  The first object of each item '
+                 'becomes a key\n'
+                 '   in the new dictionary, and the second object the '
+                 'corresponding\n'
+                 '   value.  If a key occurs more than once, the last value '
+                 'for that key\n'
+                 '   becomes the corresponding value in the new dictionary.\n'
+                 '\n'
+                 '   If keyword arguments are given, the keyword arguments '
+                 'and their\n'
+                 '   values are added to the dictionary created from the '
+                 'positional\n'
+                 '   argument.  If a key being added is already present, the '
+                 'value from\n'
+                 '   the keyword argument replaces the value from the '
+                 'positional\n'
+                 '   argument.\n'
+                 '\n'
+                 '   To illustrate, the following examples all return a '
+                 'dictionary equal\n'
+                 '   to "{"one": 1, "two": 2, "three": 3}":\n'
+                 '\n'
+                 '      >>> a = dict(one=1, two=2, three=3)\n'
+                 "      >>> b = {'one': 1, 'two': 2, 'three': 3}\n"
+                 "      >>> c = dict(zip(['one', 'two', 'three'], [1, 2, "
+                 '3]))\n'
+                 "      >>> d = dict([('two', 2), ('one', 1), ('three', "
+                 '3)])\n'
+                 "      >>> e = dict({'three': 3, 'one': 1, 'two': 2})\n"
+                 '      >>> a == b == c == d == e\n'
+                 '      True\n'
+                 '\n'
+                 '   Providing keyword arguments as in the first example '
+                 'only works for\n'
+                 '   keys that are valid Python identifiers.  Otherwise, any '
+                 'valid keys\n'
+                 '   can be used.\n'
+                 '\n'
+                 '   New in version 2.2.\n'
+                 '\n'
+                 '   Changed in version 2.3: Support for building a '
+                 'dictionary from\n'
+                 '   keyword arguments added.\n'
+                 '\n'
+                 '   These are the operations that dictionaries support (and '
+                 'therefore,\n'
+                 '   custom mapping types should support too):\n'
+                 '\n'
+                 '   len(d)\n'
+                 '\n'
+                 '      Return the number of items in the dictionary *d*.\n'
+                 '\n'
+                 '   d[key]\n'
+                 '\n'
+                 '      Return the item of *d* with key *key*.  Raises a '
+                 '"KeyError" if\n'
+                 '      *key* is not in the map.\n'
+                 '\n'
+                 '      If a subclass of dict defines a method '
+                 '"__missing__()" and *key*\n'
+                 '      is not present, the "d[key]" operation calls that '
+                 'method with\n'
+                 '      the key *key* as argument.  The "d[key]" operation '
+                 'then returns\n'
+                 '      or raises whatever is returned or raised by the\n'
+                 '      "__missing__(key)" call. No other operations or '
+                 'methods invoke\n'
+                 '      "__missing__()". If "__missing__()" is not defined, '
+                 '"KeyError"\n'
+                 '      is raised. "__missing__()" must be a method; it '
+                 'cannot be an\n'
+                 '      instance variable:\n'
+                 '\n'
+                 '         >>> class Counter(dict):\n'
+                 '         ...     def __missing__(self, key):\n'
+                 '         ...         return 0\n'
+                 '         >>> c = Counter()\n'
+                 "         >>> c['red']\n"
+                 '         0\n'
+                 "         >>> c['red'] += 1\n"
+                 "         >>> c['red']\n"
+                 '         1\n'
+                 '\n'
+                 '      The example above shows part of the implementation '
+                 'of\n'
+                 '      "collections.Counter".  A different "__missing__" '
+                 'method is used\n'
+                 '      by "collections.defaultdict".\n'
+                 '\n'
+                 '      New in version 2.5: Recognition of __missing__ '
+                 'methods of dict\n'
+                 '      subclasses.\n'
+                 '\n'
+                 '   d[key] = value\n'
+                 '\n'
+                 '      Set "d[key]" to *value*.\n'
+                 '\n'
+                 '   del d[key]\n'
+                 '\n'
+                 '      Remove "d[key]" from *d*.  Raises a "KeyError" if '
+                 '*key* is not\n'
+                 '      in the map.\n'
+                 '\n'
+                 '   key in d\n'
+                 '\n'
+                 '      Return "True" if *d* has a key *key*, else "False".\n'
+                 '\n'
+                 '      New in version 2.2.\n'
+                 '\n'
+                 '   key not in d\n'
+                 '\n'
+                 '      Equivalent to "not key in d".\n'
+                 '\n'
+                 '      New in version 2.2.\n'
+                 '\n'
+                 '   iter(d)\n'
+                 '\n'
+                 '      Return an iterator over the keys of the dictionary.  '
+                 'This is a\n'
+                 '      shortcut for "iterkeys()".\n'
+                 '\n'
+                 '   clear()\n'
+                 '\n'
+                 '      Remove all items from the dictionary.\n'
+                 '\n'
+                 '   copy()\n'
+                 '\n'
+                 '      Return a shallow copy of the dictionary.\n'
+                 '\n'
+                 '   fromkeys(seq[, value])\n'
+                 '\n'
+                 '      Create a new dictionary with keys from *seq* and '
+                 'values set to\n'
+                 '      *value*.\n'
+                 '\n'
+                 '      "fromkeys()" is a class method that returns a new '
+                 'dictionary.\n'
+                 '      *value* defaults to "None".\n'
+                 '\n'
+                 '      New in version 2.3.\n'
+                 '\n'
+                 '   get(key[, default])\n'
+                 '\n'
+                 '      Return the value for *key* if *key* is in the '
+                 'dictionary, else\n'
+                 '      *default*. If *default* is not given, it defaults to '
+                 '"None", so\n'
+                 '      that this method never raises a "KeyError".\n'
+                 '\n'
+                 '   has_key(key)\n'
+                 '\n'
+                 '      Test for the presence of *key* in the dictionary.  '
+                 '"has_key()"\n'
+                 '      is deprecated in favor of "key in d".\n'
+                 '\n'
+                 '   items()\n'
+                 '\n'
+                 '      Return a copy of the dictionary\'s list of "(key, '
+                 'value)" pairs.\n'
+                 '\n'
+                 '      **CPython implementation detail:** Keys and values '
+                 'are listed in\n'
+                 '      an arbitrary order which is non-random, varies '
+                 'across Python\n'
+                 "      implementations, and depends on the dictionary's "
+                 'history of\n'
+                 '      insertions and deletions.\n'
+                 '\n'
+                 '      If "items()", "keys()", "values()", "iteritems()", '
+                 '"iterkeys()",\n'
+                 '      and "itervalues()" are called with no intervening '
+                 'modifications\n'
+                 '      to the dictionary, the lists will directly '
+                 'correspond.  This\n'
+                 '      allows the creation of "(value, key)" pairs using '
+                 '"zip()":\n'
+                 '      "pairs = zip(d.values(), d.keys())".  The same '
+                 'relationship\n'
+                 '      holds for the "iterkeys()" and "itervalues()" '
+                 'methods: "pairs =\n'
+                 '      zip(d.itervalues(), d.iterkeys())" provides the same '
+                 'value for\n'
+                 '      "pairs". Another way to create the same list is '
+                 '"pairs = [(v, k)\n'
+                 '      for (k, v) in d.iteritems()]".\n'
+                 '\n'
+                 '   iteritems()\n'
+                 '\n'
+                 '      Return an iterator over the dictionary\'s "(key, '
+                 'value)" pairs.\n'
+                 '      See the note for "dict.items()".\n'
+                 '\n'
+                 '      Using "iteritems()" while adding or deleting entries '
+                 'in the\n'
+                 '      dictionary may raise a "RuntimeError" or fail to '
+                 'iterate over\n'
+                 '      all entries.\n'
+                 '\n'
+                 '      New in version 2.2.\n'
+                 '\n'
+                 '   iterkeys()\n'
+                 '\n'
+                 "      Return an iterator over the dictionary's keys.  See "
+                 'the note for\n'
+                 '      "dict.items()".\n'
+                 '\n'
+                 '      Using "iterkeys()" while adding or deleting entries '
+                 'in the\n'
+                 '      dictionary may raise a "RuntimeError" or fail to '
+                 'iterate over\n'
+                 '      all entries.\n'
+                 '\n'
+                 '      New in version 2.2.\n'
+                 '\n'
+                 '   itervalues()\n'
+                 '\n'
+                 "      Return an iterator over the dictionary's values.  "
+                 'See the note\n'
+                 '      for "dict.items()".\n'
+                 '\n'
+                 '      Using "itervalues()" while adding or deleting '
+                 'entries in the\n'
+                 '      dictionary may raise a "RuntimeError" or fail to '
+                 'iterate over\n'
+                 '      all entries.\n'
+                 '\n'
+                 '      New in version 2.2.\n'
+                 '\n'
+                 '   keys()\n'
+                 '\n'
+                 "      Return a copy of the dictionary's list of keys.  See "
+                 'the note\n'
+                 '      for "dict.items()".\n'
+                 '\n'
+                 '   pop(key[, default])\n'
+                 '\n'
+                 '      If *key* is in the dictionary, remove it and return '
+                 'its value,\n'
+                 '      else return *default*.  If *default* is not given '
+                 'and *key* is\n'
+                 '      not in the dictionary, a "KeyError" is raised.\n'
+                 '\n'
+                 '      New in version 2.3.\n'
+                 '\n'
+                 '   popitem()\n'
+                 '\n'
+                 '      Remove and return an arbitrary "(key, value)" pair '
+                 'from the\n'
+                 '      dictionary.\n'
+                 '\n'
+                 '      "popitem()" is useful to destructively iterate over '
+                 'a\n'
+                 '      dictionary, as often used in set algorithms.  If the '
+                 'dictionary\n'
+                 '      is empty, calling "popitem()" raises a "KeyError".\n'
+                 '\n'
+                 '   setdefault(key[, default])\n'
+                 '\n'
+                 '      If *key* is in the dictionary, return its value.  If '
+                 'not, insert\n'
+                 '      *key* with a value of *default* and return '
+                 '*default*.  *default*\n'
+                 '      defaults to "None".\n'
+                 '\n'
+                 '   update([other])\n'
+                 '\n'
+                 '      Update the dictionary with the key/value pairs from '
+                 '*other*,\n'
+                 '      overwriting existing keys.  Return "None".\n'
+                 '\n'
+                 '      "update()" accepts either another dictionary object '
+                 'or an\n'
+                 '      iterable of key/value pairs (as tuples or other '
+                 'iterables of\n'
+                 '      length two).  If keyword arguments are specified, '
+                 'the dictionary\n'
+                 '      is then updated with those key/value pairs: '
+                 '"d.update(red=1,\n'
+                 '      blue=2)".\n'
+                 '\n'
+                 '      Changed in version 2.4: Allowed the argument to be '
+                 'an iterable\n'
+                 '      of key/value pairs and allowed keyword arguments.\n'
+                 '\n'
+                 '   values()\n'
+                 '\n'
+                 "      Return a copy of the dictionary's list of values.  "
+                 'See the note\n'
+                 '      for "dict.items()".\n'
+                 '\n'
+                 '   viewitems()\n'
+                 '\n'
+                 '      Return a new view of the dictionary\'s items ("(key, '
+                 'value)"\n'
+                 '      pairs).  See below for documentation of view '
+                 'objects.\n'
+                 '\n'
+                 '      New in version 2.7.\n'
+                 '\n'
+                 '   viewkeys()\n'
+                 '\n'
+                 "      Return a new view of the dictionary's keys.  See "
+                 'below for\n'
+                 '      documentation of view objects.\n'
+                 '\n'
+                 '      New in version 2.7.\n'
+                 '\n'
+                 '   viewvalues()\n'
+                 '\n'
+                 "      Return a new view of the dictionary's values.  See "
+                 'below for\n'
+                 '      documentation of view objects.\n'
+                 '\n'
+                 '      New in version 2.7.\n'
+                 '\n'
+                 '   Dictionaries compare equal if and only if they have the '
+                 'same "(key,\n'
+                 '   value)" pairs.\n'
+                 '\n'
+                 '\n'
+                 'Dictionary view objects\n'
+                 '=======================\n'
+                 '\n'
+                 'The objects returned by "dict.viewkeys()", '
+                 '"dict.viewvalues()" and\n'
+                 '"dict.viewitems()" are *view objects*.  They provide a '
+                 'dynamic view on\n'
+                 "the dictionary's entries, which means that when the "
+                 'dictionary\n'
+                 'changes, the view reflects these changes.\n'
+                 '\n'
+                 'Dictionary views can be iterated over to yield their '
+                 'respective data,\n'
+                 'and support membership tests:\n'
+                 '\n'
+                 'len(dictview)\n'
+                 '\n'
+                 '   Return the number of entries in the dictionary.\n'
+                 '\n'
+                 'iter(dictview)\n'
+                 '\n'
+                 '   Return an iterator over the keys, values or items '
+                 '(represented as\n'
+                 '   tuples of "(key, value)") in the dictionary.\n'
+                 '\n'
+                 '   Keys and values are iterated over in an arbitrary order '
+                 'which is\n'
+                 '   non-random, varies across Python implementations, and '
+                 'depends on\n'
+                 "   the dictionary's history of insertions and deletions. "
+                 'If keys,\n'
+                 '   values and items views are iterated over with no '
+                 'intervening\n'
+                 '   modifications to the dictionary, the order of items '
+                 'will directly\n'
+                 '   correspond.  This allows the creation of "(value, key)" '
+                 'pairs using\n'
+                 '   "zip()": "pairs = zip(d.values(), d.keys())".  Another '
+                 'way to\n'
+                 '   create the same list is "pairs = [(v, k) for (k, v) in '
+                 'd.items()]".\n'
+                 '\n'
+                 '   Iterating views while adding or deleting entries in the '
+                 'dictionary\n'
+                 '   may raise a "RuntimeError" or fail to iterate over all '
+                 'entries.\n'
+                 '\n'
+                 'x in dictview\n'
+                 '\n'
+                 '   Return "True" if *x* is in the underlying dictionary\'s '
+                 'keys, values\n'
+                 '   or items (in the latter case, *x* should be a "(key, '
+                 'value)"\n'
+                 '   tuple).\n'
+                 '\n'
+                 'Keys views are set-like since their entries are unique and '
+                 'hashable.\n'
+                 'If all values are hashable, so that (key, value) pairs are '
+                 'unique and\n'
+                 'hashable, then the items view is also set-like.  (Values '
+                 'views are not\n'
+                 'treated as set-like since the entries are generally not '
+                 'unique.)  Then\n'
+                 'these set operations are available ("other" refers either '
+                 'to another\n'
+                 'view or a set):\n'
+                 '\n'
+                 'dictview & other\n'
+                 '\n'
+                 '   Return the intersection of the dictview and the other '
+                 'object as a\n'
+                 '   new set.\n'
+                 '\n'
+                 'dictview | other\n'
+                 '\n'
+                 '   Return the union of the dictview and the other object '
+                 'as a new set.\n'
+                 '\n'
+                 'dictview - other\n'
+                 '\n'
+                 '   Return the difference between the dictview and the '
+                 'other object\n'
+                 "   (all elements in *dictview* that aren't in *other*) as "
+                 'a new set.\n'
+                 '\n'
+                 'dictview ^ other\n'
+                 '\n'
+                 '   Return the symmetric difference (all elements either in '
+                 '*dictview*\n'
+                 '   or *other*, but not in both) of the dictview and the '
+                 'other object\n'
+                 '   as a new set.\n'
+                 '\n'
+                 'An example of dictionary view usage:\n'
+                 '\n'
+                 "   >>> dishes = {'eggs': 2, 'sausage': 1, 'bacon': 1, "
+                 "'spam': 500}\n"
+                 '   >>> keys = dishes.viewkeys()\n'
+                 '   >>> values = dishes.viewvalues()\n'
+                 '\n'
+                 '   >>> # iteration\n'
+                 '   >>> n = 0\n'
+                 '   >>> for val in values:\n'
+                 '   ...     n += val\n'
+                 '   >>> print(n)\n'
+                 '   504\n'
+                 '\n'
+                 '   >>> # keys and values are iterated over in the same '
+                 'order\n'
+                 '   >>> list(keys)\n'
+                 "   ['eggs', 'bacon', 'sausage', 'spam']\n"
+                 '   >>> list(values)\n'
+                 '   [2, 1, 1, 500]\n'
+                 '\n'
+                 '   >>> # view objects are dynamic and reflect dict '
+                 'changes\n'
+                 "   >>> del dishes['eggs']\n"
+                 "   >>> del dishes['sausage']\n"
+                 '   >>> list(keys)\n'
+                 "   ['spam', 'bacon']\n"
+                 '\n'
+                 '   >>> # set operations\n'
+                 "   >>> keys & {'eggs', 'bacon', 'salad'}\n"
+                 "   {'bacon'}\n",
+ 'typesmethods': '\n'
+                 'Methods\n'
+                 '*******\n'
+                 '\n'
+                 'Methods are functions that are called using the attribute '
+                 'notation.\n'
+                 'There are two flavors: built-in methods (such as '
+                 '"append()" on lists)\n'
+                 'and class instance methods.  Built-in methods are '
+                 'described with the\n'
+                 'types that support them.\n'
+                 '\n'
+                 'The implementation adds two special read-only attributes '
+                 'to class\n'
+                 'instance methods: "m.im_self" is the object on which the '
+                 'method\n'
+                 'operates, and "m.im_func" is the function implementing the '
+                 'method.\n'
+                 'Calling "m(arg-1, arg-2, ..., arg-n)" is completely '
+                 'equivalent to\n'
+                 'calling "m.im_func(m.im_self, arg-1, arg-2, ..., arg-n)".\n'
+                 '\n'
+                 'Class instance methods are either *bound* or *unbound*, '
+                 'referring to\n'
+                 'whether the method was accessed through an instance or a '
+                 'class,\n'
+                 'respectively.  When a method is unbound, its "im_self" '
+                 'attribute will\n'
+                 'be "None" and if called, an explicit "self" object must be '
+                 'passed as\n'
+                 'the first argument.  In this case, "self" must be an '
+                 'instance of the\n'
+                 "unbound method's class (or a subclass of that class), "
+                 'otherwise a\n'
+                 '"TypeError" is raised.\n'
+                 '\n'
+                 'Like function objects, methods objects support getting '
+                 'arbitrary\n'
+                 'attributes. However, since method attributes are actually '
+                 'stored on\n'
+                 'the underlying function object ("meth.im_func"), setting '
+                 'method\n'
+                 'attributes on either bound or unbound methods is '
+                 'disallowed.\n'
+                 'Attempting to set an attribute on a method results in an\n'
+                 '"AttributeError" being raised.  In order to set a method '
+                 'attribute,\n'
+                 'you need to explicitly set it on the underlying function '
+                 'object:\n'
+                 '\n'
+                 '   >>> class C:\n'
+                 '   ...     def method(self):\n'
+                 '   ...         pass\n'
+                 '   ...\n'
+                 '   >>> c = C()\n'
+                 "   >>> c.method.whoami = 'my name is method'  # can't set "
+                 'on the method\n'
+                 '   Traceback (most recent call last):\n'
+                 '     File "<stdin>", line 1, in <module>\n'
+                 "   AttributeError: 'instancemethod' object has no "
+                 "attribute 'whoami'\n"
+                 "   >>> c.method.im_func.whoami = 'my name is method'\n"
+                 '   >>> c.method.whoami\n'
+                 "   'my name is method'\n"
+                 '\n'
+                 'See The standard type hierarchy for more information.\n',
+ 'typesmodules': '\n'
+                 'Modules\n'
+                 '*******\n'
+                 '\n'
+                 'The only special operation on a module is attribute '
+                 'access: "m.name",\n'
+                 'where *m* is a module and *name* accesses a name defined '
+                 "in *m*'s\n"
+                 'symbol table. Module attributes can be assigned to.  (Note '
+                 'that the\n'
+                 '"import" statement is not, strictly speaking, an operation '
+                 'on a module\n'
+                 'object; "import foo" does not require a module object '
+                 'named *foo* to\n'
+                 'exist, rather it requires an (external) *definition* for a '
+                 'module\n'
+                 'named *foo* somewhere.)\n'
+                 '\n'
+                 'A special attribute of every module is "__dict__". This is '
+                 'the\n'
+                 "dictionary containing the module's symbol table. Modifying "
+                 'this\n'
+                 "dictionary will actually change the module's symbol table, "
+                 'but direct\n'
+                 'assignment to the "__dict__" attribute is not possible '
+                 '(you can write\n'
+                 '"m.__dict__[\'a\'] = 1", which defines "m.a" to be "1", '
+                 "but you can't\n"
+                 'write "m.__dict__ = {}").  Modifying "__dict__" directly '
+                 'is not\n'
+                 'recommended.\n'
+                 '\n'
+                 'Modules built into the interpreter are written like this: '
+                 '"<module\n'
+                 '\'sys\' (built-in)>".  If loaded from a file, they are '
+                 'written as\n'
+                 '"<module \'os\' from '
+                 '\'/usr/local/lib/pythonX.Y/os.pyc\'>".\n',
+ 'typesseq': '\n'
+             'Sequence Types --- "str", "unicode", "list", "tuple", '
+             '"bytearray", "buffer", "xrange"\n'
+             '*************************************************************************************\n'
+             '\n'
+             'There are seven sequence types: strings, Unicode strings, '
+             'lists,\n'
+             'tuples, bytearrays, buffers, and xrange objects.\n'
+             '\n'
+             'For other containers see the built in "dict" and "set" '
+             'classes, and\n'
+             'the "collections" module.\n'
+             '\n'
+             'String literals are written in single or double quotes: '
+             '"\'xyzzy\'",\n'
+             '""frobozz"".  See String literals for more about string '
+             'literals.\n'
+             'Unicode strings are much like strings, but are specified in '
+             'the syntax\n'
+             'using a preceding "\'u\'" character: "u\'abc\'", "u"def"". In '
+             'addition to\n'
+             'the functionality described here, there are also '
+             'string-specific\n'
+             'methods described in the String Methods section. Lists are '
+             'constructed\n'
+             'with square brackets, separating items with commas: "[a, b, '
+             'c]".\n'
+             'Tuples are constructed by the comma operator (not within '
+             'square\n'
+             'brackets), with or without enclosing parentheses, but an empty '
+             'tuple\n'
+             'must have the enclosing parentheses, such as "a, b, c" or '
+             '"()".  A\n'
+             'single item tuple must have a trailing comma, such as "(d,)".\n'
+             '\n'
+             'Bytearray objects are created with the built-in function\n'
+             '"bytearray()".\n'
+             '\n'
+             'Buffer objects are not directly supported by Python syntax, '
+             'but can be\n'
+             'created by calling the built-in function "buffer()".  They '
+             "don't\n"
+             'support concatenation or repetition.\n'
+             '\n'
+             'Objects of type xrange are similar to buffers in that there is '
+             'no\n'
+             'specific syntax to create them, but they are created using '
+             'the\n'
+             '"xrange()" function.  They don\'t support slicing, '
+             'concatenation or\n'
+             'repetition, and using "in", "not in", "min()" or "max()" on '
+             'them is\n'
+             'inefficient.\n'
+             '\n'
+             'Most sequence types support the following operations.  The '
+             '"in" and\n'
+             '"not in" operations have the same priorities as the '
+             'comparison\n'
+             'operations.  The "+" and "*" operations have the same priority '
+             'as the\n'
+             'corresponding numeric operations. [3] Additional methods are '
+             'provided\n'
+             'for Mutable Sequence Types.\n'
+             '\n'
+             'This table lists the sequence operations sorted in ascending '
+             'priority.\n'
+             'In the table, *s* and *t* are sequences of the same type; *n*, '
+             '*i* and\n'
+             '*j* are integers:\n'
+             '\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| Operation          | Result                           | '
+             'Notes      |\n'
+             '+====================+==================================+============+\n'
+             '| "x in s"           | "True" if an item of *s* is      | '
+             '(1)        |\n'
+             '|                    | equal to *x*, else "False"       '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "x not in s"       | "False" if an item of *s* is     | '
+             '(1)        |\n'
+             '|                    | equal to *x*, else "True"        '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "s + t"            | the concatenation of *s* and *t* | '
+             '(6)        |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "s * n, n * s"     | equivalent to adding *s* to      | '
+             '(2)        |\n'
+             '|                    | itself *n* times                 '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "s[i]"             | *i*th item of *s*, origin 0      | '
+             '(3)        |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "s[i:j]"           | slice of *s* from *i* to *j*     | '
+             '(3)(4)     |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "s[i:j:k]"         | slice of *s* from *i* to *j*     | '
+             '(3)(5)     |\n'
+             '|                    | with step *k*                    '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "len(s)"           | length of *s*                    '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "min(s)"           | smallest item of *s*             '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "max(s)"           | largest item of *s*              '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "s.index(x)"       | index of the first occurrence of '
+             '|            |\n'
+             '|                    | *x* in *s*                       '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '| "s.count(x)"       | total number of occurrences of   '
+             '|            |\n'
+             '|                    | *x* in *s*                       '
+             '|            |\n'
+             '+--------------------+----------------------------------+------------+\n'
+             '\n'
+             'Sequence types also support comparisons. In particular, tuples '
+             'and\n'
+             'lists are compared lexicographically by comparing '
+             'corresponding\n'
+             'elements. This means that to compare equal, every element must '
+             'compare\n'
+             'equal and the two sequences must be of the same type and have '
+             'the same\n'
+             'length. (For full details see Comparisons in the language '
+             'reference.)\n'
+             '\n'
+             'Notes:\n'
+             '\n'
+             '1. When *s* is a string or Unicode string object the "in" and '
+             '"not\n'
+             '   in" operations act like a substring test.  In Python '
+             'versions\n'
+             '   before 2.3, *x* had to be a string of length 1. In Python '
+             '2.3 and\n'
+             '   beyond, *x* may be a string of any length.\n'
+             '\n'
+             '2. Values of *n* less than "0" are treated as "0" (which '
+             'yields an\n'
+             '   empty sequence of the same type as *s*).  Note that items '
+             'in the\n'
+             '   sequence *s* are not copied; they are referenced multiple '
+             'times.\n'
+             '   This often haunts new Python programmers; consider:\n'
+             '\n'
+             '   >>> lists = [[]] * 3\n'
+             '   >>> lists\n'
+             '   [[], [], []]\n'
+             '   >>> lists[0].append(3)\n'
+             '   >>> lists\n'
+             '   [[3], [3], [3]]\n'
+             '\n'
+             '   What has happened is that "[[]]" is a one-element list '
+             'containing\n'
+             '   an empty list, so all three elements of "[[]] * 3" are '
+             'references\n'
+             '   to this single empty list.  Modifying any of the elements '
+             'of\n'
+             '   "lists" modifies this single list. You can create a list '
+             'of\n'
+             '   different lists this way:\n'
+             '\n'
+             '   >>> lists = [[] for i in range(3)]\n'
+             '   >>> lists[0].append(3)\n'
+             '   >>> lists[1].append(5)\n'
+             '   >>> lists[2].append(7)\n'
+             '   >>> lists\n'
+             '   [[3], [5], [7]]\n'
+             '\n'
+             '   Further explanation is available in the FAQ entry How do I '
+             'create a\n'
+             '   multidimensional list?.\n'
+             '\n'
+             '3. If *i* or *j* is negative, the index is relative to the end '
+             'of\n'
+             '   the string: "len(s) + i" or "len(s) + j" is substituted.  '
+             'But note\n'
+             '   that "-0" is still "0".\n'
+             '\n'
+             '4. The slice of *s* from *i* to *j* is defined as the sequence '
+             'of\n'
+             '   items with index *k* such that "i <= k < j".  If *i* or *j* '
+             'is\n'
+             '   greater than "len(s)", use "len(s)".  If *i* is omitted or '
+             '"None",\n'
+             '   use "0".  If *j* is omitted or "None", use "len(s)".  If '
+             '*i* is\n'
+             '   greater than or equal to *j*, the slice is empty.\n'
+             '\n'
+             '5. The slice of *s* from *i* to *j* with step *k* is defined '
+             'as the\n'
+             '   sequence of items with index  "x = i + n*k" such that "0 <= '
+             'n <\n'
+             '   (j-i)/k".  In other words, the indices are "i", "i+k", '
+             '"i+2*k",\n'
+             '   "i+3*k" and so on, stopping when *j* is reached (but never\n'
+             '   including *j*).  If *i* or *j* is greater than "len(s)", '
+             'use\n'
+             '   "len(s)".  If *i* or *j* are omitted or "None", they become '
+             '"end"\n'
+             '   values (which end depends on the sign of *k*).  Note, *k* '
+             'cannot be\n'
+             '   zero. If *k* is "None", it is treated like "1".\n'
+             '\n'
+             '6. **CPython implementation detail:** If *s* and *t* are both\n'
+             '   strings, some Python implementations such as CPython can '
+             'usually\n'
+             '   perform an in-place optimization for assignments of the '
+             'form "s = s\n'
+             '   + t" or "s += t".  When applicable, this optimization '
+             'makes\n'
+             '   quadratic run-time much less likely.  This optimization is '
+             'both\n'
+             '   version and implementation dependent.  For performance '
+             'sensitive\n'
+             '   code, it is preferable to use the "str.join()" method which '
+             'assures\n'
+             '   consistent linear concatenation performance across versions '
+             'and\n'
+             '   implementations.\n'
+             '\n'
+             '   Changed in version 2.4: Formerly, string concatenation '
+             'never\n'
+             '   occurred in-place.\n'
+             '\n'
+             '\n'
+             'String Methods\n'
+             '==============\n'
+             '\n'
+             'Below are listed the string methods which both 8-bit strings '
+             'and\n'
+             'Unicode objects support.  Some of them are also available on\n'
+             '"bytearray" objects.\n'
+             '\n'
+             "In addition, Python's strings support the sequence type "
+             'methods\n'
+             'described in the Sequence Types --- str, unicode, list, '
+             'tuple,\n'
+             'bytearray, buffer, xrange section. To output formatted strings '
+             'use\n'
+             'template strings or the "%" operator described in the String\n'
+             'Formatting Operations section. Also, see the "re" module for '
+             'string\n'
+             'functions based on regular expressions.\n'
+             '\n'
+             'str.capitalize()\n'
+             '\n'
+             '   Return a copy of the string with its first character '
+             'capitalized\n'
+             '   and the rest lowercased.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.center(width[, fillchar])\n'
+             '\n'
+             '   Return centered in a string of length *width*. Padding is '
+             'done\n'
+             '   using the specified *fillchar* (default is a space).\n'
+             '\n'
+             '   Changed in version 2.4: Support for the *fillchar* '
+             'argument.\n'
+             '\n'
+             'str.count(sub[, start[, end]])\n'
+             '\n'
+             '   Return the number of non-overlapping occurrences of '
+             'substring *sub*\n'
+             '   in the range [*start*, *end*].  Optional arguments *start* '
+             'and\n'
+             '   *end* are interpreted as in slice notation.\n'
+             '\n'
+             'str.decode([encoding[, errors]])\n'
+             '\n'
+             '   Decodes the string using the codec registered for '
+             '*encoding*.\n'
+             '   *encoding* defaults to the default string encoding.  '
+             '*errors* may\n'
+             '   be given to set a different error handling scheme.  The '
+             'default is\n'
+             '   "\'strict\'", meaning that encoding errors raise '
+             '"UnicodeError".\n'
+             '   Other possible values are "\'ignore\'", "\'replace\'" and '
+             'any other\n'
+             '   name registered via "codecs.register_error()", see section '
+             'Codec\n'
+             '   Base Classes.\n'
+             '\n'
+             '   New in version 2.2.\n'
+             '\n'
+             '   Changed in version 2.3: Support for other error handling '
+             'schemes\n'
+             '   added.\n'
+             '\n'
+             '   Changed in version 2.7: Support for keyword arguments '
+             'added.\n'
+             '\n'
+             'str.encode([encoding[, errors]])\n'
+             '\n'
+             '   Return an encoded version of the string.  Default encoding '
+             'is the\n'
+             '   current default string encoding.  *errors* may be given to '
+             'set a\n'
+             '   different error handling scheme.  The default for *errors* '
+             'is\n'
+             '   "\'strict\'", meaning that encoding errors raise a '
+             '"UnicodeError".\n'
+             '   Other possible values are "\'ignore\'", "\'replace\'",\n'
+             '   "\'xmlcharrefreplace\'", "\'backslashreplace\'" and any '
+             'other name\n'
+             '   registered via "codecs.register_error()", see section Codec '
+             'Base\n'
+             '   Classes. For a list of possible encodings, see section '
+             'Standard\n'
+             '   Encodings.\n'
+             '\n'
+             '   New in version 2.0.\n'
+             '\n'
+             '   Changed in version 2.3: Support for "\'xmlcharrefreplace\'" '
+             'and\n'
+             '   "\'backslashreplace\'" and other error handling schemes '
+             'added.\n'
+             '\n'
+             '   Changed in version 2.7: Support for keyword arguments '
+             'added.\n'
+             '\n'
+             'str.endswith(suffix[, start[, end]])\n'
+             '\n'
+             '   Return "True" if the string ends with the specified '
+             '*suffix*,\n'
+             '   otherwise return "False".  *suffix* can also be a tuple of '
+             'suffixes\n'
+             '   to look for.  With optional *start*, test beginning at '
+             'that\n'
+             '   position.  With optional *end*, stop comparing at that '
+             'position.\n'
+             '\n'
+             '   Changed in version 2.5: Accept tuples as *suffix*.\n'
+             '\n'
+             'str.expandtabs([tabsize])\n'
+             '\n'
+             '   Return a copy of the string where all tab characters are '
+             'replaced\n'
+             '   by one or more spaces, depending on the current column and '
+             'the\n'
+             '   given tab size.  Tab positions occur every *tabsize* '
+             'characters\n'
+             '   (default is 8, giving tab positions at columns 0, 8, 16 and '
+             'so on).\n'
+             '   To expand the string, the current column is set to zero and '
+             'the\n'
+             '   string is examined character by character.  If the '
+             'character is a\n'
+             '   tab ("\\t"), one or more space characters are inserted in '
+             'the result\n'
+             '   until the current column is equal to the next tab position. '
+             '(The\n'
+             '   tab character itself is not copied.)  If the character is a '
+             'newline\n'
+             '   ("\\n") or return ("\\r"), it is copied and the current '
+             'column is\n'
+             '   reset to zero.  Any other character is copied unchanged and '
+             'the\n'
+             '   current column is incremented by one regardless of how the\n'
+             '   character is represented when printed.\n'
+             '\n'
+             "   >>> '01\\t012\\t0123\\t01234'.expandtabs()\n"
+             "   '01      012     0123    01234'\n"
+             "   >>> '01\\t012\\t0123\\t01234'.expandtabs(4)\n"
+             "   '01  012 0123    01234'\n"
+             '\n'
+             'str.find(sub[, start[, end]])\n'
+             '\n'
+             '   Return the lowest index in the string where substring *sub* '
+             'is\n'
+             '   found, such that *sub* is contained in the slice '
+             '"s[start:end]".\n'
+             '   Optional arguments *start* and *end* are interpreted as in '
+             'slice\n'
+             '   notation.  Return "-1" if *sub* is not found.\n'
+             '\n'
+             '   Note: The "find()" method should be used only if you need '
+             'to know\n'
+             '     the position of *sub*.  To check if *sub* is a substring '
+             'or not,\n'
+             '     use the "in" operator:\n'
+             '\n'
+             "        >>> 'Py' in 'Python'\n"
+             '        True\n'
+             '\n'
+             'str.format(*args, **kwargs)\n'
+             '\n'
+             '   Perform a string formatting operation.  The string on which '
+             'this\n'
+             '   method is called can contain literal text or replacement '
+             'fields\n'
+             '   delimited by braces "{}".  Each replacement field contains '
+             'either\n'
+             '   the numeric index of a positional argument, or the name of '
+             'a\n'
+             '   keyword argument.  Returns a copy of the string where each\n'
+             '   replacement field is replaced with the string value of the\n'
+             '   corresponding argument.\n'
+             '\n'
+             '   >>> "The sum of 1 + 2 is {0}".format(1+2)\n'
+             "   'The sum of 1 + 2 is 3'\n"
+             '\n'
+             '   See Format String Syntax for a description of the various\n'
+             '   formatting options that can be specified in format '
+             'strings.\n'
+             '\n'
+             '   This method of string formatting is the new standard in '
+             'Python 3,\n'
+             '   and should be preferred to the "%" formatting described in '
+             'String\n'
+             '   Formatting Operations in new code.\n'
+             '\n'
+             '   New in version 2.6.\n'
+             '\n'
+             'str.index(sub[, start[, end]])\n'
+             '\n'
+             '   Like "find()", but raise "ValueError" when the substring is '
+             'not\n'
+             '   found.\n'
+             '\n'
+             'str.isalnum()\n'
+             '\n'
+             '   Return true if all characters in the string are '
+             'alphanumeric and\n'
+             '   there is at least one character, false otherwise.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.isalpha()\n'
+             '\n'
+             '   Return true if all characters in the string are alphabetic '
+             'and\n'
+             '   there is at least one character, false otherwise.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.isdigit()\n'
+             '\n'
+             '   Return true if all characters in the string are digits and '
+             'there is\n'
+             '   at least one character, false otherwise.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.islower()\n'
+             '\n'
+             '   Return true if all cased characters [4] in the string are '
+             'lowercase\n'
+             '   and there is at least one cased character, false '
+             'otherwise.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.isspace()\n'
+             '\n'
+             '   Return true if there are only whitespace characters in the '
+             'string\n'
+             '   and there is at least one character, false otherwise.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.istitle()\n'
+             '\n'
+             '   Return true if the string is a titlecased string and there '
+             'is at\n'
+             '   least one character, for example uppercase characters may '
+             'only\n'
+             '   follow uncased characters and lowercase characters only '
+             'cased ones.\n'
+             '   Return false otherwise.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.isupper()\n'
+             '\n'
+             '   Return true if all cased characters [4] in the string are '
+             'uppercase\n'
+             '   and there is at least one cased character, false '
+             'otherwise.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.join(iterable)\n'
+             '\n'
+             '   Return a string which is the concatenation of the strings '
+             'in the\n'
+             '   *iterable* *iterable*.  The separator between elements is '
+             'the\n'
+             '   string providing this method.\n'
+             '\n'
+             'str.ljust(width[, fillchar])\n'
+             '\n'
+             '   Return the string left justified in a string of length '
+             '*width*.\n'
+             '   Padding is done using the specified *fillchar* (default is '
+             'a\n'
+             '   space).  The original string is returned if *width* is less '
+             'than or\n'
+             '   equal to "len(s)".\n'
+             '\n'
+             '   Changed in version 2.4: Support for the *fillchar* '
+             'argument.\n'
+             '\n'
+             'str.lower()\n'
+             '\n'
+             '   Return a copy of the string with all the cased characters '
+             '[4]\n'
+             '   converted to lowercase.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.lstrip([chars])\n'
+             '\n'
+             '   Return a copy of the string with leading characters '
+             'removed.  The\n'
+             '   *chars* argument is a string specifying the set of '
+             'characters to be\n'
+             '   removed.  If omitted or "None", the *chars* argument '
+             'defaults to\n'
+             '   removing whitespace.  The *chars* argument is not a prefix; '
+             'rather,\n'
+             '   all combinations of its values are stripped:\n'
+             '\n'
+             "   >>> '   spacious   '.lstrip()\n"
+             "   'spacious   '\n"
+             "   >>> 'www.example.com'.lstrip('cmowz.')\n"
+             "   'example.com'\n"
+             '\n'
+             '   Changed in version 2.2.2: Support for the *chars* '
+             'argument.\n'
+             '\n'
+             'str.partition(sep)\n'
+             '\n'
+             '   Split the string at the first occurrence of *sep*, and '
+             'return a\n'
+             '   3-tuple containing the part before the separator, the '
+             'separator\n'
+             '   itself, and the part after the separator.  If the separator '
+             'is not\n'
+             '   found, return a 3-tuple containing the string itself, '
+             'followed by\n'
+             '   two empty strings.\n'
+             '\n'
+             '   New in version 2.5.\n'
+             '\n'
+             'str.replace(old, new[, count])\n'
+             '\n'
+             '   Return a copy of the string with all occurrences of '
+             'substring *old*\n'
+             '   replaced by *new*.  If the optional argument *count* is '
+             'given, only\n'
+             '   the first *count* occurrences are replaced.\n'
+             '\n'
+             'str.rfind(sub[, start[, end]])\n'
+             '\n'
+             '   Return the highest index in the string where substring '
+             '*sub* is\n'
+             '   found, such that *sub* is contained within "s[start:end]".\n'
+             '   Optional arguments *start* and *end* are interpreted as in '
+             'slice\n'
+             '   notation.  Return "-1" on failure.\n'
+             '\n'
+             'str.rindex(sub[, start[, end]])\n'
+             '\n'
+             '   Like "rfind()" but raises "ValueError" when the substring '
+             '*sub* is\n'
+             '   not found.\n'
+             '\n'
+             'str.rjust(width[, fillchar])\n'
+             '\n'
+             '   Return the string right justified in a string of length '
+             '*width*.\n'
+             '   Padding is done using the specified *fillchar* (default is '
+             'a\n'
+             '   space). The original string is returned if *width* is less '
+             'than or\n'
+             '   equal to "len(s)".\n'
+             '\n'
+             '   Changed in version 2.4: Support for the *fillchar* '
+             'argument.\n'
+             '\n'
+             'str.rpartition(sep)\n'
+             '\n'
+             '   Split the string at the last occurrence of *sep*, and '
+             'return a\n'
+             '   3-tuple containing the part before the separator, the '
+             'separator\n'
+             '   itself, and the part after the separator.  If the separator '
+             'is not\n'
+             '   found, return a 3-tuple containing two empty strings, '
+             'followed by\n'
+             '   the string itself.\n'
+             '\n'
+             '   New in version 2.5.\n'
+             '\n'
+             'str.rsplit([sep[, maxsplit]])\n'
+             '\n'
+             '   Return a list of the words in the string, using *sep* as '
+             'the\n'
+             '   delimiter string. If *maxsplit* is given, at most '
+             '*maxsplit* splits\n'
+             '   are done, the *rightmost* ones.  If *sep* is not specified '
+             'or\n'
+             '   "None", any whitespace string is a separator.  Except for '
+             'splitting\n'
+             '   from the right, "rsplit()" behaves like "split()" which is\n'
+             '   described in detail below.\n'
+             '\n'
+             '   New in version 2.4.\n'
+             '\n'
+             'str.rstrip([chars])\n'
+             '\n'
+             '   Return a copy of the string with trailing characters '
+             'removed.  The\n'
+             '   *chars* argument is a string specifying the set of '
+             'characters to be\n'
+             '   removed.  If omitted or "None", the *chars* argument '
+             'defaults to\n'
+             '   removing whitespace.  The *chars* argument is not a suffix; '
+             'rather,\n'
+             '   all combinations of its values are stripped:\n'
+             '\n'
+             "   >>> '   spacious   '.rstrip()\n"
+             "   '   spacious'\n"
+             "   >>> 'mississippi'.rstrip('ipz')\n"
+             "   'mississ'\n"
+             '\n'
+             '   Changed in version 2.2.2: Support for the *chars* '
+             'argument.\n'
+             '\n'
+             'str.split([sep[, maxsplit]])\n'
+             '\n'
+             '   Return a list of the words in the string, using *sep* as '
+             'the\n'
+             '   delimiter string.  If *maxsplit* is given, at most '
+             '*maxsplit*\n'
+             '   splits are done (thus, the list will have at most '
+             '"maxsplit+1"\n'
+             '   elements).  If *maxsplit* is not specified or "-1", then '
+             'there is\n'
+             '   no limit on the number of splits (all possible splits are '
+             'made).\n'
+             '\n'
+             '   If *sep* is given, consecutive delimiters are not grouped '
+             'together\n'
+             '   and are deemed to delimit empty strings (for example,\n'
+             '   "\'1,,2\'.split(\',\')" returns "[\'1\', \'\', \'2\']").  '
+             'The *sep* argument\n'
+             '   may consist of multiple characters (for example,\n'
+             '   "\'1<>2<>3\'.split(\'<>\')" returns "[\'1\', \'2\', '
+             '\'3\']"). Splitting an\n'
+             '   empty string with a specified separator returns "[\'\']".\n'
+             '\n'
+             '   If *sep* is not specified or is "None", a different '
+             'splitting\n'
+             '   algorithm is applied: runs of consecutive whitespace are '
+             'regarded\n'
+             '   as a single separator, and the result will contain no empty '
+             'strings\n'
+             '   at the start or end if the string has leading or trailing\n'
+             '   whitespace.  Consequently, splitting an empty string or a '
+             'string\n'
+             '   consisting of just whitespace with a "None" separator '
+             'returns "[]".\n'
+             '\n'
+             '   For example, "\' 1  2   3  \'.split()" returns "[\'1\', '
+             '\'2\', \'3\']", and\n'
+             '   "\'  1  2   3  \'.split(None, 1)" returns "[\'1\', \'2   3  '
+             '\']".\n'
+             '\n'
+             'str.splitlines([keepends])\n'
+             '\n'
+             '   Return a list of the lines in the string, breaking at line\n'
+             '   boundaries. This method uses the *universal newlines* '
+             'approach to\n'
+             '   splitting lines. Line breaks are not included in the '
+             'resulting list\n'
+             '   unless *keepends* is given and true.\n'
+             '\n'
+             '   For example, "\'ab c\\n\\nde fg\\rkl\\r\\n\'.splitlines()" '
+             'returns "[\'ab\n'
+             '   c\', \'\', \'de fg\', \'kl\']", while the same call with\n'
+             '   "splitlines(True)" returns "[\'ab c\\n\', \'\\n\', \'de '
+             'fg\\r\', \'kl\\r\\n\']".\n'
+             '\n'
+             '   Unlike "split()" when a delimiter string *sep* is given, '
+             'this\n'
+             '   method returns an empty list for the empty string, and a '
+             'terminal\n'
+             '   line break does not result in an extra line.\n'
+             '\n'
+             'str.startswith(prefix[, start[, end]])\n'
+             '\n'
+             '   Return "True" if string starts with the *prefix*, otherwise '
+             'return\n'
+             '   "False". *prefix* can also be a tuple of prefixes to look '
+             'for.\n'
+             '   With optional *start*, test string beginning at that '
+             'position.\n'
+             '   With optional *end*, stop comparing string at that '
+             'position.\n'
+             '\n'
+             '   Changed in version 2.5: Accept tuples as *prefix*.\n'
+             '\n'
+             'str.strip([chars])\n'
+             '\n'
+             '   Return a copy of the string with the leading and trailing\n'
+             '   characters removed. The *chars* argument is a string '
+             'specifying the\n'
+             '   set of characters to be removed. If omitted or "None", the '
+             '*chars*\n'
+             '   argument defaults to removing whitespace. The *chars* '
+             'argument is\n'
+             '   not a prefix or suffix; rather, all combinations of its '
+             'values are\n'
+             '   stripped:\n'
+             '\n'
+             "   >>> '   spacious   '.strip()\n"
+             "   'spacious'\n"
+             "   >>> 'www.example.com'.strip('cmowz.')\n"
+             "   'example'\n"
+             '\n'
+             '   Changed in version 2.2.2: Support for the *chars* '
+             'argument.\n'
+             '\n'
+             'str.swapcase()\n'
+             '\n'
+             '   Return a copy of the string with uppercase characters '
+             'converted to\n'
+             '   lowercase and vice versa.\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.title()\n'
+             '\n'
+             '   Return a titlecased version of the string where words start '
+             'with an\n'
+             '   uppercase character and the remaining characters are '
+             'lowercase.\n'
+             '\n'
+             '   The algorithm uses a simple language-independent definition '
+             'of a\n'
+             '   word as groups of consecutive letters.  The definition '
+             'works in\n'
+             '   many contexts but it means that apostrophes in contractions '
+             'and\n'
+             '   possessives form word boundaries, which may not be the '
+             'desired\n'
+             '   result:\n'
+             '\n'
+             '      >>> "they\'re bill\'s friends from the UK".title()\n'
+             '      "They\'Re Bill\'S Friends From The Uk"\n'
+             '\n'
+             '   A workaround for apostrophes can be constructed using '
+             'regular\n'
+             '   expressions:\n'
+             '\n'
+             '      >>> import re\n'
+             '      >>> def titlecase(s):\n'
+             '      ...     return re.sub(r"[A-Za-z]+(\'[A-Za-z]+)?",\n'
+             '      ...                   lambda mo: mo.group(0)[0].upper() '
+             '+\n'
+             '      ...                              '
+             'mo.group(0)[1:].lower(),\n'
+             '      ...                   s)\n'
+             '      ...\n'
+             '      >>> titlecase("they\'re bill\'s friends.")\n'
+             '      "They\'re Bill\'s Friends."\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.translate(table[, deletechars])\n'
+             '\n'
+             '   Return a copy of the string where all characters occurring '
+             'in the\n'
+             '   optional argument *deletechars* are removed, and the '
+             'remaining\n'
+             '   characters have been mapped through the given translation '
+             'table,\n'
+             '   which must be a string of length 256.\n'
+             '\n'
+             '   You can use the "maketrans()" helper function in the '
+             '"string"\n'
+             '   module to create a translation table. For string objects, '
+             'set the\n'
+             '   *table* argument to "None" for translations that only '
+             'delete\n'
+             '   characters:\n'
+             '\n'
+             "   >>> 'read this short text'.translate(None, 'aeiou')\n"
+             "   'rd ths shrt txt'\n"
+             '\n'
+             '   New in version 2.6: Support for a "None" *table* argument.\n'
+             '\n'
+             '   For Unicode objects, the "translate()" method does not '
+             'accept the\n'
+             '   optional *deletechars* argument.  Instead, it returns a '
+             'copy of the\n'
+             '   *s* where all characters have been mapped through the '
+             'given\n'
+             '   translation table which must be a mapping of Unicode '
+             'ordinals to\n'
+             '   Unicode ordinals, Unicode strings or "None". Unmapped '
+             'characters\n'
+             '   are left untouched. Characters mapped to "None" are '
+             'deleted.  Note,\n'
+             '   a more flexible approach is to create a custom character '
+             'mapping\n'
+             '   codec using the "codecs" module (see "encodings.cp1251" for '
+             'an\n'
+             '   example).\n'
+             '\n'
+             'str.upper()\n'
+             '\n'
+             '   Return a copy of the string with all the cased characters '
+             '[4]\n'
+             '   converted to uppercase.  Note that "str.upper().isupper()" '
+             'might be\n'
+             '   "False" if "s" contains uncased characters or if the '
+             'Unicode\n'
+             '   category of the resulting character(s) is not "Lu" '
+             '(Letter,\n'
+             '   uppercase), but e.g. "Lt" (Letter, titlecase).\n'
+             '\n'
+             '   For 8-bit strings, this method is locale-dependent.\n'
+             '\n'
+             'str.zfill(width)\n'
+             '\n'
+             '   Return the numeric string left filled with zeros in a '
+             'string of\n'
+             '   length *width*.  A sign prefix is handled correctly.  The '
+             'original\n'
+             '   string is returned if *width* is less than or equal to '
+             '"len(s)".\n'
+             '\n'
+             '   New in version 2.2.2.\n'
+             '\n'
+             'The following methods are present only on unicode objects:\n'
+             '\n'
+             'unicode.isnumeric()\n'
+             '\n'
+             '   Return "True" if there are only numeric characters in S, '
+             '"False"\n'
+             '   otherwise. Numeric characters include digit characters, and '
+             'all\n'
+             '   characters that have the Unicode numeric value property, '
+             'e.g.\n'
+             '   U+2155, VULGAR FRACTION ONE FIFTH.\n'
+             '\n'
+             'unicode.isdecimal()\n'
+             '\n'
+             '   Return "True" if there are only decimal characters in S, '
+             '"False"\n'
+             '   otherwise. Decimal characters include digit characters, and '
+             'all\n'
+             '   characters that can be used to form decimal-radix numbers, '
+             'e.g.\n'
+             '   U+0660, ARABIC-INDIC DIGIT ZERO.\n'
+             '\n'
+             '\n'
+             'String Formatting Operations\n'
+             '============================\n'
+             '\n'
+             'String and Unicode objects have one unique built-in operation: '
+             'the "%"\n'
+             'operator (modulo).  This is also known as the string '
+             '*formatting* or\n'
+             '*interpolation* operator.  Given "format % values" (where '
+             '*format* is\n'
+             'a string or Unicode object), "%" conversion specifications in '
+             '*format*\n'
+             'are replaced with zero or more elements of *values*.  The '
+             'effect is\n'
+             'similar to the using "sprintf()" in the C language.  If '
+             '*format* is a\n'
+             'Unicode object, or if any of the objects being converted using '
+             'the\n'
+             '"%s" conversion are Unicode objects, the result will also be a '
+             'Unicode\n'
+             'object.\n'
+             '\n'
+             'If *format* requires a single argument, *values* may be a '
+             'single non-\n'
+             'tuple object. [5]  Otherwise, *values* must be a tuple with '
+             'exactly\n'
+             'the number of items specified by the format string, or a '
+             'single\n'
+             'mapping object (for example, a dictionary).\n'
+             '\n'
+             'A conversion specifier contains two or more characters and has '
+             'the\n'
+             'following components, which must occur in this order:\n'
+             '\n'
+             '1. The "\'%\'" character, which marks the start of the '
+             'specifier.\n'
+             '\n'
+             '2. Mapping key (optional), consisting of a parenthesised '
+             'sequence\n'
+             '   of characters (for example, "(somename)").\n'
+             '\n'
+             '3. Conversion flags (optional), which affect the result of '
+             'some\n'
+             '   conversion types.\n'
+             '\n'
+             '4. Minimum field width (optional).  If specified as an '
+             '"\'*\'"\n'
+             '   (asterisk), the actual width is read from the next element '
+             'of the\n'
+             '   tuple in *values*, and the object to convert comes after '
+             'the\n'
+             '   minimum field width and optional precision.\n'
+             '\n'
+             '5. Precision (optional), given as a "\'.\'" (dot) followed by '
+             'the\n'
+             '   precision.  If specified as "\'*\'" (an asterisk), the '
+             'actual width\n'
+             '   is read from the next element of the tuple in *values*, and '
+             'the\n'
+             '   value to convert comes after the precision.\n'
+             '\n'
+             '6. Length modifier (optional).\n'
+             '\n'
+             '7. Conversion type.\n'
+             '\n'
+             'When the right argument is a dictionary (or other mapping '
+             'type), then\n'
+             'the formats in the string *must* include a parenthesised '
+             'mapping key\n'
+             'into that dictionary inserted immediately after the "\'%\'" '
+             'character.\n'
+             'The mapping key selects the value to be formatted from the '
+             'mapping.\n'
+             'For example:\n'
+             '\n'
+             ">>> print '%(language)s has %(number)03d quote types.' % \\\n"
+             '...       {"language": "Python", "number": 2}\n'
+             'Python has 002 quote types.\n'
+             '\n'
+             'In this case no "*" specifiers may occur in a format (since '
+             'they\n'
+             'require a sequential parameter list).\n'
+             '\n'
+             'The conversion flag characters are:\n'
+             '\n'
+             '+-----------+-----------------------------------------------------------------------+\n'
+             '| Flag      | '
+             'Meaning                                                               '
+             '|\n'
+             '+===========+=======================================================================+\n'
+             '| "\'#\'"     | The value conversion will use the "alternate '
+             'form" (where defined     |\n'
+             '|           | '
+             'below).                                                               '
+             '|\n'
+             '+-----------+-----------------------------------------------------------------------+\n'
+             '| "\'0\'"     | The conversion will be zero padded for numeric '
+             'values.                |\n'
+             '+-----------+-----------------------------------------------------------------------+\n'
+             '| "\'-\'"     | The converted value is left adjusted '
+             '(overrides the "\'0\'" conversion  |\n'
+             '|           | if both are '
+             'given).                                                   |\n'
+             '+-----------+-----------------------------------------------------------------------+\n'
+             '| "\' \'"     | (a space) A blank should be left before a '
+             'positive number (or empty   |\n'
+             '|           | string) produced by a signed '
+             'conversion.                              |\n'
+             '+-----------+-----------------------------------------------------------------------+\n'
+             '| "\'+\'"     | A sign character ("\'+\'" or "\'-\'") will '
+             'precede the conversion         |\n'
+             '|           | (overrides a "space" '
+             'flag).                                           |\n'
+             '+-----------+-----------------------------------------------------------------------+\n'
+             '\n'
+             'A length modifier ("h", "l", or "L") may be present, but is '
+             'ignored as\n'
+             'it is not necessary for Python -- so e.g. "%ld" is identical '
+             'to "%d".\n'
+             '\n'
+             'The conversion types are:\n'
+             '\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| Conversion   | '
+             'Meaning                                               | '
+             'Notes   |\n'
+             '+==============+=======================================================+=========+\n'
+             '| "\'d\'"        | Signed integer '
+             'decimal.                               |         |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'i\'"        | Signed integer '
+             'decimal.                               |         |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'o\'"        | Signed octal '
+             'value.                                   | (1)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'u\'"        | Obsolete type -- it is identical to '
+             '"\'d\'".            | (7)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'x\'"        | Signed hexadecimal '
+             '(lowercase).                       | (2)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'X\'"        | Signed hexadecimal '
+             '(uppercase).                       | (2)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'e\'"        | Floating point exponential format '
+             '(lowercase).        | (3)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'E\'"        | Floating point exponential format '
+             '(uppercase).        | (3)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'f\'"        | Floating point decimal '
+             'format.                        | (3)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'F\'"        | Floating point decimal '
+             'format.                        | (3)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'g\'"        | Floating point format. Uses lowercase '
+             'exponential     | (4)     |\n'
+             '|              | format if exponent is less than -4 or not '
+             'less than   |         |\n'
+             '|              | precision, decimal format '
+             'otherwise.                  |         |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'G\'"        | Floating point format. Uses uppercase '
+             'exponential     | (4)     |\n'
+             '|              | format if exponent is less than -4 or not '
+             'less than   |         |\n'
+             '|              | precision, decimal format '
+             'otherwise.                  |         |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'c\'"        | Single character (accepts integer or single '
+             'character |         |\n'
+             '|              | '
+             'string).                                              '
+             '|         |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'r\'"        | String (converts any Python object using '
+             'repr()).     | (5)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'s\'"        | String (converts any Python object using '
+             '"str()").    | (6)     |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '| "\'%\'"        | No argument is converted, results in a '
+             '"\'%\'"          |         |\n'
+             '|              | character in the '
+             'result.                              |         |\n'
+             '+--------------+-------------------------------------------------------+---------+\n'
+             '\n'
+             'Notes:\n'
+             '\n'
+             '1. The alternate form causes a leading zero ("\'0\'") to be '
+             'inserted\n'
+             '   between left-hand padding and the formatting of the number '
+             'if the\n'
+             '   leading character of the result is not already a zero.\n'
+             '\n'
+             '2. The alternate form causes a leading "\'0x\'" or "\'0X\'" '
+             '(depending\n'
+             '   on whether the "\'x\'" or "\'X\'" format was used) to be '
+             'inserted\n'
+             '   between left-hand padding and the formatting of the number '
+             'if the\n'
+             '   leading character of the result is not already a zero.\n'
+             '\n'
+             '3. The alternate form causes the result to always contain a '
+             'decimal\n'
+             '   point, even if no digits follow it.\n'
+             '\n'
+             '   The precision determines the number of digits after the '
+             'decimal\n'
+             '   point and defaults to 6.\n'
+             '\n'
+             '4. The alternate form causes the result to always contain a '
+             'decimal\n'
+             '   point, and trailing zeroes are not removed as they would '
+             'otherwise\n'
+             '   be.\n'
+             '\n'
+             '   The precision determines the number of significant digits '
+             'before\n'
+             '   and after the decimal point and defaults to 6.\n'
+             '\n'
+             '5. The "%r" conversion was added in Python 2.0.\n'
+             '\n'
+             '   The precision determines the maximal number of characters '
+             'used.\n'
+             '\n'
+             '6. If the object or format provided is a "unicode" string, '
+             'the\n'
+             '   resulting string will also be "unicode".\n'
+             '\n'
+             '   The precision determines the maximal number of characters '
+             'used.\n'
+             '\n'
+             '7. See **PEP 237**.\n'
+             '\n'
+             'Since Python strings have an explicit length, "%s" conversions '
+             'do not\n'
+             'assume that "\'\\0\'" is the end of the string.\n'
+             '\n'
+             'Changed in version 2.7: "%f" conversions for numbers whose '
+             'absolute\n'
+             'value is over 1e50 are no longer replaced by "%g" '
+             'conversions.\n'
+             '\n'
+             'Additional string operations are defined in standard modules '
+             '"string"\n'
+             'and "re".\n'
+             '\n'
+             '\n'
+             'XRange Type\n'
+             '===========\n'
+             '\n'
+             'The "xrange" type is an immutable sequence which is commonly '
+             'used for\n'
+             'looping.  The advantage of the "xrange" type is that an '
+             '"xrange"\n'
+             'object will always take the same amount of memory, no matter '
+             'the size\n'
+             'of the range it represents.  There are no consistent '
+             'performance\n'
+             'advantages.\n'
+             '\n'
+             'XRange objects have very little behavior: they only support '
+             'indexing,\n'
+             'iteration, and the "len()" function.\n'
+             '\n'
+             '\n'
+             'Mutable Sequence Types\n'
+             '======================\n'
+             '\n'
+             'List and "bytearray" objects support additional operations '
+             'that allow\n'
+             'in-place modification of the object. Other mutable sequence '
+             'types\n'
+             '(when added to the language) should also support these '
+             'operations.\n'
+             'Strings and tuples are immutable sequence types: such objects '
+             'cannot\n'
+             'be modified once created. The following operations are defined '
+             'on\n'
+             'mutable sequence types (where *x* is an arbitrary object):\n'
+             '\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| Operation                      | '
+             'Result                           | Notes                 |\n'
+             '+================================+==================================+=======================+\n'
+             '| "s[i] = x"                     | item *i* of *s* is replaced '
+             'by   |                       |\n'
+             '|                                | '
+             '*x*                              |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s[i:j] = t"                   | slice of *s* from *i* to '
+             '*j* is  |                       |\n'
+             '|                                | replaced by the contents of '
+             'the  |                       |\n'
+             '|                                | iterable '
+             '*t*                     |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "del s[i:j]"                   | same as "s[i:j] = '
+             '[]"            |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s[i:j:k] = t"                 | the elements of "s[i:j:k]" '
+             'are   | (1)                   |\n'
+             '|                                | replaced by those of '
+             '*t*         |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "del s[i:j:k]"                 | removes the elements '
+             'of          |                       |\n'
+             '|                                | "s[i:j:k]" from the '
+             'list         |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.append(x)"                  | same as "s[len(s):len(s)] = '
+             '[x]" | (2)                   |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.extend(x)" or "s += t"      | for the most part the same '
+             'as    | (3)                   |\n'
+             '|                                | "s[len(s):len(s)] = '
+             'x"           |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s *= n"                       | updates *s* with its '
+             'contents    | (11)                  |\n'
+             '|                                | repeated *n* '
+             'times               |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.count(x)"                   | return number of *i*\'s for '
+             'which |                       |\n'
+             '|                                | "s[i] == '
+             'x"                      |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.index(x[, i[, j]])"         | return smallest *k* such '
+             'that    | (4)                   |\n'
+             '|                                | "s[k] == x" and "i <= k < '
+             'j"     |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.insert(i, x)"               | same as "s[i:i] = '
+             '[x]"           | (5)                   |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.pop([i])"                   | same as "x = s[i]; del '
+             's[i];     | (6)                   |\n'
+             '|                                | return '
+             'x"                        |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.remove(x)"                  | same as "del '
+             's[s.index(x)]"      | (4)                   |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.reverse()"                  | reverses the items of *s* '
+             'in     | (7)                   |\n'
+             '|                                | '
+             'place                            |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '| "s.sort([cmp[, key[,           | sort the items of *s* in '
+             'place   | (7)(8)(9)(10)         |\n'
+             '| reverse]]])"                   '
+             '|                                  |                       |\n'
+             '+--------------------------------+----------------------------------+-----------------------+\n'
+             '\n'
+             'Notes:\n'
+             '\n'
+             '1. *t* must have the same length as the slice it is  '
+             'replacing.\n'
+             '\n'
+             '2. The C implementation of Python has historically accepted\n'
+             '   multiple parameters and implicitly joined them into a '
+             'tuple; this\n'
+             '   no longer works in Python 2.0.  Use of this misfeature has '
+             'been\n'
+             '   deprecated since Python 1.4.\n'
+             '\n'
+             '3. *x* can be any iterable object.\n'
+             '\n'
+             '4. Raises "ValueError" when *x* is not found in *s*. When a\n'
+             '   negative index is passed as the second or third parameter '
+             'to the\n'
+             '   "index()" method, the list length is added, as for slice '
+             'indices.\n'
+             '   If it is still negative, it is truncated to zero, as for '
+             'slice\n'
+             '   indices.\n'
+             '\n'
+             '   Changed in version 2.3: Previously, "index()" didn\'t have '
+             'arguments\n'
+             '   for specifying start and stop positions.\n'
+             '\n'
+             '5. When a negative index is passed as the first parameter to '
+             'the\n'
+             '   "insert()" method, the list length is added, as for slice '
+             'indices.\n'
+             '   If it is still negative, it is truncated to zero, as for '
+             'slice\n'
+             '   indices.\n'
+             '\n'
+             '   Changed in version 2.3: Previously, all negative indices '
+             'were\n'
+             '   truncated to zero.\n'
+             '\n'
+             '6. The "pop()" method\'s optional argument *i* defaults to '
+             '"-1", so\n'
+             '   that by default the last item is removed and returned.\n'
+             '\n'
+             '7. The "sort()" and "reverse()" methods modify the list in '
+             'place\n'
+             '   for economy of space when sorting or reversing a large '
+             'list.  To\n'
+             "   remind you that they operate by side effect, they don't "
+             'return the\n'
+             '   sorted or reversed list.\n'
+             '\n'
+             '8. The "sort()" method takes optional arguments for '
+             'controlling the\n'
+             '   comparisons.\n'
+             '\n'
+             '   *cmp* specifies a custom comparison function of two '
+             'arguments (list\n'
+             '   items) which should return a negative, zero or positive '
+             'number\n'
+             '   depending on whether the first argument is considered '
+             'smaller than,\n'
+             '   equal to, or larger than the second argument: "cmp=lambda '
+             'x,y:\n'
+             '   cmp(x.lower(), y.lower())".  The default value is "None".\n'
+             '\n'
+             '   *key* specifies a function of one argument that is used to '
+             'extract\n'
+             '   a comparison key from each list element: "key=str.lower".  '
+             'The\n'
+             '   default value is "None".\n'
+             '\n'
+             '   *reverse* is a boolean value.  If set to "True", then the '
+             'list\n'
+             '   elements are sorted as if each comparison were reversed.\n'
+             '\n'
+             '   In general, the *key* and *reverse* conversion processes '
+             'are much\n'
+             '   faster than specifying an equivalent *cmp* function.  This '
+             'is\n'
+             '   because *cmp* is called multiple times for each list '
+             'element while\n'
+             '   *key* and *reverse* touch each element only once.  Use\n'
+             '   "functools.cmp_to_key()" to convert an old-style *cmp* '
+             'function to\n'
+             '   a *key* function.\n'
+             '\n'
+             '   Changed in version 2.3: Support for "None" as an equivalent '
+             'to\n'
+             '   omitting *cmp* was added.\n'
+             '\n'
+             '   Changed in version 2.4: Support for *key* and *reverse* was '
+             'added.\n'
+             '\n'
+             '9. Starting with Python 2.3, the "sort()" method is guaranteed '
+             'to\n'
+             '   be stable.  A sort is stable if it guarantees not to change '
+             'the\n'
+             '   relative order of elements that compare equal --- this is '
+             'helpful\n'
+             '   for sorting in multiple passes (for example, sort by '
+             'department,\n'
+             '   then by salary grade).\n'
+             '\n'
+             '10. **CPython implementation detail:** While a list is being\n'
+             '    sorted, the effect of attempting to mutate, or even '
+             'inspect, the\n'
+             '    list is undefined.  The C implementation of Python 2.3 and '
+             'newer\n'
+             '    makes the list appear empty for the duration, and raises\n'
+             '    "ValueError" if it can detect that the list has been '
+             'mutated\n'
+             '    during a sort.\n'
+             '\n'
+             '11. The value *n* is an integer, or an object implementing\n'
+             '    "__index__()".  Zero and negative values of *n* clear the\n'
+             '    sequence.  Items in the sequence are not copied; they are\n'
+             '    referenced multiple times, as explained for "s * n" under '
+             'Sequence\n'
+             '    Types --- str, unicode, list, tuple, bytearray, buffer, '
+             'xrange.\n',
+ 'typesseq-mutable': '\n'
+                     'Mutable Sequence Types\n'
+                     '**********************\n'
+                     '\n'
+                     'List and "bytearray" objects support additional '
+                     'operations that allow\n'
+                     'in-place modification of the object. Other mutable '
+                     'sequence types\n'
+                     '(when added to the language) should also support these '
+                     'operations.\n'
+                     'Strings and tuples are immutable sequence types: such '
+                     'objects cannot\n'
+                     'be modified once created. The following operations are '
+                     'defined on\n'
+                     'mutable sequence types (where *x* is an arbitrary '
+                     'object):\n'
+                     '\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| Operation                      | '
+                     'Result                           | '
+                     'Notes                 |\n'
+                     '+================================+==================================+=======================+\n'
+                     '| "s[i] = x"                     | item *i* of *s* is '
+                     'replaced by   |                       |\n'
+                     '|                                | '
+                     '*x*                              '
+                     '|                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s[i:j] = t"                   | slice of *s* from '
+                     '*i* to *j* is  |                       |\n'
+                     '|                                | replaced by the '
+                     'contents of the  |                       |\n'
+                     '|                                | iterable '
+                     '*t*                     |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "del s[i:j]"                   | same as "s[i:j] = '
+                     '[]"            |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s[i:j:k] = t"                 | the elements of '
+                     '"s[i:j:k]" are   | (1)                   |\n'
+                     '|                                | replaced by those '
+                     'of *t*         |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "del s[i:j:k]"                 | removes the '
+                     'elements of          |                       |\n'
+                     '|                                | "s[i:j:k]" from the '
+                     'list         |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.append(x)"                  | same as '
+                     '"s[len(s):len(s)] = [x]" | (2)                   |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.extend(x)" or "s += t"      | for the most part '
+                     'the same as    | (3)                   |\n'
+                     '|                                | "s[len(s):len(s)] = '
+                     'x"           |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s *= n"                       | updates *s* with '
+                     'its contents    | (11)                  |\n'
+                     '|                                | repeated *n* '
+                     'times               |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.count(x)"                   | return number of '
+                     "*i*'s for which |                       |\n"
+                     '|                                | "s[i] == '
+                     'x"                      |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.index(x[, i[, j]])"         | return smallest *k* '
+                     'such that    | (4)                   |\n'
+                     '|                                | "s[k] == x" and "i '
+                     '<= k < j"     |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.insert(i, x)"               | same as "s[i:i] = '
+                     '[x]"           | (5)                   |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.pop([i])"                   | same as "x = s[i]; '
+                     'del s[i];     | (6)                   |\n'
+                     '|                                | return '
+                     'x"                        |                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.remove(x)"                  | same as "del '
+                     's[s.index(x)]"      | (4)                   |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.reverse()"                  | reverses the items '
+                     'of *s* in     | (7)                   |\n'
+                     '|                                | '
+                     'place                            '
+                     '|                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '| "s.sort([cmp[, key[,           | sort the items of '
+                     '*s* in place   | (7)(8)(9)(10)         |\n'
+                     '| reverse]]])"                   '
+                     '|                                  '
+                     '|                       |\n'
+                     '+--------------------------------+----------------------------------+-----------------------+\n'
+                     '\n'
+                     'Notes:\n'
+                     '\n'
+                     '1. *t* must have the same length as the slice it is  '
+                     'replacing.\n'
+                     '\n'
+                     '2. The C implementation of Python has historically '
+                     'accepted\n'
+                     '   multiple parameters and implicitly joined them into '
+                     'a tuple; this\n'
+                     '   no longer works in Python 2.0.  Use of this '
+                     'misfeature has been\n'
+                     '   deprecated since Python 1.4.\n'
+                     '\n'
+                     '3. *x* can be any iterable object.\n'
+                     '\n'
+                     '4. Raises "ValueError" when *x* is not found in *s*. '
+                     'When a\n'
+                     '   negative index is passed as the second or third '
+                     'parameter to the\n'
+                     '   "index()" method, the list length is added, as for '
+                     'slice indices.\n'
+                     '   If it is still negative, it is truncated to zero, '
+                     'as for slice\n'
+                     '   indices.\n'
+                     '\n'
+                     '   Changed in version 2.3: Previously, "index()" '
+                     "didn't have arguments\n"
+                     '   for specifying start and stop positions.\n'
+                     '\n'
+                     '5. When a negative index is passed as the first '
+                     'parameter to the\n'
+                     '   "insert()" method, the list length is added, as for '
+                     'slice indices.\n'
+                     '   If it is still negative, it is truncated to zero, '
+                     'as for slice\n'
+                     '   indices.\n'
+                     '\n'
+                     '   Changed in version 2.3: Previously, all negative '
+                     'indices were\n'
+                     '   truncated to zero.\n'
+                     '\n'
+                     '6. The "pop()" method\'s optional argument *i* '
+                     'defaults to "-1", so\n'
+                     '   that by default the last item is removed and '
+                     'returned.\n'
+                     '\n'
+                     '7. The "sort()" and "reverse()" methods modify the '
+                     'list in place\n'
+                     '   for economy of space when sorting or reversing a '
+                     'large list.  To\n'
+                     '   remind you that they operate by side effect, they '
+                     "don't return the\n"
+                     '   sorted or reversed list.\n'
+                     '\n'
+                     '8. The "sort()" method takes optional arguments for '
+                     'controlling the\n'
+                     '   comparisons.\n'
+                     '\n'
+                     '   *cmp* specifies a custom comparison function of two '
+                     'arguments (list\n'
+                     '   items) which should return a negative, zero or '
+                     'positive number\n'
+                     '   depending on whether the first argument is '
+                     'considered smaller than,\n'
+                     '   equal to, or larger than the second argument: '
+                     '"cmp=lambda x,y:\n'
+                     '   cmp(x.lower(), y.lower())".  The default value is '
+                     '"None".\n'
+                     '\n'
+                     '   *key* specifies a function of one argument that is '
+                     'used to extract\n'
+                     '   a comparison key from each list element: '
+                     '"key=str.lower".  The\n'
+                     '   default value is "None".\n'
+                     '\n'
+                     '   *reverse* is a boolean value.  If set to "True", '
+                     'then the list\n'
+                     '   elements are sorted as if each comparison were '
+                     'reversed.\n'
+                     '\n'
+                     '   In general, the *key* and *reverse* conversion '
+                     'processes are much\n'
+                     '   faster than specifying an equivalent *cmp* '
+                     'function.  This is\n'
+                     '   because *cmp* is called multiple times for each '
+                     'list element while\n'
+                     '   *key* and *reverse* touch each element only once.  '
+                     'Use\n'
+                     '   "functools.cmp_to_key()" to convert an old-style '
+                     '*cmp* function to\n'
+                     '   a *key* function.\n'
+                     '\n'
+                     '   Changed in version 2.3: Support for "None" as an '
+                     'equivalent to\n'
+                     '   omitting *cmp* was added.\n'
+                     '\n'
+                     '   Changed in version 2.4: Support for *key* and '
+                     '*reverse* was added.\n'
+                     '\n'
+                     '9. Starting with Python 2.3, the "sort()" method is '
+                     'guaranteed to\n'
+                     '   be stable.  A sort is stable if it guarantees not '
+                     'to change the\n'
+                     '   relative order of elements that compare equal --- '
+                     'this is helpful\n'
+                     '   for sorting in multiple passes (for example, sort '
+                     'by department,\n'
+                     '   then by salary grade).\n'
+                     '\n'
+                     '10. **CPython implementation detail:** While a list is '
+                     'being\n'
+                     '    sorted, the effect of attempting to mutate, or '
+                     'even inspect, the\n'
+                     '    list is undefined.  The C implementation of Python '
+                     '2.3 and newer\n'
+                     '    makes the list appear empty for the duration, and '
+                     'raises\n'
+                     '    "ValueError" if it can detect that the list has '
+                     'been mutated\n'
+                     '    during a sort.\n'
+                     '\n'
+                     '11. The value *n* is an integer, or an object '
+                     'implementing\n'
+                     '    "__index__()".  Zero and negative values of *n* '
+                     'clear the\n'
+                     '    sequence.  Items in the sequence are not copied; '
+                     'they are\n'
+                     '    referenced multiple times, as explained for "s * '
+                     'n" under Sequence\n'
+                     '    Types --- str, unicode, list, tuple, bytearray, '
+                     'buffer, xrange.\n',
+ 'unary': '\n'
+          'Unary arithmetic and bitwise operations\n'
+          '***************************************\n'
+          '\n'
+          'All unary arithmetic and bitwise operations have the same '
+          'priority:\n'
+          '\n'
+          '   u_expr ::= power | "-" u_expr | "+" u_expr | "~" u_expr\n'
+          '\n'
+          'The unary "-" (minus) operator yields the negation of its '
+          'numeric\n'
+          'argument.\n'
+          '\n'
+          'The unary "+" (plus) operator yields its numeric argument '
+          'unchanged.\n'
+          '\n'
+          'The unary "~" (invert) operator yields the bitwise inversion of '
+          'its\n'
+          'plain or long integer argument.  The bitwise inversion of "x" is\n'
+          'defined as "-(x+1)".  It only applies to integral numbers.\n'
+          '\n'
+          'In all three cases, if the argument does not have the proper '
+          'type, a\n'
+          '"TypeError" exception is raised.\n',
+ 'while': '\n'
+          'The "while" statement\n'
+          '*********************\n'
+          '\n'
+          'The "while" statement is used for repeated execution as long as '
+          'an\n'
+          'expression is true:\n'
+          '\n'
+          '   while_stmt ::= "while" expression ":" suite\n'
+          '                  ["else" ":" suite]\n'
+          '\n'
+          'This repeatedly tests the expression and, if it is true, executes '
+          'the\n'
+          'first suite; if the expression is false (which may be the first '
+          'time\n'
+          'it is tested) the suite of the "else" clause, if present, is '
+          'executed\n'
+          'and the loop terminates.\n'
+          '\n'
+          'A "break" statement executed in the first suite terminates the '
+          'loop\n'
+          'without executing the "else" clause\'s suite.  A "continue" '
+          'statement\n'
+          'executed in the first suite skips the rest of the suite and goes '
+          'back\n'
+          'to testing the expression.\n',
+ 'with': '\n'
+         'The "with" statement\n'
+         '********************\n'
+         '\n'
+         'New in version 2.5.\n'
+         '\n'
+         'The "with" statement is used to wrap the execution of a block '
+         'with\n'
+         'methods defined by a context manager (see section With Statement\n'
+         'Context Managers). This allows common '
+         '"try"..."except"..."finally"\n'
+         'usage patterns to be encapsulated for convenient reuse.\n'
+         '\n'
+         '   with_stmt ::= "with" with_item ("," with_item)* ":" suite\n'
+         '   with_item ::= expression ["as" target]\n'
+         '\n'
+         'The execution of the "with" statement with one "item" proceeds as\n'
+         'follows:\n'
+         '\n'
+         '1. The context expression (the expression given in the '
+         '"with_item")\n'
+         '   is evaluated to obtain a context manager.\n'
+         '\n'
+         '2. The context manager\'s "__exit__()" is loaded for later use.\n'
+         '\n'
+         '3. The context manager\'s "__enter__()" method is invoked.\n'
+         '\n'
+         '4. If a target was included in the "with" statement, the return\n'
+         '   value from "__enter__()" is assigned to it.\n'
+         '\n'
+         '   Note: The "with" statement guarantees that if the '
+         '"__enter__()"\n'
+         '     method returns without an error, then "__exit__()" will '
+         'always be\n'
+         '     called. Thus, if an error occurs during the assignment to '
+         'the\n'
+         '     target list, it will be treated the same as an error '
+         'occurring\n'
+         '     within the suite would be. See step 6 below.\n'
+         '\n'
+         '5. The suite is executed.\n'
+         '\n'
+         '6. The context manager\'s "__exit__()" method is invoked. If an\n'
+         '   exception caused the suite to be exited, its type, value, and\n'
+         '   traceback are passed as arguments to "__exit__()". Otherwise, '
+         'three\n'
+         '   "None" arguments are supplied.\n'
+         '\n'
+         '   If the suite was exited due to an exception, and the return '
+         'value\n'
+         '   from the "__exit__()" method was false, the exception is '
+         'reraised.\n'
+         '   If the return value was true, the exception is suppressed, and\n'
+         '   execution continues with the statement following the "with"\n'
+         '   statement.\n'
+         '\n'
+         '   If the suite was exited for any reason other than an exception, '
+         'the\n'
+         '   return value from "__exit__()" is ignored, and execution '
+         'proceeds\n'
+         '   at the normal location for the kind of exit that was taken.\n'
+         '\n'
+         'With more than one item, the context managers are processed as if\n'
+         'multiple "with" statements were nested:\n'
+         '\n'
+         '   with A() as a, B() as b:\n'
+         '       suite\n'
+         '\n'
+         'is equivalent to\n'
+         '\n'
+         '   with A() as a:\n'
+         '       with B() as b:\n'
+         '           suite\n'
+         '\n'
+         'Note: In Python 2.5, the "with" statement is only allowed when '
+         'the\n'
+         '  "with_statement" feature has been enabled.  It is always enabled '
+         'in\n'
+         '  Python 2.6.\n'
+         '\n'
+         'Changed in version 2.7: Support for multiple context expressions.\n'
+         '\n'
+         'See also: **PEP 0343** - The "with" statement\n'
+         '\n'
+         '     The specification, background, and examples for the Python '
+         '"with"\n'
+         '     statement.\n',
+ 'yield': '\n'
+          'The "yield" statement\n'
+          '*********************\n'
+          '\n'
+          '   yield_stmt ::= yield_expression\n'
+          '\n'
+          'The "yield" statement is only used when defining a generator '
+          'function,\n'
+          'and is only used in the body of the generator function. Using a\n'
+          '"yield" statement in a function definition is sufficient to cause '
+          'that\n'
+          'definition to create a generator function instead of a normal\n'
+          'function.\n'
+          '\n'
+          'When a generator function is called, it returns an iterator known '
+          'as a\n'
+          'generator iterator, or more commonly, a generator.  The body of '
+          'the\n'
+          "generator function is executed by calling the generator's "
+          '"next()"\n'
+          'method repeatedly until it raises an exception.\n'
+          '\n'
+          'When a "yield" statement is executed, the state of the generator '
+          'is\n'
+          'frozen and the value of "expression_list" is returned to '
+          '"next()"\'s\n'
+          'caller.  By "frozen" we mean that all local state is retained,\n'
+          'including the current bindings of local variables, the '
+          'instruction\n'
+          'pointer, and the internal evaluation stack: enough information '
+          'is\n'
+          'saved so that the next time "next()" is invoked, the function '
+          'can\n'
+          'proceed exactly as if the "yield" statement were just another '
+          'external\n'
+          'call.\n'
+          '\n'
+          'As of Python version 2.5, the "yield" statement is now allowed in '
+          'the\n'
+          '"try" clause of a "try" ...  "finally" construct.  If the '
+          'generator is\n'
+          'not resumed before it is finalized (by reaching a zero reference '
+          'count\n'
+          "or by being garbage collected), the generator-iterator's "
+          '"close()"\n'
+          'method will be called, allowing any pending "finally" clauses to\n'
+          'execute.\n'
+          '\n'
+          'For full details of "yield" semantics, refer to the Yield '
+          'expressions\n'
+          'section.\n'
+          '\n'
+          'Note: In Python 2.2, the "yield" statement was only allowed when '
+          'the\n'
+          '  "generators" feature has been enabled.  This "__future__" '
+          'import\n'
+          '  statement was used to enable the feature:\n'
+          '\n'
+          '     from __future__ import generators\n'
+          '\n'
+          'See also: **PEP 0255** - Simple Generators\n'
+          '\n'
+          '     The proposal for adding generators and the "yield" statement '
+          'to\n'
+          '     Python.\n'
+          '\n'
+          '  **PEP 0342** - Coroutines via Enhanced Generators\n'
+          '     The proposal that, among other generator enhancements, '
+          'proposed\n'
+          '     allowing "yield" to appear inside a "try" ... "finally" '
+          'block.\n'}
index 6e4bd12ad31d29bcfa0186c88c858ce20c931e71..73f8d80ee9cd98bc975456cf8c9e83b66675e5bb 100644 (file)
@@ -135,20 +135,23 @@ class Completer:
             return []
 
         # get the content of the object, except __builtins__
-        words = dir(thisobject)
-        if "__builtins__" in words:
-            words.remove("__builtins__")
+        words = set(dir(thisobject))
+        words.discard("__builtins__")
 
         if hasattr(thisobject, '__class__'):
-            words.append('__class__')
-            words.extend(get_class_members(thisobject.__class__))
+            words.add('__class__')
+            words.update(get_class_members(thisobject.__class__))
         matches = []
         n = len(attr)
         for word in words:
-            if word[:n] == attr and hasattr(thisobject, word):
-                val = getattr(thisobject, word)
+            if word[:n] == attr:
+                try:
+                    val = getattr(thisobject, word)
+                except Exception:
+                    continue  # Exclude properties that are not set
                 word = self._callable_postfix(val, "%s.%s" % (expr, word))
                 matches.append(word)
+        matches.sort()
         return matches
 
 def get_class_members(klass):
index e78a5758ca0a58077f56e3bc3dc2d0a399ebfa42..26dcfde7bcbea703cbd6b32b2162aad8cada94a1 100644 (file)
@@ -449,7 +449,16 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
         if not dry_run:
             with zipfile.ZipFile(zip_filename, "w",
                                  compression=zipfile.ZIP_DEFLATED) as zf:
+                path = os.path.normpath(base_dir)
+                zf.write(path, path)
+                if logger is not None:
+                    logger.info("adding '%s'", path)
                 for dirpath, dirnames, filenames in os.walk(base_dir):
+                    for name in sorted(dirnames):
+                        path = os.path.normpath(os.path.join(dirpath, name))
+                        zf.write(path, path)
+                        if logger is not None:
+                            logger.info("adding '%s'", path)
                     for name in filenames:
                         path = os.path.normpath(os.path.join(dirpath, name))
                         if os.path.isfile(path):
index 0813a13f4087cdc5ce8c694eb315a686008926a0..f4b842834901a95af1228a36aba14ad01da12212 100644 (file)
@@ -170,6 +170,14 @@ class RowFactoryTests(unittest.TestCase):
         self.assertEqual(list(reversed(row)), list(reversed(as_tuple)))
         self.assertIsInstance(row, Sequence)
 
+    def CheckFakeCursorClass(self):
+        # Issue #24257: Incorrect use of PyObject_IsInstance() caused
+        # segmentation fault.
+        class FakeCursor(str):
+            __class__ = sqlite.Cursor
+        cur = self.con.cursor(factory=FakeCursor)
+        self.assertRaises(TypeError, sqlite.Row, cur, ())
+
     def tearDown(self):
         self.con.close()
 
index 082f36117902c0265631f96d58431444f9496fa2..66e5393afe5452c7cb298622e1922e06c6fd3c78 100644 (file)
@@ -186,7 +186,7 @@ def nti(s):
     # itn() below.
     if s[0] != chr(0200):
         try:
-            n = int(nts(s) or "0", 8)
+            n = int(nts(s).strip() or "0", 8)
         except ValueError:
             raise InvalidHeaderError("invalid header")
     else:
@@ -744,12 +744,18 @@ class _FileInFile(object):
         else:
             return self.readsparse(size)
 
+    def __read(self, size):
+        buf = self.fileobj.read(size)
+        if len(buf) != size:
+            raise ReadError("unexpected end of data")
+        return buf
+
     def readnormal(self, size):
         """Read operation for regular files.
         """
         self.fileobj.seek(self.offset + self.position)
         self.position += size
-        return self.fileobj.read(size)
+        return self.__read(size)
 
     def readsparse(self, size):
         """Read operation for sparse files.
@@ -777,7 +783,7 @@ class _FileInFile(object):
             realpos = section.realpos + self.position - section.offset
             self.fileobj.seek(self.offset + realpos)
             self.position += size
-            return self.fileobj.read(size)
+            return self.__read(size)
         else:
             self.position += size
             return NUL * size
@@ -2336,8 +2342,13 @@ class TarFile(object):
             self.firstmember = None
             return m
 
+        # Advance the file pointer.
+        if self.offset != self.fileobj.tell():
+            self.fileobj.seek(self.offset - 1)
+            if not self.fileobj.read(1):
+                raise ReadError("unexpected end of data")
+
         # Read the next block.
-        self.fileobj.seek(self.offset)
         tarinfo = None
         while True:
             try:
index fbda8ebeb732ad4a1423647da16cee8e79ea4a68..184dfc16e5441e8c1acf7fda39c0a884726e25d1 100644 (file)
@@ -205,9 +205,14 @@ def _get_default_tempdir():
                     _os.unlink(filename)
                 return dir
             except (OSError, IOError) as e:
-                if e.args[0] != _errno.EEXIST:
-                    break # no point trying more names in this directory
-                pass
+                if e.args[0] == _errno.EEXIST:
+                    continue
+                if (_os.name == 'nt' and e.args[0] == _errno.EACCES and
+                    _os.path.isdir(dir) and _os.access(dir, _os.W_OK)):
+                    # On windows, when a directory with the chosen name already
+                    # exists, EACCES error code is returned instead of EEXIST.
+                    continue
+                break # no point trying more names in this directory
     raise IOError, (_errno.ENOENT,
                     ("No usable temporary directory found in %s" % dirlist))
 
@@ -242,7 +247,8 @@ def _mkstemp_inner(dir, pre, suf, flags):
         except OSError, e:
             if e.errno == _errno.EEXIST:
                 continue # try again
-            if _os.name == 'nt' and e.errno == _errno.EACCES:
+            if (_os.name == 'nt' and e.errno == _errno.EACCES and
+                _os.path.isdir(dir) and _os.access(dir, _os.W_OK)):
                 # On windows, when a directory with the chosen name already
                 # exists, EACCES error code is returned instead of EEXIST.
                 continue
@@ -335,6 +341,11 @@ def mkdtemp(suffix="", prefix=template, dir=None):
         except OSError, e:
             if e.errno == _errno.EEXIST:
                 continue # try again
+            if (_os.name == 'nt' and e.errno == _errno.EACCES and
+                _os.path.isdir(dir) and _os.access(dir, _os.W_OK)):
+                # On windows, when a directory with the chosen name already
+                # exists, EACCES error code is returned instead of EEXIST.
+                continue
             raise
 
     raise IOError, (_errno.EEXIST, "No usable temporary directory name found")
index 2ff75c4ade9b863b71eb573a53ea0a725aaf0958..efc464f4032026f9bb8e227accbdf45eeb6e1ed1 100644 (file)
@@ -305,6 +305,14 @@ class EventTests(BaseTestCase):
         for r, dt in results2:
             self.assertTrue(r)
 
+    def test_reset_internal_locks(self):
+        evt = self.eventtype()
+        old_lock = evt._Event__cond._Condition__lock
+        evt._reset_internal_locks()
+        new_lock = evt._Event__cond._Condition__lock
+        self.assertIsNot(new_lock, old_lock)
+        self.assertIs(type(new_lock), type(old_lock))
+
 
 class ConditionTests(BaseTestCase):
     """
index 1599893d8a60abb0ae5c4f20e1a07efe6279a2a7..d8346ea757b6f9bf1131f1ff2cdb57a13e57115b 100644 (file)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 import unittest
 import pickle
 import cPickle
@@ -108,9 +109,37 @@ class C:
     def __cmp__(self, other):
         return cmp(self.__dict__, other.__dict__)
 
+class D(C):
+    def __init__(self, arg):
+        pass
+
+class E(C):
+    def __getinitargs__(self):
+        return ()
+
+class H(object):
+    pass
+
+# Hashable mutable key
+class K(object):
+    def __init__(self, value):
+        self.value = value
+
+    def __reduce__(self):
+        # Shouldn't support the recursion itself
+        return K, (self.value,)
+
 import __main__
 __main__.C = C
 C.__module__ = "__main__"
+__main__.D = D
+D.__module__ = "__main__"
+__main__.E = E
+E.__module__ = "__main__"
+__main__.H = H
+H.__module__ = "__main__"
+__main__.K = K
+K.__module__ = "__main__"
 
 class myint(int):
     def __init__(self, x):
@@ -420,11 +449,197 @@ def create_data():
     x.append(5)
     return x
 
-class AbstractPickleTests(unittest.TestCase):
-    # Subclass must define self.dumps, self.loads, self.error.
+
+class AbstractUnpickleTests(unittest.TestCase):
+    # Subclass must define self.loads, self.error.
 
     _testdata = create_data()
 
+    def assert_is_copy(self, obj, objcopy, msg=None):
+        """Utility method to verify if two objects are copies of each others.
+        """
+        if msg is None:
+            msg = "{!r} is not a copy of {!r}".format(obj, objcopy)
+        self.assertEqual(obj, objcopy, msg=msg)
+        self.assertIs(type(obj), type(objcopy), msg=msg)
+        if hasattr(obj, '__dict__'):
+            self.assertDictEqual(obj.__dict__, objcopy.__dict__, msg=msg)
+            self.assertIsNot(obj.__dict__, objcopy.__dict__, msg=msg)
+        if hasattr(obj, '__slots__'):
+            self.assertListEqual(obj.__slots__, objcopy.__slots__, msg=msg)
+            for slot in obj.__slots__:
+                self.assertEqual(
+                    hasattr(obj, slot), hasattr(objcopy, slot), msg=msg)
+                self.assertEqual(getattr(obj, slot, None),
+                                 getattr(objcopy, slot, None), msg=msg)
+
+    def test_load_from_canned_string(self):
+        expected = self._testdata
+        for canned in DATA0, DATA1, DATA2:
+            got = self.loads(canned)
+            self.assert_is_copy(expected, got)
+
+    def test_garyp(self):
+        self.assertRaises(self.error, self.loads, 'garyp')
+
+    def test_maxint64(self):
+        maxint64 = (1L << 63) - 1
+        data = 'I' + str(maxint64) + '\n.'
+        got = self.loads(data)
+        self.assertEqual(got, maxint64)
+
+        # Try too with a bogus literal.
+        data = 'I' + str(maxint64) + 'JUNK\n.'
+        self.assertRaises(ValueError, self.loads, data)
+
+    def test_insecure_strings(self):
+        insecure = ["abc", "2 + 2", # not quoted
+                    #"'abc' + 'def'", # not a single quoted string
+                    "'abc", # quote is not closed
+                    "'abc\"", # open quote and close quote don't match
+                    "'abc'   ?", # junk after close quote
+                    "'\\'", # trailing backslash
+                    # issue #17710
+                    "'", '"',
+                    "' ", '" ',
+                    '\'"', '"\'',
+                    " ''", ' ""',
+                    ' ',
+                    # some tests of the quoting rules
+                    #"'abc\"\''",
+                    #"'\\\\a\'\'\'\\\'\\\\\''",
+                    ]
+        for s in insecure:
+            buf = "S" + s + "\n."
+            self.assertRaises(ValueError, self.loads, buf)
+
+    def test_correctly_quoted_string(self):
+        goodpickles = [("S''\n.", ''),
+                       ('S""\n.', ''),
+                       ('S"\\n"\n.', '\n'),
+                       ("S'\\n'\n.", '\n')]
+        for p, expected in goodpickles:
+            self.assertEqual(self.loads(p), expected)
+
+    def test_load_classic_instance(self):
+        # See issue5180.  Test loading 2.x pickles that
+        # contain an instance of old style class.
+        for X, args in [(C, ()), (D, ('x',)), (E, ())]:
+            xname = X.__name__.encode('ascii')
+            # Protocol 0 (text mode pickle):
+            """
+             0: (    MARK
+             1: i        INST       '__main__ X' (MARK at 0)
+            13: p    PUT        0
+            16: (    MARK
+            17: d        DICT       (MARK at 16)
+            18: p    PUT        1
+            21: b    BUILD
+            22: .    STOP
+            """
+            pickle0 = ("(i__main__\n"
+                       "X\n"
+                       "p0\n"
+                       "(dp1\nb.").replace('X', xname)
+            self.assert_is_copy(X(*args), self.loads(pickle0))
+
+            # Protocol 1 (binary mode pickle)
+            """
+             0: (    MARK
+             1: c        GLOBAL     '__main__ X'
+            13: q        BINPUT     0
+            15: o        OBJ        (MARK at 0)
+            16: q    BINPUT     1
+            18: }    EMPTY_DICT
+            19: q    BINPUT     2
+            21: b    BUILD
+            22: .    STOP
+            """
+            pickle1 = ('(c__main__\n'
+                       'X\n'
+                       'q\x00oq\x01}q\x02b.').replace('X', xname)
+            self.assert_is_copy(X(*args), self.loads(pickle1))
+
+            # Protocol 2 (pickle2 = '\x80\x02' + pickle1)
+            """
+             0: \x80 PROTO      2
+             2: (    MARK
+             3: c        GLOBAL     '__main__ X'
+            15: q        BINPUT     0
+            17: o        OBJ        (MARK at 2)
+            18: q    BINPUT     1
+            20: }    EMPTY_DICT
+            21: q    BINPUT     2
+            23: b    BUILD
+            24: .    STOP
+            """
+            pickle2 = ('\x80\x02(c__main__\n'
+                       'X\n'
+                       'q\x00oq\x01}q\x02b.').replace('X', xname)
+            self.assert_is_copy(X(*args), self.loads(pickle2))
+
+    def test_pop_empty_stack(self):
+        # Test issue7455
+        s = '0'
+        self.assertRaises((cPickle.UnpicklingError, IndexError), self.loads, s)
+
+    def test_load_str(self):
+        # From Python 2: pickle.dumps('a\x00\xa0', protocol=0)
+        self.assertEqual(self.loads("S'a\\x00\\xa0'\n."), 'a\x00\xa0')
+        # From Python 2: pickle.dumps('a\x00\xa0', protocol=1)
+        self.assertEqual(self.loads('U\x03a\x00\xa0.'), 'a\x00\xa0')
+        # From Python 2: pickle.dumps('a\x00\xa0', protocol=2)
+        self.assertEqual(self.loads('\x80\x02U\x03a\x00\xa0.'), 'a\x00\xa0')
+
+    def test_load_unicode(self):
+        # From Python 2: pickle.dumps(u'π', protocol=0)
+        self.assertEqual(self.loads('V\\u03c0\n.'), u'π')
+        # From Python 2: pickle.dumps(u'π', protocol=1)
+        self.assertEqual(self.loads('X\x02\x00\x00\x00\xcf\x80.'), u'π')
+        # From Python 2: pickle.dumps(u'π', protocol=2)
+        self.assertEqual(self.loads('\x80\x02X\x02\x00\x00\x00\xcf\x80.'), u'π')
+
+    def test_constants(self):
+        self.assertIsNone(self.loads('N.'))
+        self.assertIs(self.loads('\x88.'), True)
+        self.assertIs(self.loads('\x89.'), False)
+        self.assertIs(self.loads('I01\n.'), True)
+        self.assertIs(self.loads('I00\n.'), False)
+
+    def test_misc_get(self):
+        self.assertRaises(self.error, self.loads, 'g0\np0\n')
+        self.assertRaises(self.error, self.loads, 'h\x00q\x00')
+
+    def test_get(self):
+        pickled = '((lp100000\ng100000\nt.'
+        unpickled = self.loads(pickled)
+        self.assertEqual(unpickled, ([],)*2)
+        self.assertIs(unpickled[0], unpickled[1])
+
+    def test_binget(self):
+        pickled = '(]q\xffh\xfft.'
+        unpickled = self.loads(pickled)
+        self.assertEqual(unpickled, ([],)*2)
+        self.assertIs(unpickled[0], unpickled[1])
+
+    def test_long_binget(self):
+        pickled = '(]r\x00\x00\x01\x00j\x00\x00\x01\x00t.'
+        unpickled = self.loads(pickled)
+        self.assertEqual(unpickled, ([],)*2)
+        self.assertIs(unpickled[0], unpickled[1])
+
+    def test_dup(self):
+        pickled = '((l2t.'
+        unpickled = self.loads(pickled)
+        self.assertEqual(unpickled, ([],)*2)
+        self.assertIs(unpickled[0], unpickled[1])
+
+
+class AbstractPickleTests(unittest.TestCase):
+    # Subclass must define self.dumps, self.loads.
+
+    _testdata = AbstractUnpickleTests._testdata
+
     def setUp(self):
         pass
 
@@ -455,12 +670,6 @@ class AbstractPickleTests(unittest.TestCase):
             got = self.loads(s)
             self.assertEqual(expected, got)
 
-    def test_load_from_canned_string(self):
-        expected = self._testdata
-        for canned in DATA0, DATA1, DATA2:
-            got = self.loads(canned)
-            self.assertEqual(expected, got)
-
     # There are gratuitous differences between pickles produced by
     # pickle and cPickle, largely because cPickle starts PUT indices at
     # 1 and pickle starts them at 0.  See XXX comment in cPickle's put2() --
@@ -483,18 +692,21 @@ class AbstractPickleTests(unittest.TestCase):
         for proto in protocols:
             s = self.dumps(l, proto)
             x = self.loads(s)
+            self.assertIsInstance(x, list)
             self.assertEqual(len(x), 1)
-            self.assertTrue(x is x[0])
+            self.assertIs(x[0], x)
 
-    def test_recursive_tuple(self):
+    def test_recursive_tuple_and_list(self):
         t = ([],)
         t[0].append(t)
         for proto in protocols:
             s = self.dumps(t, proto)
             x = self.loads(s)
+            self.assertIsInstance(x, tuple)
             self.assertEqual(len(x), 1)
+            self.assertIsInstance(x[0], list)
             self.assertEqual(len(x[0]), 1)
-            self.assertTrue(x is x[0][0])
+            self.assertIs(x[0][0], x)
 
     def test_recursive_dict(self):
         d = {}
@@ -502,8 +714,50 @@ class AbstractPickleTests(unittest.TestCase):
         for proto in protocols:
             s = self.dumps(d, proto)
             x = self.loads(s)
+            self.assertIsInstance(x, dict)
             self.assertEqual(x.keys(), [1])
-            self.assertTrue(x[1] is x)
+            self.assertIs(x[1], x)
+
+    def test_recursive_dict_key(self):
+        d = {}
+        k = K(d)
+        d[k] = 1
+        for proto in protocols:
+            s = self.dumps(d, proto)
+            x = self.loads(s)
+            self.assertIsInstance(x, dict)
+            self.assertEqual(len(x.keys()), 1)
+            self.assertIsInstance(x.keys()[0], K)
+            self.assertIs(x.keys()[0].value, x)
+
+    def test_recursive_list_subclass(self):
+        y = MyList()
+        y.append(y)
+        s = self.dumps(y, 2)
+        x = self.loads(s)
+        self.assertIsInstance(x, MyList)
+        self.assertEqual(len(x), 1)
+        self.assertIs(x[0], x)
+
+    def test_recursive_dict_subclass(self):
+        d = MyDict()
+        d[1] = d
+        s = self.dumps(d, 2)
+        x = self.loads(s)
+        self.assertIsInstance(x, MyDict)
+        self.assertEqual(x.keys(), [1])
+        self.assertIs(x[1], x)
+
+    def test_recursive_dict_subclass_key(self):
+        d = MyDict()
+        k = K(d)
+        d[k] = 1
+        s = self.dumps(d, 2)
+        x = self.loads(s)
+        self.assertIsInstance(x, MyDict)
+        self.assertEqual(len(x.keys()), 1)
+        self.assertIsInstance(x.keys()[0], K)
+        self.assertIs(x.keys()[0].value, x)
 
     def test_recursive_inst(self):
         i = C()
@@ -528,25 +782,41 @@ class AbstractPickleTests(unittest.TestCase):
             self.assertEqual(x[0].attr.keys(), [1])
             self.assertTrue(x[0].attr[1] is x)
 
-    def test_garyp(self):
-        self.assertRaises(self.error, self.loads, 'garyp')
+    def check_recursive_collection_and_inst(self, factory):
+        h = H()
+        y = factory([h])
+        h.attr = y
+        for proto in protocols:
+            s = self.dumps(y, proto)
+            x = self.loads(s)
+            self.assertIsInstance(x, type(y))
+            self.assertEqual(len(x), 1)
+            self.assertIsInstance(list(x)[0], H)
+            self.assertIs(list(x)[0].attr, x)
 
-    def test_insecure_strings(self):
-        insecure = ["abc", "2 + 2", # not quoted
-                    #"'abc' + 'def'", # not a single quoted string
-                    "'abc", # quote is not closed
-                    "'abc\"", # open quote and close quote don't match
-                    "'abc'   ?", # junk after close quote
-                    "'\\'", # trailing backslash
-                    "'",    # issue #17710
-                    "' ",   # issue #17710
-                    # some tests of the quoting rules
-                    #"'abc\"\''",
-                    #"'\\\\a\'\'\'\\\'\\\\\''",
-                    ]
-        for s in insecure:
-            buf = "S" + s + "\012p0\012."
-            self.assertRaises(ValueError, self.loads, buf)
+    def test_recursive_list_and_inst(self):
+        self.check_recursive_collection_and_inst(list)
+
+    def test_recursive_tuple_and_inst(self):
+        self.check_recursive_collection_and_inst(tuple)
+
+    def test_recursive_dict_and_inst(self):
+        self.check_recursive_collection_and_inst(dict.fromkeys)
+
+    def test_recursive_set_and_inst(self):
+        self.check_recursive_collection_and_inst(set)
+
+    def test_recursive_frozenset_and_inst(self):
+        self.check_recursive_collection_and_inst(frozenset)
+
+    def test_recursive_list_subclass_and_inst(self):
+        self.check_recursive_collection_and_inst(MyList)
+
+    def test_recursive_tuple_subclass_and_inst(self):
+        self.check_recursive_collection_and_inst(MyTuple)
+
+    def test_recursive_dict_subclass_and_inst(self):
+        self.check_recursive_collection_and_inst(MyDict.fromkeys)
 
     if have_unicode:
         def test_unicode(self):
@@ -576,16 +846,6 @@ class AbstractPickleTests(unittest.TestCase):
                     self.assertEqual(expected, n2)
                 n = n >> 1
 
-    def test_maxint64(self):
-        maxint64 = (1L << 63) - 1
-        data = 'I' + str(maxint64) + '\n.'
-        got = self.loads(data)
-        self.assertEqual(got, maxint64)
-
-        # Try too with a bogus literal.
-        data = 'I' + str(maxint64) + 'JUNK\n.'
-        self.assertRaises(ValueError, self.loads, data)
-
     def test_long(self):
         for proto in protocols:
             # 256 bytes is where LONG4 begins.
index 3a8ad91067e8dc1842071b8cb423d8ee6706f661..0007da64b8861df186e21dd0ce61ba1ea0940e29 100755 (executable)
@@ -57,11 +57,12 @@ Special runs
 -t/--threshold THRESHOLD
                 -- call gc.set_threshold(THRESHOLD)
 -F/--forever    -- run the specified tests in a loop, until an error happens
+-P/--pgo        -- enable Profile Guided Optimization training
 
 
 Additional Option Details:
 
--r randomizes test execution order. You can use --randseed=int to provide a
+-r randomizes test execution order. You can use --randseed=int to provide an
 int seed value for the randomizer; this is useful for reproducing troublesome
 test orders.
 
@@ -203,6 +204,15 @@ if sys.platform == 'darwin':
         newsoft = min(hard, max(soft, 1024*2048))
         resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard))
 
+# Windows, Tkinter, and resetting the environment after each test don't
+# mix well.  To alleviate test failures due to Tcl/Tk not being able to
+# find its library, get the necessary environment massage done once early.
+if sys.platform == 'win32':
+    try:
+        import FixTk
+    except Exception:
+        pass
+
 # Test result constants.
 PASSED = 1
 FAILED = 0
@@ -231,7 +241,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
          findleaks=False, use_resources=None, trace=False, coverdir='coverage',
          runleaks=False, huntrleaks=False, verbose2=False, print_slow=False,
          random_seed=None, use_mp=None, verbose3=False, forever=False,
-         header=False):
+         header=False, pgo=False):
     """Execute a test suite.
 
     This also parses command-line options and modifies its behavior
@@ -257,12 +267,12 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
 
     test_support.record_original_stdout(sys.stdout)
     try:
-        opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:FwWM:j:',
+        opts, args = getopt.getopt(sys.argv[1:], 'hvqxsSrf:lu:t:TD:NLR:FwWM:j:P',
             ['help', 'verbose', 'verbose2', 'verbose3', 'quiet',
              'exclude', 'single', 'slow', 'randomize', 'fromfile=', 'findleaks',
              'use=', 'threshold=', 'trace', 'coverdir=', 'nocoverdir',
              'runleaks', 'huntrleaks=', 'memlimit=', 'randseed=',
-             'multiprocess=', 'slaveargs=', 'forever', 'header'])
+             'multiprocess=', 'slaveargs=', 'forever', 'header', 'pgo'])
     except getopt.error, msg:
         usage(2, msg)
 
@@ -357,6 +367,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
             print   # Force a newline (just in case)
             print json.dumps(result)
             sys.exit(0)
+        elif o in ('-P', '--pgo'):
+            pgo = True
         else:
             print >>sys.stderr, ("No handler for option {}.  Please "
                 "report this as a bug at http://bugs.python.org.").format(o)
@@ -422,13 +434,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
 
     # For a partial run, we do not need to clutter the output.
     if verbose or header or not (quiet or single or tests or args):
-        # Print basic platform information
-        print "==", platform.python_implementation(), \
-                    " ".join(sys.version.split())
-        print "==  ", platform.platform(aliased=True), \
-                      "%s-endian" % sys.byteorder
-        print "==  ", os.getcwd()
-        print "Testing with flags:", sys.flags
+        if not pgo:
+            # Print basic platform information
+            print "==", platform.python_implementation(), \
+                        " ".join(sys.version.split())
+            print "==  ", platform.platform(aliased=True), \
+                          "%s-endian" % sys.byteorder
+            print "==  ", os.getcwd()
+            print "Testing with flags:", sys.flags
 
     alltests = findtests(testdir, stdtests, nottests)
     selected = tests or args or alltests
@@ -459,7 +472,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
         elif ok == FAILED:
             bad.append(test)
         elif ok == ENV_CHANGED:
-            bad.append(test)
             environment_changed.append(test)
         elif ok == SKIPPED:
             skipped.append(test)
@@ -496,12 +508,16 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
             for test in tests:
                 args_tuple = (
                     (test, verbose, quiet),
-                    dict(huntrleaks=huntrleaks, use_resources=use_resources)
+                    dict(huntrleaks=huntrleaks, use_resources=use_resources,
+                         pgo=pgo)
                 )
                 yield (test, args_tuple)
         pending = tests_and_args()
         opt_args = test_support.args_from_interpreter_flags()
         base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
+        # required to spawn a new process with PGO flag on/off
+        if pgo:
+            base_cmd = base_cmd + ['--pgo']
         def work():
             # A worker thread.
             try:
@@ -542,7 +558,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
                     continue
                 if stdout:
                     print stdout
-                if stderr:
+                if stderr and not pgo:
                     print >>sys.stderr, stderr
                 sys.stdout.flush()
                 sys.stderr.flush()
@@ -575,11 +591,12 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
                               globals=globals(), locals=vars())
             else:
                 try:
-                    result = runtest(test, verbose, quiet, huntrleaks)
+                    result = runtest(test, verbose, quiet, huntrleaks, None, pgo)
                     accumulate_result(test, result)
                     if verbose3 and result[0] == FAILED:
-                        print "Re-running test %r in verbose mode" % test
-                        runtest(test, True, quiet, huntrleaks)
+                        if not pgo:
+                            print "Re-running test %r in verbose mode" % test
+                        runtest(test, True, quiet, huntrleaks, None, pgo)
                 except KeyboardInterrupt:
                     interrupted = True
                     break
@@ -599,14 +616,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
                 if module not in save_modules and module.startswith("test."):
                     test_support.unload(module)
 
-    if interrupted:
+    if interrupted and not pgo:
         # print a newline after ^C
         print
         print "Test suite interrupted by signal SIGINT."
         omitted = set(selected) - set(good) - set(bad) - set(skipped)
         print count(len(omitted), "test"), "omitted:"
         printlist(omitted)
-    if good and not quiet:
+    if good and not quiet and not pgo:
         if not bad and not skipped and not interrupted and len(good) > 1:
             print "All",
         print count(len(good), "test"), "OK."
@@ -615,16 +632,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
         print "10 slowest tests:"
         for time, test in test_times[:10]:
             print "%s: %.1fs" % (test, time)
-    if bad:
-        bad = set(bad) - set(environment_changed)
-        if bad:
-            print count(len(bad), "test"), "failed:"
-            printlist(bad)
-        if environment_changed:
-            print "{} altered the execution environment:".format(
-                count(len(environment_changed), "test"))
-            printlist(environment_changed)
-    if skipped and not quiet:
+    if bad and not pgo:
+        print count(len(bad), "test"), "failed:"
+        printlist(bad)
+    if environment_changed and not pgo:
+        print "{} altered the execution environment:".format(
+            count(len(environment_changed), "test"))
+        printlist(environment_changed)
+    if skipped and not quiet and not pgo:
         print count(len(skipped), "test"), "skipped:"
         printlist(skipped)
 
@@ -644,18 +659,23 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
 
     if verbose2 and bad:
         print "Re-running failed tests in verbose mode"
-        for test in bad:
+        for test in bad[:]:
             print "Re-running test %r in verbose mode" % test
             sys.stdout.flush()
             try:
                 test_support.verbose = True
-                ok = runtest(test, True, quiet, huntrleaks)
+                ok = runtest(test, True, quiet, huntrleaks, None, pgo)
             except KeyboardInterrupt:
                 # print a newline separate from the ^C
                 print
                 break
-            except:
-                raise
+            else:
+                if ok[0] in {PASSED, ENV_CHANGED, SKIPPED, RESOURCE_DENIED}:
+                    bad.remove(test)
+        else:
+            if bad:
+                print count(len(bad), "test"), "failed again:"
+                printlist(bad)
 
     if single:
         if next_single_test:
@@ -705,7 +725,7 @@ def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS):
     return stdtests + sorted(tests)
 
 def runtest(test, verbose, quiet,
-            huntrleaks=False, use_resources=None):
+            huntrleaks=False, use_resources=None, pgo=False):
     """Run a single test.
 
     test -- the name of the test
@@ -714,6 +734,9 @@ def runtest(test, verbose, quiet,
     test_times -- a list of (time, test_name) pairs
     huntrleaks -- run multiple times to test for leaks; requires a debug
                   build; a triple corresponding to -R's three arguments
+    pgo -- if true, do not print unnecessary info when running the test
+           for Profile Guided Optimization build
+
     Returns one of the test result constants:
         INTERRUPTED      KeyboardInterrupt when run under -j
         RESOURCE_DENIED  test skipped because resource denied
@@ -727,7 +750,7 @@ def runtest(test, verbose, quiet,
     if use_resources is not None:
         test_support.use_resources = use_resources
     try:
-        return runtest_inner(test, verbose, quiet, huntrleaks)
+        return runtest_inner(test, verbose, quiet, huntrleaks, pgo)
     finally:
         cleanup_test_droppings(test, verbose)
 
@@ -756,10 +779,11 @@ class saved_test_environment:
 
     changed = False
 
-    def __init__(self, testname, verbose=0, quiet=False):
+    def __init__(self, testname, verbose=0, quiet=False, pgo=False):
         self.testname = testname
         self.verbose = verbose
         self.quiet = quiet
+        self.pgo = pgo
 
     # To add things to save and restore, add a name XXX to the resources list
     # and add corresponding get_XXX/restore_XXX functions.  get_XXX should
@@ -873,11 +897,11 @@ class saved_test_environment:
             if current != original:
                 self.changed = True
                 restore(original)
-                if not self.quiet:
+                if not self.quiet and not self.pgo:
                     print >>sys.stderr, (
                           "Warning -- {} was modified by {}".format(
                                                  name, self.testname))
-                    if self.verbose > 1:
+                    if self.verbose > 1 and not self.pgo:
                         print >>sys.stderr, (
                               "  Before: {}\n  After:  {} ".format(
                                                   original, current))
@@ -888,7 +912,7 @@ class saved_test_environment:
         return False
 
 
-def runtest_inner(test, verbose, quiet, huntrleaks=False):
+def runtest_inner(test, verbose, quiet, huntrleaks=False, pgo=False):
     test_support.unload(test)
     if verbose:
         capture_stdout = None
@@ -907,7 +931,7 @@ def runtest_inner(test, verbose, quiet, huntrleaks=False):
             else:
                 # Always import it from the test package
                 abstest = 'test.' + test
-            with saved_test_environment(test, verbose, quiet) as environment:
+            with saved_test_environment(test, verbose, quiet, pgo) as environment:
                 start_time = time.time()
                 the_package = __import__(abstest, globals(), locals(), [])
                 the_module = getattr(the_package, test)
@@ -924,26 +948,28 @@ def runtest_inner(test, verbose, quiet, huntrleaks=False):
         finally:
             sys.stdout = save_stdout
     except test_support.ResourceDenied, msg:
-        if not quiet:
+        if not quiet and not pgo:
             print test, "skipped --", msg
             sys.stdout.flush()
         return RESOURCE_DENIED, test_time
     except unittest.SkipTest, msg:
-        if not quiet:
+        if not quiet and not pgo:
             print test, "skipped --", msg
             sys.stdout.flush()
         return SKIPPED, test_time
     except KeyboardInterrupt:
         raise
     except test_support.TestFailed, msg:
-        print >>sys.stderr, "test", test, "failed --", msg
+        if not pgo:
+            print >>sys.stderr, "test", test, "failed --", msg
         sys.stderr.flush()
         return FAILED, test_time
     except:
         type, value = sys.exc_info()[:2]
-        print >>sys.stderr, "test", test, "crashed --", str(type) + ":", value
+        if not pgo:
+            print >>sys.stderr, "test", test, "crashed --", str(type) + ":", value
         sys.stderr.flush()
-        if verbose:
+        if verbose and not pgo:
             traceback.print_exc(file=sys.stderr)
             sys.stderr.flush()
         return FAILED, test_time
index f5e4e0ef552d21a5eed5b361ac7e8befc1d919b1..f4673d48af3206c945a41e7cbc461897313a3209 100644 (file)
@@ -84,6 +84,14 @@ def itermulti(seqn):
     'Test multiple tiers of iterators'
     return chain(imap(lambda x:x, iterfunc(IterGen(Sequence(seqn)))))
 
+class LyingTuple(tuple):
+    def __iter__(self):
+        yield 1
+
+class LyingList(list):
+    def __iter__(self):
+        yield 1
+
 class CommonTest(unittest.TestCase):
     # The type to be tested
     type2test = None
@@ -130,6 +138,10 @@ class CommonTest(unittest.TestCase):
             self.assertRaises(TypeError, self.type2test, IterNoNext(s))
             self.assertRaises(ZeroDivisionError, self.type2test, IterGenExc(s))
 
+        # Issue #23757
+        self.assertEqual(self.type2test(LyingTuple((2,))), self.type2test((1,)))
+        self.assertEqual(self.type2test(LyingList([2])), self.type2test([1]))
+
     def test_truth(self):
         self.assertFalse(self.type2test())
         self.assertTrue(self.type2test([42]))
index 6d87eb695741287eec2854086a16f7a021592a21..b2f837bab657f19ba9f3e6e5a05a9a6f59326093 100644 (file)
@@ -1295,8 +1295,10 @@ class MixinStrUserStringTest:
                   ('hex', '68656c6c6f20776f726c64'),
                   ('uu', 'begin 666 <data>\n+:&5L;&\\@=V]R;&0 \n \nend\n')]
         for encoding, data in codecs:
-            self.checkequal(data, 'hello world', 'encode', encoding)
-            self.checkequal('hello world', data, 'decode', encoding)
+            with test_support.check_py3k_warnings():
+                self.checkequal(data, 'hello world', 'encode', encoding)
+            with test_support.check_py3k_warnings():
+                self.checkequal('hello world', data, 'decode', encoding)
         # zlib is optional, so we make the test optional too...
         try:
             import zlib
@@ -1304,8 +1306,10 @@ class MixinStrUserStringTest:
             pass
         else:
             data = 'x\x9c\xcbH\xcd\xc9\xc9W(\xcf/\xcaI\x01\x00\x1a\x0b\x04]'
-            self.checkequal(data, 'hello world', 'encode', 'zlib')
-            self.checkequal('hello world', data, 'decode', 'zlib')
+            with test_support.check_py3k_warnings():
+                self.checkequal(data, 'hello world', 'encode', 'zlib')
+            with test_support.check_py3k_warnings():
+                self.checkequal('hello world', data, 'decode', 'zlib')
 
         self.checkraises(TypeError, 'xyz', 'decode', 42)
         self.checkraises(TypeError, 'xyz', 'encode', 42)
index 88f2c44809293daf47892fe8ccc2d1f416f3efdd..9b5914e3ca18139c84da037688b64c81488f3866 100644 (file)
@@ -23,7 +23,8 @@ candidate_locales = ['es_UY', 'fr_FR', 'fi_FI', 'es_CO', 'pt_PT', 'it_IT',
     'de_DE', 'sr_YU', 'br_FR', 'nl_BE', 'sv_FI', 'pl_PL', 'fr_CA', 'fo_FO',
     'bs_BA', 'fr_LU', 'kl_GL', 'fa_IR', 'de_BE', 'sv_SE', 'it_CH', 'uk_UA',
     'eu_ES', 'vi_VN', 'af_ZA', 'nb_NO', 'en_DK', 'tg_TJ', 'ps_AF.UTF-8', 'en_US',
-    'es_ES.ISO8859-1', 'fr_FR.ISO8859-15', 'ru_RU.KOI8-R', 'ko_KR.eucKR']
+    'fr_FR.ISO8859-1', 'fr_FR.UTF-8', 'fr_FR.ISO8859-15@euro',
+    'ru_RU.KOI8-R', 'ko_KR.eucKR']
 
 # Workaround for MSVC6(debug) crash bug
 if "MSC v.1200" in sys.version:
@@ -37,8 +38,8 @@ if "MSC v.1200" in sys.version:
 # value is not known, use '' .
 known_numerics = {
     'en_US': ('.', ','),
-    'fr_FR' : (',', ' '),
     'de_DE' : (',', '.'),
+    'fr_FR.UTF-8' : (',', ' '),
     'ps_AF.UTF-8' : ('\xd9\xab', '\xd9\xac'),
 }
 
index b933cbfaf301085fc18903cef95dd70f7b804f06..9f5c09d8cbbb71556a7ced69ff842f1e9bca4d7c 100644 (file)
@@ -18,7 +18,9 @@ class ArraySubclassWithKwargs(array.array):
         array.array.__init__(self, typecode)
 
 tests = [] # list to accumulate all tests
-typecodes = "cubBhHiIlLfd"
+typecodes = "cbBhHiIlLfd"
+if test_support.have_unicode:
+    typecodes += "u"
 
 class BadConstructorTest(unittest.TestCase):
 
@@ -26,7 +28,17 @@ class BadConstructorTest(unittest.TestCase):
         self.assertRaises(TypeError, array.array)
         self.assertRaises(TypeError, array.array, spam=42)
         self.assertRaises(TypeError, array.array, 'xx')
+        self.assertRaises(TypeError, array.array, '')
+        self.assertRaises(TypeError, array.array, 1)
         self.assertRaises(ValueError, array.array, 'x')
+        self.assertRaises(ValueError, array.array, '\x80')
+
+    @test_support.requires_unicode
+    def test_unicode_constructor(self):
+        self.assertRaises(TypeError, array.array, u'xx')
+        self.assertRaises(TypeError, array.array, u'')
+        self.assertRaises(ValueError, array.array, u'x')
+        self.assertRaises(ValueError, array.array, u'\x80')
 
 tests.append(BadConstructorTest)
 
@@ -235,6 +247,7 @@ class BaseTest(unittest.TestCase):
         self.assertRaises(TypeError, a.tostring, 42)
         self.assertRaises(TypeError, b.fromstring)
         self.assertRaises(TypeError, b.fromstring, 42)
+        self.assertRaises(ValueError, a.fromstring, a)
         b.fromstring(a.tostring())
         self.assertEqual(a, b)
         if a.itemsize>1:
@@ -827,6 +840,7 @@ class CharacterTest(StringTest):
         self.assertEqual(s.color, "red")
         self.assertEqual(s.__dict__.keys(), ["color"])
 
+    @test_support.requires_unicode
     def test_nounicode(self):
         a = array.array(self.typecode, self.example)
         self.assertRaises(ValueError, a.fromunicode, unicode(''))
@@ -1039,6 +1053,17 @@ class UnsignedLongTest(UnsignedNumberTest):
     minitemsize = 4
 tests.append(UnsignedLongTest)
 
+
+@test_support.requires_unicode
+class UnicodeTypecodeTest(unittest.TestCase):
+    def test_unicode_typecode(self):
+        for typecode in typecodes:
+            a = array.array(unicode(typecode))
+            self.assertEqual(a.typecode, typecode)
+            self.assertIs(type(a.typecode), str)
+tests.append(UnicodeTypecodeTest)
+
+
 class FPTest(NumberTest):
     example = [-42.0, 0, 42, 1e5, -1e10]
     smallerexample = [-42.0, 0, 42, 1e5, -2e10]
index e5a51593fa4d99f5bb27385d7d4bfafcb80dc694..4af73500ea41aa0d613d4d3dea277e4144e64665 100644 (file)
@@ -210,6 +210,21 @@ class TestAudioop(unittest.TestCase):
             self.assertEqual(audioop.lin2adpcm(b'\0' * w * 10, w, None),
                              (b'\0' * 5, (0, 0)))
 
+    def test_invalid_adpcm_state(self):
+        # state must be a tuple or None, not an integer
+        self.assertRaises(TypeError, audioop.adpcm2lin, b'\0', 1, 555)
+        self.assertRaises(TypeError, audioop.lin2adpcm, b'\0', 1, 555)
+        # Issues #24456, #24457: index out of range
+        self.assertRaises(ValueError, audioop.adpcm2lin, b'\0', 1, (0, -1))
+        self.assertRaises(ValueError, audioop.adpcm2lin, b'\0', 1, (0, 89))
+        self.assertRaises(ValueError, audioop.lin2adpcm, b'\0', 1, (0, -1))
+        self.assertRaises(ValueError, audioop.lin2adpcm, b'\0', 1, (0, 89))
+        # value out of range
+        self.assertRaises(ValueError, audioop.adpcm2lin, b'\0', 1, (-0x8001, 0))
+        self.assertRaises(ValueError, audioop.adpcm2lin, b'\0', 1, (0x8000, 0))
+        self.assertRaises(ValueError, audioop.lin2adpcm, b'\0', 1, (-0x8001, 0))
+        self.assertRaises(ValueError, audioop.lin2adpcm, b'\0', 1, (0x8000, 0))
+
     def test_lin2alaw(self):
         self.assertEqual(audioop.lin2alaw(datas[1], 1),
                          b'\xd5\x87\xa4\x24\xaa\x2a\x5a')
@@ -280,6 +295,9 @@ class TestAudioop(unittest.TestCase):
                              (b'', (-2, ((0, 0),))))
             self.assertEqual(audioop.ratecv(datas[w], w, 1, 8000, 8000, None)[0],
                              datas[w])
+            self.assertEqual(audioop.ratecv(datas[w], w, 1, 8000, 8000, None, 1, 0)[0],
+                             datas[w])
+
         state = None
         d1, state = audioop.ratecv(b'\x00\x01\x02', 1, 1, 8000, 16000, state)
         d2, state = audioop.ratecv(b'\x00\x01\x02', 1, 1, 8000, 16000, state)
@@ -295,6 +313,18 @@ class TestAudioop(unittest.TestCase):
             self.assertEqual(d, d0)
             self.assertEqual(state, state0)
 
+        expected = {
+            1: packs[1](0, 0x0d, 0x37, -0x26, 0x55, -0x4b, -0x14),
+            2: packs[2](0, 0x0da7, 0x3777, -0x2630, 0x5673, -0x4a64, -0x129a),
+            4: packs[4](0, 0x0da740da, 0x37777776, -0x262fc962,
+                        0x56740da6, -0x4a62fc96, -0x1298bf26),
+        }
+        for w in 1, 2, 4:
+            self.assertEqual(audioop.ratecv(datas[w], w, 1, 8000, 8000, None, 3, 1)[0],
+                             expected[w])
+            self.assertEqual(audioop.ratecv(datas[w], w, 1, 8000, 8000, None, 30, 10)[0],
+                             expected[w])
+
     def test_reverse(self):
         for w in 1, 2, 4:
             self.assertEqual(audioop.reverse(b'', w), b'')
index 108b1e18696e1af6aea27c8246000844a5e400fe..d6b12e32214cb7c7f4131da21ce6037e2c69435f 100644 (file)
@@ -34,7 +34,7 @@ class BufferSizeTest(unittest.TestCase):
             line = f.readline()
             self.assertEqual(line, s)
             line = f.readline()
-            self.assertTrue(not line) # Must be at EOF
+            self.assertFalse(line) # Must be at EOF
             f.close()
         finally:
             support.unlink(support.TESTFN)
index 988b931d1a803a4adad0d5262198a977408d9cca..02fba389ca730ae40cd4c21a8a997090b0b2ee04 100644 (file)
@@ -722,10 +722,27 @@ class ByteArrayTest(BaseBytesTest):
         for i in range(100):
             b += b"x"
             alloc = b.__alloc__()
-            self.assertTrue(alloc >= len(b))
+            self.assertGreater(alloc, len(b))  # including trailing null byte
             if alloc not in seq:
                 seq.append(alloc)
 
+    def test_init_alloc(self):
+        b = bytearray()
+        def g():
+            for i in range(1, 100):
+                yield i
+                a = list(b)
+                self.assertEqual(a, list(range(1, len(a)+1)))
+                self.assertEqual(len(b), len(a))
+                self.assertLessEqual(len(b), i)
+                alloc = b.__alloc__()
+                self.assertGreater(alloc, len(b))  # including trailing null byte
+        b.__init__(g())
+        self.assertEqual(list(b), list(range(1, 100)))
+        self.assertEqual(len(b), 99)
+        alloc = b.__alloc__()
+        self.assertGreater(alloc, len(b))
+
     def test_extend(self):
         orig = b'hello'
         a = bytearray(orig)
index 5692642db183d1d712ed37af22a3f19fce67ca4c..46c4a6fe3b31f2dbe3ff72be83f258b4cb9b7557 100644 (file)
@@ -513,8 +513,8 @@ class CommandLineTestCase(unittest.TestCase):
     def test_option_encoding(self):
         self.assertFailure('-e')
         self.assertFailure('--encoding')
-        stdout = self.run_ok('--encoding', 'rot-13', '2004')
-        self.assertEqual(stdout.strip(), conv(result_2004_text.encode('rot-13')).strip())
+        stdout = self.run_ok('--encoding', 'utf-16-le', '2004')
+        self.assertEqual(stdout.strip(), conv(result_2004_text.encode('utf-16-le')).strip())
 
     def test_option_locale(self):
         self.assertFailure('-L')
index 5d1026151df14dc79707a7f8dfe4c2d431a0ebc9..c1d03271f62b3fcd2484bc0db1a8066ebc276e67 100644 (file)
@@ -1,4 +1,4 @@
-from test.test_support import run_unittest
+from test.test_support import run_unittest, cpython_only
 from test.test_math import parse_testfile, test_file
 import unittest
 import cmath, math
@@ -351,17 +351,48 @@ class CMathTests(unittest.TestCase):
             self.rAssertAlmostEqual(expected.imag, actual.imag,
                                         msg=error_message)
 
-    def assertCISEqual(self, a, b):
-        eps = 1E-7
-        if abs(a[0] - b[0]) > eps or abs(a[1] - b[1]) > eps:
-            self.fail((a ,b))
+    def check_polar(self, func):
+        def check(arg, expected):
+            got = func(arg)
+            for e, g in zip(expected, got):
+                self.rAssertAlmostEqual(e, g)
+        check(0, (0., 0.))
+        check(1, (1., 0.))
+        check(-1, (1., pi))
+        check(1j, (1., pi / 2))
+        check(-3j, (3., -pi / 2))
+        inf = float('inf')
+        check(complex(inf, 0), (inf, 0.))
+        check(complex(-inf, 0), (inf, pi))
+        check(complex(3, inf), (inf, pi / 2))
+        check(complex(5, -inf), (inf, -pi / 2))
+        check(complex(inf, inf), (inf, pi / 4))
+        check(complex(inf, -inf), (inf, -pi / 4))
+        check(complex(-inf, inf), (inf, 3 * pi / 4))
+        check(complex(-inf, -inf), (inf, -3 * pi / 4))
+        nan = float('nan')
+        check(complex(nan, 0), (nan, nan))
+        check(complex(0, nan), (nan, nan))
+        check(complex(nan, nan), (nan, nan))
+        check(complex(inf, nan), (inf, nan))
+        check(complex(-inf, nan), (inf, nan))
+        check(complex(nan, inf), (inf, nan))
+        check(complex(nan, -inf), (inf, nan))
 
     def test_polar(self):
-        self.assertCISEqual(polar(0), (0., 0.))
-        self.assertCISEqual(polar(1.), (1., 0.))
-        self.assertCISEqual(polar(-1.), (1., pi))
-        self.assertCISEqual(polar(1j), (1., pi/2))
-        self.assertCISEqual(polar(-1j), (1., -pi/2))
+        self.check_polar(polar)
+
+    @cpython_only
+    def test_polar_errno(self):
+        # Issue #24489: check a previously set C errno doesn't disturb polar()
+        from _testcapi import set_errno
+        def polar_with_errno_set(z):
+            set_errno(11)
+            try:
+                return polar(z)
+            finally:
+                set_errno(0)
+        self.check_polar(polar_with_errno_set)
 
     def test_phase(self):
         self.assertAlmostEqual(phase(0), 0.)
index b9cd9c2d622df6ff768fd4d9554f3105b1fffd64..c11affdabb92e07730aef059bde705480f9acc75 100644 (file)
@@ -836,6 +836,26 @@ class CodecCallbackTest(unittest.TestCase):
             text = u'abc<def>ghi'*n
             text.translate(charmap)
 
+    def test_fake_error_class(self):
+        handlers = [
+            codecs.strict_errors,
+            codecs.ignore_errors,
+            codecs.replace_errors,
+            codecs.backslashreplace_errors,
+            codecs.xmlcharrefreplace_errors,
+        ]
+        for cls in UnicodeEncodeError, UnicodeDecodeError, UnicodeTranslateError:
+            class FakeUnicodeError(str):
+                __class__ = cls
+            for handler in handlers:
+                self.assertRaises(TypeError, handler, FakeUnicodeError())
+            class FakeUnicodeError(Exception):
+                __class__ = cls
+            for handler in handlers:
+                with self.assertRaises((TypeError, FakeUnicodeError)):
+                    handler(FakeUnicodeError())
+
+
 def test_main():
     test.test_support.run_unittest(CodecCallbackTest)
 
index de80b0776c8116e806ee57f653a6bff18fbf2d63..57d5e066263352d66d945773e7a6276593e658e9 100644 (file)
@@ -573,9 +573,13 @@ class UTF16LETest(ReadTest):
             (b'\x00\xdcA\x00', u'\ufffdA'),
         ]
         for raw, expected in tests:
-            self.assertRaises(UnicodeDecodeError, codecs.utf_16_le_decode,
-                              raw, 'strict', True)
-            self.assertEqual(raw.decode('utf-16le', 'replace'), expected)
+            try:
+                with self.assertRaises(UnicodeDecodeError):
+                    codecs.utf_16_le_decode(raw, 'strict', True)
+                self.assertEqual(raw.decode('utf-16le', 'replace'), expected)
+            except:
+                print 'raw=%r' % raw
+                raise
 
 class UTF16BETest(ReadTest):
     encoding = "utf-16-be"
@@ -610,9 +614,13 @@ class UTF16BETest(ReadTest):
             (b'\xdc\x00\x00A', u'\ufffdA'),
         ]
         for raw, expected in tests:
-            self.assertRaises(UnicodeDecodeError, codecs.utf_16_be_decode,
-                              raw, 'strict', True)
-            self.assertEqual(raw.decode('utf-16be', 'replace'), expected)
+            try:
+                with self.assertRaises(UnicodeDecodeError):
+                    codecs.utf_16_be_decode(raw, 'strict', True)
+                self.assertEqual(raw.decode('utf-16be', 'replace'), expected)
+            except:
+                print 'raw=%r' % raw
+                raise
 
 class UTF8Test(ReadTest):
     encoding = "utf-8"
@@ -642,6 +650,32 @@ class UTF8Test(ReadTest):
 class UTF7Test(ReadTest):
     encoding = "utf-7"
 
+    def test_ascii(self):
+        # Set D (directly encoded characters)
+        set_d = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+                 'abcdefghijklmnopqrstuvwxyz'
+                 '0123456789'
+                 '\'(),-./:?')
+        self.assertEqual(set_d.encode(self.encoding), set_d)
+        self.assertEqual(set_d.decode(self.encoding), set_d)
+        # Set O (optional direct characters)
+        set_o = ' !"#$%&*;<=>@[]^_`{|}'
+        self.assertEqual(set_o.encode(self.encoding), set_o)
+        self.assertEqual(set_o.decode(self.encoding), set_o)
+        # +
+        self.assertEqual(u'a+b'.encode(self.encoding), 'a+-b')
+        self.assertEqual('a+-b'.decode(self.encoding), u'a+b')
+        # White spaces
+        ws = ' \t\n\r'
+        self.assertEqual(ws.encode(self.encoding), ws)
+        self.assertEqual(ws.decode(self.encoding), ws)
+        # Other ASCII characters
+        other_ascii = ''.join(sorted(set(chr(i) for i in range(0x80)) -
+                                     set(set_d + set_o + '+' + ws)))
+        self.assertEqual(other_ascii.encode(self.encoding),
+                         '+AAAAAQACAAMABAAFAAYABwAIAAsADAAOAA8AEAARABIAEwAU'
+                         'ABUAFgAXABgAGQAaABsAHAAdAB4AHwBcAH4Afw-')
+
     def test_partial(self):
         self.check_partial(
             u"a+-b",
@@ -656,7 +690,9 @@ class UTF7Test(ReadTest):
 
     def test_errors(self):
         tests = [
-            ('a\xffb', u'a\ufffdb'),
+            ('\xe1b', u'\ufffdb'),
+            ('a\xe1b', u'a\ufffdb'),
+            ('a\xe1\xe1b', u'a\ufffd\ufffdb'),
             ('a+IK', u'a\ufffd'),
             ('a+IK-b', u'a\ufffdb'),
             ('a+IK,b', u'a\ufffdb'),
@@ -672,16 +708,55 @@ class UTF7Test(ReadTest):
             ('a+//,+IKw-b', u'a\ufffd\u20acb'),
             ('a+///,+IKw-b', u'a\uffff\ufffd\u20acb'),
             ('a+////,+IKw-b', u'a\uffff\ufffd\u20acb'),
+            ('a+IKw-b\xe1', u'a\u20acb\ufffd'),
+            ('a+IKw\xe1b', u'a\u20ac\ufffdb'),
         ]
         for raw, expected in tests:
-            self.assertRaises(UnicodeDecodeError, codecs.utf_7_decode,
-                              raw, 'strict', True)
-            self.assertEqual(raw.decode('utf-7', 'replace'), expected)
+            try:
+                with self.assertRaises(UnicodeDecodeError):
+                    codecs.utf_7_decode(raw, 'strict', True)
+                self.assertEqual(raw.decode('utf-7', 'replace'), expected)
+            except:
+                print 'raw=%r' % raw
+                raise
 
     def test_nonbmp(self):
         self.assertEqual(u'\U000104A0'.encode(self.encoding), '+2AHcoA-')
         self.assertEqual(u'\ud801\udca0'.encode(self.encoding), '+2AHcoA-')
         self.assertEqual('+2AHcoA-'.decode(self.encoding), u'\U000104A0')
+        self.assertEqual('+2AHcoA'.decode(self.encoding), u'\U000104A0')
+        self.assertEqual(u'\u20ac\U000104A0'.encode(self.encoding), '+IKzYAdyg-')
+        self.assertEqual('+IKzYAdyg-'.decode(self.encoding), u'\u20ac\U000104A0')
+        self.assertEqual('+IKzYAdyg'.decode(self.encoding), u'\u20ac\U000104A0')
+        self.assertEqual(u'\u20ac\u20ac\U000104A0'.encode(self.encoding),
+                         '+IKwgrNgB3KA-')
+        self.assertEqual('+IKwgrNgB3KA-'.decode(self.encoding),
+                         u'\u20ac\u20ac\U000104A0')
+        self.assertEqual('+IKwgrNgB3KA'.decode(self.encoding),
+                         u'\u20ac\u20ac\U000104A0')
+
+    def test_lone_surrogates(self):
+        tests = [
+            ('a+2AE-b', u'a\ud801b'),
+            ('a+2AE\xe1b', u'a\ufffdb'),
+            ('a+2AE', u'a\ufffd'),
+            ('a+2AEA-b', u'a\ufffdb'),
+            ('a+2AH-b', u'a\ufffdb'),
+            ('a+IKzYAQ-b', u'a\u20ac\ud801b'),
+            ('a+IKzYAQ\xe1b', u'a\u20ac\ufffdb'),
+            ('a+IKzYAQA-b', u'a\u20ac\ufffdb'),
+            ('a+IKzYAd-b', u'a\u20ac\ufffdb'),
+            ('a+IKwgrNgB-b', u'a\u20ac\u20ac\ud801b'),
+            ('a+IKwgrNgB\xe1b', u'a\u20ac\u20ac\ufffdb'),
+            ('a+IKwgrNgB', u'a\u20ac\u20ac\ufffd'),
+            ('a+IKwgrNgBA-b', u'a\u20ac\u20ac\ufffdb'),
+        ]
+        for raw, expected in tests:
+            try:
+                self.assertEqual(raw.decode('utf-7', 'replace'), expected)
+            except:
+                print 'raw=%r' % raw
+                raise
 
 class UTF16ExTest(unittest.TestCase):
 
@@ -1395,14 +1470,14 @@ class EncodedFileTest(unittest.TestCase):
 class Str2StrTest(unittest.TestCase):
 
     def test_read(self):
-        sin = "\x80".encode("base64_codec")
+        sin = codecs.encode("\x80", "base64_codec")
         reader = codecs.getreader("base64_codec")(StringIO.StringIO(sin))
         sout = reader.read()
         self.assertEqual(sout, "\x80")
         self.assertIsInstance(sout, str)
 
     def test_readline(self):
-        sin = "\x80".encode("base64_codec")
+        sin = codecs.encode("\x80", "base64_codec")
         reader = codecs.getreader("base64_codec")(StringIO.StringIO(sin))
         sout = reader.readline()
         self.assertEqual(sout, "\x80")
@@ -1536,6 +1611,9 @@ broken_unicode_with_streams = [
 ]
 broken_incremental_coders = broken_unicode_with_streams[:]
 
+if sys.flags.py3k_warning:
+    broken_unicode_with_streams.append("rot_13")
+
 # The following encodings only support "strict" mode
 only_strict_mode = [
     "idna",
@@ -2098,6 +2176,21 @@ class BomTest(unittest.TestCase):
                 self.assertEqual(f.read(), data * 2)
 
 
+class TransformCodecTest(unittest.TestCase):
+
+    def test_quopri_stateless(self):
+        # Should encode with quotetabs=True
+        encoded = codecs.encode(b"space tab\teol \n", "quopri-codec")
+        self.assertEqual(encoded, b"space=20tab=09eol=20\n")
+        # But should still support unescaped tabs and spaces
+        unescaped = b"space tab eol\n"
+        self.assertEqual(codecs.decode(unescaped, "quopri-codec"), unescaped)
+
+    def test_uu_invalid(self):
+        # Missing "begin" line
+        self.assertRaises(ValueError, codecs.decode, "", "uu-codec")
+
+
 def test_main():
     test_support.run_unittest(
         UTF32Test,
@@ -2129,12 +2222,9 @@ def test_main():
         UnicodeEscapeTest,
         RawUnicodeEscapeTest,
         BomTest,
+        TransformCodecTest,
     )
 
-    def test_uu_invalid(self):
-        # Missing "begin" line
-        self.assertRaises(ValueError, codecs.decode, "", "uu-codec")
-
 
 if __name__ == "__main__":
     test_main()
index cd2722786768675ee18f2a13f2a64c0accb8e2e5..09b5c544fe10b8823bf03b88c283b8d16ed6d2ea 100644 (file)
@@ -1286,6 +1286,10 @@ class TestOrderedDict(unittest.TestCase):
         self.assertEqual(list(od.viewvalues()),  [None for k in s])
         self.assertEqual(list(od.viewitems()),  [(k, None) for k in s])
 
+        # See http://bugs.python.org/issue24286
+        self.assertEqual(od.viewkeys(), dict(od).viewkeys())
+        self.assertEqual(od.viewitems(), dict(od).viewitems())
+
     def test_override_update(self):
         # Verify that subclasses can override update() without breaking __init__()
         class MyOD(OrderedDict):
index cfc6389b59a7c2c306ae71f387f3986994eb5b76..6a6ef0e14694279da6a5dc50f997e240bdb1d422 100644 (file)
@@ -3,6 +3,9 @@ import unittest
 import sys
 import _ast
 from test import test_support
+from test import script_helper
+import os
+import tempfile
 import textwrap
 
 class TestSpecifics(unittest.TestCase):
@@ -555,6 +558,32 @@ if 1:
         ast.body = [_ast.BoolOp()]
         self.assertRaises(TypeError, compile, ast, '<ast>', 'exec')
 
+    def test_yet_more_evil_still_undecodable(self):
+        # Issue #25388
+        src = b"#\x00\n#\xfd\n"
+        tmpd = tempfile.mkdtemp()
+        try:
+            fn = os.path.join(tmpd, "bad.py")
+            with open(fn, "wb") as fp:
+                fp.write(src)
+            rc, out, err = script_helper.assert_python_failure(fn)
+        finally:
+            test_support.rmtree(tmpd)
+        self.assertIn(b"Non-ASCII", err)
+
+    def test_null_terminated(self):
+        # The source code is null-terminated internally, but bytes-like
+        # objects are accepted, which could be not terminated.
+        with self.assertRaisesRegexp(TypeError, "without null bytes"):
+            compile(u"123\x00", "<dummy>", "eval")
+        with self.assertRaisesRegexp(TypeError, "without null bytes"):
+            compile(buffer("123\x00"), "<dummy>", "eval")
+        code = compile(buffer("123\x00", 1, 2), "<dummy>", "eval")
+        self.assertEqual(eval(code), 23)
+        code = compile(buffer("1234", 1, 2), "<dummy>", "eval")
+        self.assertEqual(eval(code), 23)
+        code = compile(buffer("$23$", 1, 2), "<dummy>", "eval")
+        self.assertEqual(eval(code), 23)
 
 class TestStackSize(unittest.TestCase):
     # These tests check that the computed stack size for a code object
index f28c95eadbc1968b50c2fa1ca79d8547b583b2c5..301564bfc062666d5c8805306cf583df13c9e4e6 100644 (file)
@@ -106,6 +106,14 @@ class ContextManagerTestCase(unittest.TestCase):
         baz = self._create_contextmanager_attribs()
         self.assertEqual(baz.__doc__, "Whee!")
 
+    def test_keywords(self):
+        # Ensure no keyword arguments are inhibited
+        @contextmanager
+        def woohoo(self, func, args, kwds):
+            yield (self, func, args, kwds)
+        with woohoo(self=11, func=22, args=33, kwds=44) as target:
+            self.assertEqual(target, (11, 22, 33, 44))
+
 class NestedTestCase(unittest.TestCase):
 
     # XXX This needs more work
index 3bc700b1fb8a59f1e5be8636afff9a3374306e9b..0a1eb43a31a746990dcf7a82a2416d2979169a0d 100644 (file)
@@ -1,8 +1,10 @@
 import cPickle
 import cStringIO
 import io
+import functools
 import unittest
-from test.pickletester import (AbstractPickleTests,
+from test.pickletester import (AbstractUnpickleTests,
+                               AbstractPickleTests,
                                AbstractPickleModuleTests,
                                AbstractPicklerUnpicklerObjectTests,
                                BigmemPickleTests)
@@ -40,7 +42,8 @@ class FileIOMixin:
         test_support.unlink(test_support.TESTFN)
 
 
-class cPickleTests(AbstractPickleTests, AbstractPickleModuleTests):
+class cPickleTests(AbstractUnpickleTests, AbstractPickleTests,
+                   AbstractPickleModuleTests):
 
     def setUp(self):
         self.dumps = cPickle.dumps
@@ -49,6 +52,28 @@ class cPickleTests(AbstractPickleTests, AbstractPickleModuleTests):
     error = cPickle.BadPickleGet
     module = cPickle
 
+class cPickleUnpicklerTests(AbstractUnpickleTests):
+
+    def loads(self, buf):
+        f = self.input(buf)
+        try:
+            p = cPickle.Unpickler(f)
+            return p.load()
+        finally:
+            self.close(f)
+
+    error = cPickle.BadPickleGet
+
+class cStringIOCUnpicklerTests(cStringIOMixin, cPickleUnpicklerTests):
+    pass
+
+class BytesIOCUnpicklerTests(BytesIOMixin, cPickleUnpicklerTests):
+    pass
+
+class FileIOCUnpicklerTests(FileIOMixin, cPickleUnpicklerTests):
+    pass
+
+
 class cPicklePicklerTests(AbstractPickleTests):
 
     def dumps(self, arg, proto=0):
@@ -69,8 +94,6 @@ class cPicklePicklerTests(AbstractPickleTests):
         finally:
             self.close(f)
 
-    error = cPickle.BadPickleGet
-
 class cStringIOCPicklerTests(cStringIOMixin, cPicklePicklerTests):
     pass
 
@@ -129,33 +152,6 @@ class cPickleFastPicklerTests(AbstractPickleTests):
         finally:
             self.close(f)
 
-    error = cPickle.BadPickleGet
-
-    def test_recursive_list(self):
-        self.assertRaises(ValueError,
-                          AbstractPickleTests.test_recursive_list,
-                          self)
-
-    def test_recursive_tuple(self):
-        self.assertRaises(ValueError,
-                          AbstractPickleTests.test_recursive_tuple,
-                          self)
-
-    def test_recursive_inst(self):
-        self.assertRaises(ValueError,
-                          AbstractPickleTests.test_recursive_inst,
-                          self)
-
-    def test_recursive_dict(self):
-        self.assertRaises(ValueError,
-                          AbstractPickleTests.test_recursive_dict,
-                          self)
-
-    def test_recursive_multi(self):
-        self.assertRaises(ValueError,
-                          AbstractPickleTests.test_recursive_multi,
-                          self)
-
     def test_nonrecursive_deep(self):
         # If it's not cyclic, it should pickle OK even if the nesting
         # depth exceeds PY_CPICKLE_FAST_LIMIT.  That happens to be
@@ -167,6 +163,19 @@ class cPickleFastPicklerTests(AbstractPickleTests):
         b = self.loads(self.dumps(a))
         self.assertEqual(a, b)
 
+for name in dir(AbstractPickleTests):
+    if name.startswith('test_recursive_'):
+        func = getattr(AbstractPickleTests, name)
+        if '_subclass' in name and '_and_inst' not in name:
+            assert_args = RuntimeError, 'maximum recursion depth exceeded'
+        else:
+            assert_args = ValueError, "can't pickle cyclic objects"
+        def wrapper(self, func=func, assert_args=assert_args):
+            with self.assertRaisesRegexp(*assert_args):
+                func(self)
+        functools.update_wrapper(wrapper, func)
+        setattr(cPickleFastPicklerTests, name, wrapper)
+
 class cStringIOCPicklerFastTests(cStringIOMixin, cPickleFastPicklerTests):
     pass
 
@@ -219,6 +228,9 @@ class cPickleDeepRecursive(unittest.TestCase):
 def test_main():
     test_support.run_unittest(
         cPickleTests,
+        cStringIOCUnpicklerTests,
+        BytesIOCUnpicklerTests,
+        FileIOCUnpicklerTests,
         cStringIOCPicklerTests,
         BytesIOCPicklerTests,
         FileIOCPicklerTests,
index 3b3d9d1003b8aa38dd60c57a611a45ae541becb2..14b7f42f56275c9020a2017afd3d77a52c0dad8c 100644 (file)
@@ -16,7 +16,7 @@ test the pythonic behaviour according to PEP 327.
 
 Cowlishaw's tests can be downloaded from:
 
-   www2.hursley.ibm.com/decimal/dectest.zip
+   http://speleotrove.com/decimal/dectest.zip
 
 This test module can be called from command line with one parameter (Arithmetic
 or Behaviour) to test each part, or without parameter to test both parts. If
index 0ac458f1e3a89074b032e58b592d6c6c0286b9ad..25f65c5a2c8587e803f18b2ffb9da37d62b36455 100644 (file)
@@ -4065,6 +4065,37 @@ order (MRO) for bases """
         else:
             assert 0, "best_base calculation found wanting"
 
+    def test_unsubclassable_types(self):
+        with self.assertRaises(TypeError):
+            class X(types.NoneType):
+                pass
+        with self.assertRaises(TypeError):
+            class X(object, types.NoneType):
+                pass
+        with self.assertRaises(TypeError):
+            class X(types.NoneType, object):
+                pass
+        class O(object):
+            pass
+        with self.assertRaises(TypeError):
+            class X(O, types.NoneType):
+                pass
+        with self.assertRaises(TypeError):
+            class X(types.NoneType, O):
+                pass
+
+        class X(object):
+            pass
+        with self.assertRaises(TypeError):
+            X.__bases__ = types.NoneType,
+        with self.assertRaises(TypeError):
+            X.__bases__ = object, types.NoneType
+        with self.assertRaises(TypeError):
+            X.__bases__ = types.NoneType, object
+        with self.assertRaises(TypeError):
+            X.__bases__ = O, types.NoneType
+        with self.assertRaises(TypeError):
+            X.__bases__ = types.NoneType, O
 
     def test_mutable_bases_with_failing_mro(self):
         # Testing mutable bases with failing mro...
index a5685b98eb79d5e74128e41b561522b279489903..1c63fc0e0987f84f2c3802c278e61ee781ea51e5 100644 (file)
@@ -448,7 +448,7 @@ class DictTest(unittest.TestCase):
         # (D) subclass defines __missing__ method returning a value
         # (E) subclass defines __missing__ method raising RuntimeError
         # (F) subclass sets __missing__ instance variable (no effect)
-        # (G) subclass doesn't define __missing__ at a all
+        # (G) subclass doesn't define __missing__ at all
         class D(dict):
             def __missing__(self, key):
                 return 42
index 30cfb93be7d5bb92ab68afcd7d50fc1303c8296e..71f1af733fe32531a71e8080a685043c6832d684 100644 (file)
@@ -1,4 +1,7 @@
+import copy
+import pickle
 import unittest
+import collections
 from test import test_support
 
 class DictSetTest(unittest.TestCase):
@@ -164,7 +167,42 @@ class DictSetTest(unittest.TestCase):
         d[42] = d.viewvalues()
         self.assertRaises(RuntimeError, repr, d)
 
+    def test_abc_registry(self):
+        d = dict(a=1)
 
+        self.assertIsInstance(d.viewkeys(), collections.KeysView)
+        self.assertIsInstance(d.viewkeys(), collections.MappingView)
+        self.assertIsInstance(d.viewkeys(), collections.Set)
+        self.assertIsInstance(d.viewkeys(), collections.Sized)
+        self.assertIsInstance(d.viewkeys(), collections.Iterable)
+        self.assertIsInstance(d.viewkeys(), collections.Container)
+
+        self.assertIsInstance(d.viewvalues(), collections.ValuesView)
+        self.assertIsInstance(d.viewvalues(), collections.MappingView)
+        self.assertIsInstance(d.viewvalues(), collections.Sized)
+
+        self.assertIsInstance(d.viewitems(), collections.ItemsView)
+        self.assertIsInstance(d.viewitems(), collections.MappingView)
+        self.assertIsInstance(d.viewitems(), collections.Set)
+        self.assertIsInstance(d.viewitems(), collections.Sized)
+        self.assertIsInstance(d.viewitems(), collections.Iterable)
+        self.assertIsInstance(d.viewitems(), collections.Container)
+
+    def test_copy(self):
+        d = {1: 10, "a": "ABC"}
+        self.assertRaises(TypeError, copy.copy, d.viewkeys())
+        self.assertRaises(TypeError, copy.copy, d.viewvalues())
+        self.assertRaises(TypeError, copy.copy, d.viewitems())
+
+    def test_pickle(self):
+        d = {1: 10, "a": "ABC"}
+        for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+            self.assertRaises((TypeError, pickle.PicklingError),
+                pickle.dumps, d.viewkeys(), proto)
+            self.assertRaises((TypeError, pickle.PicklingError),
+                pickle.dumps, d.viewvalues(), proto)
+            self.assertRaises((TypeError, pickle.PicklingError),
+                pickle.dumps, d.viewitems(), proto)
 
 
 def test_main():
index f671ee3c0b76b90d3ba7d20c53b73ab35d3a3132..8645f058da8ea4c48658f75932aa40d8b0f342bc 100644 (file)
@@ -216,7 +216,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
             ensurepip._uninstall_helper()
 
         self.run_pip.assert_called_once_with(
-            ["uninstall", "-y", "pip", "setuptools"]
+            [
+                "uninstall", "-y", "--disable-pip-version-check", "pip",
+                "setuptools",
+            ]
         )
 
     @requires_usable_pip
@@ -225,7 +228,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
             ensurepip._uninstall_helper(verbosity=1)
 
         self.run_pip.assert_called_once_with(
-            ["uninstall", "-y", "-v", "pip", "setuptools"]
+            [
+                "uninstall", "-y", "--disable-pip-version-check", "-v", "pip",
+                "setuptools",
+            ]
         )
 
     @requires_usable_pip
@@ -234,7 +240,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
             ensurepip._uninstall_helper(verbosity=2)
 
         self.run_pip.assert_called_once_with(
-            ["uninstall", "-y", "-vv", "pip", "setuptools"]
+            [
+                "uninstall", "-y", "--disable-pip-version-check", "-vv", "pip",
+                "setuptools",
+            ]
         )
 
     @requires_usable_pip
@@ -243,7 +252,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
             ensurepip._uninstall_helper(verbosity=3)
 
         self.run_pip.assert_called_once_with(
-            ["uninstall", "-y", "-vvv", "pip", "setuptools"]
+            [
+                "uninstall", "-y", "--disable-pip-version-check", "-vvv",
+                "pip", "setuptools",
+            ]
         )
 
     @requires_usable_pip
@@ -344,7 +356,10 @@ class TestUninstallationMainFunction(EnsurepipMixin, unittest.TestCase):
             ensurepip._uninstall._main([])
 
         self.run_pip.assert_called_once_with(
-            ["uninstall", "-y", "pip", "setuptools"]
+            [
+                "uninstall", "-y", "--disable-pip-version-check", "pip",
+                "setuptools",
+            ]
         )
 
 
index 4f2c9ef5b6034a5adc1238c5f24a99fd81f7e5ff..1fd7910d15874c6b84b6387b4950a7fe6c3c1fe4 100644 (file)
@@ -88,8 +88,8 @@ class AutoFileTests(unittest.TestCase):
     def testErrors(self):
         f = self.f
         self.assertEqual(f.name, TESTFN)
-        self.assertTrue(not f.isatty())
-        self.assertTrue(not f.closed)
+        self.assertFalse(f.isatty())
+        self.assertFalse(f.closed)
 
         if hasattr(f, "readinto"):
             self.assertRaises((IOError, TypeError), f.readinto, "")
index c15ad847bbc3fb0083157499548cee78268b8023..facc56e24f66e4fcb5b337fa6464fe532a2c30a4 100644 (file)
@@ -211,10 +211,11 @@ class FileInputTests(unittest.TestCase):
         except ValueError:
             pass
         try:
-            t1 = writeTmp(1, ["A\nB"], mode="wb")
-            fi = FileInput(files=t1, openhook=hook_encoded("rot13"))
+            # UTF-7 is a convenient, seldom used encoding
+            t1 = writeTmp(1, ['+AEE-\n+AEI-'], mode="wb")
+            fi = FileInput(files=t1, openhook=hook_encoded("utf-7"))
             lines = list(fi)
-            self.assertEqual(lines, ["N\n", "O"])
+            self.assertEqual(lines, [u'A\n', u'B'])
         finally:
             remove_tempfiles(t1)
 
index e21e47f9e8853f256c02d2752d53bdc769e76a45..8fdad14880c791365c8f14f1dd09c9c118247dab 100644 (file)
@@ -112,15 +112,15 @@ class AutoFileTests(unittest.TestCase):
 
     def testErrors(self):
         f = self.f
-        self.assertTrue(not f.isatty())
-        self.assertTrue(not f.closed)
+        self.assertFalse(f.isatty())
+        self.assertFalse(f.closed)
         #self.assertEqual(f.name, TESTFN)
         self.assertRaises(ValueError, f.read, 10) # Open for reading
         f.close()
         self.assertTrue(f.closed)
         f = _FileIO(TESTFN, 'r')
         self.assertRaises(TypeError, f.readinto, "")
-        self.assertTrue(not f.closed)
+        self.assertFalse(f.closed)
         f.close()
         self.assertTrue(f.closed)
 
index 5bf1d314e910edd1447469c82abe35349c1006cc..422430601ecba635b4c034f6de394b52cbe93416 100644 (file)
@@ -53,6 +53,36 @@ class GeneralFloatCases(unittest.TestCase):
         float('.' + '1'*1000)
         float(unicode('.' + '1'*1000))
 
+    def test_non_numeric_input_types(self):
+        # Test possible non-numeric types for the argument x, including
+        # subclasses of the explicitly documented accepted types.
+        class CustomStr(str): pass
+        class CustomByteArray(bytearray): pass
+        factories = [str, bytearray, CustomStr, CustomByteArray, buffer]
+
+        if test_support.have_unicode:
+            class CustomUnicode(unicode): pass
+            factories += [unicode, CustomUnicode]
+
+        for f in factories:
+            x = f(" 3.14  ")
+            msg = 'x has value %s and type %s' % (x, type(x).__name__)
+            try:
+                self.assertEqual(float(x), 3.14, msg=msg)
+            except TypeError, err:
+                raise AssertionError('For %s got TypeError: %s' %
+                                     (type(x).__name__, err))
+            errmsg = "could not convert"
+            with self.assertRaisesRegexp(ValueError, errmsg, msg=msg):
+                float(f('A' * 0x10))
+
+    def test_float_buffer(self):
+        self.assertEqual(float(buffer('12.3', 1, 3)), 2.3)
+        self.assertEqual(float(buffer('12.3\x00', 1, 3)), 2.3)
+        self.assertEqual(float(buffer('12.3 ', 1, 3)), 2.3)
+        self.assertEqual(float(buffer('12.3A', 1, 3)), 2.3)
+        self.assertEqual(float(buffer('12.34', 1, 3)), 2.3)
+
     def check_conversion_to_int(self, x):
         """Check that int(x) has the correct value and type, for a float x."""
         n = int(x)
index 965601058a0643114a4ac56c005e484a635def8a..8a56118f963e561644fcaad74cd991082c11c6a0 100644 (file)
@@ -10,21 +10,43 @@ import sys
 import unittest
 import sysconfig
 
+from test import test_support
 from test.test_support import run_unittest, findfile
 
+# Is this Python configured to support threads?
 try:
-    gdb_version, _ = subprocess.Popen(["gdb", "-nx", "--version"],
-                                      stdout=subprocess.PIPE).communicate()
-except OSError:
-    # This is what "no gdb" looks like.  There may, however, be other
-    # errors that manifest this way too.
-    raise unittest.SkipTest("Couldn't find gdb on the path")
-gdb_version_number = re.search("^GNU gdb [^\d]*(\d+)\.(\d)", gdb_version)
-gdb_major_version = int(gdb_version_number.group(1))
-gdb_minor_version = int(gdb_version_number.group(2))
+    import thread
+except ImportError:
+    thread = None
+
+def get_gdb_version():
+    try:
+        proc = subprocess.Popen(["gdb", "-nx", "--version"],
+                                stdout=subprocess.PIPE,
+                                universal_newlines=True)
+        version = proc.communicate()[0]
+    except OSError:
+        # This is what "no gdb" looks like.  There may, however, be other
+        # errors that manifest this way too.
+        raise unittest.SkipTest("Couldn't find gdb on the path")
+
+    # Regex to parse:
+    # 'GNU gdb (GDB; SUSE Linux Enterprise 12) 7.7\n' -> 7.7
+    # 'GNU gdb (GDB) Fedora 7.9.1-17.fc22\n' -> 7.9
+    # 'GNU gdb 6.1.1 [FreeBSD]\n' -> 6.1
+    # 'GNU gdb (GDB) Fedora (7.5.1-37.fc18)\n' -> 7.5
+    match = re.search(r"^GNU gdb.*?\b(\d+)\.(\d+)", version)
+    if match is None:
+        raise Exception("unable to parse GDB version: %r" % version)
+    return (version, int(match.group(1)), int(match.group(2)))
+
+gdb_version, gdb_major_version, gdb_minor_version = get_gdb_version()
 if gdb_major_version < 7:
-    raise unittest.SkipTest("gdb versions before 7.0 didn't support python embedding"
-                            " Saw:\n" + gdb_version)
+    raise unittest.SkipTest("gdb versions before 7.0 didn't support python "
+                            "embedding. Saw %s.%s:\n%s"
+                            % (gdb_major_version, gdb_minor_version,
+                               gdb_version))
+
 if sys.platform.startswith("sunos"):
     raise unittest.SkipTest("test doesn't work very well on Solaris")
 
@@ -713,20 +735,133 @@ $''')
 class PyBtTests(DebuggerTests):
     @unittest.skipIf(python_is_optimized(),
                      "Python was compiled with optimizations")
-    def test_basic_command(self):
+    def test_bt(self):
         'Verify that the "py-bt" command works'
         bt = self.get_stack_trace(script=self.get_sample_script(),
                                   cmds_after_breakpoint=['py-bt'])
         self.assertMultilineMatches(bt,
                                     r'''^.*
-#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
+Traceback \(most recent call first\):
+  File ".*gdb_sample.py", line 10, in baz
+    print\(42\)
+  File ".*gdb_sample.py", line 7, in bar
+    baz\(a, b, c\)
+  File ".*gdb_sample.py", line 4, in foo
+    bar\(a, b, c\)
+  File ".*gdb_sample.py", line 12, in <module>
+    foo\(1, 2, 3\)
+''')
+
+    @unittest.skipIf(python_is_optimized(),
+                     "Python was compiled with optimizations")
+    def test_bt_full(self):
+        'Verify that the "py-bt-full" command works'
+        bt = self.get_stack_trace(script=self.get_sample_script(),
+                                  cmds_after_breakpoint=['py-bt-full'])
+        self.assertMultilineMatches(bt,
+                                    r'''^.*
+#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\)
     baz\(a, b, c\)
-#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\)
+#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\)
     bar\(a, b, c\)
-#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
+#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 12, in <module> \(\)
     foo\(1, 2, 3\)
 ''')
 
+    @unittest.skipUnless(thread,
+                         "Python was compiled without thread support")
+    def test_threads(self):
+        'Verify that "py-bt" indicates threads that are waiting for the GIL'
+        cmd = '''
+from threading import Thread
+
+class TestThread(Thread):
+    # These threads would run forever, but we'll interrupt things with the
+    # debugger
+    def run(self):
+        i = 0
+        while 1:
+             i += 1
+
+t = {}
+for i in range(4):
+   t[i] = TestThread()
+   t[i].start()
+
+# Trigger a breakpoint on the main thread
+print 42
+
+'''
+        # Verify with "py-bt":
+        gdb_output = self.get_stack_trace(cmd,
+                                          cmds_after_breakpoint=['thread apply all py-bt'])
+        self.assertIn('Waiting for the GIL', gdb_output)
+
+        # Verify with "py-bt-full":
+        gdb_output = self.get_stack_trace(cmd,
+                                          cmds_after_breakpoint=['thread apply all py-bt-full'])
+        self.assertIn('Waiting for the GIL', gdb_output)
+
+    @unittest.skipIf(python_is_optimized(),
+                     "Python was compiled with optimizations")
+    # Some older versions of gdb will fail with
+    #  "Cannot find new threads: generic error"
+    # unless we add LD_PRELOAD=PATH-TO-libpthread.so.1 as a workaround
+    @unittest.skipUnless(thread,
+                         "Python was compiled without thread support")
+    def test_gc(self):
+        'Verify that "py-bt" indicates if a thread is garbage-collecting'
+        cmd = ('from gc import collect\n'
+               'print 42\n'
+               'def foo():\n'
+               '    collect()\n'
+               'def bar():\n'
+               '    foo()\n'
+               'bar()\n')
+        # Verify with "py-bt":
+        gdb_output = self.get_stack_trace(cmd,
+                                          cmds_after_breakpoint=['break update_refs', 'continue', 'py-bt'],
+                                          )
+        self.assertIn('Garbage-collecting', gdb_output)
+
+        # Verify with "py-bt-full":
+        gdb_output = self.get_stack_trace(cmd,
+                                          cmds_after_breakpoint=['break update_refs', 'continue', 'py-bt-full'],
+                                          )
+        self.assertIn('Garbage-collecting', gdb_output)
+
+    @unittest.skipIf(python_is_optimized(),
+                     "Python was compiled with optimizations")
+    # Some older versions of gdb will fail with
+    #  "Cannot find new threads: generic error"
+    # unless we add LD_PRELOAD=PATH-TO-libpthread.so.1 as a workaround
+    @unittest.skipUnless(thread,
+                         "Python was compiled without thread support")
+    def test_pycfunction(self):
+        'Verify that "py-bt" displays invocations of PyCFunction instances'
+        # Tested function must not be defined with METH_NOARGS or METH_O,
+        # otherwise call_function() doesn't call PyCFunction_Call()
+        cmd = ('from time import gmtime\n'
+               'def foo():\n'
+               '    gmtime(1)\n'
+               'def bar():\n'
+               '    foo()\n'
+               'bar()\n')
+        # Verify with "py-bt":
+        gdb_output = self.get_stack_trace(cmd,
+                                          breakpoint='time_gmtime',
+                                          cmds_after_breakpoint=['bt', 'py-bt'],
+                                          )
+        self.assertIn('<built-in function gmtime', gdb_output)
+
+        # Verify with "py-bt-full":
+        gdb_output = self.get_stack_trace(cmd,
+                                          breakpoint='time_gmtime',
+                                          cmds_after_breakpoint=['py-bt-full'],
+                                          )
+        self.assertIn('#0 <built-in function gmtime', gdb_output)
+
+
 class PyPrintTests(DebuggerTests):
     @unittest.skipIf(python_is_optimized(),
                      "Python was compiled with optimizations")
@@ -781,6 +916,10 @@ class PyLocalsTests(DebuggerTests):
                                     r".*\na = 1\nb = 2\nc = 3\n.*")
 
 def test_main():
+    if test_support.verbose:
+        print("GDB version %s.%s:" % (gdb_major_version, gdb_minor_version))
+        for line in gdb_version.splitlines():
+            print(" " * 4 + line)
     run_unittest(PrettyPrintTests,
                  PyListTests,
                  StackNavigationTests,
index 7da9746d789e2e3e55f0a28dea4c65b58217d921..9f4b798a6972f1e1ce944494e407f15a1fe3d0d0 100644 (file)
@@ -149,6 +149,10 @@ class HotShotTestCase(unittest.TestCase):
         stats.load(self.logfn)
         os.unlink(self.logfn)
 
+    def test_large_info(self):
+        p = self.new_profiler()
+        self.assertRaises(ValueError, p.addinfo, "A", "A" * 0xfceb)
+
 
 def test_main():
     test_support.run_unittest(HotShotTestCase)
index fc7c5710e46d89c1e06920c504d1dcead9349b20..a72f6f7ff1c27ce6395a76ae71ba92ce1924fbac 100644 (file)
@@ -5,6 +5,7 @@ import StringIO
 import socket
 import errno
 import os
+import tempfile
 
 import unittest
 TestCase = unittest.TestCase
@@ -399,6 +400,22 @@ class BasicTest(TestCase):
         conn.sock = sock
         conn.request('GET', '/foo', body)
         self.assertTrue(sock.data.startswith(expected))
+        self.assertIn('def test_send_file', sock.data)
+
+    def test_send_tempfile(self):
+        expected = ('GET /foo HTTP/1.1\r\nHost: example.com\r\n'
+                    'Accept-Encoding: identity\r\nContent-Length: 9\r\n\r\n'
+                    'fake\ndata')
+
+        with tempfile.TemporaryFile() as body:
+            body.write('fake\ndata')
+            body.seek(0)
+
+            conn = httplib.HTTPConnection('example.com')
+            sock = FakeSocket(body)
+            conn.sock = sock
+            conn.request('GET', '/foo', body)
+        self.assertEqual(sock.data, expected)
 
     def test_send(self):
         expected = 'this is a test this is only a test'
@@ -561,6 +578,16 @@ class BasicTest(TestCase):
         #self.assertTrue(response[0].closed)
         self.assertTrue(conn.sock.file_closed)
 
+    def test_proxy_tunnel_without_status_line(self):
+        # Issue 17849: If a proxy tunnel is created that does not return
+        # a status code, fail.
+        body = 'hello world'
+        conn = httplib.HTTPConnection('example.com', strict=False)
+        conn.set_tunnel('foo')
+        conn.sock = FakeSocket(body)
+        with self.assertRaisesRegexp(socket.error, "Invalid response"):
+            conn._tunnel()
+
 class OfflineTest(TestCase):
     def test_responses(self):
         self.assertEqual(httplib.responses[httplib.NOT_FOUND], "Not Found")
@@ -825,10 +852,12 @@ class TunnelTests(TestCase):
 
         self.assertEqual(conn.sock.host, 'proxy.com')
         self.assertEqual(conn.sock.port, 80)
-        self.assertTrue('CONNECT destination.com' in conn.sock.data)
-        self.assertTrue('Host: destination.com' in conn.sock.data)
+        self.assertIn('CONNECT destination.com', conn.sock.data)
+        # issue22095
+        self.assertNotIn('Host: destination.com:None', conn.sock.data)
+        self.assertIn('Host: destination.com', conn.sock.data)
 
-        self.assertTrue('Host: proxy.com' not in conn.sock.data)
+        self.assertNotIn('Host: proxy.com', conn.sock.data)
 
         conn.close()
 
index 706dfc7fb2ad289f3db66fe34c9bd503fd22031d..c84f48fea40b56dc8771470ad393c12f9bdec1bf 100644 (file)
@@ -381,6 +381,16 @@ print "%%s, %%s, %%s" %% (form.getfirst("spam"), form.getfirst("eggs"),
                           form.getfirst("bacon"))
 """
 
+cgi_file4 = """\
+#!%s
+import os
+
+print("Content-type: text/html")
+print()
+
+print(os.environ["%s"])
+"""
+
 
 @unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
         "This test can't be run reliably as root (issue #13308).")
@@ -424,6 +434,11 @@ class CGIHTTPServerTestCase(BaseTestCase):
             file3.write(cgi_file1 % self.pythonexe)
         os.chmod(self.file3_path, 0777)
 
+        self.file4_path = os.path.join(self.cgi_dir, 'file4.py')
+        with open(self.file4_path, 'w') as file4:
+            file4.write(cgi_file4 % (self.pythonexe, 'QUERY_STRING'))
+        os.chmod(self.file4_path, 0o777)
+
         self.cwd = os.getcwd()
         os.chdir(self.parent_dir)
 
@@ -436,6 +451,7 @@ class CGIHTTPServerTestCase(BaseTestCase):
             os.remove(self.file1_path)
             os.remove(self.file2_path)
             os.remove(self.file3_path)
+            os.remove(self.file4_path)
             os.rmdir(self.cgi_child_dir)
             os.rmdir(self.cgi_dir)
             os.rmdir(self.parent_dir)
@@ -536,6 +552,19 @@ class CGIHTTPServerTestCase(BaseTestCase):
         self.assertEqual((b'Hello World\n', 'text/html', 200),
                 (res.read(), res.getheader('Content-type'), res.status))
 
+    def test_query_with_multiple_question_mark(self):
+        res = self.request('/cgi-bin/file4.py?a=b?c=d')
+        self.assertEqual(
+            (b'a=b?c=d\n', 'text/html', 200),
+            (res.read(), res.getheader('Content-type'), res.status))
+
+    def test_query_with_continuous_slashes(self):
+        res = self.request('/cgi-bin/file4.py?k=aa%2F%2Fbb&//q//p//=//a//b//')
+        self.assertEqual(
+            (b'k=aa%2F%2Fbb&//q//p//=//a//b//\n',
+             'text/html', 200),
+            (res.read(), res.getheader('Content-type'), res.status))
+
 
 class SimpleHTTPRequestHandlerTestCase(unittest.TestCase):
     """ Test url parsing """
index 31edbd12454bde2f1d66f16ea523662a06c52166..9589bf230ca3954bd679694c4200117f224ee584 100644 (file)
@@ -61,7 +61,9 @@ class InputValidationTests(unittest.TestCase):
         self.check("rgb82rgb")
         self.check("rgb2grey")
         self.check("grey2rgb")
-
+        # Issue #24264: Buffer overflow
+        with self.assertRaises(imageop.error):
+            imageop.grey2rgb('A'*256, 1, 129)
 
 def test_main():
 
index 4130cd0b502bcc92443d817aea104598dfa1ba89..ecc04cb75d59b128b13e1cb10078e725ba3a87ef 100644 (file)
@@ -8,7 +8,7 @@ import datetime
 from UserList import UserList
 from UserDict import UserDict
 
-from test.test_support import run_unittest, check_py3k_warnings
+from test.test_support import run_unittest, check_py3k_warnings, have_unicode
 
 with check_py3k_warnings(
         ("tuple parameter unpacking has been removed", SyntaxWarning),
@@ -17,7 +17,10 @@ with check_py3k_warnings(
     from test import inspect_fodder2 as mod2
 
 # C module for test_findsource_binary
-import unicodedata
+try:
+    import unicodedata
+except ImportError:
+    unicodedata = None
 
 # Functions tested in this suite:
 # ismodule, isclass, ismethod, isfunction, istraceback, isframe, iscode,
@@ -798,7 +801,8 @@ class TestGetcallargsFunctions(unittest.TestCase):
             self.assertEqualException(f, '2, c=3')
             self.assertEqualException(f, '2, 3, c=4')
             self.assertEqualException(f, '2, c=4, b=3')
-            self.assertEqualException(f, '**{u"\u03c0\u03b9": 4}')
+            if have_unicode:
+                self.assertEqualException(f, '**{u"\u03c0\u03b9": 4}')
             # f got multiple values for keyword argument
             self.assertEqualException(f, '1, a=2')
             self.assertEqualException(f, '1, **{"a":2}')
index 365f9a247c9ea441f44bd670b68588a9f0ba8e40..2ca6cf2f529f1af698ee048b68151e866bdf12a3 100644 (file)
@@ -340,20 +340,37 @@ class IntTestCases(IntLongCommonTests, unittest.TestCase):
         # Test possible valid non-numeric types for x, including subclasses
         # of the allowed built-in types.
         class CustomStr(str): pass
-        values = ['100', CustomStr('100')]
+        class CustomByteArray(bytearray): pass
+        factories = [str, bytearray, CustomStr, CustomByteArray, buffer]
 
         if have_unicode:
             class CustomUnicode(unicode): pass
-            values += [unicode('100'), CustomUnicode(unicode('100'))]
+            factories += [unicode, CustomUnicode]
 
-        for x in values:
+        for f in factories:
+            x = f('100')
             msg = 'x has value %s and type %s' % (x, type(x).__name__)
             try:
                 self.assertEqual(int(x), 100, msg=msg)
-                self.assertEqual(int(x, 2), 4, msg=msg)
+                if isinstance(x, basestring):
+                    self.assertEqual(int(x, 2), 4, msg=msg)
             except TypeError, err:
                 raise AssertionError('For %s got TypeError: %s' %
                                      (type(x).__name__, err))
+            if not isinstance(x, basestring):
+                errmsg = "can't convert non-string"
+                with self.assertRaisesRegexp(TypeError, errmsg, msg=msg):
+                    int(x, 2)
+            errmsg = 'invalid literal'
+            with self.assertRaisesRegexp(ValueError, errmsg, msg=msg):
+                int(f('A' * 0x10))
+
+    def test_int_buffer(self):
+        self.assertEqual(int(buffer('123', 1, 2)), 23)
+        self.assertEqual(int(buffer('123\x00', 1, 2)), 23)
+        self.assertEqual(int(buffer('123 ', 1, 2)), 23)
+        self.assertEqual(int(buffer('123A', 1, 2)), 23)
+        self.assertEqual(int(buffer('1234', 1, 2)), 23)
 
     def test_error_on_string_float_for_x(self):
         self.assertRaises(ValueError, int, '1.2')
index bbc804b6a58a3aa76a96d52c6b1b305ae359c92d..34760c9533ec7c3899c9a3fbbbbdf7a39876e35a 100644 (file)
@@ -15,7 +15,7 @@
 ################################################################################
 # When writing tests for io, it's important to test both the C and Python
 # implementations. This is usually done by writing a base test that refers to
-# the type it is testing as a attribute. Then it provides custom subclasses to
+# the type it is testing as an attribute. Then it provides custom subclasses to
 # test both implementations. This file has lots of examples.
 ################################################################################
 
@@ -426,7 +426,7 @@ class IOTest(unittest.TestCase):
         with self.open(support.TESTFN, "ab") as f:
             self.assertEqual(f.tell(), 3)
         with self.open(support.TESTFN, "a") as f:
-            self.assertTrue(f.tell() > 0)
+            self.assertGreater(f.tell(), 0)
 
     def test_destructor(self):
         record = []
@@ -544,7 +544,7 @@ class IOTest(unittest.TestCase):
         wr = weakref.ref(f)
         del f
         support.gc_collect()
-        self.assertTrue(wr() is None, wr)
+        self.assertIsNone(wr(), wr)
         with self.open(support.TESTFN, "rb") as f:
             self.assertEqual(f.read(), b"abcxxx")
 
@@ -668,7 +668,7 @@ class CIOTest(IOTest):
         del MyIO
         del obj
         support.gc_collect()
-        self.assertTrue(wr() is None, wr)
+        self.assertIsNone(wr(), wr)
 
 class PyIOTest(IOTest):
     test_array_writes = unittest.skip(
@@ -1062,7 +1062,7 @@ class CBufferedReaderTest(BufferedReaderTest, SizeofTest):
         wr = weakref.ref(f)
         del f
         support.gc_collect()
-        self.assertTrue(wr() is None, wr)
+        self.assertIsNone(wr(), wr)
 
     def test_args_error(self):
         # Issue #17275
@@ -1365,7 +1365,7 @@ class CBufferedWriterTest(BufferedWriterTest, SizeofTest):
         wr = weakref.ref(f)
         del f
         support.gc_collect()
-        self.assertTrue(wr() is None, wr)
+        self.assertIsNone(wr(), wr)
         with self.open(support.TESTFN, "rb") as f:
             self.assertEqual(f.read(), b"123xxx")
 
@@ -2001,6 +2001,15 @@ class TextIOWrapperTest(unittest.TestCase):
         t.__init__(self.MockRawIO())
         self.assertEqual(t.read(0), u'')
 
+    def test_non_text_encoding_codecs_are_rejected(self):
+        # Ensure the constructor complains if passed a codec that isn't
+        # marked as a text encoding
+        # http://bugs.python.org/issue20404
+        r = self.BytesIO()
+        b = self.BufferedWriter(r)
+        with support.check_py3k_warnings():
+            self.TextIOWrapper(b, encoding="hex_codec")
+
     def test_detach(self):
         r = self.BytesIO()
         b = self.BufferedWriter(r)
@@ -2054,7 +2063,7 @@ class TextIOWrapperTest(unittest.TestCase):
         t = self.TextIOWrapper(b, encoding="utf8")
         self.assertEqual(t.encoding, "utf8")
         t = self.TextIOWrapper(b)
-        self.assertTrue(t.encoding is not None)
+        self.assertIsNotNone(t.encoding)
         codecs.lookup(t.encoding)
 
     def test_encoding_errors_reading(self):
@@ -2617,19 +2626,39 @@ class TextIOWrapperTest(unittest.TestCase):
 
     def test_illegal_decoder(self):
         # Issue #17106
+        # Bypass the early encoding check added in issue 20404
+        def _make_illegal_wrapper():
+            quopri = codecs.lookup("quopri_codec")
+            quopri._is_text_encoding = True
+            try:
+                t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'),
+                                       newline='\n', encoding="quopri_codec")
+            finally:
+                quopri._is_text_encoding = False
+            return t
         # Crash when decoder returns non-string
-        t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'), newline='\n',
-                               encoding='quopri_codec')
+        with support.check_py3k_warnings():
+            t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'), newline='\n',
+                                   encoding='quopri_codec')
         with self.maybeRaises(TypeError):
             t.read(1)
-        t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'), newline='\n',
-                               encoding='quopri_codec')
+        with support.check_py3k_warnings():
+            t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'), newline='\n',
+                                   encoding='quopri_codec')
         with self.maybeRaises(TypeError):
             t.readline()
-        t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'), newline='\n',
-                               encoding='quopri_codec')
+        with support.check_py3k_warnings():
+            t = self.TextIOWrapper(self.BytesIO(b'aaaaaa'), newline='\n',
+                                   encoding='quopri_codec')
         with self.maybeRaises(TypeError):
             t.read()
+        #else:
+            #t = _make_illegal_wrapper()
+            #self.assertRaises(TypeError, t.read, 1)
+            #t = _make_illegal_wrapper()
+            #self.assertRaises(TypeError, t.readline)
+            #t = _make_illegal_wrapper()
+            #self.assertRaises(TypeError, t.read)
 
 
 class CTextIOWrapperTest(TextIOWrapperTest):
@@ -2658,7 +2687,7 @@ class CTextIOWrapperTest(TextIOWrapperTest):
         wr = weakref.ref(t)
         del t
         support.gc_collect()
-        self.assertTrue(wr() is None, wr)
+        self.assertIsNone(wr(), wr)
         with self.open(support.TESTFN, "rb") as f:
             self.assertEqual(f.read(), b"456def")
 
@@ -2808,7 +2837,7 @@ class MiscIOTest(unittest.TestCase):
     def test___all__(self):
         for name in self.io.__all__:
             obj = getattr(self.io, name, None)
-            self.assertTrue(obj is not None, name)
+            self.assertIsNotNone(obj, name)
             if name == "open":
                 continue
             elif "error" in name.lower() or name == "UnsupportedOperation":
@@ -2903,7 +2932,7 @@ class MiscIOTest(unittest.TestCase):
         wr = weakref.ref(c)
         del c, b
         support.gc_collect()
-        self.assertTrue(wr() is None, wr)
+        self.assertIsNone(wr(), wr)
 
     def test_abcs(self):
         # Test the visible base classes are ABCs.
@@ -2996,15 +3025,17 @@ class MiscIOTest(unittest.TestCase):
             received += iter(rf.read, None)
 
         sent, received = b''.join(sent), b''.join(received)
-        self.assertTrue(sent == received)
+        self.assertEqual(sent, received)
         self.assertTrue(wf.closed)
         self.assertTrue(rf.closed)
 
 class CMiscIOTest(MiscIOTest):
     io = io
+    shutdown_error = "RuntimeError: could not find io module state"
 
 class PyMiscIOTest(MiscIOTest):
     io = pyio
+    shutdown_error = "LookupError: unknown encoding: ascii"
 
 
 @unittest.skipIf(os.name == 'nt', 'POSIX signals required for this test.')
index 8d16bb03875c1f10f06bd8e153050162c01abc6d..ffa4774b1f9beffbc38b2730d27aa1b71e23dbf7 100644 (file)
@@ -216,43 +216,43 @@ class LongTest(test_int.IntLongCommonTests, unittest.TestCase):
         for n in xrange(2*SHIFT):
             p2 = 2L ** n
             eq(x << n >> n, x,
-                Frm("x << n >> n != x for x=%r, n=%r", (x, n)))
+                Frm("x << n >> n != x for x=%r, n=%r", x, n))
             eq(x // p2, x >> n,
-                Frm("x // p2 != x >> n for x=%r n=%r p2=%r", (x, n, p2)))
+                Frm("x // p2 != x >> n for x=%r n=%r p2=%r", x, n, p2))
             eq(x * p2, x << n,
-                Frm("x * p2 != x << n for x=%r n=%r p2=%r", (x, n, p2)))
+                Frm("x * p2 != x << n for x=%r n=%r p2=%r", x, n, p2))
             eq(x & -p2, x >> n << n,
-                Frm("not x & -p2 == x >> n << n for x=%r n=%r p2=%r", (x, n, p2)))
+                Frm("not x & -p2 == x >> n << n for x=%r n=%r p2=%r", x, n, p2))
             eq(x & -p2, x & ~(p2 - 1),
-                Frm("not x & -p2 == x & ~(p2 - 1) for x=%r n=%r p2=%r", (x, n, p2)))
+                Frm("not x & -p2 == x & ~(p2 - 1) for x=%r n=%r p2=%r", x, n, p2))
 
     def check_bitop_identities_2(self, x, y):
         eq = self.assertEqual
-        eq(x & y, y & x, Frm("x & y != y & x for x=%r, y=%r", (x, y)))
-        eq(x | y, y | x, Frm("x | y != y | x for x=%r, y=%r", (x, y)))
-        eq(x ^ y, y ^ x, Frm("x ^ y != y ^ x for x=%r, y=%r", (x, y)))
-        eq(x ^ y ^ x, y, Frm("x ^ y ^ x != y for x=%r, y=%r", (x, y)))
-        eq(x & y, ~(~x | ~y), Frm("x & y != ~(~x | ~y) for x=%r, y=%r", (x, y)))
-        eq(x | y, ~(~x & ~y), Frm("x | y != ~(~x & ~y) for x=%r, y=%r", (x, y)))
+        eq(x & y, y & x, Frm("x & y != y & x for x=%r, y=%r", x, y))
+        eq(x | y, y | x, Frm("x | y != y | x for x=%r, y=%r", x, y))
+        eq(x ^ y, y ^ x, Frm("x ^ y != y ^ x for x=%r, y=%r", x, y))
+        eq(x ^ y ^ x, y, Frm("x ^ y ^ x != y for x=%r, y=%r", x, y))
+        eq(x & y, ~(~x | ~y), Frm("x & y != ~(~x | ~y) for x=%r, y=%r", x, y))
+        eq(x | y, ~(~x & ~y), Frm("x | y != ~(~x & ~y) for x=%r, y=%r", x, y))
         eq(x ^ y, (x | y) & ~(x & y),
-             Frm("x ^ y != (x | y) & ~(x & y) for x=%r, y=%r", (x, y)))
+             Frm("x ^ y != (x | y) & ~(x & y) for x=%r, y=%r", x, y))
         eq(x ^ y, (x & ~y) | (~x & y),
-             Frm("x ^ y == (x & ~y) | (~x & y) for x=%r, y=%r", (x, y)))
+             Frm("x ^ y == (x & ~y) | (~x & y) for x=%r, y=%r", x, y))
         eq(x ^ y, (x | y) & (~x | ~y),
-             Frm("x ^ y == (x | y) & (~x | ~y) for x=%r, y=%r", (x, y)))
+             Frm("x ^ y == (x | y) & (~x | ~y) for x=%r, y=%r", x, y))
 
     def check_bitop_identities_3(self, x, y, z):
         eq = self.assertEqual
         eq((x & y) & z, x & (y & z),
-             Frm("(x & y) & z != x & (y & z) for x=%r, y=%r, z=%r", (x, y, z)))
+             Frm("(x & y) & z != x & (y & z) for x=%r, y=%r, z=%r", x, y, z))
         eq((x | y) | z, x | (y | z),
-             Frm("(x | y) | z != x | (y | z) for x=%r, y=%r, z=%r", (x, y, z)))
+             Frm("(x | y) | z != x | (y | z) for x=%r, y=%r, z=%r", x, y, z))
         eq((x ^ y) ^ z, x ^ (y ^ z),
-             Frm("(x ^ y) ^ z != x ^ (y ^ z) for x=%r, y=%r, z=%r", (x, y, z)))
+             Frm("(x ^ y) ^ z != x ^ (y ^ z) for x=%r, y=%r, z=%r", x, y, z))
         eq(x & (y | z), (x & y) | (x & z),
-             Frm("x & (y | z) != (x & y) | (x & z) for x=%r, y=%r, z=%r", (x, y, z)))
+             Frm("x & (y | z) != (x & y) | (x & z) for x=%r, y=%r, z=%r", x, y, z))
         eq(x | (y & z), (x | y) & (x | z),
-             Frm("x | (y & z) != (x | y) & (x | z) for x=%r, y=%r, z=%r", (x, y, z)))
+             Frm("x | (y & z) != (x | y) & (x | z) for x=%r, y=%r, z=%r", x, y, z))
 
     def test_bitop_identities(self):
         for x in special:
index fdd642b3b1f5f7f290d87916b355381b2f2aac0b..0eb996176e16eee0880b33532027ae4dede9fe4f 100644 (file)
@@ -673,7 +673,8 @@ class CBytesIOTest(PyBytesIOTest):
         self.assertEqual(len(state), 3)
         bytearray(state[0]) # Check if state[0] supports the buffer interface.
         self.assertIsInstance(state[1], int)
-        self.assertTrue(isinstance(state[2], dict) or state[2] is None)
+        if state[2] is not None:
+            self.assertIsInstance(state[2], dict)
         memio.close()
         self.assertRaises(ValueError, memio.__getstate__)
 
@@ -729,7 +730,8 @@ class CStringIOTest(PyStringIOTest):
         self.assertIsInstance(state[0], unicode)
         self.assertIsInstance(state[1], str)
         self.assertIsInstance(state[2], int)
-        self.assertTrue(isinstance(state[3], dict) or state[3] is None)
+        if state[3] is not None:
+            self.assertIsInstance(state[3], dict)
         memio.close()
         self.assertRaises(ValueError, memio.__getstate__)
 
index 6c7ea7a58ec14363aa008711c8975b5ba79e93ea..57c7c8847c6c5c0924ae82055f8c70cbbd16399f 100644 (file)
@@ -856,7 +856,7 @@ class Win32KillTests(unittest.TestCase):
             os.kill(proc.pid, signal.SIGINT)
             self.fail("subprocess did not stop on {}".format(name))
 
-    @unittest.skip("subprocesses aren't inheriting CTRL+C property")
+    @unittest.skip("subprocesses aren't inheriting Ctrl+C property")
     def test_CTRL_C_EVENT(self):
         from ctypes import wintypes
         import ctypes
@@ -869,7 +869,7 @@ class Win32KillTests(unittest.TestCase):
         SetConsoleCtrlHandler.restype = wintypes.BOOL
 
         # Calling this with NULL and FALSE causes the calling process to
-        # handle CTRL+C, rather than ignore it. This property is inherited
+        # handle Ctrl+C, rather than ignore it. This property is inherited
         # by subprocesses.
         SetConsoleCtrlHandler(NULL, 0)
 
index b6dd2b7370dc8f53664fff68fc22cc753929404f..b98fe19816f7278c85cfd649ef47040aae3c0f71 100644 (file)
@@ -69,6 +69,17 @@ class PdbTestCase(unittest.TestCase):
             any('main.py(5)foo()->None' in l for l in stdout.splitlines()),
             'Fail to step into the caller after a return')
 
+    def test_issue16180(self):
+        # A syntax error in the debuggee.
+        script = "def f: pass\n"
+        commands = ''
+        expected = "SyntaxError:"
+        stdout, stderr = self.run_pdb(script, commands)
+        self.assertIn(expected, stdout,
+            '\n\nExpected:\n{}\nGot:\n{}\n'
+            'Fail to handle a syntax error in the debuggee.'
+            .format(expected, stdout))
+
 
 class PdbTestInput(object):
     """Context manager that makes testing Pdb in doctests easier."""
index 92b82d0f7d27e353236cfd4ec788e9437b769017..cbc36cfce3931ec11cf993bea10b402a060604dd 100644 (file)
@@ -164,17 +164,11 @@ class UnicodeFileTests(unittest.TestCase):
         dirname = os.path.join(test_support.TESTFN,
                                u'Gr\xfc\xdf-\u66e8\u66e9\u66eb')
         filename = u'\xdf-\u66e8\u66e9\u66eb'
-        oldwd = os.getcwd()
-        os.mkdir(dirname)
-        os.chdir(dirname)
-        try:
+        with test_support.temp_cwd(dirname):
             with open(filename, 'w') as f:
                 f.write((filename + '\n').encode("utf-8"))
             os.access(filename,os.R_OK)
             os.remove(filename)
-        finally:
-            os.chdir(oldwd)
-            os.rmdir(dirname)
 
 
 class UnicodeNFCFileTests(UnicodeFileTests):
index c3126491ad29d78f641ac9116371d115cfa12cbd..2db75898e332debd6a4521141675134a64d54b68 100644 (file)
@@ -3,13 +3,15 @@ from cStringIO import StringIO
 
 from test import test_support
 
-from test.pickletester import (AbstractPickleTests,
+from test.pickletester import (AbstractUnpickleTests,
+                               AbstractPickleTests,
                                AbstractPickleModuleTests,
                                AbstractPersistentPicklerTests,
                                AbstractPicklerUnpicklerObjectTests,
                                BigmemPickleTests)
 
-class PickleTests(AbstractPickleTests, AbstractPickleModuleTests):
+class PickleTests(AbstractUnpickleTests, AbstractPickleTests,
+                  AbstractPickleModuleTests):
 
     def dumps(self, arg, proto=0, fast=0):
         # Ignore fast
@@ -22,10 +24,18 @@ class PickleTests(AbstractPickleTests, AbstractPickleModuleTests):
     module = pickle
     error = KeyError
 
-class PicklerTests(AbstractPickleTests):
+class UnpicklerTests(AbstractUnpickleTests):
 
     error = KeyError
 
+    def loads(self, buf):
+        f = StringIO(buf)
+        u = pickle.Unpickler(f)
+        return u.load()
+
+
+class PicklerTests(AbstractPickleTests):
+
     def dumps(self, arg, proto=0, fast=0):
         f = StringIO()
         p = pickle.Pickler(f, proto)
@@ -81,6 +91,7 @@ class PickleBigmemPickleTests(BigmemPickleTests):
 def test_main():
     test_support.run_unittest(
         PickleTests,
+        UnpicklerTests,
         PicklerTests,
         PersPicklerTests,
         PicklerUnpicklerObjectTests,
index 13381e502e116fb43ac7bb8c07c46a5318757b4f..686b6b9ff60378eeac6ba1d4e58ab58ffe0f0a2a 100644 (file)
@@ -1,5 +1,6 @@
 import unittest
 from test import test_support, test_genericpath
+from test import test_support as support
 
 import posixpath
 import os
@@ -251,7 +252,6 @@ class PosixPathTest(unittest.TestCase):
             # Bug #930024, return the path unchanged if we get into an infinite
             # symlink loop.
             try:
-                old_path = abspath('.')
                 os.symlink(ABSTFN, ABSTFN)
                 self.assertEqual(realpath(ABSTFN), ABSTFN)
 
@@ -277,10 +277,9 @@ class PosixPathTest(unittest.TestCase):
                 self.assertEqual(realpath(ABSTFN+"c"), ABSTFN+"c")
 
                 # Test using relative path as well.
-                os.chdir(dirname(ABSTFN))
-                self.assertEqual(realpath(basename(ABSTFN)), ABSTFN)
+                with support.change_cwd(dirname(ABSTFN)):
+                    self.assertEqual(realpath(basename(ABSTFN)), ABSTFN)
             finally:
-                os.chdir(old_path)
                 test_support.unlink(ABSTFN)
                 test_support.unlink(ABSTFN+"1")
                 test_support.unlink(ABSTFN+"2")
@@ -302,7 +301,6 @@ class PosixPathTest(unittest.TestCase):
 
         def test_realpath_deep_recursion(self):
             depth = 10
-            old_path = abspath('.')
             try:
                 os.mkdir(ABSTFN)
                 for i in range(depth):
@@ -311,10 +309,9 @@ class PosixPathTest(unittest.TestCase):
                 self.assertEqual(realpath(ABSTFN + '/%d' % depth), ABSTFN)
 
                 # Test using relative path as well.
-                os.chdir(ABSTFN)
-                self.assertEqual(realpath('%d' % depth), ABSTFN)
+                with support.change_cwd(ABSTFN):
+                    self.assertEqual(realpath('%d' % depth), ABSTFN)
             finally:
-                os.chdir(old_path)
                 for i in range(depth + 1):
                     test_support.unlink(ABSTFN + '/%d' % i)
                 safe_rmdir(ABSTFN)
@@ -325,15 +322,13 @@ class PosixPathTest(unittest.TestCase):
             # /usr/doc with 'doc' being a symlink to /usr/share/doc. We call
             # realpath("a"). This should return /usr/share/doc/a/.
             try:
-                old_path = abspath('.')
                 os.mkdir(ABSTFN)
                 os.mkdir(ABSTFN + "/y")
                 os.symlink(ABSTFN + "/y", ABSTFN + "/k")
 
-                os.chdir(ABSTFN + "/k")
-                self.assertEqual(realpath("a"), ABSTFN + "/y/a")
+                with support.change_cwd(ABSTFN + "/k"):
+                    self.assertEqual(realpath("a"), ABSTFN + "/y/a")
             finally:
-                os.chdir(old_path)
                 test_support.unlink(ABSTFN + "/k")
                 safe_rmdir(ABSTFN + "/y")
                 safe_rmdir(ABSTFN)
@@ -347,7 +342,6 @@ class PosixPathTest(unittest.TestCase):
             # and a symbolic link 'link-y' pointing to 'y' in directory 'a',
             # then realpath("link-y/..") should return 'k', not 'a'.
             try:
-                old_path = abspath('.')
                 os.mkdir(ABSTFN)
                 os.mkdir(ABSTFN + "/k")
                 os.mkdir(ABSTFN + "/k/y")
@@ -356,11 +350,10 @@ class PosixPathTest(unittest.TestCase):
                 # Absolute path.
                 self.assertEqual(realpath(ABSTFN + "/link-y/.."), ABSTFN + "/k")
                 # Relative path.
-                os.chdir(dirname(ABSTFN))
-                self.assertEqual(realpath(basename(ABSTFN) + "/link-y/.."),
-                                 ABSTFN + "/k")
+                with support.change_cwd(dirname(ABSTFN)):
+                    self.assertEqual(realpath(basename(ABSTFN) + "/link-y/.."),
+                                     ABSTFN + "/k")
             finally:
-                os.chdir(old_path)
                 test_support.unlink(ABSTFN + "/link-y")
                 safe_rmdir(ABSTFN + "/k/y")
                 safe_rmdir(ABSTFN + "/k")
@@ -371,17 +364,14 @@ class PosixPathTest(unittest.TestCase):
             # must be resolved too.
 
             try:
-                old_path = abspath('.')
                 os.mkdir(ABSTFN)
                 os.mkdir(ABSTFN + "/k")
                 os.symlink(ABSTFN, ABSTFN + "link")
-                os.chdir(dirname(ABSTFN))
-
-                base = basename(ABSTFN)
-                self.assertEqual(realpath(base + "link"), ABSTFN)
-                self.assertEqual(realpath(base + "link/k"), ABSTFN + "/k")
+                with support.change_cwd(dirname(ABSTFN)):
+                    base = basename(ABSTFN)
+                    self.assertEqual(realpath(base + "link"), ABSTFN)
+                    self.assertEqual(realpath(base + "link/k"), ABSTFN + "/k")
             finally:
-                os.chdir(old_path)
                 test_support.unlink(ABSTFN + "link")
                 safe_rmdir(ABSTFN + "/k")
                 safe_rmdir(ABSTFN)
index 50493f6d1a8b6e84c17e160dc43eb7b4b3f12544..bed9a932274de54068732bce9f4d9e1876725308 100644 (file)
@@ -56,6 +56,7 @@ class QueryTestCase(unittest.TestCase):
         # Verify .isrecursive() and .isreadable() w/o recursion
         pp = pprint.PrettyPrinter()
         for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, uni("yaddayadda"),
+                     bytearray(b"ghi"), True, False, None,
                      self.a, self.b):
             # module-level convenience functions
             self.assertFalse(pprint.isrecursive(safe),
@@ -125,21 +126,23 @@ class QueryTestCase(unittest.TestCase):
         # it sorted a dict display if and only if the display required
         # multiple lines.  For that reason, dicts with more than one element
         # aren't tested here.
-        for simple in (0, 0L, 0+0j, 0.0, "", uni(""),
+        for simple in (0, 0L, 0+0j, 0.0, "", uni(""), bytearray(),
                        (), tuple2(), tuple3(),
                        [], list2(), list3(),
                        set(), set2(), set3(),
                        frozenset(), frozenset2(), frozenset3(),
                        {}, dict2(), dict3(),
                        self.assertTrue, pprint,
-                       -6, -6L, -6-6j, -1.5, "x", uni("x"), (3,), [3], {3: 6},
+                       -6, -6L, -6-6j, -1.5, "x", uni("x"), bytearray(b"x"),
+                       (3,), [3], {3: 6},
                        (1,2), [3,4], {5: 6},
                        tuple2((1,2)), tuple3((1,2)), tuple3(range(100)),
                        [3,4], list2([3,4]), list3([3,4]), list3(range(100)),
                        set({7}), set2({7}), set3({7}),
                        frozenset({8}), frozenset2({8}), frozenset3({8}),
                        dict2({5: 6}), dict3({5: 6}),
-                       range(10, -11, -1)
+                       range(10, -11, -1),
+                       True, False, None,
                       ):
             native = repr(simple)
             self.assertEqual(pprint.pformat(simple), native)
index 5aee6a5ec6e00c5efaa8337a1602d8534a3303e1..b4e4e9d7116d5e3609b853b5a94b5ed707a09c29 100644 (file)
@@ -2,6 +2,7 @@ import unittest
 import sys
 from test.test_support import check_py3k_warnings, CleanImport, run_unittest
 import warnings
+from test import test_support
 
 if not sys.py3kwarning:
     raise unittest.SkipTest('%s must be run with the -3 flag' % __name__)
@@ -356,6 +357,21 @@ class TestStdlibRemovals(unittest.TestCase):
     def check_removal(self, module_name, optional=False):
         """Make sure the specified module, when imported, raises a
         DeprecationWarning and specifies itself in the message."""
+        if module_name in sys.modules:
+            mod = sys.modules[module_name]
+            filename = getattr(mod, '__file__', '')
+            mod = None
+            # the module is not implemented in C?
+            if not filename.endswith(('.py', '.pyc', '.pyo')):
+                # Issue #23375: If the module was already loaded, reimporting
+                # the module will not emit again the warning. The warning is
+                # emited when the module is loaded, but C modules cannot
+                # unloaded.
+                if test_support.verbose:
+                    print("Cannot test the Python 3 DeprecationWarning of the "
+                          "%s module, the C module is already loaded"
+                          % module_name)
+                return
         with CleanImport(module_name), warnings.catch_warnings():
             warnings.filterwarnings("error", ".+ (module|package) .+ removed",
                                     DeprecationWarning, __name__)
index b919da2221ad3db07f35d880b0721ac7cd8dc920..5ec523abe25889753fc6a9057f8afc3d317f424f 100644 (file)
@@ -5,7 +5,7 @@ import shutil
 import tempfile
 import unittest
 
-from test import test_support
+from test import test_support as support
 
 class PyCompileTests(unittest.TestCase):
 
@@ -35,11 +35,9 @@ class PyCompileTests(unittest.TestCase):
         self.assertTrue(os.path.exists(self.pyc_path))
 
     def test_cwd(self):
-        cwd = os.getcwd()
-        os.chdir(self.directory)
-        py_compile.compile(os.path.basename(self.source_path),
-                           os.path.basename(self.pyc_path))
-        os.chdir(cwd)
+        with support.change_cwd(self.directory):
+            py_compile.compile(os.path.basename(self.source_path),
+                               os.path.basename(self.pyc_path))
         self.assertTrue(os.path.exists(self.pyc_path))
 
     def test_relative_path(self):
@@ -48,7 +46,7 @@ class PyCompileTests(unittest.TestCase):
         self.assertTrue(os.path.exists(self.pyc_path))
 
 def test_main():
-    test_support.run_unittest(PyCompileTests)
+    support.run_unittest(PyCompileTests)
 
 if __name__ == "__main__":
     test_main()
index 9f63d4e9797991ec37a1868c2ffe2e98db39369c..eba905801c2550a1e2125f7c362d64de5b96ecb4 100644 (file)
@@ -13,27 +13,42 @@ from test.test_support import sortdict, run_unittest
 class SetAttributeTest(unittest.TestCase):
     def setUp(self):
         self.parser = expat.ParserCreate(namespace_separator='!')
-        self.set_get_pairs = [
-            [0, 0],
-            [1, 1],
-            [2, 1],
-            [0, 0],
-            ]
+
+    def test_buffer_text(self):
+        self.assertIs(self.parser.buffer_text, False)
+        for x in 0, 1, 2, 0:
+            self.parser.buffer_text = x
+            self.assertIs(self.parser.buffer_text, bool(x))
+
+    def test_namespace_prefixes(self):
+        self.assertIs(self.parser.namespace_prefixes, False)
+        for x in 0, 1, 2, 0:
+            self.parser.namespace_prefixes = x
+            self.assertIs(self.parser.namespace_prefixes, bool(x))
 
     def test_returns_unicode(self):
-        for x, y in self.set_get_pairs:
+        self.assertIs(self.parser.returns_unicode, test_support.have_unicode)
+        for x in 0, 1, 2, 0:
             self.parser.returns_unicode = x
-            self.assertEqual(self.parser.returns_unicode, y)
+            self.assertIs(self.parser.returns_unicode, bool(x))
 
     def test_ordered_attributes(self):
-        for x, y in self.set_get_pairs:
+        self.assertIs(self.parser.ordered_attributes, False)
+        for x in 0, 1, 2, 0:
             self.parser.ordered_attributes = x
-            self.assertEqual(self.parser.ordered_attributes, y)
+            self.assertIs(self.parser.ordered_attributes, bool(x))
 
     def test_specified_attributes(self):
-        for x, y in self.set_get_pairs:
+        self.assertIs(self.parser.specified_attributes, False)
+        for x in 0, 1, 2, 0:
             self.parser.specified_attributes = x
-            self.assertEqual(self.parser.specified_attributes, y)
+            self.assertIs(self.parser.specified_attributes, bool(x))
+
+    def test_invalid_attributes(self):
+        with self.assertRaises(AttributeError):
+            self.parser.foo = 1
+        with self.assertRaises(AttributeError):
+            self.parser.foo
 
 
 data = '''\
@@ -469,12 +484,14 @@ class ChardataBufferTest(unittest.TestCase):
     def test_wrong_size(self):
         parser = expat.ParserCreate()
         parser.buffer_text = 1
-        def f(size):
-            parser.buffer_size = size
-
-        self.assertRaises(TypeError, f, sys.maxint+1)
-        self.assertRaises(ValueError, f, -1)
-        self.assertRaises(ValueError, f, 0)
+        with self.assertRaises(ValueError):
+            parser.buffer_size = -1
+        with self.assertRaises(ValueError):
+            parser.buffer_size = 0
+        with self.assertRaises(TypeError):
+            parser.buffer_size = 512.0
+        with self.assertRaises(TypeError):
+            parser.buffer_size = sys.maxint+1
 
     def test_unchanged_size(self):
         xml1 = ("<?xml version='1.0' encoding='iso8859'?><s>%s" % ('a' * 512))
index 250f443d1689fdce1623a052d719081fa56a59be..e4876fd0902e701d76cebc010817d2595a536a39 100644 (file)
@@ -319,6 +319,11 @@ class MersenneTwister_TestBasicOps(TestBasicOps):
         self.assertRaises(TypeError, self.gen.setstate, (2, ('a',)*625, None))
         # Last element s/b an int also
         self.assertRaises(TypeError, self.gen.setstate, (2, (0,)*624+('a',), None))
+        # Last element s/b between 0 and 624
+        with self.assertRaises((ValueError, OverflowError)):
+            self.gen.setstate((2, (1,)*624+(625,), None))
+        with self.assertRaises((ValueError, OverflowError)):
+            self.gen.setstate((2, (1,)*624+(-1,), None))
 
     def test_referenceImplementation(self):
         # Compare the python implementation with results from the original
index ac0e70dbcbef6910978b4869365da22c81f61e86..c969d278e4d3e865dabff00e0e500e8a8f202c5d 100644 (file)
@@ -65,6 +65,19 @@ class TestRlcompleter(unittest.TestCase):
                          ['egg.{}('.format(x) for x in dir(str)
                           if x.startswith('s')])
 
+    def test_excessive_getattr(self):
+        # Ensure getattr() is invoked no more than once per attribute
+        class Foo:
+            calls = 0
+            @property
+            def bar(self):
+                self.calls += 1
+                return None
+        f = Foo()
+        completer = rlcompleter.Completer(dict(f=f))
+        self.assertEqual(completer.complete('f.b', 0), 'f.bar')
+        self.assertEqual(f.calls, 1)
+
 def test_main():
     support.run_unittest(TestRlcompleter)
 
index dd652023ee2adac2c96e5a23c308025f44296a3c..d9ea098b6d27c1d83b3eb61837e7acd8c0d8b869 100644 (file)
@@ -1648,6 +1648,17 @@ class TestWeirdBugs(unittest.TestCase):
         be_bad = True
         set1.symmetric_difference_update(dict2)
 
+    def test_iter_and_mutate(self):
+        # Issue #24581
+        s = set(range(100))
+        s.clear()
+        s.update(range(100))
+        si = iter(s)
+        s.clear()
+        a = list(range(100))
+        s.update(range(100))
+        list(si)
+
 # Application tests (based on David Eppstein's graph recipes ====================================
 
 def powerset(U):
index bcabe75ad7dd60f87b0ded4ee4b7c5279fea8629..c85f25e1bc0dbfa8596ded6caa6a07f19815605c 100644 (file)
@@ -8,15 +8,15 @@ import stat
 import os
 import os.path
 import errno
-from os.path import splitdrive
-from distutils.spawn import find_executable, spawn
-from shutil import (_make_tarball, _make_zipfile, make_archive,
+import subprocess
+from distutils.spawn import find_executable
+from shutil import (make_archive,
                     register_archive_format, unregister_archive_format,
                     get_archive_formats)
 import tarfile
 import warnings
 
-from test import test_support
+from test import test_support as support
 from test.test_support import TESTFN, check_warnings, captured_stdout
 
 TESTFN2 = TESTFN + "2"
@@ -374,139 +374,165 @@ class TestShutil(unittest.TestCase):
     @unittest.skipUnless(zlib, "requires zlib")
     def test_make_tarball(self):
         # creating something to tar
-        tmpdir = self.mkdtemp()
-        self.write_file([tmpdir, 'file1'], 'xxx')
-        self.write_file([tmpdir, 'file2'], 'xxx')
-        os.mkdir(os.path.join(tmpdir, 'sub'))
-        self.write_file([tmpdir, 'sub', 'file3'], 'xxx')
+        root_dir, base_dir = self._create_files('')
 
         tmpdir2 = self.mkdtemp()
         # force shutil to create the directory
         os.rmdir(tmpdir2)
-        unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0],
-                            "source and target should be on same drive")
-
-        base_name = os.path.join(tmpdir2, 'archive')
+        # working with relative paths
+        work_dir = os.path.dirname(tmpdir2)
+        rel_base_name = os.path.join(os.path.basename(tmpdir2), 'archive')
 
-        # working with relative paths to avoid tar warnings
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            _make_tarball(splitdrive(base_name)[1], '.')
-        finally:
-            os.chdir(old_dir)
+        with support.change_cwd(work_dir):
+            base_name = os.path.abspath(rel_base_name)
+            tarball = make_archive(rel_base_name, 'gztar', root_dir, '.')
 
         # check if the compressed tarball was created
-        tarball = base_name + '.tar.gz'
-        self.assertTrue(os.path.exists(tarball))
+        self.assertEqual(tarball, base_name + '.tar.gz')
+        self.assertTrue(os.path.isfile(tarball))
+        self.assertTrue(tarfile.is_tarfile(tarball))
+        with tarfile.open(tarball, 'r:gz') as tf:
+            self.assertEqual(sorted(tf.getnames()),
+                             ['.', './file1', './file2',
+                              './sub', './sub/file3', './sub2'])
 
         # trying an uncompressed one
-        base_name = os.path.join(tmpdir2, 'archive')
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            _make_tarball(splitdrive(base_name)[1], '.', compress=None)
-        finally:
-            os.chdir(old_dir)
-        tarball = base_name + '.tar'
-        self.assertTrue(os.path.exists(tarball))
+        with support.change_cwd(work_dir):
+            tarball = make_archive(rel_base_name, 'tar', root_dir, '.')
+        self.assertEqual(tarball, base_name + '.tar')
+        self.assertTrue(os.path.isfile(tarball))
+        self.assertTrue(tarfile.is_tarfile(tarball))
+        with tarfile.open(tarball, 'r') as tf:
+            self.assertEqual(sorted(tf.getnames()),
+                             ['.', './file1', './file2',
+                              './sub', './sub/file3', './sub2'])
 
     def _tarinfo(self, path):
-        tar = tarfile.open(path)
-        try:
+        with tarfile.open(path) as tar:
             names = tar.getnames()
             names.sort()
             return tuple(names)
-        finally:
-            tar.close()
 
-    def _create_files(self):
+    def _create_files(self, base_dir='dist'):
         # creating something to tar
-        tmpdir = self.mkdtemp()
-        dist = os.path.join(tmpdir, 'dist')
-        os.mkdir(dist)
-        self.write_file([dist, 'file1'], 'xxx')
-        self.write_file([dist, 'file2'], 'xxx')
+        root_dir = self.mkdtemp()
+        dist = os.path.join(root_dir, base_dir)
+        if not os.path.isdir(dist):
+            os.makedirs(dist)
+        self.write_file((dist, 'file1'), 'xxx')
+        self.write_file((dist, 'file2'), 'xxx')
         os.mkdir(os.path.join(dist, 'sub'))
-        self.write_file([dist, 'sub', 'file3'], 'xxx')
+        self.write_file((dist, 'sub', 'file3'), 'xxx')
         os.mkdir(os.path.join(dist, 'sub2'))
-        tmpdir2 = self.mkdtemp()
-        base_name = os.path.join(tmpdir2, 'archive')
-        return tmpdir, tmpdir2, base_name
+        if base_dir:
+            self.write_file((root_dir, 'outer'), 'xxx')
+        return root_dir, base_dir
 
     @unittest.skipUnless(zlib, "Requires zlib")
-    @unittest.skipUnless(find_executable('tar') and find_executable('gzip'),
+    @unittest.skipUnless(find_executable('tar'),
                          'Need the tar command to run')
     def test_tarfile_vs_tar(self):
-        tmpdir, tmpdir2, base_name =  self._create_files()
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            _make_tarball(base_name, 'dist')
-        finally:
-            os.chdir(old_dir)
+        root_dir, base_dir = self._create_files()
+        base_name = os.path.join(self.mkdtemp(), 'archive')
+        tarball = make_archive(base_name, 'gztar', root_dir, base_dir)
 
         # check if the compressed tarball was created
-        tarball = base_name + '.tar.gz'
-        self.assertTrue(os.path.exists(tarball))
+        self.assertEqual(tarball, base_name + '.tar.gz')
+        self.assertTrue(os.path.isfile(tarball))
 
         # now create another tarball using `tar`
-        tarball2 = os.path.join(tmpdir, 'archive2.tar.gz')
-        tar_cmd = ['tar', '-cf', 'archive2.tar', 'dist']
-        gzip_cmd = ['gzip', '-f9', 'archive2.tar']
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            with captured_stdout() as s:
-                spawn(tar_cmd)
-                spawn(gzip_cmd)
-        finally:
-            os.chdir(old_dir)
+        tarball2 = os.path.join(root_dir, 'archive2.tar')
+        tar_cmd = ['tar', '-cf', 'archive2.tar', base_dir]
+        subprocess.check_call(tar_cmd, cwd=root_dir)
 
-        self.assertTrue(os.path.exists(tarball2))
+        self.assertTrue(os.path.isfile(tarball2))
         # let's compare both tarballs
         self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2))
 
         # trying an uncompressed one
-        base_name = os.path.join(tmpdir2, 'archive')
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            _make_tarball(base_name, 'dist', compress=None)
-        finally:
-            os.chdir(old_dir)
-        tarball = base_name + '.tar'
-        self.assertTrue(os.path.exists(tarball))
+        tarball = make_archive(base_name, 'tar', root_dir, base_dir)
+        self.assertEqual(tarball, base_name + '.tar')
+        self.assertTrue(os.path.isfile(tarball))
 
         # now for a dry_run
-        base_name = os.path.join(tmpdir2, 'archive')
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
-        try:
-            _make_tarball(base_name, 'dist', compress=None, dry_run=True)
-        finally:
-            os.chdir(old_dir)
-        tarball = base_name + '.tar'
-        self.assertTrue(os.path.exists(tarball))
+        tarball = make_archive(base_name, 'tar', root_dir, base_dir,
+                               dry_run=True)
+        self.assertEqual(tarball, base_name + '.tar')
+        self.assertTrue(os.path.isfile(tarball))
 
     @unittest.skipUnless(zlib, "Requires zlib")
     @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run')
     def test_make_zipfile(self):
-        # creating something to tar
-        tmpdir = self.mkdtemp()
-        self.write_file([tmpdir, 'file1'], 'xxx')
-        self.write_file([tmpdir, 'file2'], 'xxx')
+        # creating something to zip
+        root_dir, base_dir = self._create_files()
 
         tmpdir2 = self.mkdtemp()
         # force shutil to create the directory
         os.rmdir(tmpdir2)
-        base_name = os.path.join(tmpdir2, 'archive')
-        _make_zipfile(base_name, tmpdir)
+        # working with relative paths
+        work_dir = os.path.dirname(tmpdir2)
+        rel_base_name = os.path.join(os.path.basename(tmpdir2), 'archive')
+
+        with support.change_cwd(work_dir):
+            base_name = os.path.abspath(rel_base_name)
+            res = make_archive(rel_base_name, 'zip', root_dir, base_dir)
+
+        self.assertEqual(res, base_name + '.zip')
+        self.assertTrue(os.path.isfile(res))
+        self.assertTrue(zipfile.is_zipfile(res))
+        with zipfile.ZipFile(res) as zf:
+            self.assertEqual(sorted(zf.namelist()),
+                    ['dist/', 'dist/file1', 'dist/file2',
+                     'dist/sub/', 'dist/sub/file3', 'dist/sub2/'])
 
-        # check if the compressed tarball was created
-        tarball = base_name + '.zip'
-        self.assertTrue(os.path.exists(tarball))
+    @unittest.skipUnless(zlib, "Requires zlib")
+    @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run')
+    @unittest.skipUnless(find_executable('zip'),
+                         'Need the zip command to run')
+    def test_zipfile_vs_zip(self):
+        root_dir, base_dir = self._create_files()
+        base_name = os.path.join(self.mkdtemp(), 'archive')
+        archive = make_archive(base_name, 'zip', root_dir, base_dir)
+
+        # check if ZIP file  was created
+        self.assertEqual(archive, base_name + '.zip')
+        self.assertTrue(os.path.isfile(archive))
+
+        # now create another ZIP file using `zip`
+        archive2 = os.path.join(root_dir, 'archive2.zip')
+        zip_cmd = ['zip', '-q', '-r', 'archive2.zip', base_dir]
+        subprocess.check_call(zip_cmd, cwd=root_dir)
+
+        self.assertTrue(os.path.isfile(archive2))
+        # let's compare both ZIP files
+        with zipfile.ZipFile(archive) as zf:
+            names = zf.namelist()
+        with zipfile.ZipFile(archive2) as zf:
+            names2 = zf.namelist()
+        self.assertEqual(sorted(names), sorted(names2))
 
+    @unittest.skipUnless(zlib, "Requires zlib")
+    @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run')
+    @unittest.skipUnless(find_executable('unzip'),
+                         'Need the unzip command to run')
+    def test_unzip_zipfile(self):
+        root_dir, base_dir = self._create_files()
+        base_name = os.path.join(self.mkdtemp(), 'archive')
+        archive = make_archive(base_name, 'zip', root_dir, base_dir)
+
+        # check if ZIP file  was created
+        self.assertEqual(archive, base_name + '.zip')
+        self.assertTrue(os.path.isfile(archive))
+
+        # now check the ZIP file using `unzip -t`
+        zip_cmd = ['unzip', '-t', archive]
+        with support.change_cwd(root_dir):
+            try:
+                subprocess.check_output(zip_cmd, stderr=subprocess.STDOUT)
+            except subprocess.CalledProcessError as exc:
+                details = exc.output
+                msg = "{}\n\n**Unzip Output**\n{}"
+                self.fail(msg.format(exc, details))
 
     def test_make_archive(self):
         tmpdir = self.mkdtemp()
@@ -523,39 +549,36 @@ class TestShutil(unittest.TestCase):
         else:
             group = owner = 'root'
 
-        base_dir, root_dir, base_name =  self._create_files()
-        base_name = os.path.join(self.mkdtemp() , 'archive')
+        root_dir, base_dir = self._create_files()
+        base_name = os.path.join(self.mkdtemp(), 'archive')
         res = make_archive(base_name, 'zip', root_dir, base_dir, owner=owner,
                            group=group)
-        self.assertTrue(os.path.exists(res))
+        self.assertTrue(os.path.isfile(res))
 
         res = make_archive(base_name, 'zip', root_dir, base_dir)
-        self.assertTrue(os.path.exists(res))
+        self.assertTrue(os.path.isfile(res))
 
         res = make_archive(base_name, 'tar', root_dir, base_dir,
                            owner=owner, group=group)
-        self.assertTrue(os.path.exists(res))
+        self.assertTrue(os.path.isfile(res))
 
         res = make_archive(base_name, 'tar', root_dir, base_dir,
                            owner='kjhkjhkjg', group='oihohoh')
-        self.assertTrue(os.path.exists(res))
+        self.assertTrue(os.path.isfile(res))
 
     @unittest.skipUnless(zlib, "Requires zlib")
     @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
     def test_tarfile_root_owner(self):
-        tmpdir, tmpdir2, base_name =  self._create_files()
-        old_dir = os.getcwd()
-        os.chdir(tmpdir)
+        root_dir, base_dir = self._create_files()
+        base_name = os.path.join(self.mkdtemp(), 'archive')
         group = grp.getgrgid(0)[0]
         owner = pwd.getpwuid(0)[0]
-        try:
-            archive_name = _make_tarball(base_name, 'dist', compress=None,
-                                         owner=owner, group=group)
-        finally:
-            os.chdir(old_dir)
+        with support.change_cwd(root_dir):
+            archive_name = make_archive(base_name, 'gztar', root_dir, 'dist',
+                                        owner=owner, group=group)
 
         # check if the compressed tarball was created
-        self.assertTrue(os.path.exists(archive_name))
+        self.assertTrue(os.path.isfile(archive_name))
 
         # now checks the rights
         archive = tarfile.open(archive_name)
@@ -889,7 +912,7 @@ class TestCopyFile(unittest.TestCase):
 
 
 def test_main():
-    test_support.run_unittest(TestShutil, TestMove, TestCopyFile)
+    support.run_unittest(TestShutil, TestMove, TestCopyFile)
 
 if __name__ == '__main__':
     test_main()
index 3304d6b4e3b98f6fe900e62b9617cc78963227b7..68518d78f2ab48a1f7f39567b818872ce74c9ebc 100644 (file)
@@ -18,7 +18,8 @@ class SliceTest(unittest.TestCase):
     def test_hash(self):
         # Verify clearing of SF bug #800796
         self.assertRaises(TypeError, hash, slice(5))
-        self.assertRaises(TypeError, slice(5).__hash__)
+        with self.assertRaises(TypeError):
+            slice(5).__hash__()
 
     def test_cmp(self):
         s1 = slice(1, 2, 3)
index 8707017f3b25ce824e8bd1e26267248e288bdd71..714ca4afb0a8f998d56e86d9e85651d30a9724da 100644 (file)
@@ -158,6 +158,8 @@ class SocketServerTest(unittest.TestCase):
         if verbose: print "waiting for server"
         server.shutdown()
         t.join()
+        server.server_close()
+        self.assertRaises(socket.error, server.socket.fileno)
         if verbose: print "done"
 
     def stream_examine(self, proto, addr):
index e58f55ac4c0c5d9f08f829ec802f2f0aa7914fb2..27572c392fe9d41aa23736f7ceb4d6031634201e 100644 (file)
@@ -714,12 +714,12 @@ class ContextTests(unittest.TestCase):
     @skip_if_broken_ubuntu_ssl
     def test_options(self):
         ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
-        # OP_ALL | OP_NO_SSLv2 is the default value
-        self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2,
-                         ctx.options)
-        ctx.options |= ssl.OP_NO_SSLv3
+        # OP_ALL | OP_NO_SSLv2 | OP_NO_SSLv3 is the default value
         self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3,
                          ctx.options)
+        ctx.options |= ssl.OP_NO_TLSv1
+        self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_TLSv1,
+                         ctx.options)
         if can_clear_options():
             ctx.options = (ctx.options & ~ssl.OP_NO_SSLv2) | ssl.OP_NO_TLSv1
             self.assertEqual(ssl.OP_ALL | ssl.OP_NO_TLSv1 | ssl.OP_NO_SSLv3,
@@ -2230,17 +2230,17 @@ else:
                             " SSL2 client to SSL23 server test unexpectedly failed:\n %s\n"
                             % str(x))
             if hasattr(ssl, 'PROTOCOL_SSLv3'):
-                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3')
+                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False)
             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True)
             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
 
             if hasattr(ssl, 'PROTOCOL_SSLv3'):
-                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_OPTIONAL)
+                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_OPTIONAL)
             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL)
             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)
 
             if hasattr(ssl, 'PROTOCOL_SSLv3'):
-                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_REQUIRED)
+                try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_REQUIRED)
             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED)
             try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)
 
@@ -2272,8 +2272,8 @@ else:
             try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
             if no_sslv2_implies_sslv3_hello():
                 # No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
-                try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, 'SSLv3',
-                                   client_options=ssl.OP_NO_SSLv2)
+                try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23,
+                                   False, client_options=ssl.OP_NO_SSLv2)
 
         @skip_if_broken_ubuntu_ssl
         def test_protocol_tlsv1(self):
index 2cd79665580f5d0d05706e11efb57e30c494529d..774c6346ffb0833910c33d839622909a4ca6d0e9 100644 (file)
@@ -428,6 +428,11 @@ class StrTest(
         self.assertEqual('{:{f}}{g}{}'.format(1, 3, g='g', f=2), ' 1g3')
         self.assertEqual('{f:{}}{}{g}'.format(2, 4, f=1, g='g'), ' 14g')
 
+    def test_format_c_overflow(self):
+        # issue #7267
+        self.assertRaises(OverflowError, '{0:c}'.format, -1)
+        self.assertRaises(OverflowError, '{0:c}'.format, 256)
+
     def test_buffer_is_readonly(self):
         self.assertRaises(TypeError, sys.stdin.readinto, b"")
 
index 45c90a6539790f4cf17e0158b88dffb9d4cb7663..81d078ed8d39c6e1ad3bcbd6b875a0817d9773ed 100644 (file)
@@ -141,6 +141,11 @@ class StropFunctionTestCase(unittest.TestCase):
         else:
             self.assertEqual(len(r), len(a) * 3)
 
+    @unittest.skipUnless(sys.maxsize == 2147483647, "only for 32-bit")
+    def test_stropreplace_overflow(self):
+        a = "A" * 0x10000
+        self.assertRaises(MemoryError, strop.replace, a, "A", a)
+
 transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377'
 
 
index 0efcdbf25347fb1cdab5b05246bd2be6d23ea571..06de10851e83996ee32e7127271a17723593c9bd 100644 (file)
@@ -32,16 +32,6 @@ else:
     SETBINARY = ''
 
 
-try:
-    mkstemp = tempfile.mkstemp
-except AttributeError:
-    # tempfile.mkstemp is not available
-    def mkstemp():
-        """Replacement for mkstemp, calling mktemp."""
-        fname = tempfile.mktemp()
-        return os.open(fname, os.O_RDWR|os.O_CREAT), fname
-
-
 class BaseTestCase(unittest.TestCase):
     def setUp(self):
         # Try to minimize the number of children we have so this test
@@ -666,9 +656,9 @@ class ProcessTestCase(BaseTestCase):
     def test_handles_closed_on_exception(self):
         # If CreateProcess exits with an error, ensure the
         # duplicate output handles are released
-        ifhandle, ifname = mkstemp()
-        ofhandle, ofname = mkstemp()
-        efhandle, efname = mkstemp()
+        ifhandle, ifname = tempfile.mkstemp()
+        ofhandle, ofname = tempfile.mkstemp()
+        efhandle, efname = tempfile.mkstemp()
         try:
             subprocess.Popen (["*"], stdin=ifhandle, stdout=ofhandle,
               stderr=efhandle)
@@ -858,7 +848,7 @@ class POSIXProcessTestCase(BaseTestCase):
 
     def test_args_string(self):
         # args is a string
-        f, fname = mkstemp()
+        f, fname = tempfile.mkstemp()
         os.write(f, "#!/bin/sh\n")
         os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" %
                     sys.executable)
@@ -902,7 +892,7 @@ class POSIXProcessTestCase(BaseTestCase):
 
     def test_call_string(self):
         # call() function with string argument on UNIX
-        f, fname = mkstemp()
+        f, fname = tempfile.mkstemp()
         os.write(f, "#!/bin/sh\n")
         os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" %
                     sys.executable)
@@ -1058,7 +1048,7 @@ class POSIXProcessTestCase(BaseTestCase):
 
     def check_swap_fds(self, stdin_no, stdout_no, stderr_no):
         # open up some temporary files
-        temps = [mkstemp() for i in range(3)]
+        temps = [tempfile.mkstemp() for i in range(3)]
         temp_fds = [fd for fd, fname in temps]
         try:
             # unlink the files -- we won't need to reopen them
@@ -1379,7 +1369,7 @@ class CommandsWithSpaces (BaseTestCase):
 
     def setUp(self):
         super(CommandsWithSpaces, self).setUp()
-        f, fname = mkstemp(".py", "te st")
+        f, fname = tempfile.mkstemp(".py", "te st")
         self.fname = fname.lower ()
         os.write(f, b"import sys;"
                     b"sys.stdout.write('%d %s' % (len(sys.argv), [a.lower () for a in sys.argv]))"
index 75563cbb21f374092e198c26f50855c1abb2dd00..7ce1c73b28ce4375af4faf9e5c0a13715ef4995b 100644 (file)
@@ -668,6 +668,33 @@ TESTFN = "{}_{}_tmp".format(TESTFN, os.getpid())
 # Save the initial cwd
 SAVEDCWD = os.getcwd()
 
+@contextlib.contextmanager
+def change_cwd(path, quiet=False):
+    """Return a context manager that changes the current working directory.
+
+    Arguments:
+
+      path: the directory to use as the temporary current working directory.
+
+      quiet: if False (the default), the context manager raises an exception
+        on error.  Otherwise, it issues only a warning and keeps the current
+        working directory the same.
+
+    """
+    saved_dir = os.getcwd()
+    try:
+        os.chdir(path)
+    except OSError:
+        if not quiet:
+            raise
+        warnings.warn('tests may fail, unable to change CWD to: ' + path,
+                      RuntimeWarning, stacklevel=3)
+    try:
+        yield os.getcwd()
+    finally:
+        os.chdir(saved_dir)
+
+
 @contextlib.contextmanager
 def temp_cwd(name='tempcwd', quiet=False):
     """
@@ -678,7 +705,8 @@ def temp_cwd(name='tempcwd', quiet=False):
     the CWD, an error is raised.  If it's True, only a warning is raised
     and the original CWD is used.
     """
-    if have_unicode and isinstance(name, unicode):
+    if (have_unicode and isinstance(name, unicode) and
+        not os.path.supports_unicode_filenames):
         try:
             name = name.encode(sys.getfilesystemencoding() or 'ascii')
         except UnicodeEncodeError:
index ff3265fc0ee324e21102090b71b86288a6c6fef0..7f7b2b42fa3eb96ea39d2e206e1f29ea75608764 100644 (file)
@@ -11,6 +11,7 @@ import unittest
 import tarfile
 
 from test import test_support
+from test import test_support as support
 
 # Check for our compression modules.
 try:
@@ -285,6 +286,30 @@ class CommonReadTest(ReadTest):
                     "ignore_zeros=True should have skipped the %r-blocks" % char)
             tar.close()
 
+    def test_premature_end_of_archive(self):
+        for size in (512, 600, 1024, 1200):
+            with tarfile.open(tmpname, "w:") as tar:
+                t = tarfile.TarInfo("foo")
+                t.size = 1024
+                tar.addfile(t, StringIO.StringIO("a" * 1024))
+
+            with open(tmpname, "r+b") as fobj:
+                fobj.truncate(size)
+
+            with tarfile.open(tmpname) as tar:
+                with self.assertRaisesRegexp(tarfile.ReadError, "unexpected end of data"):
+                    for t in tar:
+                        pass
+
+            with tarfile.open(tmpname) as tar:
+                t = tar.next()
+
+                with self.assertRaisesRegexp(tarfile.ReadError, "unexpected end of data"):
+                    tar.extract(t, TEMPDIR)
+
+                with self.assertRaisesRegexp(tarfile.ReadError, "unexpected end of data"):
+                    tar.extractfile(t).read()
+
 
 class MiscReadTest(CommonReadTest):
     taropen = tarfile.TarFile.taropen
@@ -948,9 +973,7 @@ class WriteTest(WriteTestBase):
 
     def test_cwd(self):
         # Test adding the current working directory.
-        cwd = os.getcwd()
-        os.chdir(TEMPDIR)
-        try:
+        with support.change_cwd(TEMPDIR):
             open("foo", "w").close()
 
             tar = tarfile.open(tmpname, self.mode)
@@ -961,8 +984,6 @@ class WriteTest(WriteTestBase):
             for t in tar:
                 self.assertTrue(t.name == "." or t.name.startswith("./"))
             tar.close()
-        finally:
-            os.chdir(cwd)
 
     @unittest.skipUnless(hasattr(os, 'symlink'), "needs os.symlink")
     def test_extractall_symlinks(self):
@@ -1566,6 +1587,14 @@ class LimitsTest(unittest.TestCase):
         tarinfo.tobuf(tarfile.PAX_FORMAT)
 
 
+class MiscTest(unittest.TestCase):
+
+    def test_read_number_fields(self):
+        # Issue 24514: Test if empty number fields are converted to zero.
+        self.assertEqual(tarfile.nti("\0"), 0)
+        self.assertEqual(tarfile.nti("       \0"), 0)
+
+
 class ContextManagerTest(unittest.TestCase):
 
     def test_basic(self):
@@ -1730,6 +1759,7 @@ def test_main():
         PaxUnicodeTest,
         AppendTest,
         LimitsTest,
+        MiscTest,
         ContextManagerTest,
     ]
 
index 9c9afde3c2a22c6c9bbab5b8bb247c1918eec386..4c2e8d5200c480c71d3d232139b311827f562baf 100644 (file)
@@ -8,9 +8,7 @@ from subprocess import Popen, PIPE
 # Skip this test if the _tkinter module wasn't built.
 _tkinter = test_support.import_module('_tkinter')
 
-# Make sure tkinter._fix runs to set up the environment
-tkinter = test_support.import_fresh_module('Tkinter')
-
+import Tkinter as tkinter
 from Tkinter import Tcl
 from _tkinter import TclError
 
index 465bcdac0c422396069fdc8bf3babbca6beb1a64..3d0ac57a5b0581bb79983cd57ee9f472a5c0b444 100644 (file)
@@ -287,7 +287,42 @@ def _mock_candidate_names(*names):
                              lambda: iter(names))
 
 
-class test__mkstemp_inner(TC):
+class TestBadTempdir:
+
+    def test_read_only_directory(self):
+        with _inside_empty_temp_dir():
+            oldmode = mode = os.stat(tempfile.tempdir).st_mode
+            mode &= ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
+            os.chmod(tempfile.tempdir, mode)
+            try:
+                if os.access(tempfile.tempdir, os.W_OK):
+                    self.skipTest("can't set the directory read-only")
+                with self.assertRaises(OSError) as cm:
+                    self.make_temp()
+                self.assertIn(cm.exception.errno, (errno.EPERM, errno.EACCES))
+                self.assertEqual(os.listdir(tempfile.tempdir), [])
+            finally:
+                os.chmod(tempfile.tempdir, oldmode)
+
+    def test_nonexisting_directory(self):
+        with _inside_empty_temp_dir():
+            tempdir = os.path.join(tempfile.tempdir, 'nonexistent')
+            with support.swap_attr(tempfile, 'tempdir', tempdir):
+                with self.assertRaises(OSError) as cm:
+                    self.make_temp()
+                self.assertEqual(cm.exception.errno, errno.ENOENT)
+
+    def test_non_directory(self):
+        with _inside_empty_temp_dir():
+            tempdir = os.path.join(tempfile.tempdir, 'file')
+            open(tempdir, 'wb').close()
+            with support.swap_attr(tempfile, 'tempdir', tempdir):
+                with self.assertRaises(OSError) as cm:
+                    self.make_temp()
+                self.assertIn(cm.exception.errno, (errno.ENOTDIR, errno.ENOENT))
+
+
+class test__mkstemp_inner(TestBadTempdir, TC):
     """Test the internal function _mkstemp_inner."""
 
     class mkstemped:
@@ -400,7 +435,7 @@ class test__mkstemp_inner(TC):
         self.do_create(bin=0).write("blat\n")
         # XXX should test that the file really is a text file
 
-    def default_mkstemp_inner(self):
+    def make_temp(self):
         return tempfile._mkstemp_inner(tempfile.gettempdir(),
                                        tempfile.template,
                                        '',
@@ -411,11 +446,11 @@ class test__mkstemp_inner(TC):
         # the chosen name already exists
         with _inside_empty_temp_dir(), \
              _mock_candidate_names('aaa', 'aaa', 'bbb'):
-            (fd1, name1) = self.default_mkstemp_inner()
+            (fd1, name1) = self.make_temp()
             os.close(fd1)
             self.assertTrue(name1.endswith('aaa'))
 
-            (fd2, name2) = self.default_mkstemp_inner()
+            (fd2, name2) = self.make_temp()
             os.close(fd2)
             self.assertTrue(name2.endswith('bbb'))
 
@@ -427,7 +462,7 @@ class test__mkstemp_inner(TC):
             dir = tempfile.mkdtemp()
             self.assertTrue(dir.endswith('aaa'))
 
-            (fd, name) = self.default_mkstemp_inner()
+            (fd, name) = self.make_temp()
             os.close(fd)
             self.assertTrue(name.endswith('bbb'))
 
@@ -542,9 +577,12 @@ class test_mkstemp(TC):
 test_classes.append(test_mkstemp)
 
 
-class test_mkdtemp(TC):
+class test_mkdtemp(TestBadTempdir, TC):
     """Test mkdtemp()."""
 
+    def make_temp(self):
+        return tempfile.mkdtemp()
+
     def do_create(self, dir=None, pre="", suf=""):
         if dir is None:
             dir = tempfile.gettempdir()
index 7b72672376984dad5e5a8acc966c00d258a2c1b6..dccf095e53dd78caba1328170890a89ac3321653 100644 (file)
@@ -647,6 +647,11 @@ def foo():
         expect = "hello there\n  how are you?"
         self.assertEqual(expect, dedent(text))
 
+        # test margin is smaller than smallest indent
+        text = "  \thello there\n   \thow are you?\n \tI'm fine, thanks"
+        expect = " \thello there\n  \thow are you?\n\tI'm fine, thanks"
+        self.assertEqual(expect, dedent(text))
+
 
 def test_main():
     test_support.run_unittest(WrapTestCase,
index a084b68b3f3ec2559dee44c7143bc4aec630c922..3a3359c9699b4855ac0fba89ec9de35c96b72654 100644 (file)
@@ -120,6 +120,9 @@ class TestTimeit(unittest.TestCase):
     def test_timeit_callable_stmt(self):
         self.timeit(self.fake_callable_stmt, self.fake_setup, number=3)
 
+    def test_timeit_callable_setup(self):
+        self.timeit(self.fake_stmt, self.fake_callable_setup, number=3)
+
     def test_timeit_callable_stmt_and_setup(self):
         self.timeit(self.fake_callable_stmt,
                 self.fake_callable_setup, number=3)
@@ -169,6 +172,10 @@ class TestTimeit(unittest.TestCase):
         self.repeat(self.fake_callable_stmt, self.fake_setup,
                 repeat=3, number=5)
 
+    def test_repeat_callable_setup(self):
+        self.repeat(self.fake_stmt, self.fake_callable_setup,
+                repeat=3, number=5)
+
     def test_repeat_callable_stmt_and_setup(self):
         self.repeat(self.fake_callable_stmt, self.fake_callable_setup,
                 repeat=3, number=5)
index 850aa9ca8e067ac953a26e575127a38434bfc5d3..fd9486bdd7d3cf7fcc15cb092a48a2539e1d3e5d 100644 (file)
@@ -1,20 +1,42 @@
-doctests = """
-Tests for the tokenize module.
+from test import test_support
+from tokenize import (untokenize, generate_tokens, NUMBER, NAME, OP,
+                     STRING, ENDMARKER, tok_name, Untokenizer, tokenize)
+from StringIO import StringIO
+import os
+from unittest import TestCase
+
+
+class TokenizeTest(TestCase):
+    # Tests for the tokenize module.
 
-    >>> import glob, random, sys
+    # The tests can be really simple. Given a small fragment of source
+    # code, print out a table with tokens. The ENDMARKER is omitted for
+    # brevity.
 
-The tests can be really simple. Given a small fragment of source
-code, print out a table with tokens. The ENDMARKER is omitted for
-brevity.
+    def check_tokenize(self, s, expected):
+        # Format the tokens in s in a table format.
+        # The ENDMARKER is omitted.
+        result = []
+        f = StringIO(s)
+        for type, token, start, end, line in generate_tokens(f.readline):
+            if type == ENDMARKER:
+                break
+            type = tok_name[type]
+            result.append("    %(type)-10.10s %(token)-13.13r %(start)s %(end)s" %
+                          locals())
+        self.assertEqual(result,
+                         expected.rstrip().splitlines())
 
-    >>> dump_tokens("1 + 1")
+
+    def test_basic(self):
+        self.check_tokenize("1 + 1", """\
     NUMBER     '1'           (1, 0) (1, 1)
     OP         '+'           (1, 2) (1, 3)
     NUMBER     '1'           (1, 4) (1, 5)
-
-    >>> dump_tokens("if False:\\n"
-    ...             "    # NL\\n"
-    ...             "    True = False # NEWLINE\\n")
+    """)
+        self.check_tokenize("if False:\n"
+                            "    # NL\n"
+                            "    True = False # NEWLINE\n", """\
     NAME       'if'          (1, 0) (1, 2)
     NAME       'False'       (1, 3) (1, 8)
     OP         ':'           (1, 8) (1, 9)
@@ -28,122 +50,48 @@ brevity.
     COMMENT    '# NEWLINE'   (3, 17) (3, 26)
     NEWLINE    '\\n'          (3, 26) (3, 27)
     DEDENT     ''            (4, 0) (4, 0)
+    """)
 
-    >>> indent_error_file = \"""
-    ... def k(x):
-    ...     x += 2
-    ...   x += 5
-    ... \"""
-
-    >>> for tok in generate_tokens(StringIO(indent_error_file).readline): pass
-    Traceback (most recent call last):
-        ...
-    IndentationError: unindent does not match any outer indentation level
-
-Test roundtrip for `untokenize`. `f` is an open file or a string. The source
-code in f is tokenized, converted back to source code via tokenize.untokenize(),
-and tokenized again from the latter. The test fails if the second tokenization
-doesn't match the first.
-
-    >>> def roundtrip(f):
-    ...     if isinstance(f, str): f = StringIO(f)
-    ...     token_list = list(generate_tokens(f.readline))
-    ...     f.close()
-    ...     tokens1 = [tok[:2] for tok in token_list]
-    ...     new_text = untokenize(tokens1)
-    ...     readline = iter(new_text.splitlines(1)).next
-    ...     tokens2 = [tok[:2] for tok in generate_tokens(readline)]
-    ...     return tokens1 == tokens2
-    ...
-
-There are some standard formatting practices that are easy to get right.
-
-    >>> roundtrip("if x == 1:\\n"
-    ...           "    print x\\n")
-    True
-
-    >>> roundtrip("# This is a comment\\n# This also")
-    True
-
-Some people use different formatting conventions, which makes
-untokenize a little trickier. Note that this test involves trailing
-whitespace after the colon. Note that we use hex escapes to make the
-two trailing blanks apperant in the expected output.
-
-    >>> roundtrip("if x == 1 : \\n"
-    ...           "  print x\\n")
-    True
-
-    >>> f = test_support.findfile("tokenize_tests" + os.extsep + "txt")
-    >>> roundtrip(open(f))
-    True
-
-    >>> roundtrip("if x == 1:\\n"
-    ...           "    # A comment by itself.\\n"
-    ...           "    print x # Comment here, too.\\n"
-    ...           "    # Another comment.\\n"
-    ...           "after_if = True\\n")
-    True
-
-    >>> roundtrip("if (x # The comments need to go in the right place\\n"
-    ...           "    == 1):\\n"
-    ...           "    print 'x==1'\\n")
-    True
-
-    >>> roundtrip("class Test: # A comment here\\n"
-    ...           "  # A comment with weird indent\\n"
-    ...           "  after_com = 5\\n"
-    ...           "  def x(m): return m*5 # a one liner\\n"
-    ...           "  def y(m): # A whitespace after the colon\\n"
-    ...           "     return y*4 # 3-space indent\\n")
-    True
-
-Some error-handling code
-
-    >>> roundtrip("try: import somemodule\\n"
-    ...           "except ImportError: # comment\\n"
-    ...           "    print 'Can not import' # comment2\\n"
-    ...           "else:   print 'Loaded'\\n")
-    True
-
-Balancing continuation
-
-    >>> roundtrip("a = (3,4, \\n"
-    ...           "5,6)\\n"
-    ...           "y = [3, 4,\\n"
-    ...           "5]\\n"
-    ...           "z = {'a': 5,\\n"
-    ...           "'b':15, 'c':True}\\n"
-    ...           "x = len(y) + 5 - a[\\n"
-    ...           "3] - a[2]\\n"
-    ...           "+ len(z) - z[\\n"
-    ...           "'b']\\n")
-    True
-
-Ordinary integers and binary operators
-
-    >>> dump_tokens("0xff <= 255")
+        indent_error_file = """\
+def k(x):
+    x += 2
+  x += 5
+"""
+        with self.assertRaisesRegexp(IndentationError,
+                                     "unindent does not match any "
+                                     "outer indentation level"):
+            for tok in generate_tokens(StringIO(indent_error_file).readline):
+                pass
+
+    def test_int(self):
+        # Ordinary integers and binary operators
+        self.check_tokenize("0xff <= 255", """\
     NUMBER     '0xff'        (1, 0) (1, 4)
     OP         '<='          (1, 5) (1, 7)
     NUMBER     '255'         (1, 8) (1, 11)
-    >>> dump_tokens("0b10 <= 255")
+    """)
+        self.check_tokenize("0b10 <= 255", """\
     NUMBER     '0b10'        (1, 0) (1, 4)
     OP         '<='          (1, 5) (1, 7)
     NUMBER     '255'         (1, 8) (1, 11)
-    >>> dump_tokens("0o123 <= 0123")
+    """)
+        self.check_tokenize("0o123 <= 0123", """\
     NUMBER     '0o123'       (1, 0) (1, 5)
     OP         '<='          (1, 6) (1, 8)
     NUMBER     '0123'        (1, 9) (1, 13)
-    >>> dump_tokens("01234567 > ~0x15")
+    """)
+        self.check_tokenize("01234567 > ~0x15", """\
     NUMBER     '01234567'    (1, 0) (1, 8)
     OP         '>'           (1, 9) (1, 10)
     OP         '~'           (1, 11) (1, 12)
     NUMBER     '0x15'        (1, 12) (1, 16)
-    >>> dump_tokens("2134568 != 01231515")
+    """)
+        self.check_tokenize("2134568 != 01231515", """\
     NUMBER     '2134568'     (1, 0) (1, 7)
     OP         '!='          (1, 8) (1, 10)
     NUMBER     '01231515'    (1, 11) (1, 19)
-    >>> dump_tokens("(-124561-1) & 0200000000")
+    """)
+        self.check_tokenize("(-124561-1) & 0200000000", """\
     OP         '('           (1, 0) (1, 1)
     OP         '-'           (1, 1) (1, 2)
     NUMBER     '124561'      (1, 2) (1, 8)
@@ -152,78 +100,93 @@ Ordinary integers and binary operators
     OP         ')'           (1, 10) (1, 11)
     OP         '&'           (1, 12) (1, 13)
     NUMBER     '0200000000'  (1, 14) (1, 24)
-    >>> dump_tokens("0xdeadbeef != -1")
+    """)
+        self.check_tokenize("0xdeadbeef != -1", """\
     NUMBER     '0xdeadbeef'  (1, 0) (1, 10)
     OP         '!='          (1, 11) (1, 13)
     OP         '-'           (1, 14) (1, 15)
     NUMBER     '1'           (1, 15) (1, 16)
-    >>> dump_tokens("0xdeadc0de & 012345")
+    """)
+        self.check_tokenize("0xdeadc0de & 012345", """\
     NUMBER     '0xdeadc0de'  (1, 0) (1, 10)
     OP         '&'           (1, 11) (1, 12)
     NUMBER     '012345'      (1, 13) (1, 19)
-    >>> dump_tokens("0xFF & 0x15 | 1234")
+    """)
+        self.check_tokenize("0xFF & 0x15 | 1234", """\
     NUMBER     '0xFF'        (1, 0) (1, 4)
     OP         '&'           (1, 5) (1, 6)
     NUMBER     '0x15'        (1, 7) (1, 11)
     OP         '|'           (1, 12) (1, 13)
     NUMBER     '1234'        (1, 14) (1, 18)
+    """)
 
-Long integers
-
-    >>> dump_tokens("x = 0L")
+    def test_long(self):
+        # Long integers
+        self.check_tokenize("x = 0L", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '0L'          (1, 4) (1, 6)
-    >>> dump_tokens("x = 0xfffffffffff")
+    """)
+        self.check_tokenize("x = 0xfffffffffff", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '0xffffffffff (1, 4) (1, 17)
-    >>> dump_tokens("x = 123141242151251616110l")
+    """)
+        self.check_tokenize("x = 123141242151251616110l", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '123141242151 (1, 4) (1, 26)
-    >>> dump_tokens("x = -15921590215012591L")
+    """)
+        self.check_tokenize("x = -15921590215012591L", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     OP         '-'           (1, 4) (1, 5)
     NUMBER     '159215902150 (1, 5) (1, 23)
+    """)
 
-Floating point numbers
-
-    >>> dump_tokens("x = 3.14159")
+    def test_float(self):
+        # Floating point numbers
+        self.check_tokenize("x = 3.14159", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '3.14159'     (1, 4) (1, 11)
-    >>> dump_tokens("x = 314159.")
+    """)
+        self.check_tokenize("x = 314159.", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '314159.'     (1, 4) (1, 11)
-    >>> dump_tokens("x = .314159")
+    """)
+        self.check_tokenize("x = .314159", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '.314159'     (1, 4) (1, 11)
-    >>> dump_tokens("x = 3e14159")
+    """)
+        self.check_tokenize("x = 3e14159", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '3e14159'     (1, 4) (1, 11)
-    >>> dump_tokens("x = 3E123")
+    """)
+        self.check_tokenize("x = 3E123", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '3E123'       (1, 4) (1, 9)
-    >>> dump_tokens("x+y = 3e-1230")
+    """)
+        self.check_tokenize("x+y = 3e-1230", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '+'           (1, 1) (1, 2)
     NAME       'y'           (1, 2) (1, 3)
     OP         '='           (1, 4) (1, 5)
     NUMBER     '3e-1230'     (1, 6) (1, 13)
-    >>> dump_tokens("x = 3.14e159")
+    """)
+        self.check_tokenize("x = 3.14e159", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '3.14e159'    (1, 4) (1, 12)
+    """)
 
-String literals
-
-    >>> dump_tokens("x = ''; y = \\\"\\\"")
+    def test_string(self):
+        # String literals
+        self.check_tokenize("x = ''; y = \"\"", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     STRING     "''"          (1, 4) (1, 6)
@@ -231,7 +194,8 @@ String literals
     NAME       'y'           (1, 8) (1, 9)
     OP         '='           (1, 10) (1, 11)
     STRING     '""'          (1, 12) (1, 14)
-    >>> dump_tokens("x = '\\\"'; y = \\\"'\\\"")
+    """)
+        self.check_tokenize("x = '\"'; y = \"'\"", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     STRING     '\\'"\\''       (1, 4) (1, 7)
@@ -239,25 +203,29 @@ String literals
     NAME       'y'           (1, 9) (1, 10)
     OP         '='           (1, 11) (1, 12)
     STRING     '"\\'"'        (1, 13) (1, 16)
-    >>> dump_tokens("x = \\\"doesn't \\\"shrink\\\", does it\\\"")
+    """)
+        self.check_tokenize("x = \"doesn't \"shrink\", does it\"", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     STRING     '"doesn\\'t "' (1, 4) (1, 14)
     NAME       'shrink'      (1, 14) (1, 20)
     STRING     '", does it"' (1, 20) (1, 31)
-    >>> dump_tokens("x = u'abc' + U'ABC'")
+    """)
+        self.check_tokenize("x = u'abc' + U'ABC'", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     STRING     "u'abc'"      (1, 4) (1, 10)
     OP         '+'           (1, 11) (1, 12)
     STRING     "U'ABC'"      (1, 13) (1, 19)
-    >>> dump_tokens('y = u"ABC" + U"ABC"')
+    """)
+        self.check_tokenize('y = u"ABC" + U"ABC"', """\
     NAME       'y'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     STRING     'u"ABC"'      (1, 4) (1, 10)
     OP         '+'           (1, 11) (1, 12)
     STRING     'U"ABC"'      (1, 13) (1, 19)
-    >>> dump_tokens("x = ur'abc' + Ur'ABC' + uR'ABC' + UR'ABC'")
+    """)
+        self.check_tokenize("x = ur'abc' + Ur'ABC' + uR'ABC' + UR'ABC'", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     STRING     "ur'abc'"     (1, 4) (1, 11)
@@ -267,7 +235,8 @@ String literals
     STRING     "uR'ABC'"     (1, 24) (1, 31)
     OP         '+'           (1, 32) (1, 33)
     STRING     "UR'ABC'"     (1, 34) (1, 41)
-    >>> dump_tokens('y = ur"abc" + Ur"ABC" + uR"ABC" + UR"ABC"')
+    """)
+        self.check_tokenize('y = ur"abc" + Ur"ABC" + uR"ABC" + UR"ABC"', """\
     NAME       'y'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     STRING     'ur"abc"'     (1, 4) (1, 11)
@@ -278,15 +247,18 @@ String literals
     OP         '+'           (1, 32) (1, 33)
     STRING     'UR"ABC"'     (1, 34) (1, 41)
 
-    >>> dump_tokens("b'abc' + B'abc'")
+    """)
+        self.check_tokenize("b'abc' + B'abc'", """\
     STRING     "b'abc'"      (1, 0) (1, 6)
     OP         '+'           (1, 7) (1, 8)
     STRING     "B'abc'"      (1, 9) (1, 15)
-    >>> dump_tokens('b"abc" + B"abc"')
+    """)
+        self.check_tokenize('b"abc" + B"abc"', """\
     STRING     'b"abc"'      (1, 0) (1, 6)
     OP         '+'           (1, 7) (1, 8)
     STRING     'B"abc"'      (1, 9) (1, 15)
-    >>> dump_tokens("br'abc' + bR'abc' + Br'abc' + BR'abc'")
+    """)
+        self.check_tokenize("br'abc' + bR'abc' + Br'abc' + BR'abc'", """\
     STRING     "br'abc'"     (1, 0) (1, 7)
     OP         '+'           (1, 8) (1, 9)
     STRING     "bR'abc'"     (1, 10) (1, 17)
@@ -294,7 +266,8 @@ String literals
     STRING     "Br'abc'"     (1, 20) (1, 27)
     OP         '+'           (1, 28) (1, 29)
     STRING     "BR'abc'"     (1, 30) (1, 37)
-    >>> dump_tokens('br"abc" + bR"abc" + Br"abc" + BR"abc"')
+    """)
+        self.check_tokenize('br"abc" + bR"abc" + Br"abc" + BR"abc"', """\
     STRING     'br"abc"'     (1, 0) (1, 7)
     OP         '+'           (1, 8) (1, 9)
     STRING     'bR"abc"'     (1, 10) (1, 17)
@@ -302,10 +275,10 @@ String literals
     STRING     'Br"abc"'     (1, 20) (1, 27)
     OP         '+'           (1, 28) (1, 29)
     STRING     'BR"abc"'     (1, 30) (1, 37)
+    """)
 
-Operators
-
-    >>> dump_tokens("def d22(a, b, c=2, d=2, *k): pass")
+    def test_function(self):
+        self.check_tokenize("def d22(a, b, c=2, d=2, *k): pass", """\
     NAME       'def'         (1, 0) (1, 3)
     NAME       'd22'         (1, 4) (1, 7)
     OP         '('           (1, 7) (1, 8)
@@ -326,7 +299,8 @@ Operators
     OP         ')'           (1, 26) (1, 27)
     OP         ':'           (1, 27) (1, 28)
     NAME       'pass'        (1, 29) (1, 33)
-    >>> dump_tokens("def d01v_(a=1, *k, **w): pass")
+    """)
+        self.check_tokenize("def d01v_(a=1, *k, **w): pass", """\
     NAME       'def'         (1, 0) (1, 3)
     NAME       'd01v_'       (1, 4) (1, 9)
     OP         '('           (1, 9) (1, 10)
@@ -342,11 +316,12 @@ Operators
     OP         ')'           (1, 22) (1, 23)
     OP         ':'           (1, 23) (1, 24)
     NAME       'pass'        (1, 25) (1, 29)
+    """)
 
-Comparison
-
-    >>> dump_tokens("if 1 < 1 > 1 == 1 >= 5 <= 0x15 <= 0x12 != " +
-    ...             "1 and 5 in 1 not in 1 is 1 or 5 is not 1: pass")
+    def test_comparison(self):
+        # Comparison
+        self.check_tokenize("if 1 < 1 > 1 == 1 >= 5 <= 0x15 <= 0x12 != " +
+                            "1 and 5 in 1 not in 1 is 1 or 5 is not 1: pass", """\
     NAME       'if'          (1, 0) (1, 2)
     NUMBER     '1'           (1, 3) (1, 4)
     OP         '<'           (1, 5) (1, 6)
@@ -379,10 +354,11 @@ Comparison
     NUMBER     '1'           (1, 81) (1, 82)
     OP         ':'           (1, 82) (1, 83)
     NAME       'pass'        (1, 84) (1, 88)
+    """)
 
-Shift
-
-    >>> dump_tokens("x = 1 << 1 >> 5")
+    def test_shift(self):
+        # Shift
+        self.check_tokenize("x = 1 << 1 >> 5", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '1'           (1, 4) (1, 5)
@@ -390,10 +366,11 @@ Shift
     NUMBER     '1'           (1, 9) (1, 10)
     OP         '>>'          (1, 11) (1, 13)
     NUMBER     '5'           (1, 14) (1, 15)
+    """)
 
-Additive
-
-    >>> dump_tokens("x = 1 - y + 15 - 01 + 0x124 + z + a[5]")
+    def test_additive(self):
+        # Additive
+        self.check_tokenize("x = 1 - y + 15 - 01 + 0x124 + z + a[5]", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '1'           (1, 4) (1, 5)
@@ -412,10 +389,11 @@ Additive
     OP         '['           (1, 35) (1, 36)
     NUMBER     '5'           (1, 36) (1, 37)
     OP         ']'           (1, 37) (1, 38)
+    """)
 
-Multiplicative
-
-    >>> dump_tokens("x = 1//1*1/5*12%0x12")
+    def test_multiplicative(self):
+        # Multiplicative
+        self.check_tokenize("x = 1//1*1/5*12%0x12", """\
     NAME       'x'           (1, 0) (1, 1)
     OP         '='           (1, 2) (1, 3)
     NUMBER     '1'           (1, 4) (1, 5)
@@ -429,10 +407,11 @@ Multiplicative
     NUMBER     '12'          (1, 13) (1, 15)
     OP         '%'           (1, 15) (1, 16)
     NUMBER     '0x12'        (1, 16) (1, 20)
+    """)
 
-Unary
-
-    >>> dump_tokens("~1 ^ 1 & 1 |1 ^ -1")
+    def test_unary(self):
+        # Unary
+        self.check_tokenize("~1 ^ 1 & 1 |1 ^ -1", """\
     OP         '~'           (1, 0) (1, 1)
     NUMBER     '1'           (1, 1) (1, 2)
     OP         '^'           (1, 3) (1, 4)
@@ -444,7 +423,8 @@ Unary
     OP         '^'           (1, 14) (1, 15)
     OP         '-'           (1, 16) (1, 17)
     NUMBER     '1'           (1, 17) (1, 18)
-    >>> dump_tokens("-1*1/1+1*1//1 - ---1**1")
+    """)
+        self.check_tokenize("-1*1/1+1*1//1 - ---1**1", """\
     OP         '-'           (1, 0) (1, 1)
     NUMBER     '1'           (1, 1) (1, 2)
     OP         '*'           (1, 2) (1, 3)
@@ -464,10 +444,12 @@ Unary
     NUMBER     '1'           (1, 19) (1, 20)
     OP         '**'          (1, 20) (1, 22)
     NUMBER     '1'           (1, 22) (1, 23)
+    """)
 
-Selector
-
-    >>> dump_tokens("import sys, time\\nx = sys.modules['time'].time()")
+    def test_selector(self):
+        # Selector
+        self.check_tokenize("import sys, time\n"
+                            "x = sys.modules['time'].time()", """\
     NAME       'import'      (1, 0) (1, 6)
     NAME       'sys'         (1, 7) (1, 10)
     OP         ','           (1, 10) (1, 11)
@@ -485,10 +467,12 @@ Selector
     NAME       'time'        (2, 24) (2, 28)
     OP         '('           (2, 28) (2, 29)
     OP         ')'           (2, 29) (2, 30)
+    """)
 
-Methods
-
-    >>> dump_tokens("@staticmethod\\ndef foo(x,y): pass")
+    def test_method(self):
+        # Methods
+        self.check_tokenize("@staticmethod\n"
+                            "def foo(x,y): pass", """\
     OP         '@'           (1, 0) (1, 1)
     NAME       'staticmethod (1, 1) (1, 13)
     NEWLINE    '\\n'          (1, 13) (1, 14)
@@ -501,41 +485,13 @@ Methods
     OP         ')'           (2, 11) (2, 12)
     OP         ':'           (2, 12) (2, 13)
     NAME       'pass'        (2, 14) (2, 18)
+    """)
 
-Backslash means line continuation, except for comments
-
-    >>> roundtrip("x=1+\\\\n"
-    ...           "1\\n"
-    ...           "# This is a comment\\\\n"
-    ...           "# This also\\n")
-    True
-    >>> roundtrip("# Comment \\\\nx = 0")
-    True
-
-Two string literals on the same line
-
-    >>> roundtrip("'' ''")
-    True
-
-Test roundtrip on random python modules.
-pass the '-ucpu' option to process the full directory.
-
-    >>>
-    >>> tempdir = os.path.dirname(f) or os.curdir
-    >>> testfiles = glob.glob(os.path.join(tempdir, "test*.py"))
-
-    >>> if not test_support.is_resource_enabled("cpu"):
-    ...     testfiles = random.sample(testfiles, 10)
-    ...
-    >>> for testfile in testfiles:
-    ...     if not roundtrip(open(testfile)):
-    ...         print "Roundtrip failed for file %s" % testfile
-    ...         break
-    ... else: True
-    True
-
-Evil tabs
-    >>> dump_tokens("def f():\\n\\tif x\\n        \\tpass")
+    def test_tabs(self):
+        # Evil tabs
+        self.check_tokenize("def f():\n"
+                            "\tif x\n"
+                            "        \tpass", """\
     NAME       'def'         (1, 0) (1, 3)
     NAME       'f'           (1, 4) (1, 5)
     OP         '('           (1, 5) (1, 6)
@@ -550,56 +506,16 @@ Evil tabs
     NAME       'pass'        (3, 9) (3, 13)
     DEDENT     ''            (4, 0) (4, 0)
     DEDENT     ''            (4, 0) (4, 0)
+    """)
 
-Pathological whitespace (http://bugs.python.org/issue16152)
-    >>> dump_tokens("@          ")
+    def test_pathological_trailing_whitespace(self):
+        # Pathological whitespace (http://bugs.python.org/issue16152)
+        self.check_tokenize("@          ", """\
     OP         '@'           (1, 0) (1, 1)
-"""
+    """)
 
 
-from test import test_support
-from tokenize import (untokenize, generate_tokens, NUMBER, NAME, OP,
-                     STRING, ENDMARKER, tok_name, Untokenizer)
-from StringIO import StringIO
-import os
-from unittest import TestCase
-
-def dump_tokens(s):
-    """Print out the tokens in s in a table format.
-
-    The ENDMARKER is omitted.
-    """
-    f = StringIO(s)
-    for type, token, start, end, line in generate_tokens(f.readline):
-        if type == ENDMARKER:
-            break
-        type = tok_name[type]
-        print("%(type)-10.10s %(token)-13.13r %(start)s %(end)s" % locals())
-
-# This is an example from the docs, set up as a doctest.
 def decistmt(s):
-    """Substitute Decimals for floats in a string of statements.
-
-    >>> from decimal import Decimal
-    >>> s = 'print +21.3e-5*-.1234/81.7'
-    >>> decistmt(s)
-    "print +Decimal ('21.3e-5')*-Decimal ('.1234')/Decimal ('81.7')"
-
-    The format of the exponent is inherited from the platform C library.
-    Known cases are "e-007" (Windows) and "e-07" (not Windows).  Since
-    we're only showing 12 digits, and the 13th isn't close to 5, the
-    rest of the output should be platform-independent.
-
-    >>> exec(s) #doctest: +ELLIPSIS
-    -3.21716034272e-0...7
-
-    Output from calculations with Decimal should be identical across all
-    platforms.
-
-    >>> exec(decistmt(s))
-    -3.217160342717258261933904529E-7
-    """
-
     result = []
     g = generate_tokens(StringIO(s).readline)   # tokenize the string
     for toknum, tokval, _, _, _  in g:
@@ -614,6 +530,27 @@ def decistmt(s):
             result.append((toknum, tokval))
     return untokenize(result)
 
+class TestMisc(TestCase):
+
+    def test_decistmt(self):
+        # Substitute Decimals for floats in a string of statements.
+        # This is an example from the docs.
+
+        from decimal import Decimal
+        s = '+21.3e-5*-.1234/81.7'
+        self.assertEqual(decistmt(s),
+                         "+Decimal ('21.3e-5')*-Decimal ('.1234')/Decimal ('81.7')")
+
+        # The format of the exponent is inherited from the platform C library.
+        # Known cases are "e-007" (Windows) and "e-07" (not Windows).  Since
+        # we're only showing 12 digits, and the 13th isn't close to 5, the
+        # rest of the output should be platform-independent.
+        self.assertRegexpMatches(str(eval(s)), '-3.21716034272e-0+7')
+
+        # Output from calculations with Decimal should be identical across all
+        # platforms.
+        self.assertEqual(eval(decistmt(s)), Decimal('-3.217160342717258261933904529E-7'))
+
 
 class UntokenizeTest(TestCase):
 
@@ -650,12 +587,137 @@ class UntokenizeTest(TestCase):
         self.assertEqual(u.untokenize(iter([token])), 'Hello ')
 
 
-__test__ = {"doctests" : doctests, 'decistmt': decistmt}
+class TestRoundtrip(TestCase):
+
+    def check_roundtrip(self, f):
+        """
+        Test roundtrip for `untokenize`. `f` is an open file or a string.
+        The source code in f is tokenized, converted back to source code
+        via tokenize.untokenize(), and tokenized again from the latter.
+        The test fails if the second tokenization doesn't match the first.
+        """
+        if isinstance(f, str): f = StringIO(f)
+        token_list = list(generate_tokens(f.readline))
+        f.close()
+        tokens1 = [tok[:2] for tok in token_list]
+        new_text = untokenize(tokens1)
+        readline = iter(new_text.splitlines(1)).next
+        tokens2 = [tok[:2] for tok in generate_tokens(readline)]
+        self.assertEqual(tokens2, tokens1)
+
+    def test_roundtrip(self):
+        # There are some standard formatting practices that are easy to get right.
+
+        self.check_roundtrip("if x == 1:\n"
+                             "    print(x)\n")
+
+        # There are some standard formatting practices that are easy to get right.
+
+        self.check_roundtrip("if x == 1:\n"
+                             "    print x\n")
+        self.check_roundtrip("# This is a comment\n"
+                             "# This also")
+
+        # Some people use different formatting conventions, which makes
+        # untokenize a little trickier. Note that this test involves trailing
+        # whitespace after the colon. Note that we use hex escapes to make the
+        # two trailing blanks apperant in the expected output.
+
+        self.check_roundtrip("if x == 1 : \n"
+                             "  print x\n")
+        fn = test_support.findfile("tokenize_tests" + os.extsep + "txt")
+        with open(fn) as f:
+            self.check_roundtrip(f)
+        self.check_roundtrip("if x == 1:\n"
+                             "    # A comment by itself.\n"
+                             "    print x # Comment here, too.\n"
+                             "    # Another comment.\n"
+                             "after_if = True\n")
+        self.check_roundtrip("if (x # The comments need to go in the right place\n"
+                             "    == 1):\n"
+                             "    print 'x==1'\n")
+        self.check_roundtrip("class Test: # A comment here\n"
+                             "  # A comment with weird indent\n"
+                             "  after_com = 5\n"
+                             "  def x(m): return m*5 # a one liner\n"
+                             "  def y(m): # A whitespace after the colon\n"
+                             "     return y*4 # 3-space indent\n")
+
+        # Some error-handling code
+
+        self.check_roundtrip("try: import somemodule\n"
+                             "except ImportError: # comment\n"
+                             "    print 'Can not import' # comment2\n"
+                             "else:   print 'Loaded'\n")
+
+    def test_continuation(self):
+        # Balancing continuation
+        self.check_roundtrip("a = (3,4, \n"
+                             "5,6)\n"
+                             "y = [3, 4,\n"
+                             "5]\n"
+                             "z = {'a': 5,\n"
+                             "'b':15, 'c':True}\n"
+                             "x = len(y) + 5 - a[\n"
+                             "3] - a[2]\n"
+                             "+ len(z) - z[\n"
+                             "'b']\n")
+
+    def test_backslash_continuation(self):
+        # Backslash means line continuation, except for comments
+        self.check_roundtrip("x=1+\\\n"
+                             "1\n"
+                             "# This is a comment\\\n"
+                             "# This also\n")
+        self.check_roundtrip("# Comment \\\n"
+                             "x = 0")
+
+    def test_string_concatenation(self):
+        # Two string literals on the same line
+        self.check_roundtrip("'' ''")
+
+    def test_random_files(self):
+        # Test roundtrip on random python modules.
+        # pass the '-ucpu' option to process the full directory.
+
+        import glob, random
+        fn = test_support.findfile("tokenize_tests" + os.extsep + "txt")
+        tempdir = os.path.dirname(fn) or os.curdir
+        testfiles = glob.glob(os.path.join(tempdir, "test*.py"))
+
+        if not test_support.is_resource_enabled("cpu"):
+            testfiles = random.sample(testfiles, 10)
+
+        for testfile in testfiles:
+            try:
+                with open(testfile, 'rb') as f:
+                    self.check_roundtrip(f)
+            except:
+                print "Roundtrip failed for file %s" % testfile
+                raise
+
+
+    def roundtrip(self, code):
+        if isinstance(code, str):
+            code = code.encode('utf-8')
+        tokens = generate_tokens(StringIO(code).readline)
+        return untokenize(tokens).decode('utf-8')
+
+    def test_indentation_semantics_retained(self):
+        """
+        Ensure that although whitespace might be mutated in a roundtrip,
+        the semantic meaning of the indentation remains consistent.
+        """
+        code = "if False:\n\tx=3\n\tx=3\n"
+        codelines = self.roundtrip(code).split('\n')
+        self.assertEqual(codelines[1], codelines[2])
+
 
 def test_main():
-    from test import test_tokenize
-    test_support.run_doctest(test_tokenize, True)
+    test_support.run_unittest(TokenizeTest)
     test_support.run_unittest(UntokenizeTest)
+    test_support.run_unittest(TestRoundtrip)
+    test_support.run_unittest(TestMisc)
 
 if __name__ == "__main__":
     test_main()
index 8b0322bf7510d5d9f3b8c05f36ad376344924d6b..03c4415a0ef777da2faabb72ef555723205dc6c0 100644 (file)
@@ -4,7 +4,8 @@ from StringIO import StringIO
 import sys
 import unittest
 from imp import reload
-from test.test_support import run_unittest, is_jython, Error, cpython_only
+from test.test_support import (run_unittest, is_jython, Error, cpython_only,
+                               captured_output)
 
 import traceback
 
@@ -206,9 +207,53 @@ class TracebackFormatTests(unittest.TestCase):
         self.assertTrue(location.startswith('  File'))
         self.assertTrue(source_line.startswith('    raise'))
 
+    def test_print_stack(self):
+        def prn():
+            traceback.print_stack()
+        with captured_output("stderr") as stderr:
+            prn()
+        lineno = prn.__code__.co_firstlineno
+        file = prn.__code__.co_filename
+        self.assertEqual(stderr.getvalue().splitlines()[-4:], [
+            '  File "%s", line %d, in test_print_stack' % (file, lineno+3),
+            '    prn()',
+            '  File "%s", line %d, in prn' % (file, lineno+1),
+            '    traceback.print_stack()',
+        ])
+
+    def test_format_stack(self):
+        def fmt():
+            return traceback.format_stack()
+        result = fmt()
+        lineno = fmt.__code__.co_firstlineno
+        file = fmt.__code__.co_filename
+        self.assertEqual(result[-2:], [
+            '  File "%s", line %d, in test_format_stack\n'
+            '    result = fmt()\n' % (file, lineno+2),
+            '  File "%s", line %d, in fmt\n'
+            '    return traceback.format_stack()\n' % (file, lineno+1),
+        ])
+
+
+class MiscTracebackCases(unittest.TestCase):
+    #
+    # Check non-printing functions in traceback module
+    #
+
+    def test_extract_stack(self):
+        def extract():
+            return traceback.extract_stack()
+        result = extract()
+        lineno = extract.__code__.co_firstlineno
+        file = extract.__code__.co_filename
+        self.assertEqual(result[-2:], [
+            (file, lineno+2, 'test_extract_stack', 'result = extract()'),
+            (file, lineno+1, 'extract', 'return traceback.extract_stack()'),
+        ])
+
 
 def test_main():
-    run_unittest(TracebackCases, TracebackFormatTests)
+    run_unittest(TracebackCases, TracebackFormatTests, MiscTracebackCases)
 
 
 if __name__ == "__main__":
index 625d08c897da89206507c2001bcc1c145290e3c3..be8f89be07ce4d70825af899b95932efabcb39be 100644 (file)
@@ -1036,6 +1036,7 @@ class UnicodeTest(
         self.assertRaises(UnicodeError, unicode, 'Andr\202 x', 'ascii','strict')
         self.assertEqual(unicode('Andr\202 x','ascii','ignore'), u"Andr x")
         self.assertEqual(unicode('Andr\202 x','ascii','replace'), u'Andr\uFFFD x')
+        self.assertEqual(unicode('\202 x', 'ascii', 'replace'), u'\uFFFD x')
         self.assertEqual(u'abcde'.decode('ascii', 'ignore'),
                          u'abcde'.decode('ascii', errors='ignore'))
         self.assertEqual(u'abcde'.decode('ascii', 'replace'),
index f04bad3964237c3d22c3a56ff1135439ccbd7bdf..ae2d9d5c921c9be53c94fe73b2ce4df5021c21ca 100644 (file)
@@ -5,7 +5,7 @@ import os, glob, time, shutil
 import unicodedata
 
 import unittest
-from test.test_support import run_unittest, TESTFN_UNICODE
+from test.test_support import run_unittest, change_cwd, TESTFN_UNICODE
 from test.test_support import TESTFN_ENCODING, TESTFN_UNENCODABLE
 try:
     TESTFN_ENCODED = TESTFN_UNICODE.encode(TESTFN_ENCODING)
@@ -114,13 +114,11 @@ class TestUnicodeFiles(unittest.TestCase):
         os.unlink(filename1 + ".new")
 
     def _do_directory(self, make_name, chdir_name, encoded):
-        cwd = os.getcwd()
         if os.path.isdir(make_name):
             os.rmdir(make_name)
         os.mkdir(make_name)
         try:
-            os.chdir(chdir_name)
-            try:
+            with change_cwd(chdir_name):
                 if not encoded:
                     cwd_result = os.getcwdu()
                     name_result = make_name
@@ -132,8 +130,6 @@ class TestUnicodeFiles(unittest.TestCase):
                 name_result = unicodedata.normalize("NFD", name_result)
 
                 self.assertEqual(os.path.basename(cwd_result),name_result)
-            finally:
-                os.chdir(cwd)
         finally:
             os.rmdir(make_name)
 
index d5cecd8612f14a000c21d2baf4e35876e013fcc4..99526a238c358c10416f697c903c07c4e0a7a81d 100644 (file)
@@ -2,6 +2,7 @@
 
 from test import test_support, mapping_tests
 import UserDict
+import warnings
 
 d0 = {}
 d1 = {"one": 1}
@@ -29,7 +30,9 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
         self.assertEqual(UserDict.UserDict(one=1, two=2), d2)
         # item sequence constructor
         self.assertEqual(UserDict.UserDict([('one',1), ('two',2)]), d2)
-        self.assertEqual(UserDict.UserDict(dict=[('one',1), ('two',2)]), d2)
+        with test_support.check_warnings((".*'dict'.*",
+                                          PendingDeprecationWarning)):
+            self.assertEqual(UserDict.UserDict(dict=[('one',1), ('two',2)]), d2)
         # both together
         self.assertEqual(UserDict.UserDict([('one',1), ('two',2)], two=3, three=5), d3)
 
@@ -148,6 +151,36 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
         self.assertEqual(t.popitem(), ("x", 42))
         self.assertRaises(KeyError, t.popitem)
 
+    def test_init(self):
+        for kw in 'self', 'other', 'iterable':
+            self.assertEqual(list(UserDict.UserDict(**{kw: 42}).items()),
+                             [(kw, 42)])
+        self.assertEqual(list(UserDict.UserDict({}, dict=42).items()),
+                         [('dict', 42)])
+        self.assertEqual(list(UserDict.UserDict({}, dict=None).items()),
+                         [('dict', None)])
+        with test_support.check_warnings((".*'dict'.*",
+                                          PendingDeprecationWarning)):
+            self.assertEqual(list(UserDict.UserDict(dict={'a': 42}).items()),
+                             [('a', 42)])
+        self.assertRaises(TypeError, UserDict.UserDict, 42)
+        self.assertRaises(TypeError, UserDict.UserDict, (), ())
+        self.assertRaises(TypeError, UserDict.UserDict.__init__)
+
+    def test_update(self):
+        for kw in 'self', 'other', 'iterable':
+            d = UserDict.UserDict()
+            d.update(**{kw: 42})
+            self.assertEqual(list(d.items()), [(kw, 42)])
+        d = UserDict.UserDict()
+        with test_support.check_warnings((".*'dict'.*",
+                                          PendingDeprecationWarning)):
+            d.update(dict={'a': 42})
+        self.assertEqual(list(d.items()), [('a', 42)])
+        self.assertRaises(TypeError, UserDict.UserDict().update, 42)
+        self.assertRaises(TypeError, UserDict.UserDict().update, {}, {})
+        self.assertRaises(TypeError, UserDict.UserDict.update)
+
     def test_missing(self):
         # Make sure UserDict doesn't have a __missing__ method
         self.assertEqual(hasattr(UserDict, "__missing__"), False)
@@ -155,7 +188,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
         # (D) subclass defines __missing__ method returning a value
         # (E) subclass defines __missing__ method raising RuntimeError
         # (F) subclass sets __missing__ instance variable (no effect)
-        # (G) subclass doesn't define __missing__ at a all
+        # (G) subclass doesn't define __missing__ at all
         class D(UserDict.UserDict):
             def __missing__(self, key):
                 return 42
index 7a9459a47e2b39f6276ac7720dc29888c28b1904..11dc29408ae3917c10f3cda42d6bf7300f274cd2 100644 (file)
@@ -593,6 +593,63 @@ class WarningsDisplayTests(unittest.TestCase):
         self.assertEqual(expect, self.module.formatwarning(message,
                                     category, file_name, line_num, file_line))
 
+    @test_support.requires_unicode
+    def test_formatwarning_unicode_msg(self):
+        message = u"msg"
+        category = Warning
+        file_name = os.path.splitext(warning_tests.__file__)[0] + '.py'
+        line_num = 3
+        file_line = linecache.getline(file_name, line_num).strip()
+        format = "%s:%s: %s: %s\n  %s\n"
+        expect = format % (file_name, line_num, category.__name__, message,
+                            file_line)
+        self.assertEqual(expect, self.module.formatwarning(message,
+                                                category, file_name, line_num))
+        # Test the 'line' argument.
+        file_line += " for the win!"
+        expect = format % (file_name, line_num, category.__name__, message,
+                            file_line)
+        self.assertEqual(expect, self.module.formatwarning(message,
+                                    category, file_name, line_num, file_line))
+
+    @test_support.requires_unicode
+    @unittest.skipUnless(test_support.FS_NONASCII, 'need test_support.FS_NONASCII')
+    def test_formatwarning_unicode_msg_nonascii_filename(self):
+        message = u"msg"
+        category = Warning
+        unicode_file_name = test_support.FS_NONASCII + u'.py'
+        file_name = unicode_file_name.encode(sys.getfilesystemencoding())
+        line_num = 3
+        file_line = 'spam'
+        format = "%s:%s: %s: %s\n  %s\n"
+        expect = format % (file_name, line_num, category.__name__, str(message),
+                            file_line)
+        self.assertEqual(expect, self.module.formatwarning(message,
+                                    category, file_name, line_num, file_line))
+        message = u"\xb5sg"
+        expect = format % (unicode_file_name, line_num, category.__name__, message,
+                            file_line)
+        self.assertEqual(expect, self.module.formatwarning(message,
+                                    category, file_name, line_num, file_line))
+
+    @test_support.requires_unicode
+    def test_formatwarning_unicode_msg_nonascii_fileline(self):
+        message = u"msg"
+        category = Warning
+        file_name = 'file.py'
+        line_num = 3
+        file_line = 'sp\xe4m'
+        format = "%s:%s: %s: %s\n  %s\n"
+        expect = format % (file_name, line_num, category.__name__, str(message),
+                            file_line)
+        self.assertEqual(expect, self.module.formatwarning(message,
+                                    category, file_name, line_num, file_line))
+        message = u"\xb5sg"
+        expect = format % (file_name, line_num, category.__name__, message,
+                            unicode(file_line, 'latin1'))
+        self.assertEqual(expect, self.module.formatwarning(message,
+                                    category, file_name, line_num, file_line))
+
     def test_showwarning(self):
         file_name = os.path.splitext(warning_tests.__file__)[0] + '.py'
         line_num = 3
index cc0a755edc416478e6e0e97f1dd7e4b64a904fb4..b7f985c939a770a9fb534e9fe3a94ba700c08e11 100644 (file)
@@ -1197,6 +1197,18 @@ class MappingTestCase(TestBase):
             dict[o] = o.arg
         return dict, objects
 
+    def test_make_weak_valued_dict_misc(self):
+        # errors
+        self.assertRaises(TypeError, weakref.WeakValueDictionary.__init__)
+        self.assertRaises(TypeError, weakref.WeakValueDictionary, {}, {})
+        self.assertRaises(TypeError, weakref.WeakValueDictionary, (), ())
+        # special keyword arguments
+        o = Object(3)
+        for kw in 'self', 'other', 'iterable':
+            d = weakref.WeakValueDictionary(**{kw: o})
+            self.assertEqual(list(d.keys()), [kw])
+            self.assertEqual(d[kw], o)
+
     def make_weak_valued_dict(self):
         dict = weakref.WeakValueDictionary()
         objects = map(Object, range(self.COUNT))
@@ -1279,6 +1291,19 @@ class MappingTestCase(TestBase):
     def test_weak_valued_dict_update(self):
         self.check_update(weakref.WeakValueDictionary,
                           {1: C(), 'a': C(), C(): C()})
+        # errors
+        self.assertRaises(TypeError, weakref.WeakValueDictionary.update)
+        d = weakref.WeakValueDictionary()
+        self.assertRaises(TypeError, d.update, {}, {})
+        self.assertRaises(TypeError, d.update, (), ())
+        self.assertEqual(list(d.keys()), [])
+        # special keyword arguments
+        o = Object(3)
+        for kw in 'self', 'dict', 'other', 'iterable':
+            d = weakref.WeakValueDictionary()
+            d.update(**{kw: o})
+            self.assertEqual(list(d.keys()), [kw])
+            self.assertEqual(d[kw], o)
 
     def test_weak_keyed_dict_update(self):
         self.check_update(weakref.WeakKeyDictionary,
index 40fc35efbcbb87d2e4441b358103fc3cf1dc8960..2469f677ca094657b7b40198d12f52c7d9f1e646 100644 (file)
@@ -1,14 +1,14 @@
-from __future__ import nested_scopes    # Backward compat for 2.1
 from unittest import TestCase
 from wsgiref.util import setup_testing_defaults
 from wsgiref.headers import Headers
 from wsgiref.handlers import BaseHandler, BaseCGIHandler
 from wsgiref import util
 from wsgiref.validate import validator
-from wsgiref.simple_server import WSGIServer, WSGIRequestHandler, demo_app
+from wsgiref.simple_server import WSGIServer, WSGIRequestHandler
 from wsgiref.simple_server import make_server
 from StringIO import StringIO
 from SocketServer import BaseServer
+
 import os
 import re
 import sys
index 95ad4eba77fa6d129986bc68d7278b44cf8bac37..5cb7b25a54f934bdb0e451f7ed4ba6ec90b76f7c 100644 (file)
@@ -169,6 +169,14 @@ class AbstractCompatTests(AbstractPickleTests):
                 u2 = self.loads(p)
                 self.assertEqual(u2, u)
 
+    # The ability to pickle recursive objects was added in 2.7.11 to fix
+    # a crash in CPickle (issue #892902).
+    test_recursive_list_subclass_and_inst = None
+    test_recursive_tuple_subclass_and_inst = None
+    test_recursive_dict_subclass_and_inst = None
+    test_recursive_set_and_inst = None
+    test_recursive_frozenset_and_inst = None
+
 
 # Test backwards compatibility with Python 2.4.
 class CPicklePython24Compat(AbstractCompatTests):
index 71c6605829cb5ba17d8902de0be9d403a6420324..01750c1b125b0efc14b84cb83a4d84bf2fce796f 100644 (file)
@@ -778,6 +778,13 @@ class PyZipFileTests(unittest.TestCase):
     def requiresWriteAccess(self, path):
         if not os.access(path, os.W_OK):
             self.skipTest('requires write access to the installed location')
+        filename = os.path.join(path, 'test_zipfile.try')
+        try:
+            fd = os.open(filename, os.O_WRONLY | os.O_CREAT)
+            os.close(fd)
+        except Exception:
+            self.skipTest('requires write access to the installed location')
+        unlink(filename)
 
     def test_write_pyfile(self):
         self.requiresWriteAccess(os.path.dirname(__file__))
index fb62081f1db914287b6e5da10d2bdc385726cbf7..c8fc985cfd77c8239409a666307dcbd790f84d5a 100644 (file)
@@ -1,6 +1,7 @@
 import unittest
 from test.test_support import TESTFN, run_unittest, import_module, unlink, requires
 import binascii
+import pickle
 import random
 from test.test_support import precisionbigmemtest, _1G, _4G
 import sys
@@ -502,6 +503,16 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
         d.flush()
         self.assertRaises(ValueError, d.copy)
 
+    def test_compresspickle(self):
+        for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+            with self.assertRaises((TypeError, pickle.PicklingError)):
+                pickle.dumps(zlib.compressobj(zlib.Z_BEST_COMPRESSION), proto)
+
+    def test_decompresspickle(self):
+        for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+            with self.assertRaises((TypeError, pickle.PicklingError)):
+                pickle.dumps(zlib.decompressobj(), proto)
+
     # Memory use of the following functions takes into account overallocation
 
     @precisionbigmemtest(size=_1G + 1024 * 1024, memuse=3)
index e75586082862563c9a42683ffe566ff0ccda2736..5c2e4fa5237c9def8c249f8de4d7e5b5e85d9ea5 100644 (file)
@@ -403,11 +403,15 @@ def dedent(text):
         elif margin.startswith(indent):
             margin = indent
 
-        # Current line and previous winner have no common whitespace:
-        # there is no margin.
+        # Find the largest common whitespace between current line and previous
+        # winner.
         else:
-            margin = ""
-            break
+            for i, (x, y) in enumerate(zip(margin, indent)):
+                if x != y:
+                    margin = margin[:i]
+                    break
+            else:
+                margin = margin[:len(indent)]
 
     # sanity check (testing/debugging only)
     if 0 and margin:
index 27a5511ddc290001d7e7c9d105df98ee68a388af..527f20acc60cb893917802bac02580d06c843a7e 100644 (file)
@@ -565,7 +565,7 @@ class _Event(_Verbose):
 
     def _reset_internal_locks(self):
         # private!  called by Thread._reset_internal_locks by _after_fork()
-        self.__cond.__init__()
+        self.__cond.__init__(Lock())
 
     def isSet(self):
         'Return true if and only if the internal flag is true.'
@@ -580,12 +580,9 @@ class _Event(_Verbose):
         that call wait() once the flag is true will not block at all.
 
         """
-        self.__cond.acquire()
-        try:
+        with self.__cond:
             self.__flag = True
             self.__cond.notify_all()
-        finally:
-            self.__cond.release()
 
     def clear(self):
         """Reset the internal flag to false.
@@ -594,11 +591,8 @@ class _Event(_Verbose):
         set the internal flag to true again.
 
         """
-        self.__cond.acquire()
-        try:
+        with self.__cond:
             self.__flag = False
-        finally:
-            self.__cond.release()
 
     def wait(self, timeout=None):
         """Block until the internal flag is true.
@@ -615,13 +609,10 @@ class _Event(_Verbose):
         True except if a timeout is given and the operation times out.
 
         """
-        self.__cond.acquire()
-        try:
+        with self.__cond:
             if not self.__flag:
                 self.__cond.wait(timeout)
             return self.__flag
-        finally:
-            self.__cond.release()
 
 # Helper to generate new thread names
 _counter = _count().next
index a8992f8d771f8a1de520521337e269e44ef3004f..bf0301e66317dcdf2459239a4f64cad2d0f56221 100755 (executable)
@@ -78,7 +78,7 @@ else:
 # in Timer.__init__() depend on setup being indented 4 spaces and stmt
 # being indented 8 spaces.
 template = """
-def inner(_it, _timer):
+def inner(_it, _timer%(init)s):
     %(setup)s
     _t0 = _timer()
     for _i in _it:
@@ -132,9 +132,10 @@ class Timer:
             stmt = reindent(stmt, 8)
             if isinstance(setup, basestring):
                 setup = reindent(setup, 4)
-                src = template % {'stmt': stmt, 'setup': setup}
+                src = template % {'stmt': stmt, 'setup': setup, 'init': ''}
             elif hasattr(setup, '__call__'):
-                src = template % {'stmt': stmt, 'setup': '_setup()'}
+                src = template % {'stmt': stmt, 'setup': '_setup()',
+                                  'init': ', _setup=_setup'}
                 ns['_setup'] = setup
             else:
                 raise ValueError("setup is neither a string nor callable")
index 661ddeb8e6b5cd167013a34fbc211b402d4b1b90..d426cd2df52a04fb6bafd2b15d7c50a75f5776ce 100644 (file)
@@ -198,6 +198,8 @@ class Untokenizer:
 
     def untokenize(self, iterable):
         it = iter(iterable)
+        indents = []
+        startline = False
         for t in it:
             if len(t) == 2:
                 self.compat(t, it)
@@ -205,6 +207,21 @@ class Untokenizer:
             tok_type, token, start, end, line = t
             if tok_type == ENDMARKER:
                 break
+            if tok_type == INDENT:
+                indents.append(token)
+                continue
+            elif tok_type == DEDENT:
+                indents.pop()
+                self.prev_row, self.prev_col = end
+                continue
+            elif tok_type in (NEWLINE, NL):
+                startline = True
+            elif startline and indents:
+                indent = indents[-1]
+                if start[1] >= len(indent):
+                    self.tokens.append(indent)
+                    self.prev_col = len(indent)
+                startline = False
             self.add_whitespace(start)
             self.tokens.append(token)
             self.prev_row, self.prev_col = end
index 6bbc55fbc6edacceb694220bc6b6aaa66cc48b71..644fe5b5c5a8e37fa12f4db54f1145436cfe3bf9 100644 (file)
@@ -127,8 +127,6 @@ class _AssertRaisesContext(object):
                      (expected_regexp.pattern, str(exc_value)))
         return True
 
-def _sentinel(*args, **kwargs):
-    raise AssertionError('Should never be called')
 
 class TestCase(object):
     """A class whose instances are single test cases.
@@ -445,7 +443,7 @@ class TestCase(object):
             return  '%s : %s' % (safe_repr(standardMsg), safe_repr(msg))
 
 
-    def assertRaises(self, excClass, callableObj=_sentinel, *args, **kwargs):
+    def assertRaises(self, excClass, callableObj=None, *args, **kwargs):
         """Fail unless an exception of class excClass is raised
            by callableObj when invoked with arguments args and keyword
            arguments kwargs. If a different type of exception is
@@ -453,7 +451,7 @@ class TestCase(object):
            deemed to have suffered an error, exactly as for an
            unexpected exception.
 
-           If called with callableObj omitted, will return a
+           If called with callableObj omitted or None, will return a
            context object used like this::
 
                 with self.assertRaises(SomeException):
@@ -469,7 +467,7 @@ class TestCase(object):
                self.assertEqual(the_exception.error_code, 3)
         """
         context = _AssertRaisesContext(excClass, self)
-        if callableObj is _sentinel:
+        if callableObj is None:
             return context
         with context:
             callableObj(*args, **kwargs)
@@ -975,7 +973,7 @@ class TestCase(object):
             self.fail(self._formatMessage(msg, standardMsg))
 
     def assertRaisesRegexp(self, expected_exception, expected_regexp,
-                           callable_obj=_sentinel, *args, **kwargs):
+                           callable_obj=None, *args, **kwargs):
         """Asserts that the message in a raised exception matches a regexp.
 
         Args:
@@ -989,7 +987,7 @@ class TestCase(object):
         if expected_regexp is not None:
             expected_regexp = re.compile(expected_regexp)
         context = _AssertRaisesContext(expected_exception, self, expected_regexp)
-        if callable_obj is _sentinel:
+        if callable_obj is None:
             return context
         with context:
             callable_obj(*args, **kwargs)
index b25367992de8ac7e004c906d9b6a104f83dffb80..ca99ac64173b3ada3735c82d09ef4a2bd6ae2495 100644 (file)
@@ -174,7 +174,7 @@ class TestProgram(object):
                               action='store_true')
         if self.catchbreak != False:
             parser.add_option('-c', '--catch', dest='catchbreak', default=False,
-                              help='Catch ctrl-C and display results so far',
+                              help='Catch Ctrl-C and display results so far',
                               action='store_true')
         if self.buffer != False:
             parser.add_option('-b', '--buffer', dest='buffer', default=False,
index 4c2d1f99eba7f92201fe37cb53dae9832774cb50..7658189fe522354454a1fc921bbd3e309d95ae73 100644 (file)
@@ -967,9 +967,6 @@ test case
         # Failure when no exception is raised
         with self.assertRaises(self.failureException):
             self.assertRaises(ExceptionMock, lambda: 0)
-        # Failure when the function is None
-        with self.assertRaises(TypeError):
-            self.assertRaises(ExceptionMock, None)
         # Failure when another exception is raised
         with self.assertRaises(ExceptionMock):
             self.assertRaises(ValueError, Stub)
@@ -1008,8 +1005,6 @@ test case
         self.assertRaisesRegexp(ExceptionMock, re.compile('expect$'), Stub)
         self.assertRaisesRegexp(ExceptionMock, 'expect$', Stub)
         self.assertRaisesRegexp(ExceptionMock, u'expect$', Stub)
-        with self.assertRaises(TypeError):
-            self.assertRaisesRegexp(ExceptionMock, 'expect$', None)
 
     def testAssertNotRaisesRegexp(self):
         self.assertRaisesRegexp(
index 0f0d8c15de07cbbe8594754fa58ab1e17c16b401..7432032df04fa3d8bf5c10814a75cb686ee86667 100644 (file)
@@ -44,6 +44,8 @@ Typical usage:
     UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')
 """
 
+import os
+
 __author__ = 'Ka-Ping Yee <ping@zesty.ca>'
 
 RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, RESERVED_FUTURE = [
@@ -438,23 +440,25 @@ def _netbios_getnode():
 # Thanks to Thomas Heller for ctypes and for his help with its use here.
 
 # If ctypes is available, use it to find system routines for UUID generation.
-_uuid_generate_random = _uuid_generate_time = _UuidCreate = None
+_uuid_generate_time = _UuidCreate = None
 try:
     import ctypes, ctypes.util
+    import sys
 
     # The uuid_generate_* routines are provided by libuuid on at least
     # Linux and FreeBSD, and provided by libc on Mac OS X.
-    for libname in ['uuid', 'c']:
+    _libnames = ['uuid']
+    if not sys.platform.startswith('win'):
+        _libnames.append('c')
+    for libname in _libnames:
         try:
             lib = ctypes.CDLL(ctypes.util.find_library(libname))
         except:
             continue
-        if hasattr(lib, 'uuid_generate_random'):
-            _uuid_generate_random = lib.uuid_generate_random
         if hasattr(lib, 'uuid_generate_time'):
             _uuid_generate_time = lib.uuid_generate_time
-            if _uuid_generate_random is not None:
-                break  # found everything we were looking for
+            break
+    del _libnames
 
     # The uuid_generate_* functions are broken on MacOS X 10.5, as noted
     # in issue #8621 the function generates the same sequence of values
@@ -463,11 +467,10 @@ try:
     #
     # Assume that the uuid_generate functions are broken from 10.5 onward,
     # the test can be adjusted when a later version is fixed.
-    import sys
     if sys.platform == 'darwin':
         import os
         if int(os.uname()[2].split('.')[0]) >= 9:
-            _uuid_generate_random = _uuid_generate_time = None
+            _uuid_generate_time = None
 
     # On Windows prior to 2000, UuidCreate gives a UUID containing the
     # hardware address.  On Windows 2000 and later, UuidCreate makes a
@@ -578,21 +581,7 @@ def uuid3(namespace, name):
 
 def uuid4():
     """Generate a random UUID."""
-
-    # When the system provides a version-4 UUID generator, use it.
-    if _uuid_generate_random:
-        _buffer = ctypes.create_string_buffer(16)
-        _uuid_generate_random(_buffer)
-        return UUID(bytes=_buffer.raw)
-
-    # Otherwise, get randomness from urandom or the 'random' module.
-    try:
-        import os
-        return UUID(bytes=os.urandom(16), version=4)
-    except:
-        import random
-        bytes = [chr(random.randrange(256)) for i in range(16)]
-        return UUID(bytes=bytes, version=4)
+    return UUID(bytes=os.urandom(16), version=4)
 
 def uuid5(namespace, name):
     """Generate a UUID from the SHA-1 hash of a namespace UUID and a name."""
index fbec94b7f07aeab475367270b2bca71de343c0e3..b0d53aa0321bacc0ffba88dc6f60cc9cad973a2a 100644 (file)
@@ -31,7 +31,7 @@ def _show_warning(message, category, filename, lineno, file=None, line=None):
             return
     try:
         file.write(formatwarning(message, category, filename, lineno, line))
-    except IOError:
+    except (IOError, UnicodeError):
         pass # the file (probably stderr) is invalid - this warning gets lost.
 # Keep a working version around in case the deprecation of the old API is
 # triggered.
@@ -39,11 +39,29 @@ showwarning = _show_warning
 
 def formatwarning(message, category, filename, lineno, line=None):
     """Function to format a warning the standard way."""
-    s =  "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message)
+    try:
+        unicodetype = unicode
+    except NameError:
+        unicodetype = ()
+    try:
+        message = str(message)
+    except UnicodeEncodeError:
+        pass
+    s =  "%s: %s: %s\n" % (lineno, category.__name__, message)
     line = linecache.getline(filename, lineno) if line is None else line
     if line:
         line = line.strip()
+        if isinstance(s, unicodetype) and isinstance(line, str):
+            line = unicode(line, 'latin1')
         s += "  %s\n" % line
+    if isinstance(s, unicodetype) and isinstance(filename, str):
+        enc = sys.getfilesystemencoding()
+        if enc:
+            try:
+                filename = unicode(filename, enc)
+            except UnicodeDecodeError:
+                pass
+    s = "%s:%s" % (filename, s)
     return s
 
 def filterwarnings(action, message="", category=Warning, module="", lineno=0,
index 787c8851dd3d3453e75511051358c4f16f74c49e..ca37f8752875991233ddafb9da5a262a23138a74 100644 (file)
@@ -44,7 +44,14 @@ class WeakValueDictionary(UserDict.UserDict):
     # objects are unwrapped on the way out, and we always wrap on the
     # way in).
 
-    def __init__(self, *args, **kw):
+    def __init__(*args, **kw):
+        if not args:
+            raise TypeError("descriptor '__init__' of 'WeakValueDictionary' "
+                            "object needs an argument")
+        self = args[0]
+        args = args[1:]
+        if len(args) > 1:
+            raise TypeError('expected at most 1 arguments, got %d' % len(args))
         def remove(wr, selfref=ref(self)):
             self = selfref()
             if self is not None:
@@ -214,7 +221,15 @@ class WeakValueDictionary(UserDict.UserDict):
         else:
             return wr()
 
-    def update(self, dict=None, **kwargs):
+    def update(*args, **kwargs):
+        if not args:
+            raise TypeError("descriptor 'update' of 'WeakValueDictionary' "
+                            "object needs an argument")
+        self = args[0]
+        args = args[1:]
+        if len(args) > 1:
+            raise TypeError('expected at most 1 arguments, got %d' % len(args))
+        dict = args[0] if args else None
         if self._pending_removals:
             self._commit_removals()
         d = self.data
index 04a893d7c614a351cd1ffda5d664cde764119dd3..c3278120b0afa9205e687f5e1ace042c495c9342 100644 (file)
@@ -329,7 +329,7 @@ def check_environ(environ):
 
     # @@: these need filling out:
     if environ['REQUEST_METHOD'] not in (
-        'GET', 'HEAD', 'POST', 'OPTIONS','PUT','DELETE','TRACE'):
+        'GET', 'HEAD', 'POST', 'OPTIONS', 'PATCH', 'PUT', 'DELETE', 'TRACE'):
         warnings.warn(
             "Unknown REQUEST_METHOD: %r" % environ['REQUEST_METHOD'],
             WSGIWarning)
index b77e6c88e465db74138edc9f689052ccdae7a438..3ab66cea69d89fb32f8570449581a0c5b4a3bbd2 100644 (file)
@@ -1134,7 +1134,9 @@ class ZipFile(object):
             arcname += '/'
         zinfo = ZipInfo(arcname, date_time)
         zinfo.external_attr = (st[0] & 0xFFFF) << 16L      # Unix attributes
-        if compress_type is None:
+        if isdir:
+            zinfo.compress_type = ZIP_STORED
+        elif compress_type is None:
             zinfo.compress_type = self.compression
         else:
             zinfo.compress_type = compress_type
index 872828967ea963bcc9b2441c4337097b53b02a41..74c9cfb9e730d172712a91a4659848eedc6bc88f 100755 (executable)
@@ -237,9 +237,9 @@ def library_recipes():
 
         result.extend([
           dict(
-              name="OpenSSL 1.0.2a",
-              url="https://www.openssl.org/source/openssl-1.0.2a.tar.gz",
-              checksum='a06c547dac9044161a477211049f60ef',
+              name="OpenSSL 1.0.2d",
+              url="https://www.openssl.org/source/openssl-1.0.2d.tar.gz",
+              checksum='38dd619b2e77cbac69b99f52a053d25a',
               patches=[
                   "openssl_sdk_makedepend.patch",
                    ],
index 5903afdbff1d7930ed2b1c19b1f4c45031b288dc..86a0f2f4d5f2392a97d62b9cf89bdceca57eaa04 100644 (file)
@@ -2,7 +2,7 @@
 # Parent  25a9af415e8c3faf591c360d5f0e361d049b2b43
 # openssl_sdk_makedepend.patch
 #
-#      using openssl 1.0.2a
+#      using openssl 1.0.2d
 #
 # - support building with an OS X SDK
 # - allow "make depend" to use compilers with names other than "gcc"
index b3b2b3622f78334b52341b4e6855fcc6365a8546..ee73eddc5d8731cb86566e63670f3c61772912b1 100644 (file)
@@ -42,6 +42,11 @@ SVNVERSION=  @SVNVERSION@
 HGVERSION=     @HGVERSION@
 HGTAG=         @HGTAG@
 HGBRANCH=      @HGBRANCH@
+PGO_PROF_GEN_FLAG=@PGO_PROF_GEN_FLAG@
+PGO_PROF_USE_FLAG=@PGO_PROF_USE_FLAG@
+LLVM_PROF_MERGER=@LLVM_PROF_MERGER@
+LLVM_PROF_FILE=@LLVM_PROF_FILE@
+LLVM_PROF_ERR=@LLVM_PROF_ERR@
 
 GNULD=          @GNULD@
 
@@ -204,8 +209,7 @@ TCLTK_INCLUDES=     @TCLTK_INCLUDES@
 TCLTK_LIBS=    @TCLTK_LIBS@
 
 # The task to run while instrument when building the profile-opt target
-PROFILE_TASK=  $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-#PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py
+PROFILE_TASK=-m test.regrtest --pgo
 
 # === Definitions added by makesetup ===
 
@@ -300,6 +304,16 @@ ASDLGEN=   $(srcdir)/Parser/asdl_c.py
 
 ##########################################################################
 # Python
+
+OPCODETARGETS_H= \
+               $(srcdir)/Python/opcode_targets.h
+               
+OPCODETARGETGEN= \
+               $(srcdir)/Python/makeopcodetargets.py
+
+OPCODETARGETGEN_FILES= \
+               $(OPCODETARGETGEN) $(srcdir)/Lib/opcode.py
+
 PYTHON_OBJS=   \
                Python/_warnings.o \
                Python/Python-ast.o \
@@ -410,27 +424,38 @@ LIBRARY_OBJS=     \
 all:           build_all
 build_all:     $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks
 
-# Compile a binary with gcc profile guided optimization.
+# Compile a binary with profile guided optimization.
 profile-opt:
+       @if [ $(LLVM_PROF_ERR) == yes ]; then \
+               echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\
+               echo "Please add it to PATH and run ./configure again" ;\
+               exit 1;\
+       fi
        @echo "Building with support for profile generation:"
        $(MAKE) clean
+       $(MAKE) profile-removal
        $(MAKE) build_all_generate_profile
-       @echo "Running benchmark to generate profile data:"
        $(MAKE) profile-removal
+       @echo "Running code to generate profile data (this can take a while):"
        $(MAKE) run_profile_task
+       $(MAKE) build_all_merge_profile
        @echo "Rebuilding with profile guided optimizations:"
        $(MAKE) clean
        $(MAKE) build_all_use_profile
+       $(MAKE) profile-removal
 
 build_all_generate_profile:
-       $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
+       $(MAKE) all CFLAGS="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
 
 run_profile_task:
        : # FIXME: can't run for a cross build
-       ./$(BUILDPYTHON) $(PROFILE_TASK)
+       $(LLVM_PROF_FILE) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
+
+build_all_merge_profile:
+       $(LLVM_PROF_MERGER)
 
 build_all_use_profile:
-       $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
+       $(MAKE) all CFLAGS="$(CFLAGS) $(PGO_PROF_USE_FLAG)"
 
 coverage:
        @echo "Building with support for coverage checking:"
@@ -671,6 +696,11 @@ Objects/bytearrayobject.o: $(srcdir)/Objects/bytearrayobject.c \
 Objects/stringobject.o: $(srcdir)/Objects/stringobject.c \
                                $(STRINGLIB_HEADERS)
 
+$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
+       $(OPCODETARGETGEN) $(OPCODETARGETS_H)
+
+Python/ceval.o: $(OPCODETARGETS_H)
+
 Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
                                $(STRINGLIB_HEADERS)
 
@@ -1315,9 +1345,11 @@ clean: pycremoval
        find build -name 'fficonfig.h' -exec rm -f {} ';' || true
        find build -name 'fficonfig.py' -exec rm -f {} ';' || true
        -rm -f Lib/lib2to3/*Grammar*.pickle
+       -rm -rf build
 
 profile-removal:
        find . -name '*.gc??' -exec rm -f {} ';'
+       find . -name '*.profclang?' -exec rm -f {} ';'
 
 clobber: clean profile-removal
        -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
index 2262c79350e014fca746c19f2e1e99fc8ce22a05..c1f6481499203ae43e6e4c048b05138de5a5f6c4 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -107,6 +107,7 @@ Ben Bell
 Thomas Bellman
 Alexander “Саша” Belopolsky
 Eli Bendersky
+Cory Benfield
 David Benjamin
 Oscar Benjamin
 Andrew Bennetts
@@ -429,6 +430,7 @@ Doug Fort
 Chris Foster
 John Fouhy
 Andrew Francis
+Matt Frank
 Stefan Franke
 Martin Franklin
 Kent Frazier
@@ -460,6 +462,7 @@ Fred Gansevles
 Lars Marius Garshol
 Dan Gass
 Andrew Gaul
+Matthieu Gautier
 Stephen M. Gava
 Xavier de Gaye
 Harry Henry Gebel
@@ -571,6 +574,7 @@ Gregor Hoffleit
 Chris Hoffman
 Stefan Hoffmeister
 Albert Hofkamp
+Chris Hogan
 Tomas Hoger
 Jonathan Hogg
 Kamilla Holanda
@@ -804,6 +808,7 @@ Mark Levinson
 Mark Levitt
 William Lewis
 Akira Li
+Robert Li
 Xuanji Li
 Robert van Liere
 Ross Light
@@ -872,12 +877,14 @@ Nick Mathewson
 Simon Mathieu
 Laura Matson
 Graham Matthews
+mattip
 Martin Matusiak
 Dieter Maurer
 Daniel May
 Madison May
 Lucas Maystre
 Arnaud Mazin
+Pam McA'Nulty
 Matt McClure
 Rebecca McCreary
 Kirk McDonald
@@ -1028,6 +1035,7 @@ Heikki Partanen
 Harri Pasanen
 Gaël Pasgrimaud
 Ashish Nitin Patil
+Alecsandru Patrascu
 Randy Pausch
 Samuele Pedroni
 Justin Peel
@@ -1078,6 +1086,7 @@ Martin Pool
 Iustin Pop
 Claudiu Popa
 John Popplewell
+Matheus Vieira Portela
 Davin Potts
 Guillaume Pratte
 Florian Preinstorfer
@@ -1086,6 +1095,7 @@ Paul Prescod
 Donovan Preston
 Paul Price
 Iuliia Proskurnia
+Dorian Pula
 Jyrki Pulliainen
 Steve Purcell
 Eduardo Pérez
@@ -1135,6 +1145,7 @@ Vlad Riscutia
 Wes Rishel
 Daniel Riti
 Juan M. Bello Rivas
+Mohd Sanad Zaki Rizvi
 Davide Rizzo
 Anthony Roach
 Carl Robben
@@ -1153,12 +1164,14 @@ Armin Ronacher
 Case Roole
 Timothy Roscoe
 Erik Rose
+Mark Roseman
 Jim Roskind
 Brian Rosner
 Guido van Rossum
 Just van Rossum
 Hugo van Rossum
 Saskia van Rossum
+Clement Rouault
 Donald Wallace Rouse II
 Liam Routt
 Todd Rovito
@@ -1167,6 +1180,7 @@ Clinton Roy
 Paul Rubin
 Sam Ruby
 Demur Rumed
+Bernt Røskar Brenna
 Audun S. Runde
 Eran Rundstein
 Rauli Ruohonen
@@ -1196,6 +1210,7 @@ Hugh Sasse
 Bob Savage
 Ben Sayer
 sbt
+Luca Sbardella
 Marco Scataglini
 Andrew Schaaf
 Michael Scharf
@@ -1245,6 +1260,7 @@ Alexander Shigin
 Pete Shinners
 Michael Shiplett
 John W. Shipman
+Shiyao Ma
 Joel Shprentz
 Yue Shuaijie
 Terrel Shumway
@@ -1276,6 +1292,7 @@ Ryan Smith-Roberts
 Rafal Smotrzyk
 Eric Snow
 Dirk Soede
+Nir Soffer
 Paul Sokolovsky
 Evgeny Sologubov
 Cody Somerville
@@ -1326,6 +1343,7 @@ John Szakmeister
 Amir Szekely
 Arfrever Frehtes Taifersar Arahesis
 Hideaki Takahashi
+Takase Arihiro
 Indra Talip
 Neil Tallim
 Geoff Talvola
@@ -1385,6 +1403,7 @@ Fraser Tweedale
 Doobee R. Tzeck
 Eren Türkay
 Lionel Ulmer
+Adnan Umer
 Roger Upole
 Daniel Urban
 Michael Urman
@@ -1424,6 +1443,7 @@ Richard Walker
 Larry Wall
 Kevin Walzer
 Rodrigo Steinmuller Wanderley
+Dingyuan Wang
 Ke Wang
 Greg Ward
 Tom Wardill
@@ -1490,6 +1510,7 @@ Thomas Wouters
 Daniel Wozniak
 Heiko Wundram
 Doug Wyatt
+Xiang Zhang
 Robert Xiao
 Florent Xicluna
 Hirokazu Yamamoto
index a29b9077b17425ed10ace3bec0d1de28bc6e9112..41317e5ffeccd116e17307a15c59baef9949b2d7 100644 (file)
@@ -1495,7 +1495,7 @@ Extension Modules
 
 - Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
 
-- Patch #1212117: os.stat().st_flags is now accessible as a attribute
+- Patch #1212117: os.stat().st_flags is now accessible as an attribute
   if available on the platform.
 
 - Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if
index c311f6b25d997ad67231f596933c40f8c64fd998..5b9793b48edfbd565f66c0006bb29e9ac61c6a08 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1,7 +1,403 @@
-+++++++++++
++++++++++++
 Python News
 +++++++++++
 
+What's New in Python 2.7.11?
+============================
+
+*Release date: 2015-12-05*
+
+Library
+-------
+
+- Issue #25624: ZipFile now always writes a ZIP_STORED header for directory
+  entries.  Patch by Dingyuan Wang.
+
+
+What's New in Python 2.7.11 release candidate 1?
+================================================
+
+*Release date: 2015-11-21*
+
+Core and Builtins
+-----------------
+
+- Issue #25678: Avoid buffer overreads when int(), long(), float(), and
+  compile() are passed buffer objects.  These objects are not necessarily
+  terminated by a null byte, but the functions assumed they were.
+
+- Issue #25388: Fixed tokenizer hang when processing undecodable source code
+  with a null byte.
+
+- Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
+  rejects builtin types with not defined __new__.
+
+- Issue #7267: format(int, 'c') now raises OverflowError when the argument is
+  not in range(0, 256).
+
+- Issue #24806: Prevent builtin types that are not allowed to be subclassed from
+  being subclassed through multiple inheritance.
+
+- Issue #24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
+
+- Issue #25003: os.urandom() doesn't use getentropy() on Solaris because
+  getentropy() is blocking, whereas os.urandom() should not block. getentropy()
+  is supported since Solaris 11.3.
+
+- Issue #21167: NAN operations are now handled correctly when python is
+  compiled with ICC even if -fp-model strict is not specified.
+
+- Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
+  object now always allocates place for trailing null byte and it's buffer now
+  is always null-terminated.
+
+- Issue #19543: encode() and decode() methods and constructors of str,
+  unicode and bytearray classes now emit deprecation warning for known
+  non-text encodings when Python is ran with the -3 option.
+
+- Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
+  PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
+  to check for and handle errors correctly.
+
+- Issue #4753: On compilers where it is supported, use "computed gotos" for
+  bytecode dispatch in the interpreter. This improves interpretation
+  performance.
+
+- Issue #22939: Fixed integer overflow in iterator object.  Original patch by
+  Clement Rouault.
+
+- Issue #24102: Fixed exception type checking in standard error handlers.
+
+Library
+-------
+
+- Issue #10128: backport issue #10845's mitigation of incompatibilities between
+  the multiprocessing module and directory and zipfile execution.
+  Multiprocessing on Windows will now automatically skip rerunning __main__ in
+  spawned processes, rather than failing with AssertionError.
+
+- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer().
+
+- Issue #25590: In the Readline completer, only call getattr() once per
+  attribute.
+
+- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
+  ssl.SSLContext.
+
+- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
+
+- Issue #7759: Fixed the mhlib module on filesystems that doesn't support
+  link counting for directories.
+
+- Issue #892902: Fixed pickling recursive objects.
+
+- Issue #18010: Fix the pydoc GUI's search function to handle exceptions
+  from importing packages.
+
+- Issue #25515: Always use os.urandom as a source of randomness in uuid.uuid4.
+
+- Issue #21827: Fixed textwrap.dedent() for the case when largest common
+  whitespace is a substring of smallest leading whitespace.
+  Based on patch by Robert Li.
+
+- Issue #21709: Fix the logging module to not depend upon __file__ being set
+  properly to get the filename of its caller from the stack.  This allows it
+  to work if run in a frozen or embedded environment where the module's
+  .__file__ attribute does not match its code object's .co_filename.
+
+- Issue #25319: When threading.Event is reinitialized, the underlying condition
+  should use a regular lock rather than a recursive lock.
+
+- Issue #25232: Fix CGIRequestHandler to split the query from the URL at the
+  first question mark (?) rather than the last. Patch from Xiang Zhang.
+
+- Issue #24657: Prevent CGIRequestHandler from collapsing slashes in the
+  query part of the URL as if it were a path. Patch from Xiang Zhang.
+
+- Issue #22958: Constructor and update method of weakref.WeakValueDictionary
+  now accept the self keyword argument.
+
+- Issue #22609: Constructor and the update method of collections.UserDict now
+  accept the self keyword argument.
+
+- Issue #25203: Failed readline.set_completer_delims() no longer left the
+  module in inconsistent state.
+
+- Issue #19143: platform module now reads Windows version from kernel32.dll to
+  avoid compatibility shims.
+
+- Issue #25135: Make deque_clear() safer by emptying the deque before clearing.
+  This helps avoid possible reentrancy issues.
+
+- Issue #24684: socket.socket.getaddrinfo() now calls
+  PyUnicode_AsEncodedString() instead of calling the encode() method of the
+  host, to handle correctly custom unicode string with an encode() method
+  which doesn't return a byte string. The encoder of the IDNA codec is now
+  called directly instead of calling the encode() method of the string.
+
+- Issue #24982: shutil.make_archive() with the "zip" format now adds entries
+  for directories (including empty directories) in ZIP file.
+
+- Issue #17849: Raise a sensible exception if an invalid response is
+  received for a HTTP tunnel request, as seen with some servers that
+  do not support tunnelling.  Initial patch from Cory Benfield.
+
+- Issue #16180: Exit pdb if file has syntax error, instead of trapping user
+  in an infinite loop.  Patch by Xavier de Gaye.
+
+- Issue #22812: Fix unittest discovery examples.
+  Patch from Pam McA'Nulty.
+
+- Issue #24634: Importing uuid should not try to load libc on Windows
+
+- Issue #23652: Make it possible to compile the select module against the
+  libc headers from the Linux Standard Base, which do not include some
+  EPOLL macros.  Initial patch by Matt Frank.
+
+- Issue #15138: Speed up base64.urlsafe_b64{en,de}code considerably.
+
+- Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch
+  written by Matthieu Gautier.
+
+- Issue #23254: Document how to close the TCPServer listening socket.
+  Patch from Martin Panter.
+
+- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
+
+- Issue #24613: Calling array.fromstring() with self is no longer allowed
+  to prevent the use-after-free error.  Patch by John Leitch.
+
+- Issue #24708: Fix possible integer overflow in strop.replace().
+
+- Issue #24620: Random.setstate() now validates the value of state last element.
+
+- Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.
+
+- Issue #24611: Fixed compiling the posix module on non-Windows platforms
+  without mknod() or makedev() (e.g. on Unixware).
+
+- Issue #18684: Fixed reading out of the buffer in the re module.
+
+- Issue #24259: tarfile now raises a ReadError if an archive is truncated
+  inside a data segment.
+
+- Issue #24514: tarfile now tolerates number fields consisting of only
+  whitespace.
+
+- Issue #20387: Restore semantic round-trip correctness in tokenize/untokenize
+  for tab-indented blocks.
+
+- Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
+  functions of the audioop module.  Fixed SystemError when the state is not a
+  tuple.  Fixed possible memory leak.
+
+- Issue #24481: Fix possible memory corruption with large profiler info strings
+  in hotshot.
+
+- Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().
+
+- Issue #19543: io.TextIOWrapper (and hence io.open()) now uses the internal
+  codec marking system added to emit deprecation warning for known non-text
+  encodings at stream construction time when Python is ran with the -3 option.
+
+- Issue #24264: Fixed buffer overflow in the imageop module.
+
+- Issue #5633: Fixed timeit when the statement is a string and the setup is not.
+
+- Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
+  Original patch by David Moore.
+
+- Issue #22095: Fixed HTTPConnection.set_tunnel with default port.  The port
+  value in the host header was set to "None".  Patch by Demian Brecht.
+
+- Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked
+  cursor type.
+
+- Issue #24286: Dict view were not registered with the MappingView abstract
+  base classes.  This caused key and item views in OrderedDict to not be equal
+  to their regular dict counterparts.
+
+- Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
+  when a directory with the chosen name already exists on Windows as well as
+  on Unix.  tempfile.mkstemp() now fails early if parent directory is not
+  valid (not exists or is a file) on Windows.
+
+- Issue #6598: Increased time precision and random number range in
+  email.utils.make_msgid() to strengthen the uniqueness of the message ID.
+
+- Issue #24091: Fixed various crashes in corner cases in cElementTree.
+
+- Issue #15267: HTTPConnection.request() now is compatibile with old-style
+  classes (such as TemporaryFile).  Original patch by Atsuo Ishimoto.
+
+- Issue #20014: array.array() now accepts unicode typecodes.  Based on patch by
+  Vajrasky Kok.
+
+- Issue #23637: Showing a warning no longer fails with UnicodeErrror.
+  Formatting unicode warning in the file with the path containing non-ascii
+  characters no longer fails with UnicodeErrror.
+
+- Issue #24134: Reverted issue #24134 changes.
+
+IDLE
+----
+
+- Issue 15348: Stop the debugger engine (normally in a user process)
+  before closing the debugger window (running in the IDLE process).
+  This prevents the RuntimeErrors that were being caught and ignored.
+
+- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
+  debugger is active (15347); b) closing the debugger with the [X] button
+  (15348); and c) activating the debugger when already active (24455).
+  The patch by Mark Roseman does this by making two changes.
+  1. Suspend and resume the gui.interaction method with the tcl vwait
+  mechanism intended for this purpose (instead of root.mainloop & .quit).
+  2. In gui.run, allow any existing interaction to terminate first.
+
+- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
+  to make it clearer that the program referred to is the currently running
+  user program, not IDLE itself.
+
+- Issue #24750: Improve the appearance of the IDLE editor window status bar.
+  Patch by Mark Roseman.
+
+- Issue #25313: Change the handling of new built-in text color themes to better
+  address the compatibility problem introduced by the addition of IDLE Dark.
+  Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
+
+- Issue #24782: Extension configuration is now a tab in the IDLE Preferences
+  dialog rather than a separate dialog.   The former tabs are now a sorted
+  list.  Patch by Mark Roseman.
+
+- Issue #22726: Re-activate the config dialog help button with some content
+  about the other buttons and the new IDLE Dark theme.
+
+- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
+  It is more or less IDLE Classic inverted, with a cobalt blue background.
+  Strings, comments, keywords, ... are still green, red, orange, ... .
+  To use it with IDLEs released before November 2015, hit the
+  'Save as New Custom Theme' button and enter a new name,
+  such as 'Custom Dark'.  The custom theme will work with any IDLE
+  release, and can be modified.
+
+- Issue #25224: README.txt is now an idlelib index for IDLE developers and
+  curious users.  The previous user content is now in the IDLE doc chapter.
+  'IDLE' now means 'Integrated Development and Learning Environment'.
+
+- Issue #24820: Users can now set breakpoint colors in
+  Settings -> Custom Highlighting.  Original patch by Mark Roseman.
+
+- Issue #24972: Inactive selection background now matches active selection
+  background, as configured by users, on all systems.  Found items are now
+  always highlighted on Windows.  Initial patch by Mark Roseman.
+
+- Issue #24570: Idle: make calltip and completion boxes appear on Macs
+  affected by a tk regression.  Initial patch by Mark Roseman.
+
+- Issue #24988: Idle ScrolledList context menus (used in debugger)
+  now work on Mac Aqua.  Patch by Mark Roseman.
+
+- Issue #24801: Make right-click for context menu work on Mac Aqua.
+  Patch by Mark Roseman.
+
+- Issue #25173: Associate tkinter messageboxes with a specific widget.
+  For Mac OSX, make them a 'sheet'.  Patch by Mark Roseman.
+
+- Issue #25198: Enhance the initial html viewer now used for Idle Help.
+  * Properly indent fixed-pitch text (patch by Mark Roseman).
+  * Give code snippet a very Sphinx-like light blueish-gray background.
+  * Re-use initial width and height set by users for shell and editor.
+  * When the Table of Contents (TOC) menu is used, put the section header
+  at the top of the screen.
+
+- Issue #25225: Condense and rewrite Idle doc section on text colors.
+
+- Issue #21995: Explain some differences between IDLE and console Python.
+
+- Issue #22820: Explain need for *print* when running file from Idle editor.
+
+- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
+
+- Issue #25219: Update doc for Idle command line options.
+  Some were missing and notes were not correct.
+
+- Issue #24861: Most of idlelib is private and subject to change.
+  Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
+
+- Issue #25199: Idle: add synchronization comments for future maintainers.
+
+- Issue #16893: Replace help.txt with help.html for Idle doc display.
+  The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
+  It looks better than help.txt and will better document Idle as released.
+  The tkinter html viewer that works for this file was written by Mark Roseman.
+  The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
+
+- Issue #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
+
+- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
+
+- Issue #23672: Allow Idle to edit and run files with astral chars in name.
+  Patch by Mohd Sanad Zaki Rizvi.
+
+- Issue 24745: Idle editor default font. Switch from Courier to
+  platform-sensitive TkFixedFont.  This should not affect current customized
+  font selections.  If there is a problem, edit $HOME/.idlerc/config-main.cfg
+  and remove 'fontxxx' entries from [Editor Window].  Patch by Mark Roseman.
+
+- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
+  Do not print false prompts. Original patch by Adnan Umer.
+
+- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
+
+- Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
+  decoding unicode literals.
+
+Documentation
+-------------
+
+- Issue #24952: Clarify the default size argument of stack_size() in
+  the "threading" and "thread" modules. Patch from Mattip.
+
+- Issue #20769: Improve reload() docs. Patch by Dorian Pula.
+
+- Issue #23589: Remove duplicate sentence from the FAQ.  Patch by Yongzhi Pan.
+
+- Issue #22155: Add File Handlers subsection with createfilehandler to Tkinter
+  doc.  Remove obsolete example from FAQ.  Patch by Martin Panter.
+
+Tests
+-----
+
+- Issue #24751: When running regrtest with the ``-w`` command line option,
+  a test run is no longer marked as a failure if all tests succeed when
+  re-run.
+
+- PCbuild\rt.bat now accepts an unlimited number of arguments to pass along
+  to regrtest.py.  Previously there was a limit of 9.
+
+Build
+-----
+
+- Issue #24915: When doing a PGO build, the test suite is now used instead of
+  pybench; Clang support was also added as part off this work. Initial patch by
+  Alecsandru Patrascu of Intel.
+
+- Issue #24986: It is now possible to build Python on Windows without errors
+  when external libraries are not available.
+
+- Issue #24508: Backported the MSBuild project files from Python 3.5.  The
+  backported files replace the old project files in PCbuild; the old files moved
+  to PC/VS9.0 and remain supported.
+
+- Issue #24603: Update Windows builds and OS X 10.5 installer to use OpenSSL
+  1.0.2d.
+
+Windows
+-------
+
+- Issue #25022: Removed very outdated PC/example_nt/ directory.
+
+
 What's New in Python 2.7.10?
 ============================
 
@@ -21,11 +417,10 @@ What's New in Python 2.7.10 release candidate 1?
 Core and Builtins
 -----------------
 
-- Issue #20274: When calling a _sqlite.Connection, it now complains if passed
-  any keyword arguments.  Previously it silently ignored them.
+- Issue #23971: Fix underestimated presizing in dict.fromkeys().
 
-- Issue #20274: Remove ignored and erroneous "kwargs" parameters from three
-  METH_VARARGS methods on _sqlite.Connection.
+- Issue #23757: PySequence_Tuple() incorrectly called the concrete list API
+  when the data was a list subclass.
 
 - Issue #23629: Fix the default __sizeof__ implementation for variable-sized
   objects.
@@ -40,12 +435,18 @@ Library
 
 - The keywords attribute of functools.partial is now always a dictionary.
 
+- Issue #20274: When calling a _sqlite.Connection, it now complains if passed
+  any keyword arguments.  Previously it silently ignored them.
+
+- Issue #20274: Remove ignored and erroneous "kwargs" parameters from three
+  METH_VARARGS methods on _sqlite.Connection.
+
 - Issue #24134: assertRaises() and assertRaisesRegexp() checks are not longer
   successful if the callable is None.
 
 - Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
 
-- Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq's siftup
+- Issues #24099, #24100, and #24101: Fix use-after-free bug in heapq's siftup
   and siftdown functions.
 
 - Backport collections.deque fixes from Python 3.5.  Prevents reentrant badness
@@ -606,10 +1007,10 @@ IDLE
   Changes are written to HOME/.idlerc/config-extensions.cfg.
   Original patch by Tal Einat.
 
-- Issue #16233: A module browser (File : Class Browser, Alt+C) requires a
+- Issue #16233: A module browser (File : Class Browser, Alt+C) requires an
   editor window with a filename.  When Class Browser is requested otherwise,
   from a shell, output window, or 'Untitled' editor, Idle no longer displays
-  an error box.  It now pops up an  Open Module box (Alt+M). If a valid name
+  an error box.  It now pops up an Open Module box (Alt+M). If a valid name
   is entered and a module is opened, a corresponding browser is also opened.
 
 - Issue #4832: Save As to type Python files automatically adds .py to the
@@ -710,7 +1111,6 @@ Windows
 - Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
 
 
-
 What's New in Python 2.7.8?
 ===========================
 
@@ -748,18 +1148,18 @@ Library
 
 - Issue #21672: Fix the behavior of ntpath.join on UNC-style paths.
 
-- Issue #19145:  The times argument for itertools.repeat now handles
+- Issue #19145: The times argument for itertools.repeat now handles
   negative values the same way for keyword arguments as it does for
   positional arguments.
 
-- Issue #21832:  Require named tuple inputs to be exact strings.
+- Issue #21832: Require named tuple inputs to be exact strings.
 
-- Issue #8343:  Named group error messages in the re module did not show
+- Issue #8343: Named group error messages in the re module did not show
   the name of the erroneous group.
 
 - Issue #21491: SocketServer: Fix a race condition in child processes reaping.
 
-- Issue #21635:  The difflib SequenceMatcher.get_matching_blocks() method
+- Issue #21635: The difflib SequenceMatcher.get_matching_blocks() method
   cache didn't match the actual result.  The former was a list of tuples
   and the latter was a list of named tuples.
 
@@ -796,7 +1196,7 @@ Library
 - Issue #8743: Fix interoperability between set objects and the
   collections.Set() abstract base class.
 
-- Issue #21481:  Argparse equality and inequality tests now return
+- Issue #21481: Argparse equality and inequality tests now return
   NotImplemented when comparing to an unknown type.
 
 IDLE
@@ -863,6 +1263,7 @@ Windows
 - Issue #21671, CVE-2014-0224: The bundled version of OpenSSL has been
   updated to 1.0.1h.
 
+
 What's New in Python 2.7.7
 ==========================
 
@@ -937,7 +1338,7 @@ Library
 - Issue #21470: Do a better job seeding the random number generator by
   using enough bytes to span the full state space of the Mersenne Twister.
 
-- Issue #21469:  Reduced the risk of false positives in robotparser by
+- Issue #21469: Reduced the risk of false positives in robotparser by
   checking to make sure that robots.txt has been read or does not exist
   prior to returning True in can_fetch().
 
@@ -950,8 +1351,9 @@ Library
 - Issue #21349: Passing a memoryview to _winreg.SetValueEx now correctly raises
   a TypeError where it previously crashed the interpreter. Patch by Brian Kearns
 
-- Fix arbitrary memory access in JSONDecoder.raw_decode with a negative second
-  parameter. Bug reported by Guido Vranken.
+- Issue #21529 (CVE-2014-4616): Fix arbitrary memory access in
+  JSONDecoder.raw_decode with a negative second parameter. Bug reported by Guido
+  Vranken.
 
 - Issue #21172: isinstance check relaxed from dict to collections.Mapping.
 
@@ -1434,7 +1836,7 @@ Library
 - Issue #19131: The aifc module now correctly reads and writes sampwidth of
   compressed streams.
 
-- Issue #19158:  a rare race in BoundedSemaphore could allow .release() too
+- Issue #19158: A rare race in BoundedSemaphore could allow .release() too
   often.
 
 - Issue #18037: 2to3 now escapes '\u' and '\U' in native strings.
@@ -2738,7 +3140,7 @@ IDLE
 - Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
   Roger Serwy.
 
-- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu
+- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu.
   Patch by Todd Rovito.
 
 - Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
@@ -2934,7 +3336,7 @@ Tools/Demos
 
 - Issue #16476: Fix json.tool to avoid including trailing whitespace.
 
-- Issue #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py
+- Issue #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py.
   Patch by Serhiy Storchaka.
 
 Documentation
@@ -3435,7 +3837,7 @@ Library
   greater or equal to the default value, the value with which the interpreter
   was built.
 
-- Issue #11802:  The cache in filecmp now has a maximum size of 100 so that
+- Issue #11802: The cache in filecmp now has a maximum size of 100 so that
   it won't grow without bound.
 
 - Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira
@@ -3821,7 +4223,7 @@ Library
 - Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get
   around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
 
-- Issue #10761: Fix tarfile.extractall failure  when symlinked files are
+- Issue #10761: Fix tarfile.extractall failure when symlinked files are
   present. Initial patch by Scott Leerssen.
 
 - Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the
@@ -4332,7 +4734,7 @@ Core and Builtins
 - Issue #8530: Prevent stringlib fastsearch from reading beyond the front
   of an array.
 
-- Issue #83755:  Implicit set-to-frozenset conversion was not thread-safe.
+- Issue #83755: Implicit set-to-frozenset conversion was not thread-safe.
 
 - Issue #9416: Fix some issues with complex formatting where the
   output with no type specifier failed to match the str output:
@@ -4729,7 +5131,7 @@ Extension Modules
   os.getgroups() can now return more than 16 groups on MacOSX.
 
 - Issue #9277: Fix bug in struct.pack for bools in standard mode
-  (e.g., struct.pack('>?')):  if conversion to bool raised an exception
+  (e.g., struct.pack('>?')): if conversion to bool raised an exception
   then that exception wasn't properly propagated on machines where
   char is unsigned.
 
@@ -4777,7 +5179,7 @@ Build
 - Issue #9275: The OSX installer once again installs links to binaries in
   ``/usr/local/bin``.
 
-- Issue #9392: A framework build on OSX  will once again use a versioned name
+- Issue #9392: A framework build on OSX will once again use a versioned name
   of the ``2to3`` tool, that is you can use ``2to3-2.7`` to select the Python
   2.7 edition of 2to3.
 
@@ -6736,7 +7138,7 @@ Library
 
 - Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6
 
-- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...)  does now
+- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now
   always result in NULL.
 
 - Issue #5042: ctypes Structure sub-subclass does now initialize correctly with
@@ -7581,7 +7983,7 @@ IDLE
   wasn't working with file paths containing spaces.
 
 - Issue #5783: Windows: Version string for the .chm help file changed,
-  file not being accessed  Patch by Guilherme Polo/
+  file not being accessed.  Patch by Guilherme Polo/
 
 - Issue #1529142: Allow multiple IDLE GUI/subprocess pairs to exist
   simultaneously. Thanks to David Scherer for suggesting the use of an
@@ -8277,7 +8679,7 @@ Library
 
 - Issue #3437: Bug fix in robotparser parsing of Allow: lines.
 
-- Issue #1592:  Improve error reporting when operations are attempted
+- Issue #1592: Improve error reporting when operations are attempted
   on a closed shelf.
 
 - Deprecate the "ast" parser function aliases.
@@ -8499,7 +8901,7 @@ Core and Builtins
 
 - Add future_builtins.ascii().
 
-- Several set methods now accept multiple arguments:  update(), union(),
+- Several set methods now accept multiple arguments: update(), union(),
   intersection(), intersection_update(), difference(), and difference_update().
 
 - Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.
@@ -8535,7 +8937,7 @@ Extension Modules
 -----------------
 - Issue #1179: [CVE-2007-4965] Integer overflow in imageop module.
 
-- Issue #3116:  marshal.dumps() had quadratic behavior for strings > 32Mb.
+- Issue #3116: marshal.dumps() had quadratic behavior for strings > 32Mb.
 
 - Issue #2138: Add factorial() to the math module.
 
@@ -9517,9 +9919,9 @@ Core and builtins
 - When __slots__ are set to a unicode string, make it work the same as
   setting a plain string, ie don't expand to single letter identifiers.
 
-- Request #1191699:  Slices can now be pickled.
+- Request #1191699: Slices can now be pickled.
 
-- Request #1193128:  str.translate() now allows a None argument for
+- Request #1193128: str.translate() now allows a None argument for
   translations that only remove characters without re-mapping the
   remaining characters.
 
@@ -11038,3 +11440,4 @@ Mac
 ----
 
 **(For information about older versions, consult the HISTORY file.)**
+
index d87902f46182fd375421a2174140b3c133eed3c8..054fbb5e9b6002bd981f440003a20845d0595a01 100644 (file)
@@ -289,9 +289,9 @@ executes a
 from that file;
 when called with
 .B \-c
-.I command,
+.IR command ,
 it executes the Python statement(s) given as
-.I command.
+.IR command .
 Here
 .I command
 may contain multiple statements separated by newlines.
@@ -301,7 +301,7 @@ executed.
 .PP
 If available, the script name and additional arguments thereafter are
 passed to the script in the Python variable
-.I sys.argv ,
+.IR sys.argv ,
 which is a list of strings (you must first
 .I import sys
 to be able to access it).
@@ -315,14 +315,14 @@ contains the string
 .I '-c'.
 Note that options interpreted by the Python interpreter itself
 are not placed in
-.I sys.argv.
+.IR sys.argv .
 .PP
 In interactive mode, the primary prompt is `>>>'; the second prompt
 (which appears when a command is not complete) is `...'.
 The prompts can be changed by assignment to
 .I sys.ps1
 or
-.I sys.ps2.
+.IR sys.ps2 .
 The interpreter quits when it reads an EOF at a prompt.
 When an unhandled exception occurs, a stack trace is printed and
 control returns to the primary prompt; in non-interactive mode, the
@@ -381,7 +381,7 @@ If a script argument is given, the directory containing the script is
 inserted in the path in front of $PYTHONPATH.
 The search path can be manipulated from within a Python program as the
 variable
-.I sys.path .
+.IR sys.path .
 .IP PYTHONSTARTUP
 If this is the name of a readable file, the Python commands in that
 file are executed before the first prompt is displayed in interactive
@@ -452,7 +452,7 @@ The integer must be a decimal number in the range [0,4294967295].  Specifying
 the value 0 will lead to the same hash values as when hash randomization is
 disabled.
 .SH AUTHOR
-The Python Software Foundation: https://www.python.org/psf
+The Python Software Foundation: https://www.python.org/psf/
 .SH INTERNET RESOURCES
 Main website:  https://www.python.org/
 .br
index e50fc4bf9746788af4b531784758422dfd79c7ce..a7e26506cfdd4f39f4e4030f4b92d3cc1d609c7a 100644 (file)
 ###}
 ###
 ###{
+###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
+###   Memcheck:Addr8
+###   fun:PyObject_Free
+###}
+###
+###{
+###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
+###   Memcheck:Value8
+###   fun:PyObject_Free
+###}
+###
+###{
 ###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
 ###   Memcheck:Cond
 ###   fun:PyObject_Free
 ###}
 ###
 ###{
+###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
+###   Memcheck:Addr8
+###   fun:PyObject_Realloc
+###}
+###
+###{
+###   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
+###   Memcheck:Value8
+###   fun:PyObject_Realloc
+###}
+###
+###{
 ###   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
 ###   Memcheck:Cond
 ###   fun:PyObject_Realloc
index 203bba26727262a2443f9a2533264d80fb5275ad..408efc3f636927ecd46c24c9774690fec4a8f0fb 100644 (file)
@@ -3454,9 +3454,11 @@ DB_verify(DBObject* self, PyObject* args, PyObject* kwargs)
 
         error=DB_close_internal(self, 0, 1);
         if (error) {
-          return error;
+            if (outFile)
+                fclose(outFile);
+            return error;
         }
-     }
+    }
 
     MYDB_BEGIN_ALLOW_THREADS;
     err = self->db->verify(self->db, fileName, dbName, outFile, flags);
index 5080a5b9d9cec71825b2b6f1faed7fbd99871fa9..aaac660131a08d921f6ea8d982a562842d363d61 100644 (file)
@@ -644,16 +644,73 @@ PyDoc_STRVAR(remove_doc,
 static void
 deque_clear(dequeobject *deque)
 {
+    block *b;
+    block *prevblock;
+    block *leftblock;
+    Py_ssize_t leftindex;
+    Py_ssize_t n;
     PyObject *item;
 
+    if (deque->len == 0)
+        return;
+
+    /* During the process of clearing a deque, decrefs can cause the
+       deque to mutate.  To avoid fatal confusion, we have to make the
+       deque empty before clearing the blocks and never refer to
+       anything via deque->ref while clearing.  (This is the same
+       technique used for clearing lists, sets, and dicts.)
+
+       Making the deque empty requires allocating a new empty block.  In
+       the unlikely event that memory is full, we fall back to an
+       alternate method that doesn't require a new block.  Repeating
+       pops in a while-loop is slower, possibly re-entrant (and a clever
+       adversary could cause it to never terminate).
+    */
+
+    b = newblock(NULL, NULL, 0);
+    if (b == NULL) {
+        PyErr_Clear();
+        goto alternate_method;
+    }
+
+    /* Remember the old size, leftblock, and leftindex */
+    leftblock = deque->leftblock;
+    leftindex = deque->leftindex;
+    n = deque->len;
+
+    /* Set the deque to be empty using the newly allocated block */
+    deque->len = 0;
+    deque->leftblock = b;
+    deque->rightblock = b;
+    deque->leftindex = CENTER + 1;
+    deque->rightindex = CENTER;
+    deque->state++;
+
+    /* Now the old size, leftblock, and leftindex are disconnected from
+       the empty deque and we can use them to decref the pointers.
+    */
+    while (n--) {
+        item = leftblock->data[leftindex];
+        Py_DECREF(item);
+        leftindex++;
+        if (leftindex == BLOCKLEN && n) {
+            assert(leftblock->rightlink != NULL);
+            prevblock = leftblock;
+            leftblock = leftblock->rightlink;
+            leftindex = 0;
+            freeblock(prevblock);
+        }
+    }
+    assert(leftblock->rightlink == NULL);
+    freeblock(leftblock);
+    return;
+
+  alternate_method:
     while (deque->len) {
         item = deque_pop(deque, NULL);
         assert (item != NULL);
         Py_DECREF(item);
     }
-    assert(deque->leftblock == deque->rightblock &&
-           deque->leftindex - 1 == deque->rightindex &&
-           deque->len == 0);
 }
 
 static PyObject *
@@ -1029,7 +1086,8 @@ deque_init(dequeobject *deque, PyObject *args, PyObject *kwdargs)
         }
     }
     deque->maxlen = maxlen;
-    deque_clear(deque);
+    if (deque->len > 0)
+        deque_clear(deque);
     if (iterable != NULL) {
         PyObject *rv = deque_extend(deque, iterable);
         if (rv == NULL)
@@ -1595,7 +1653,7 @@ defdict_init(PyObject *self, PyObject *args, PyObject *kwds)
             newdefault = PyTuple_GET_ITEM(args, 0);
             if (!PyCallable_Check(newdefault) && newdefault != Py_None) {
                 PyErr_SetString(PyExc_TypeError,
-                    "first argument must be callable");
+                    "first argument must be callable or None");
                 return -1;
             }
         }
index 00f5d002cdda778b62ad351c93a3b7317a54469f..884e051830741e2be6550810989be07f3c4f7594 100644 (file)
@@ -1520,7 +1520,7 @@ PyDoc_STRVAR(csv_reader_doc,
 "provided by the dialect.\n"
 "\n"
 "The returned object is an iterator.  Each iteration returns a row\n"
-"of the CSV file (which can span multiple input lines):\n");
+"of the CSV file (which can span multiple input lines).\n");
 
 PyDoc_STRVAR(csv_writer_doc,
 "    csv_writer = csv.writer(fileobj [, dialect='excel']\n"
index 76c72f877a7cdf35ffa3879bf6a586c734a29366..85b5ad28903fb10f8e4e668c26a16d0168c3a5db 100644 (file)
@@ -769,6 +769,7 @@ I_set_sw(void *ptr, PyObject *value, Py_ssize_t size)
     if (get_ulong(value, &val) < 0)
         return  NULL;
     memcpy(&field, ptr, sizeof(field));
+    field = SWAP_INT(field);
     field = SET(unsigned int, field, (unsigned int)val, size);
     field = SWAP_INT(field);
     memcpy(ptr, &field, sizeof(field));
index 3e9f9dfdc12ef6e8afc670708a8c9091239684d3..837164cd4b4a551e5cc589d2c394e18958d7ed22 100644 (file)
@@ -756,7 +756,7 @@ static PyObject*
 element_extend(ElementObject* self, PyObject* args)
 {
     PyObject* seq;
-    Py_ssize_t i, seqlen = 0;
+    Py_ssize_t i;
 
     PyObject* seq_in;
     if (!PyArg_ParseTuple(args, "O:extend", &seq_in))
@@ -771,8 +771,7 @@ element_extend(ElementObject* self, PyObject* args)
         return NULL;
     }
 
-    seqlen = PySequence_Size(seq);
-    for (i = 0; i < seqlen; i++) {
+    for (i = 0; i < PySequence_Fast_GET_SIZE(seq); i++) {
         PyObject* element = PySequence_Fast_GET_ITEM(seq, i);
         if (element_add_subelement(self, element) < 0) {
             Py_DECREF(seq);
@@ -805,11 +804,16 @@ element_find(ElementObject* self, PyObject* args)
         
     for (i = 0; i < self->extra->length; i++) {
         PyObject* item = self->extra->children[i];
-        if (Element_CheckExact(item) &&
-            PyObject_Compare(((ElementObject*)item)->tag, tag) == 0) {
-            Py_INCREF(item);
+        int rc;
+        if (!Element_CheckExact(item))
+            continue;
+        Py_INCREF(item);
+        rc = PyObject_Compare(((ElementObject*)item)->tag, tag);
+        if (rc == 0)
             return item;
-        }
+        Py_DECREF(item);
+        if (rc < 0 && PyErr_Occurred())
+            return NULL;
     }
 
     Py_RETURN_NONE;
@@ -838,13 +842,24 @@ element_findtext(ElementObject* self, PyObject* args)
 
     for (i = 0; i < self->extra->length; i++) {
         ElementObject* item = (ElementObject*) self->extra->children[i];
-        if (Element_CheckExact(item) && !PyObject_Compare(item->tag, tag)) {
+        int rc;
+        if (!Element_CheckExact(item))
+            continue;
+        Py_INCREF(item);
+        rc = PyObject_Compare(item->tag, tag);
+        if (rc == 0) {
             PyObject* text = element_get_text(item);
-            if (text == Py_None)
+            if (text == Py_None) {
+                Py_DECREF(item);
                 return PyString_FromString("");
+            }
             Py_XINCREF(text);
+            Py_DECREF(item);
             return text;
         }
+        Py_DECREF(item);
+        if (rc < 0 && PyErr_Occurred())
+            return NULL;
     }
 
     Py_INCREF(default_value);
@@ -876,12 +891,17 @@ element_findall(ElementObject* self, PyObject* args)
 
     for (i = 0; i < self->extra->length; i++) {
         PyObject* item = self->extra->children[i];
-        if (Element_CheckExact(item) &&
-            PyObject_Compare(((ElementObject*)item)->tag, tag) == 0) {
-            if (PyList_Append(out, item) < 0) {
-                Py_DECREF(out);
-                return NULL;
-            }
+        int rc;
+        if (!Element_CheckExact(item))
+            continue;
+        Py_INCREF(item);
+        rc = PyObject_Compare(((ElementObject*)item)->tag, tag);
+        if (rc == 0)
+            rc = PyList_Append(out, item);
+        Py_DECREF(item);
+        if (rc < 0 && PyErr_Occurred()) {
+            Py_DECREF(out);
+            return NULL;
         }
     }
 
@@ -1147,8 +1167,10 @@ static PyObject*
 element_remove(ElementObject* self, PyObject* args)
 {
     int i;
-
+    int rc;
     PyObject* element;
+    PyObject* found;
+
     if (!PyArg_ParseTuple(args, "O!:remove", &Element_Type, &element))
         return NULL;
 
@@ -1164,11 +1186,14 @@ element_remove(ElementObject* self, PyObject* args)
     for (i = 0; i < self->extra->length; i++) {
         if (self->extra->children[i] == element)
             break;
-        if (PyObject_Compare(self->extra->children[i], element) == 0)
+        rc = PyObject_Compare(self->extra->children[i], element);
+        if (rc == 0)
             break;
+        if (rc < 0 && PyErr_Occurred())
+            return NULL;
     }
 
-    if (i == self->extra->length) {
+    if (i >= self->extra->length) {
         /* element is not in children, so raise exception */
         PyErr_SetString(
             PyExc_ValueError,
@@ -1177,13 +1202,13 @@ element_remove(ElementObject* self, PyObject* args)
         return NULL;
     }
 
-    Py_DECREF(self->extra->children[i]);
+    found = self->extra->children[i];
 
     self->extra->length--;
-
     for (; i < self->extra->length; i++)
         self->extra->children[i] = self->extra->children[i+1];
 
+    Py_DECREF(found);
     Py_RETURN_NONE;
 }
 
index df53e96520620022355a0c9970ba017b109c759e..01f457780819bc3e8c6f5a5205ebcb02ca84e4ff 100644 (file)
@@ -532,8 +532,8 @@ PKCS5_PBKDF2_HMAC_fast(const char *pass, int passlen,
         HMAC_CTX_cleanup(&hctx_tpl);
         return 0;
     }
-    while(tkeylen) {
-        if(tkeylen > mdlen)
+    while (tkeylen) {
+        if (tkeylen > mdlen)
             cplen = mdlen;
         else
             cplen = tkeylen;
index d0ddb09fb1593372a9d3ce5ca4a06a9f69e40141..be301a62fc6222a833a8ecd078be1a7040084f23 100644 (file)
@@ -244,6 +244,11 @@ heappushpop(PyObject *self, PyObject *args)
         return item;
     }
 
+    if (PyList_GET_SIZE(heap) == 0) {
+        PyErr_SetString(PyExc_IndexError, "index out of range");
+        return NULL;
+    }
+
     returnitem = PyList_GET_ITEM(heap, 0);
     Py_INCREF(item);
     PyList_SET_ITEM(heap, 0, item);
index df8a7f94cd4ba03eba7d4c160d449d830841b784..9719cb76733be675c150af40da994c4a9296ad5b 100644 (file)
@@ -626,6 +626,10 @@ pack_string(ProfilerObject *self, const char *s, Py_ssize_t len)
     if (len + PISIZE + self->index >= BUFFERSIZE) {
         if (flush_data(self) < 0)
             return -1;
+        if (len + PISIZE + self->index >= BUFFERSIZE) {
+            PyErr_SetString(PyExc_ValueError, "string too large for internal buffer");
+            return -1;
+        }
     }
     assert(len < INT_MAX);
     if (pack_packed_int(self, (int)len) < 0)
index c282e612173c153ee956f1f0615a2292ed6b2c55..79aaa90e8a9c4004bbf1411ed9de67c515c2537d 100644 (file)
@@ -52,7 +52,12 @@ extern PyObject *_PyIncrementalNewlineDecoder_decode(
    which can be safely put aside until another search.
    
    NOTE: for performance reasons, `end` must point to a NUL character ('\0'). 
-   Otherwise, the function will scan further and return garbage. */
+   Otherwise, the function will scan further and return garbage.
+
+   There are three modes, in order of priority:
+   * translated: Only find \n (assume newlines already translated)
+   * universal: Use universal newlines algorithm
+   * Otherwise, the line ending is specified by readnl, a str object */
 extern Py_ssize_t _PyIO_find_line_ending(
     int translated, int universal, PyObject *readnl,
     Py_UNICODE *start, Py_UNICODE *end, Py_ssize_t *consumed);
index 64983206477d50cd8533cae36da1fa723c0302ce..f643e9124d5fd363ded0ce4b56f9001b913deef8 100644 (file)
@@ -490,7 +490,7 @@ bytesio_iternext(bytesio *self)
 }
 
 PyDoc_STRVAR(seek_doc,
-"seek(pos, whence=0) -> int.  Change stream position.\n"
+"seek(pos[, whence]) -> int.  Change stream position.\n"
 "\n"
 "Seek to byte offset pos relative to position indicated by whence:\n"
 "     0  Start of stream (the default).  pos should be >= 0;\n"
index 8ac8a4acdea6e0eae598e92a88d4bfebf6a97b78..9981d4c3ba32c63d57bfb125f9bba12080e3d155 100644 (file)
@@ -826,7 +826,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
     char *kwlist[] = {"buffer", "encoding", "errors",
                       "newline", "line_buffering",
                       NULL};
-    PyObject *buffer, *raw;
+    PyObject *buffer, *raw, *codec_info = NULL;
     char *encoding = NULL;
     char *errors = NULL;
     char *newline = NULL;
@@ -909,6 +909,17 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
                         "could not determine default encoding");
     }
 
+    /* Check we have been asked for a real text encoding */
+    codec_info = _PyCodec_LookupTextEncoding(encoding, "codecs.open()");
+    if (codec_info == NULL) {
+        Py_CLEAR(self->encoding);
+        goto error;
+    }
+
+    /* XXX: Failures beyond this point have the potential to leak elements
+     * of the partially constructed object (like self->encoding)
+     */
+
     if (errors == NULL)
         errors = "strict";
     self->errors = PyBytes_FromString(errors);
@@ -922,7 +933,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
     if (newline) {
         self->readnl = PyString_FromString(newline);
         if (self->readnl == NULL)
-            return -1;
+            goto error;
     }
     self->writetranslate = (newline == NULL || newline[0] != '\0');
     if (!self->readuniversal && self->writetranslate) {
@@ -944,8 +955,8 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
     if (r == -1)
         goto error;
     if (r == 1) {
-        self->decoder = PyCodec_IncrementalDecoder(
-            encoding, errors);
+        self->decoder = _PyCodecInfo_GetIncrementalDecoder(codec_info,
+                                                           errors);
         if (self->decoder == NULL)
             goto error;
 
@@ -969,17 +980,12 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
     if (r == -1)
         goto error;
     if (r == 1) {
-        PyObject *ci;
-        self->encoder = PyCodec_IncrementalEncoder(
-            encoding, errors);
+        self->encoder = _PyCodecInfo_GetIncrementalEncoder(codec_info,
+                                                           errors);
         if (self->encoder == NULL)
             goto error;
         /* Get the normalized named of the codec */
-        ci = _PyCodec_Lookup(encoding);
-        if (ci == NULL)
-            goto error;
-        res = PyObject_GetAttrString(ci, "name");
-        Py_DECREF(ci);
+        res = PyObject_GetAttrString(codec_info, "name");
         if (res == NULL) {
             if (PyErr_ExceptionMatches(PyExc_AttributeError))
                 PyErr_Clear();
@@ -999,6 +1005,9 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
         Py_XDECREF(res);
     }
 
+    /* Finished sorting out the codec details */
+    Py_DECREF(codec_info);
+
     self->buffer = buffer;
     Py_INCREF(buffer);
 
@@ -1059,6 +1068,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
     return 0;
 
   error:
+    Py_XDECREF(codec_info);
     return -1;
 }
 
index c91340955adbe4a10e7764695b753b153a4c0c9b..5dac038902cb6a3843b19a72c75ea6b369e7939d 100644 (file)
@@ -874,6 +874,9 @@ _parse_object_str(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_
     int strict = PyObject_IsTrue(s->strict);
     Py_ssize_t next_idx;
 
+    if (strict < 0)
+        return NULL;
+
     pairs = PyList_New(0);
     if (pairs == NULL)
         return NULL;
@@ -997,6 +1000,9 @@ _parse_object_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ss
     int strict = PyObject_IsTrue(s->strict);
     Py_ssize_t next_idx;
 
+    if (strict < 0)
+        return NULL;
+
     pairs = PyList_New(0);
     if (pairs == NULL)
         return NULL;
@@ -1466,6 +1472,7 @@ scan_once_str(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *n
     Returns a new PyObject representation of the term.
     */
     PyObject *res;
+    int strict;
     char *str = PyString_AS_STRING(pystr);
     Py_ssize_t length = PyString_GET_SIZE(pystr);
     if (idx < 0) {
@@ -1479,10 +1486,11 @@ scan_once_str(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *n
     switch (str[idx]) {
         case '"':
             /* string */
+            strict = PyObject_IsTrue(s->strict);
+            if (strict < 0)
+                return NULL;
             return scanstring_str(pystr, idx + 1,
-                PyString_AS_STRING(s->encoding),
-                PyObject_IsTrue(s->strict),
-                next_idx_ptr);
+                PyString_AS_STRING(s->encoding), strict, next_idx_ptr);
         case '{':
             /* object */
             if (Py_EnterRecursiveCall(" while decoding a JSON object "
@@ -1557,6 +1565,7 @@ scan_once_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_
     Returns a new PyObject representation of the term.
     */
     PyObject *res;
+    int strict;
     Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr);
     Py_ssize_t length = PyUnicode_GET_SIZE(pystr);
     if (idx < 0) {
@@ -1570,9 +1579,10 @@ scan_once_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_
     switch (str[idx]) {
         case '"':
             /* string */
-            return scanstring_unicode(pystr, idx + 1,
-                PyObject_IsTrue(s->strict),
-                next_idx_ptr);
+            strict = PyObject_IsTrue(s->strict);
+            if (strict < 0)
+                return NULL;
+            return scanstring_unicode(pystr, idx + 1, strict, next_idx_ptr);
         case '{':
             /* object */
             if (Py_EnterRecursiveCall(" while decoding a JSON object "
@@ -1825,16 +1835,28 @@ encoder_init(PyObject *self, PyObject *args, PyObject *kwds)
 
     PyEncoderObject *s;
     PyObject *markers, *defaultfn, *encoder, *indent, *key_separator;
-    PyObject *item_separator, *sort_keys, *skipkeys, *allow_nan;
+    PyObject *item_separator, *sort_keys, *skipkeys, *allow_nan_obj;
+    int allow_nan;
 
     assert(PyEncoder_Check(self));
     s = (PyEncoderObject *)self;
 
     if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOOOOOOOO:make_encoder", kwlist,
         &markers, &defaultfn, &encoder, &indent, &key_separator, &item_separator,
-        &sort_keys, &skipkeys, &allow_nan))
+        &sort_keys, &skipkeys, &allow_nan_obj))
         return -1;
 
+    allow_nan = PyObject_IsTrue(allow_nan_obj);
+    if (allow_nan < 0)
+        return -1;
+
+    if (markers != Py_None && !PyDict_Check(markers)) {
+        PyErr_Format(PyExc_TypeError,
+                     "make_encoder() argument 1 must be dict or None, "
+                     "not %.200s", Py_TYPE(markers)->tp_name);
+        return -1;
+    }
+
     s->markers = markers;
     s->defaultfn = defaultfn;
     s->encoder = encoder;
@@ -1844,7 +1866,7 @@ encoder_init(PyObject *self, PyObject *args, PyObject *kwds)
     s->sort_keys = sort_keys;
     s->skipkeys = skipkeys;
     s->fast_encode = (PyCFunction_Check(s->encoder) && PyCFunction_GetFunction(s->encoder) == (PyCFunction)py_encode_basestring_ascii);
-    s->allow_nan = PyObject_IsTrue(allow_nan);
+    s->allow_nan = allow_nan;
 
     Py_INCREF(s->markers);
     Py_INCREF(s->defaultfn);
@@ -2110,6 +2132,8 @@ encoder_listencode_dict(PyEncoderObject *s, PyObject *rval, PyObject *dct, Py_ss
     if (it == NULL)
         goto bail;
     skipkeys = PyObject_IsTrue(s->skipkeys);
+    if (skipkeys < 0)
+        goto bail;
     idx = 0;
     while ((key = PyIter_Next(it)) != NULL) {
         PyObject *encoded;
@@ -2402,6 +2426,8 @@ init_json(void)
     if (PyType_Ready(&PyEncoderType) < 0)
         return;
     m = Py_InitModule3("_json", speedups_methods, module_doc);
+    if (m == NULL)
+        return;
     Py_INCREF((PyObject*)&PyScannerType);
     PyModule_AddObject(m, "make_scanner", (PyObject*)&PyScannerType);
     Py_INCREF((PyObject*)&PyEncoderType);
index 8bb9e37d16bfe4e9425b6f71b501501571644f22..480df92eed289b4b6fdeb3769be6a16aa397010c 100644 (file)
@@ -363,6 +363,10 @@ random_setstate(RandomObject *self, PyObject *state)
     index = PyLong_AsLong(PyTuple_GET_ITEM(state, i));
     if (index == -1 && PyErr_Occurred())
         return NULL;
+    if (index < 0 || index > N) {
+        PyErr_SetString(PyExc_ValueError, "invalid state");
+        return NULL;
+    }
     self->index = (int)index;
 
     Py_INCREF(Py_None);
index 02373f002ea01ff9f84585788b2b9d014d8608d8..9ebe7b7b81fb4dbd3dbd8def343e4a43637af1fb 100644 (file)
@@ -47,7 +47,7 @@ pysqlite_row_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     if (!PyArg_ParseTuple(args, "OO", &cursor, &data))
         return NULL;
 
-    if (!PyObject_IsInstance((PyObject*)cursor, (PyObject*)&pysqlite_CursorType)) {
+    if (!PyObject_TypeCheck((PyObject*)cursor, &pysqlite_CursorType)) {
         PyErr_SetString(PyExc_TypeError, "instance of cursor required for first argument");
         return NULL;
     }
index ec98182b235dfac1ef3d84fb32e56b5a307f2ffb..8ef8c2ccc62874c2fc177db21d612714b257b26f 100644 (file)
@@ -351,7 +351,7 @@ SRE_AT(SRE_STATE* state, SRE_CHAR* ptr, SRE_CODE at)
                 SRE_IS_LINEBREAK((int) ptr[-1]));
 
     case SRE_AT_END:
-        return (((void*) (ptr+1) == state->end &&
+        return (((SRE_CHAR *)state->end - ptr == 1 &&
                  SRE_IS_LINEBREAK((int) ptr[0])) ||
                 ((void*) ptr == state->end));
 
@@ -1404,9 +1404,9 @@ entrance:
             /* <ASSERT> <skip> <back> <pattern> */
             TRACE(("|%p|%p|ASSERT %d\n", ctx->pattern,
                    ctx->ptr, ctx->pattern[1]));
-            state->ptr = ctx->ptr - ctx->pattern[1];
-            if (state->ptr < state->beginning)
+            if (ctx->ptr - (SRE_CHAR *)state->beginning < (Py_ssize_t)ctx->pattern[1])
                 RETURN_FAILURE;
+            state->ptr = ctx->ptr - ctx->pattern[1];
             DO_JUMP(JUMP_ASSERT, jump_assert, ctx->pattern+2);
             RETURN_ON_FAILURE(ret);
             ctx->pattern += ctx->pattern[0];
@@ -1417,8 +1417,8 @@ entrance:
             /* <ASSERT_NOT> <skip> <back> <pattern> */
             TRACE(("|%p|%p|ASSERT_NOT %d\n", ctx->pattern,
                    ctx->ptr, ctx->pattern[1]));
-            state->ptr = ctx->ptr - ctx->pattern[1];
-            if (state->ptr >= state->beginning) {
+            if (ctx->ptr - (SRE_CHAR *)state->beginning >= (Py_ssize_t)ctx->pattern[1]) {
+                state->ptr = ctx->ptr - ctx->pattern[1];
                 DO_JUMP(JUMP_ASSERT_NOT, jump_assert_not, ctx->pattern+2);
                 if (ret) {
                     RETURN_ON_ERROR(ret);
@@ -1510,12 +1510,20 @@ SRE_SEARCH(SRE_STATE* state, SRE_CODE* pattern)
     SRE_CODE* overlap = NULL;
     int flags = 0;
 
+    if (ptr > end)
+        return 0;
+
     if (pattern[0] == SRE_OP_INFO) {
         /* optimization info block */
         /* <INFO> <1=skip> <2=flags> <3=min> <4=max> <5=prefix info>  */
 
         flags = pattern[2];
 
+        if (pattern[3] && end - ptr < (Py_ssize_t)pattern[3]) {
+            TRACE(("reject (got %u chars, need %u)\n",
+                   (unsigned int)(end - ptr), pattern[3]));
+            return 0;
+        }
         if (pattern[3] > 1) {
             /* adjust end point (but make sure we leave at least one
                character in there, so literal search will work) */
@@ -1614,15 +1622,18 @@ SRE_SEARCH(SRE_STATE* state, SRE_CODE* pattern)
                 break;
             ptr++;
         }
-    } else
+    } else {
         /* general case */
-        while (ptr <= end) {
+        assert(ptr <= end);
+        while (1) {
             TRACE(("|%p|%p|SEARCH\n", pattern, ptr));
-            state->start = state->ptr = ptr++;
+            state->start = state->ptr = ptr;
             status = SRE_MATCH(state, pattern);
-            if (status != 0)
+            if (status != 0 || ptr >= end)
                 break;
+            ptr++;
         }
+    }
 
     return status;
 }
@@ -2295,7 +2306,7 @@ pattern_split(PatternObject* self, PyObject* args, PyObject* kw)
         }
 
         if (state.start == state.ptr) {
-            if (last == state.end)
+            if (last == state.end || state.ptr == state.end)
                 break;
             /* skip one character */
             state.start = (void*) ((char*) state.ptr + state.charsize);
@@ -2497,6 +2508,8 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string,
 
 next:
         /* move on */
+        if (state.ptr == state.end)
+            break;
         if (state.ptr == state.start)
             state.start = (void*) ((char*) state.ptr + state.charsize);
         else
@@ -3843,6 +3856,9 @@ scanner_match(ScannerObject* self, PyObject *unused)
     PyObject* match;
     int status;
 
+    if (state->start == NULL)
+        Py_RETURN_NONE;
+
     state_reset(state);
 
     state->ptr = state->start;
@@ -3860,10 +3876,14 @@ scanner_match(ScannerObject* self, PyObject *unused)
     match = pattern_new_match((PatternObject*) self->pattern,
                                state, status);
 
-    if (status == 0 || state->ptr == state->start)
+    if (status == 0)
+        state->start = NULL;
+    else if (state->ptr != state->start)
+        state->start = state->ptr;
+    else if (state->ptr != state->end)
         state->start = (void*) ((char*) state->ptr + state->charsize);
     else
-        state->start = state->ptr;
+        state->start = NULL;
 
     return match;
 }
@@ -3876,6 +3896,9 @@ scanner_search(ScannerObject* self, PyObject *unused)
     PyObject* match;
     int status;
 
+    if (state->start == NULL)
+        Py_RETURN_NONE;
+
     state_reset(state);
 
     state->ptr = state->start;
@@ -3893,10 +3916,14 @@ scanner_search(ScannerObject* self, PyObject *unused)
     match = pattern_new_match((PatternObject*) self->pattern,
                                state, status);
 
-    if (status == 0 || state->ptr == state->start)
+    if (status == 0)
+        state->start = NULL;
+    else if (state->ptr != state->start)
+        state->start = state->ptr;
+    else if (state->ptr != state->end)
         state->start = (void*) ((char*) state->ptr + state->charsize);
     else
-        state->start = state->ptr;
+        state->start = NULL;
 
     return match;
 }
index b7537e6c72bc80cc3905eadcd66d1cdb54c9a5d7..89f2aaa02ddae6dfb7aeb7c2a1b086e79cf5c0d0 100644 (file)
@@ -965,7 +965,10 @@ _get_aia_uri(X509 *certificate, int nid) {
     AUTHORITY_INFO_ACCESS *info;
 
     info = X509_get_ext_d2i(certificate, NID_info_access, NULL, NULL);
-    if ((info == NULL) || (sk_ACCESS_DESCRIPTION_num(info) == 0)) {
+    if (info == NULL)
+        return Py_None;
+    if (sk_ACCESS_DESCRIPTION_num(info) == 0) {
+        AUTHORITY_INFO_ACCESS_free(info);
         return Py_None;
     }
 
@@ -1015,25 +1018,23 @@ _get_aia_uri(X509 *certificate, int nid) {
 static PyObject *
 _get_crl_dp(X509 *certificate) {
     STACK_OF(DIST_POINT) *dps;
-    int i, j, result;
-    PyObject *lst;
+    int i, j;
+    PyObject *lst, *res = NULL;
 
 #if OPENSSL_VERSION_NUMBER < 0x10001000L
-    dps = X509_get_ext_d2i(certificate, NID_crl_distribution_points,
-                           NULL, NULL);
+    dps = X509_get_ext_d2i(certificate, NID_crl_distribution_points, NULL, NULL);
 #else
     /* Calls x509v3_cache_extensions and sets up crldp */
     X509_check_ca(certificate);
     dps = certificate->crldp;
 #endif
 
-    if (dps == NULL) {
+    if (dps == NULL)
         return Py_None;
-    }
 
-    if ((lst = PyList_New(0)) == NULL) {
-        return NULL;
-    }
+    lst = PyList_New(0);
+    if (lst == NULL)
+        goto done;
 
     for (i=0; i < sk_DIST_POINT_num(dps); i++) {
         DIST_POINT *dp;
@@ -1046,6 +1047,7 @@ _get_crl_dp(X509 *certificate) {
             GENERAL_NAME *gn;
             ASN1_IA5STRING *uri;
             PyObject *ouri;
+            int err;
 
             gn = sk_GENERAL_NAME_value(gns, j);
             if (gn->type != GEN_URI) {
@@ -1054,28 +1056,25 @@ _get_crl_dp(X509 *certificate) {
             uri = gn->d.uniformResourceIdentifier;
             ouri = PyUnicode_FromStringAndSize((char *)uri->data,
                                                uri->length);
-            if (ouri == NULL) {
-                Py_DECREF(lst);
-                return NULL;
-            }
-            result = PyList_Append(lst, ouri);
+            if (ouri == NULL)
+                goto done;
+
+            err = PyList_Append(lst, ouri);
             Py_DECREF(ouri);
-            if (result < 0) {
-                Py_DECREF(lst);
-                return NULL;
-            }
+            if (err < 0)
+                goto done;
         }
     }
-    /* convert to tuple or None */
-    if (PyList_Size(lst) == 0) {
-        Py_DECREF(lst);
-        return Py_None;
-    } else {
-        PyObject *tup;
-        tup = PyList_AsTuple(lst);
-        Py_DECREF(lst);
-        return tup;
-    }
+
+    /* Convert to tuple. */
+    res = (PyList_GET_SIZE(lst) > 0) ? PyList_AsTuple(lst) : Py_None;
+
+  done:
+    Py_XDECREF(lst);
+#if OPENSSL_VERSION_NUMBER < 0x10001000L
+    sk_DIST_POINT_free(dps);
+#endif
+    return res;
 }
 
 static PyObject *
@@ -2050,6 +2049,8 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
     options = SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
     if (proto_version != PY_SSL_VERSION_SSL2)
         options |= SSL_OP_NO_SSLv2;
+    if (proto_version != PY_SSL_VERSION_SSL3)
+        options |= SSL_OP_NO_SSLv3;
     SSL_CTX_set_options(self->ctx, options);
 
 #ifndef OPENSSL_NO_ECDH
@@ -2788,7 +2789,7 @@ load_verify_locations(PySSLContext *self, PyObject *args, PyObject *kwds)
             cadata_ascii = PyUnicode_AsASCIIString(cadata);
             if (cadata_ascii == NULL) {
                 PyErr_SetString(PyExc_TypeError,
-                                "cadata should be a ASCII string or a "
+                                "cadata should be an ASCII string or a "
                                 "bytes-like object");
                 goto error;
             }
@@ -3426,19 +3427,19 @@ PySSL_get_default_verify_paths(PyObject *self)
     PyObject *odir_env = NULL;
     PyObject *odir = NULL;
 
-#define convert(info, target) { \
+#define CONVERT(info, target) { \
         const char *tmp = (info); \
         target = NULL; \
         if (!tmp) { Py_INCREF(Py_None); target = Py_None; } \
         else { target = PyBytes_FromString(tmp); } \
         if (!target) goto error; \
-    } while(0)
+    }
 
-    convert(X509_get_default_cert_file_env(), ofile_env);
-    convert(X509_get_default_cert_file(), ofile);
-    convert(X509_get_default_cert_dir_env(), odir_env);
-    convert(X509_get_default_cert_dir(), odir);
-#undef convert
+    CONVERT(X509_get_default_cert_file_env(), ofile_env);
+    CONVERT(X509_get_default_cert_file(), ofile);
+    CONVERT(X509_get_default_cert_dir_env(), odir_env);
+    CONVERT(X509_get_default_cert_dir(), odir);
+#undef CONVERT
 
     return Py_BuildValue("NNNN", ofile_env, ofile, odir_env, odir);
 
index 7ce3b78759c9bd33d59651a3cebc6c1640f9f53a..5896e48896a76820db7de8ccc7d3495adaccedb2 100644 (file)
@@ -1373,6 +1373,17 @@ raise_exception(PyObject *self, PyObject *args)
     return NULL;
 }
 
+static PyObject *
+set_errno(PyObject *self, PyObject *args)
+{
+    int new_errno;
+
+    if (!PyArg_ParseTuple(args, "i:set_errno", &new_errno))
+        return NULL;
+
+    errno = new_errno;
+    Py_RETURN_NONE;
+}
 
 static int test_run_counter = 0;
 
@@ -2032,6 +2043,7 @@ pymarshal_read_object_from_file(PyObject* self, PyObject *args)
 
 static PyMethodDef TestMethods[] = {
     {"raise_exception",         raise_exception,                 METH_VARARGS},
+    {"set_errno",               set_errno,                       METH_VARARGS},
     {"test_config",             (PyCFunction)test_config,        METH_NOARGS},
     {"test_datetime_capi",  test_datetime_capi,              METH_NOARGS},
     {"test_list_api",           (PyCFunction)test_list_api,      METH_NOARGS},
index 5a92862a7c30477e2c5fa8e242973a20c31f3ed6..1d1f0d3845cc1cc5bac42181adab491e0f346312 100644 (file)
@@ -1380,6 +1380,11 @@ array_fromstring(arrayobject *self, PyObject *args)
     int itemsize = self->ob_descr->itemsize;
     if (!PyArg_ParseTuple(args, "s#:fromstring", &str, &n))
         return NULL;
+    if (str == self->ob_item) {
+        PyErr_SetString(PyExc_ValueError,
+                        "array.fromstring(x): x cannot be self");
+        return NULL;
+    }
     if (n % itemsize != 0) {
         PyErr_SetString(PyExc_ValueError,
                    "string length not a multiple of item size");
@@ -1928,15 +1933,29 @@ static PyBufferProcs array_as_buffer = {
 static PyObject *
 array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    char c;
-    PyObject *initial = NULL, *it = NULL;
+    int c = -1;
+    PyObject *initial = NULL, *it = NULL, *typecode = NULL;
     struct arraydescr *descr;
 
     if (type == &Arraytype && !_PyArg_NoKeywords("array.array()", kwds))
         return NULL;
 
-    if (!PyArg_ParseTuple(args, "c|O:array", &c, &initial))
+    if (!PyArg_ParseTuple(args, "O|O:array", &typecode, &initial))
+        return NULL;
+
+    if (PyString_Check(typecode) && PyString_GET_SIZE(typecode) == 1)
+        c = (unsigned char)*PyString_AS_STRING(typecode);
+#ifdef Py_USING_UNICODE
+    else if (PyUnicode_Check(typecode) && PyUnicode_GET_SIZE(typecode) == 1)
+        c = *PyUnicode_AS_UNICODE(typecode);
+#endif
+    else {
+        PyErr_Format(PyExc_TypeError,
+                     "array() argument 1 or typecode must be char (string or "
+                     "ascii-unicode with length 1), not %s",
+                     Py_TYPE(typecode)->tp_name);
         return NULL;
+    }
 
     if (!(initial == NULL || PyList_Check(initial)
           || PyString_Check(initial) || PyTuple_Check(initial)
index 8a3a27596313c0d0c9d2dd4c8d2af1ffea8683c9..4d3b679015058ea310706750956cad893bcccc08 100644 (file)
@@ -1130,7 +1130,7 @@ audioop_ratecv(PyObject *self, PyObject *args)
     /* divide weightA and weightB by their greatest common divisor */
     d = gcd(weightA, weightB);
     weightA /= d;
-    weightA /= d;
+    weightB /= d;
 
     if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) {
         PyErr_SetString(PyExc_MemoryError,
@@ -1420,18 +1420,29 @@ audioop_lin2adpcm(PyObject *self, PyObject *args)
     if (!audioop_check_parameters(len, size))
         return NULL;
 
-    str = PyString_FromStringAndSize(NULL, len/(size*2));
-    if ( str == 0 )
-        return 0;
-    ncp = (signed char *)PyString_AsString(str);
-
     /* Decode state, should have (value, step) */
     if ( state == Py_None ) {
         /* First time, it seems. Set defaults */
         valpred = 0;
         index = 0;
-    } else if ( !PyArg_ParseTuple(state, "ii", &valpred, &index) )
+    }
+    else if (!PyTuple_Check(state)) {
+        PyErr_SetString(PyExc_TypeError, "state must be a tuple or None");
+        return NULL;
+    }
+    else if (!PyArg_ParseTuple(state, "ii", &valpred, &index)) {
+        return NULL;
+    }
+    else if (valpred >= 0x8000 || valpred < -0x8000 ||
+             (size_t)index >= sizeof(stepsizeTable)/sizeof(stepsizeTable[0])) {
+        PyErr_SetString(PyExc_ValueError, "bad state");
+        return NULL;
+    }
+
+    str = PyString_FromStringAndSize(NULL, len/(size*2));
+    if ( str == 0 )
         return 0;
+    ncp = (signed char *)PyString_AsString(str);
 
     step = stepsizeTable[index];
     bufferstep = 1;
@@ -1529,8 +1540,19 @@ audioop_adpcm2lin(PyObject *self, PyObject *args)
         /* First time, it seems. Set defaults */
         valpred = 0;
         index = 0;
-    } else if ( !PyArg_ParseTuple(state, "ii", &valpred, &index) )
-        return 0;
+    }
+    else if (!PyTuple_Check(state)) {
+        PyErr_SetString(PyExc_TypeError, "state must be a tuple or None");
+        return NULL;
+    }
+    else if (!PyArg_ParseTuple(state, "ii", &valpred, &index)) {
+        return NULL;
+    }
+    else if (valpred >= 0x8000 || valpred < -0x8000 ||
+             (size_t)index >= sizeof(stepsizeTable)/sizeof(stepsizeTable[0])) {
+        PyErr_SetString(PyExc_ValueError, "bad state");
+        return NULL;
+    }
 
     if (len > (INT_MAX/2)/size) {
         PyErr_SetString(PyExc_MemoryError,
index 10199eb3bdb33554aee3551d9b86c95d5065c073..0e9372360f34d27834b47407caf9787bc6614e22 100644 (file)
@@ -2533,6 +2533,27 @@ save_reduce(Picklerobject *self, PyObject *args, PyObject *fn, PyObject *ob)
     /* Memoize. */
     /* XXX How can ob be NULL? */
     if (ob != NULL) {
+        /* If the object is already in the memo, this means it is
+           recursive. In this case, throw away everything we put on the
+           stack, and fetch the object back from the memo. */
+        if (Py_REFCNT(ob) > 1 && !self->fast) {
+            PyObject *py_ob_id = PyLong_FromVoidPtr(ob);
+            if (!py_ob_id)
+                return -1;
+            if (PyDict_GetItem(self->memo, py_ob_id)) {
+                const char pop_op = POP;
+                if (self->write_func(self, &pop_op, 1) < 0 ||
+                    get(self, py_ob_id) < 0) {
+                    Py_DECREF(py_ob_id);
+                    return -1;
+                }
+                Py_DECREF(py_ob_id);
+                return 0;
+            }
+            Py_DECREF(py_ob_id);
+            if (PyErr_Occurred())
+                return -1;
+        }
         if (state && !PyDict_Check(state)) {
             if (put2(self, ob) < 0)
                 return -1;
@@ -2910,7 +2931,7 @@ Pickle_getvalue(Picklerobject *self, PyObject *args)
             if (ik >= lm || ik == 0) {
                 PyErr_SetString(PicklingError,
                                 "Invalid get data");
-                return NULL;
+                goto err;
             }
             have_get[ik] = 1;
             rsize += ik < 256 ? 2 : 5;
@@ -3448,7 +3469,7 @@ calc_binint(char *s, int x)
      * to extend a BININT's sign bit to the full width.
      */
     if (x == 4 && l & (1L << 31))
-        l |= (~0L) << 32;
+        l |= (~0UL) << 32;
 #endif
     return l;
 }
index 3f75fe74cab5be37b1aac6fe8220f4587f88c131..376f8ee1e33ef2a68ae75189dce0171f280c741c 100644 (file)
@@ -478,6 +478,7 @@ multibytecodec_encode(MultibyteCodec *codec,
         return PyString_FromString("");
 
     buf.excobj = NULL;
+    buf.outobj = NULL;
     buf.inbuf = buf.inbuf_top = *data;
     buf.inbuf_end = buf.inbuf_top + datalen;
 
index 26e7aba45e062c46a4ef785f8ff907bb1f1f3e55..a674d412c932701c4f7135e8ee4e502e0e625c25 100644 (file)
@@ -941,9 +941,10 @@ cmath_polar(PyObject *self, PyObject *args)
     double r, phi;
     if (!PyArg_ParseTuple(args, "D:polar", &z))
         return NULL;
+    errno = 0;
     PyFPE_START_PROTECT("polar function", return 0)
     phi = c_atan2(z); /* should not cause any exception */
-    r = c_abs(z); /* sets errno to ERANGE on overflow;  otherwise 0 */
+    r = c_abs(z); /* sets errno to ERANGE on overflow */
     PyFPE_END_PROTECT(r)
     if (errno != 0)
         return math_error();
index 8bd11b24c8a6dfc2e1f6e9b03c8271ccabf0ab21..b91f967eb2c5bd3c413d5380fb0a953799822d55 100644 (file)
@@ -50,8 +50,11 @@ check_multiply_size(int product, int x, const char* xname, int y, const char* yn
         return 0;
     if ( !check_coordonnate(y, yname) )
         return 0;
-    if ( size == (product / y) / x )
-        return 1;
+    if ( product % y == 0 ) {
+        product /= y;
+        if ( product % x == 0 && size == product / x )
+            return 1;
+    }
     PyErr_SetString(ImageopError, "String has incorrect length");
     return 0;
 }
index e5b2b7443954b20f46e234b007c57a07270c9c03..c3cf1c0bccb2ab69c194394247d2eb824064fe55 100644 (file)
@@ -1410,7 +1410,7 @@ PyDoc_STRVAR(starmap_doc,
 "starmap(function, sequence) --> starmap object\n\
 \n\
 Return an iterator whose values are returned from the function evaluated\n\
-with a argument tuple taken from the given sequence.");
+with an argument tuple taken from the given sequence.");
 
 static PyTypeObject starmap_type = {
     PyVarObject_HEAD_INIT(NULL, 0)
@@ -2543,18 +2543,18 @@ def permutations(iterable, r=None):
     cycles = range(n-r+1, n+1)[::-1]
     yield tuple(pool[i] for i in indices[:r])
     while n:
-    for i in reversed(range(r)):
-        cycles[i] -= 1
-        if cycles[i] == 0:
-        indices[i:] = indices[i+1:] + indices[i:i+1]
-        cycles[i] = n - i
+        for i in reversed(range(r)):
+            cycles[i] -= 1
+            if cycles[i] == 0:
+                indices[i:] = indices[i+1:] + indices[i:i+1]
+                cycles[i] = n - i
+            else:
+                j = cycles[i]
+                indices[i], indices[-j] = indices[-j], indices[i]
+                yield tuple(pool[i] for i in indices[:r])
+                break
         else:
-        j = cycles[i]
-        indices[i], indices[-j] = indices[-j], indices[i]
-        yield tuple(pool[i] for i in indices[:r])
-        break
-    else:
-        return
+            return
 */
 
 typedef struct {
index 0784350a2369295ac657f31c3730494c926f6d7b..8fdf7f75e1ab8bb9f85e2697fcac6418a1306264 100644 (file)
@@ -23,9 +23,9 @@
 
 #ifndef MS_WINDOWS
 #define UNIX
-# ifdef __APPLE__
+# ifdef HAVE_FCNTL_H
 #  include <fcntl.h>
-# endif
+# endif /* HAVE_FCNTL_H */
 #endif
 
 #ifdef MS_WINDOWS
index 4e86d3216fa0cbcc2992d0bb1c59ccb0f2c7b77f..4fc3ef75a12ca6a89461605b064075699af6987c 100644 (file)
@@ -513,6 +513,8 @@ _Py_Dev_Converter(PyObject *obj, void *p)
     return 1;
 }
 
+#endif
+
 #ifdef HAVE_LONG_LONG
 static PyObject *
 _PyInt_FromDev(PY_LONG_LONG v)
@@ -526,8 +528,6 @@ _PyInt_FromDev(PY_LONG_LONG v)
 #  define _PyInt_FromDev PyInt_FromLong
 #endif
 
-#endif
-
 
 #if defined _MSC_VER && _MSC_VER >= 1400
 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is
index 244d2608e7b843b7df7359415e0b26eb662b0679..1e98ffb9c22d719b24559f05dfb0f69c1397b02e 100644 (file)
@@ -355,10 +355,11 @@ set_completer_delims(PyObject *self, PyObject *args)
     /* Keep a reference to the allocated memory in the module state in case
        some other module modifies rl_completer_word_break_characters
        (see issue #17289). */
-    free(completer_word_break_characters);
-    completer_word_break_characters = strdup(break_chars);
-    if (completer_word_break_characters) {
-        rl_completer_word_break_characters = completer_word_break_characters;
+    break_chars = strdup(break_chars);
+    if (break_chars) {
+        free(completer_word_break_characters);
+        completer_word_break_characters = break_chars;
+        rl_completer_word_break_characters = break_chars;
         Py_RETURN_NONE;
     }
     else
index 2707b059f526b8fb9b7a4d398a495c454e0ae848..6ea308adb018ed2ead7378d7d8a711c1972e7943 100644 (file)
@@ -1874,11 +1874,21 @@ initselect(void)
     PyModule_AddIntConstant(m, "EPOLLONESHOT", EPOLLONESHOT);
 #endif
     /* PyModule_AddIntConstant(m, "EPOLL_RDHUP", EPOLLRDHUP); */
+#ifdef EPOLLRDNORM
     PyModule_AddIntConstant(m, "EPOLLRDNORM", EPOLLRDNORM);
+#endif
+#ifdef EPOLLRDBAND
     PyModule_AddIntConstant(m, "EPOLLRDBAND", EPOLLRDBAND);
+#endif
+#ifdef EPOLLWRNORM
     PyModule_AddIntConstant(m, "EPOLLWRNORM", EPOLLWRNORM);
+#endif
+#ifdef EPOLLWRBAND
     PyModule_AddIntConstant(m, "EPOLLWRBAND", EPOLLWRBAND);
+#endif
+#ifdef EPOLLMSG
     PyModule_AddIntConstant(m, "EPOLLMSG", EPOLLMSG);
+#endif
 #endif /* HAVE_EPOLL */
 
 #ifdef HAVE_KQUEUE
index 5def531c4a3918705a772b8eb613129ef677d0f2..ced93433e57a0567db54a92e759dd5a02cc32f02 100644 (file)
@@ -4158,7 +4158,7 @@ socket_getaddrinfo(PyObject *self, PyObject *args)
     if (hobj == Py_None) {
         hptr = NULL;
     } else if (PyUnicode_Check(hobj)) {
-        idna = PyObject_CallMethod(hobj, "encode", "s", "idna");
+        idna = PyUnicode_AsEncodedString(hobj, "idna", NULL);
         if (!idna)
             return NULL;
         hptr = PyString_AsString(idna);
index 913bef8595b68dee4f77c314846b05980e3833be..10d3013dc5c8422912e5f3fa04f665c2d88406f2 100644 (file)
@@ -1094,7 +1094,7 @@ mymemreplace(const char *str, Py_ssize_t len,           /* input string */
 {
     char *out_s;
     char *new_s;
-    Py_ssize_t nfound, offset, new_len;
+    Py_ssize_t nfound, offset, new_len, delta_len, abs_delta;
 
     if (len == 0 || pat_len > len)
         goto return_same;
@@ -1108,7 +1108,14 @@ mymemreplace(const char *str, Py_ssize_t len,           /* input string */
     if (nfound == 0)
         goto return_same;
 
-    new_len = len + nfound*(sub_len - pat_len);
+    delta_len = sub_len - pat_len;
+    abs_delta = (delta_len < 0) ? -delta_len : delta_len;
+    if (PY_SSIZE_T_MAX/nfound < abs_delta)
+        return NULL;
+    delta_len *= nfound;
+    if (PY_SSIZE_T_MAX - len < delta_len)
+        return NULL;
+    new_len = len + delta_len;
     if (new_len == 0) {
         /* Have to allocate something for the caller to free(). */
         out_s = (char *)PyMem_MALLOC(1);
index efc5d7f5119ea987b9091e615d731cf9864e3f2d..82eff0072b3903c274b077dd256e9db285c63c28 100644 (file)
@@ -333,12 +333,18 @@ local_new(PyTypeObject *type, PyObject *args, PyObject *kw)
         "_localdummy_destroyed", (PyCFunction) _localdummy_destroyed, METH_O
     };
 
-    if (type->tp_init == PyBaseObject_Type.tp_init
-        && ((args && PyObject_IsTrue(args))
-        || (kw && PyObject_IsTrue(kw)))) {
-        PyErr_SetString(PyExc_TypeError,
-                  "Initialization arguments are not supported");
-        return NULL;
+    if (type->tp_init == PyBaseObject_Type.tp_init) {
+        int rc = 0;
+        if (args != NULL)
+            rc = PyObject_IsTrue(args);
+        if (rc == 0 && kw != NULL)
+            rc = PyObject_IsTrue(kw);
+        if (rc != 0) {
+            if (rc > 0)
+                PyErr_SetString(PyExc_TypeError,
+                          "Initialization arguments are not supported");
+            return NULL;
+        }
     }
 
     self = (localobject *)type->tp_alloc(type, 0);
index 64a1a381e11cfa68823ab546a5f68bf163378ad1..3a50b7364d620d7fc0a4204aab83f14ddc1f12d7 100644 (file)
@@ -259,7 +259,7 @@ PyObject_AsCharBuffer(PyObject *obj,
          pb->bf_getcharbuffer == NULL ||
          pb->bf_getsegcount == NULL) {
         PyErr_SetString(PyExc_TypeError,
-                        "expected a character buffer object");
+                        "expected a string or other character buffer object");
         return -1;
     }
     if ((*pb->bf_getsegcount)(obj,NULL) != 1) {
@@ -1666,8 +1666,17 @@ PyNumber_Int(PyObject *o)
                                  PyUnicode_GET_SIZE(o),
                                  10);
 #endif
-    if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len))
-        return int_from_string((char*)buffer, buffer_len);
+    if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len)) {
+        PyObject *result, *str;
+
+        /* Copy to NUL-terminated buffer. */
+        str = PyString_FromStringAndSize((const char *)buffer, buffer_len);
+        if (str == NULL)
+            return NULL;
+        result = int_from_string(PyString_AS_STRING(str), buffer_len);
+        Py_DECREF(str);
+        return result;
+    }
 
     return type_error("int() argument must be a string or a "
                       "number, not '%.200s'", o);
@@ -1765,9 +1774,17 @@ PyNumber_Long(PyObject *o)
                                   PyUnicode_GET_SIZE(o),
                                   10);
 #endif
-    if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len))
-        return long_from_string(buffer, buffer_len);
+    if (!PyObject_AsCharBuffer(o, &buffer, &buffer_len)) {
+        PyObject *result, *str;
 
+        /* Copy to NUL-terminated buffer. */
+        str = PyString_FromStringAndSize((const char *)buffer, buffer_len);
+        if (str == NULL)
+            return NULL;
+        result = long_from_string(PyString_AS_STRING(str), buffer_len);
+        Py_DECREF(str);
+        return result;
+    }
     return type_error("long() argument must be a string or a "
                       "number, not '%.200s'", o);
 }
@@ -2169,7 +2186,7 @@ PySequence_Tuple(PyObject *v)
         Py_INCREF(v);
         return v;
     }
-    if (PyList_Check(v))
+    if (PyList_CheckExact(v))
         return PyList_AsTuple(v);
 
     /* Get iterator. */
index fd0ce7c6cfa53a60e87650f7d61c6d5c8d7a6988..5276da51bdb7e4174e110e791d1422d271e48665 100644 (file)
@@ -783,7 +783,7 @@ bytearray_init(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
     if (PyBytes_Check(arg)) {
         PyObject *new, *encoded;
         if (encoding != NULL) {
-            encoded = PyCodec_Encode(arg, encoding, errors);
+            encoded = _PyCodec_EncodeText(arg, encoding, errors);
             if (encoded == NULL)
                 return -1;
             assert(PyBytes_Check(encoded));
@@ -809,7 +809,7 @@ bytearray_init(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
                             "unicode argument without an encoding");
             return -1;
         }
-        encoded = PyCodec_Encode(arg, encoding, errors);
+        encoded = _PyCodec_EncodeText(arg, encoding, errors);
         if (encoded == NULL)
             return -1;
         assert(PyBytes_Check(encoded));
@@ -897,8 +897,10 @@ bytearray_init(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
             goto error;
 
         /* Append the byte */
-        if (Py_SIZE(self) < self->ob_alloc)
+        if (Py_SIZE(self) + 1 < self->ob_alloc) {
             Py_SIZE(self)++;
+            PyByteArray_AS_STRING(self)[Py_SIZE(self)] = '\0';
+        }
         else if (PyByteArray_Resize((PyObject *)self, Py_SIZE(self)+1) < 0)
             goto error;
         self->ob_bytes[Py_SIZE(self)-1] = value;
@@ -1021,14 +1023,18 @@ bytearray_richcompare(PyObject *self, PyObject *other, int op)
     Py_buffer self_bytes, other_bytes;
     PyObject *res;
     Py_ssize_t minsize;
-    int cmp;
+    int cmp, rc;
 
     /* Bytes can be compared to anything that supports the (binary)
        buffer API.  Except that a comparison with Unicode is always an
        error, even if the comparison is for equality. */
 #ifdef Py_USING_UNICODE
-    if (PyObject_IsInstance(self, (PyObject*)&PyUnicode_Type) ||
-        PyObject_IsInstance(other, (PyObject*)&PyUnicode_Type)) {
+    rc = PyObject_IsInstance(self, (PyObject*)&PyUnicode_Type);
+    if (!rc)
+        rc = PyObject_IsInstance(other, (PyObject*)&PyUnicode_Type);
+    if (rc < 0)
+        return NULL;
+    if (rc) {
         if (Py_BytesWarningFlag && op == Py_EQ) {
             if (PyErr_WarnEx(PyExc_BytesWarning,
                             "Comparison between bytearray and string", 1))
@@ -2563,7 +2569,7 @@ bytearray_decode(PyObject *self, PyObject *args, PyObject *kwargs)
         return NULL;
 #endif
     }
-    return PyCodec_Decode(self, encoding, errors);
+    return _PyCodec_DecodeText(self, encoding, errors);
 }
 
 PyDoc_STRVAR(alloc_doc,
index 2659a23cbe215ca0cc6ad5d502ff70cb6fafddd6..9e97d1b3d41d63374c190b35a2b5de79672cb208 100644 (file)
@@ -1000,7 +1000,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
         len = strlen(s);
     }
 #endif
-    else if (PyObject_AsCharBuffer(v, &s, &len)) {
+    else {
         PyErr_SetString(PyExc_TypeError,
                         "complex() arg is not a string");
         return NULL;
index 3e9b03451e052d290b99693aee7fe1676522dc8f..886a451de63b6dfc30e48f015ef413046b3b6100 100644 (file)
@@ -1117,11 +1117,11 @@ PyWrapper_New(PyObject *d, PyObject *self)
 /* A built-in 'property' type */
 
 /*
-    class property(object):
+class property(object):
 
     def __init__(self, fget=None, fset=None, fdel=None, doc=None):
         if doc is None and fget is not None and hasattr(fget, "__doc__"):
-        doc = fget.__doc__
+            doc = fget.__doc__
         self.__get = fget
         self.__set = fset
         self.__del = fdel
@@ -1129,19 +1129,19 @@ PyWrapper_New(PyObject *d, PyObject *self)
 
     def __get__(self, inst, type=None):
         if inst is None:
-        return self
+            return self
         if self.__get is None:
-        raise AttributeError, "unreadable attribute"
+            raise AttributeError, "unreadable attribute"
         return self.__get(inst)
 
     def __set__(self, inst, value):
         if self.__set is None:
-        raise AttributeError, "can't set attribute"
+            raise AttributeError, "can't set attribute"
         return self.__set(inst, value)
 
     def __delete__(self, inst):
         if self.__del is None:
-        raise AttributeError, "can't delete attribute"
+            raise AttributeError, "can't delete attribute"
         return self.__del(inst)
 
 */
index 39e7035901033985706cffb243f5440d77fb3645..50afa3f654a85a808a95b8bb7b2bbc58bd0d0c7c 100644 (file)
@@ -1361,7 +1361,7 @@ dict_fromkeys(PyObject *cls, PyObject *args)
             PyObject *key;
             long hash;
 
-            if (dictresize(mp, Py_SIZE(seq))) {
+            if (dictresize(mp, Py_SIZE(seq) / 2 * 3)) {
                 Py_DECREF(d);
                 return NULL;
             }
@@ -1382,7 +1382,7 @@ dict_fromkeys(PyObject *cls, PyObject *args)
             PyObject *key;
             long hash;
 
-            if (dictresize(mp, PySet_GET_SIZE(seq))) {
+            if (dictresize(mp, PySet_GET_SIZE(seq) / 2 * 3)) {
                 Py_DECREF(d);
                 return NULL;
             }
index 0ce7f6ce5cf22b89c798995b5beab4ce7d9b97e1..1143fab1420ad31fa28a74691d77b9a32c519bc3 100644 (file)
@@ -180,6 +180,7 @@ PyFloat_FromString(PyObject *v, char **pend)
     char *s_buffer = NULL;
 #endif
     Py_ssize_t len;
+    PyObject *str = NULL;
     PyObject *result = NULL;
 
     if (pend)
@@ -202,7 +203,14 @@ PyFloat_FromString(PyObject *v, char **pend)
         len = strlen(s);
     }
 #endif
-    else if (PyObject_AsCharBuffer(v, &s, &len)) {
+    else if (!PyObject_AsCharBuffer(v, &s, &len)) {
+        /* Copy to NUL-terminated buffer. */
+        str = PyString_FromStringAndSize(s, len);
+        if (str == NULL)
+            return NULL;
+        s = PyString_AS_STRING(str);
+    }
+    else {
         PyErr_SetString(PyExc_TypeError,
             "float() argument must be a string or a number");
         return NULL;
@@ -233,6 +241,7 @@ PyFloat_FromString(PyObject *v, char **pend)
     if (s_buffer)
         PyMem_FREE(s_buffer);
 #endif
+    Py_XDECREF(str);
     return result;
 }
 
index 5a9a2dd7a090eaa777fcdc89519cdc3596668cbb..9c90abe6012e7f95cb6e3063fbba188866f58568 100644 (file)
@@ -54,6 +54,11 @@ iter_iternext(PyObject *iterator)
     seq = it->it_seq;
     if (seq == NULL)
         return NULL;
+    if (it->it_index == LONG_MAX) {
+        PyErr_SetString(PyExc_OverflowError,
+                        "iter index too large");
+        return NULL;
+    }
 
     result = PySequence_GetItem(seq, it->it_index);
     if (result != NULL) {
index 85eee611530a43d9bd7ba8082bee7c45d3272449..1bb1866dc6f9ac2cfdc838f2c434154a0a443d96 100644 (file)
@@ -167,7 +167,7 @@ static int running_on_valgrind = -1;
  * this value according to your application behaviour and memory needs.
  *
  * The following invariants must hold:
- *      1) ALIGNMENT <= SMALL_REQUEST_THRESHOLD <= 256
+ *      1) ALIGNMENT <= SMALL_REQUEST_THRESHOLD <= 512
  *      2) SMALL_REQUEST_THRESHOLD is evenly divisible by ALIGNMENT
  *
  * Note: a size threshold of 512 guarantees that newly created dictionaries
index b4b117802158ccbc5ad4de0f2ab69d4374a89308..8a58d65d37ddc21b9b847fe618427b6890913a07 100644 (file)
@@ -1548,9 +1548,15 @@ set_difference(PySetObject *so, PyObject *other)
     if (PyDict_CheckExact(other)) {
         while (set_next(so, &pos, &entry)) {
             setentry entrycopy;
+            int rv;
             entrycopy.hash = entry->hash;
             entrycopy.key = entry->key;
-            if (!_PyDict_Contains(other, entry->key, entry->hash)) {
+            rv = _PyDict_Contains(other, entry->key, entry->hash);
+            if (rv < 0) {
+                Py_DECREF(result);
+                return NULL;
+            }
+            if (!rv) {
                 if (set_add_entry((PySetObject *)result, &entrycopy) == -1) {
                     Py_DECREF(result);
                     return NULL;
@@ -1793,7 +1799,8 @@ PyDoc_STRVAR(issuperset_doc, "Report whether this set contains another set.");
 static PyObject *
 set_richcompare(PySetObject *v, PyObject *w, int op)
 {
-    PyObject *r1, *r2;
+    PyObject *r1;
+    int r2;
 
     if(!PyAnySet_Check(w)) {
         Py_INCREF(Py_NotImplemented);
@@ -1812,9 +1819,11 @@ set_richcompare(PySetObject *v, PyObject *w, int op)
         r1 = set_richcompare(v, w, Py_EQ);
         if (r1 == NULL)
             return NULL;
-        r2 = PyBool_FromLong(PyObject_Not(r1));
+        r2 = PyObject_IsTrue(r1);
         Py_DECREF(r1);
-        return r2;
+        if (r2 < 0)
+            return NULL;
+        return PyBool_FromLong(!r2);
     case Py_LE:
         return set_issubset(v, w);
     case Py_GE:
index 122abe6c83cdadccf993f550b5c3b8edba96d25b..b75755ef577b0001271095ea6524d3dd0907fd2c 100644 (file)
@@ -789,6 +789,7 @@ format_int_or_long_internal(PyObject *value, const InternalFormatSpec *format,
         x = PyLong_AsLong(value);
         if (x == -1 && PyErr_Occurred())
             goto done;
+#if STRINGLIB_IS_UNICODE
 #ifdef Py_UNICODE_WIDE
         if (x < 0 || x > 0x10ffff) {
             PyErr_SetString(PyExc_OverflowError,
@@ -803,6 +804,13 @@ format_int_or_long_internal(PyObject *value, const InternalFormatSpec *format,
                             "(narrow Python build)");
             goto done;
         }
+#endif
+#else
+        if (x < 0 || x > 0xff) {
+            PyErr_SetString(PyExc_OverflowError,
+                            "%c arg not in range(0x100)");
+            goto done;
+        }
 #endif
         numeric_char = (STRINGLIB_CHAR)x;
         pnumeric_chars = &numeric_char;
index 46f46db0e0fce9ff2c0992422912fe18d1fd2c8a..c1e12a7aaea3fa125e0684893e83666e58a25ead 100644 (file)
@@ -449,7 +449,7 @@ PyObject *PyString_AsDecodedObject(PyObject *str,
     }
 
     /* Decode via the codec registry */
-    v = PyCodec_Decode(str, encoding, errors);
+    v = _PyCodec_DecodeText(str, encoding, errors);
     if (v == NULL)
         goto onError;
 
@@ -529,7 +529,7 @@ PyObject *PyString_AsEncodedObject(PyObject *str,
     }
 
     /* Encode via the codec registry */
-    v = PyCodec_Encode(str, encoding, errors);
+    v = _PyCodec_EncodeText(str, encoding, errors);
     if (v == NULL)
         goto onError;
 
index 22def745da1ee5b2d7c8d6f5edbcbcc0410f32c7..720a84e97e0d44a6a3ca8c0bad6d8102e755b4f5 100644 (file)
@@ -1724,6 +1724,12 @@ best_base(PyObject *bases)
             if (PyType_Ready(base_i) < 0)
                 return NULL;
         }
+        if (!PyType_HasFeature(base_i, Py_TPFLAGS_BASETYPE)) {
+            PyErr_Format(PyExc_TypeError,
+                         "type '%.100s' is not an acceptable base type",
+                         base_i->tp_name);
+            return NULL;
+        }
         candidate = solid_base(base_i);
         if (winner == NULL) {
             winner = candidate;
@@ -2148,13 +2154,6 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
         Py_DECREF(bases);
         return NULL;
     }
-    if (!PyType_HasFeature(base, Py_TPFLAGS_BASETYPE)) {
-        PyErr_Format(PyExc_TypeError,
-                     "type '%.100s' is not an acceptable base type",
-                     base->tp_name);
-        Py_DECREF(bases);
-        return NULL;
-    }
 
     /* Check for a __slots__ sequence variable in dict, and count it */
     slots = PyDict_GetItemString(dict, "__slots__");
@@ -3215,6 +3214,13 @@ reduce_2(PyObject *obj)
     if (cls == NULL)
         return NULL;
 
+    if (PyType_Check(cls) && ((PyTypeObject *)cls)->tp_new == NULL) {
+        PyErr_Format(PyExc_TypeError,
+                     "can't pickle %s objects",
+                     ((PyTypeObject *)cls)->tp_name);
+        return NULL;
+    }
+
     getnewargs = PyObject_GetAttrString(obj, "__getnewargs__");
     if (getnewargs != NULL) {
         args = PyObject_CallObject(getnewargs, NULL);
@@ -3444,10 +3450,10 @@ PyDoc_STRVAR(object_subclasshook_doc,
 
    class object:
        def __format__(self, format_spec):
-       if isinstance(format_spec, str):
-           return format(str(self), format_spec)
-       elif isinstance(format_spec, unicode):
-           return format(unicode(self), format_spec)
+           if isinstance(format_spec, str):
+               return format(str(self), format_spec)
+           elif isinstance(format_spec, unicode):
+               return format(unicode(self), format_spec)
 */
 static PyObject *
 object_format(PyObject *self, PyObject *args)
index 91e75244bf4be33de9640c6de6d9fcb573796cd4..9368a3a14f594155ceea99b6afa41cd1c5980159 100644 (file)
@@ -1259,7 +1259,7 @@ PyObject *PyUnicode_Decode(const char *s,
     buffer = PyBuffer_FromMemory((void *)s, size);
     if (buffer == NULL)
         goto onError;
-    unicode = PyCodec_Decode(buffer, encoding, errors);
+    unicode = _PyCodec_DecodeText(buffer, encoding, errors);
     if (unicode == NULL)
         goto onError;
     if (!PyUnicode_Check(unicode)) {
@@ -1292,7 +1292,7 @@ PyObject *PyUnicode_AsDecodedObject(PyObject *unicode,
         encoding = PyUnicode_GetDefaultEncoding();
 
     /* Decode via the codec registry */
-    v = PyCodec_Decode(unicode, encoding, errors);
+    v = _PyCodec_DecodeText(unicode, encoding, errors);
     if (v == NULL)
         goto onError;
     return v;
@@ -1331,7 +1331,7 @@ PyObject *PyUnicode_AsEncodedObject(PyObject *unicode,
         encoding = PyUnicode_GetDefaultEncoding();
 
     /* Encode via the codec registry */
-    v = PyCodec_Encode(unicode, encoding, errors);
+    v = _PyCodec_EncodeText(unicode, encoding, errors);
     if (v == NULL)
         goto onError;
     return v;
@@ -1369,7 +1369,7 @@ PyObject *PyUnicode_AsEncodedString(PyObject *unicode,
     }
 
     /* Encode via the codec registry */
-    v = PyCodec_Encode(unicode, encoding, errors);
+    v = _PyCodec_EncodeText(unicode, encoding, errors);
     if (v == NULL)
         goto onError;
     if (!PyString_Check(v)) {
@@ -1555,7 +1555,10 @@ int unicode_decode_call_errorhandler(const char *errors, PyObject **errorHandler
 /* Is c a base-64 character? */
 
 #define IS_BASE64(c) \
-    (isalnum(c) || (c) == '+' || (c) == '/')
+    (((c) >= 'A' && (c) <= 'Z') ||     \
+     ((c) >= 'a' && (c) <= 'z') ||     \
+     ((c) >= '0' && (c) <= '9') ||     \
+     (c) == '+' || (c) == '/')
 
 /* given that c is a base-64 character, what is its base-64 value? */
 
@@ -1716,29 +1719,29 @@ PyObject *PyUnicode_DecodeUTF7Stateful(const char *s,
             }
             else { /* now leaving a base-64 section */
                 inShift = 0;
-                s++;
-                if (surrogate) {
-                    *p++ = surrogate;
-                    surrogate = 0;
-                }
                 if (base64bits > 0) { /* left-over bits */
                     if (base64bits >= 6) {
                         /* We've seen at least one base-64 character */
+                        s++;
                         errmsg = "partial character in shift sequence";
                         goto utf7Error;
                     }
                     else {
                         /* Some bits remain; they should be zero */
                         if (base64buffer != 0) {
+                            s++;
                             errmsg = "non-zero padding bits in shift sequence";
                             goto utf7Error;
                         }
                     }
                 }
-                if (ch != '-') {
+                if (surrogate && DECODE_DIRECT(ch))
+                    *p++ = surrogate;
+                surrogate = 0;
+                if (ch == '-') {
                     /* '-' is absorbed; other terminating
                        characters are preserved */
-                    *p++ = ch;
+                    s++;
                 }
             }
         }
@@ -1751,6 +1754,7 @@ PyObject *PyUnicode_DecodeUTF7Stateful(const char *s,
             }
             else { /* begin base64-encoded section */
                 inShift = 1;
+                surrogate = 0;
                 shiftOutStart = p;
                 base64bits = 0;
                 base64buffer = 0;
@@ -1782,6 +1786,7 @@ utf7Error:
 
     if (inShift && !consumed) { /* in shift sequence, no more to follow */
         /* if we're in an inconsistent state, that's an error */
+        inShift = 0;
         if (surrogate ||
                 (base64bits >= 6) ||
                 (base64bits > 0 && base64buffer != 0)) {
diff --git a/PC/VS9.0/_bsddb.vcproj b/PC/VS9.0/_bsddb.vcproj
new file mode 100644 (file)
index 0000000..2b926aa
--- /dev/null
@@ -0,0 +1,1463 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="_bsddb"\r
+       ProjectGUID="{B4D38F3F-68FB-42EC-A45D-E00657BB3627}"\r
+       RootNamespace="_bsddb"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(bsddbDepLibs)"\r
+                               BaseAddress="0x1e180000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\bsddb.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_bsddb.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Berkeley DB 4.7.25 Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\crypto\aes_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_compact.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_compare.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_conv.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_curadj.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_cursor.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_delete.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_open.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_put.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_reclaim.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_recno.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_rsearch.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_search.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_split.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_upgrade.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\bt_verify.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\btree\btree_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\crdel_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\crdel_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\crypto\crypto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_am.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\db_byteorder.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_cam.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_cds.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_conv.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_dispatch.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_dup.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\db_err.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\db_getlong.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\db_idspace.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_iface.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_join.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\db_log2.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_meta.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_open.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_overflow.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_ovfl_vrfy.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_pr.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_reclaim.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_remove.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_rename.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_ret.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_setid.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_setlsn.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\db_shash.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_stati.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_truncate.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_upg.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_upg_opd.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_vrfy.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\db\db_vrfyutil.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\dbm\dbm.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\dbreg\dbreg.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_util.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\dbt.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_alloc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_config.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_failchk.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_file.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_globals.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_name.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_open.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_recover.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_region.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_register.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_sig.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\env\env_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\fileops\fileops_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\fileops\fop_basic.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\fileops\fop_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\fileops\fop_util.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_conv.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_dup.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_func.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_meta.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_open.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_page.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_reclaim.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_upgrade.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hash\hash_verify.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hmac\hmac.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hsearch\hsearch.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_deadlock.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_failchk.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_id.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_list.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_region.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_timer.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\lock\lock_util.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log_archive.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log_compare.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log_debug.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log_get.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log_put.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\log\log_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\mkpath.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_alloc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_bh.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_fget.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_fmethod.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_fopen.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_fput.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_fset.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_mvcc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_region.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_register.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_resize.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_sync.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mp\mp_trickle.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\crypto\mersenne\mt19937db.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mutex\mut_alloc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mutex\mut_failchk.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mutex\mut_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mutex\mut_region.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mutex\mut_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\mutex\mut_win32.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\openflags.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_abort.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_abs.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_addrinfo.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_alloc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_clock.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_config.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_cpu.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_ctime.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_dir.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_errno.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_fid.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_flock.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_fsync.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_getenv.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_handle.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_map.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\os_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_mkdir.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_open.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_pid.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_rename.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_root.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_rpath.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_rw.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_seek.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_stack.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_tmpdir.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_truncate.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os\os_uid.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_unlink.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\os_windows\os_yield.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_conv.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_files.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_open.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_upgrade.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\qam\qam_verify.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_backup.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_elect.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_lease.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_log.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_record.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_region.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_util.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\rep\rep_verify.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_elect.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_msg.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_net.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_queue.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_sel.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_util.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_windows.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\crypto\rijndael\rijndael-alg-fst.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\crypto\rijndael\rijndael-api-fst.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\sequence\seq_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\sequence\sequence.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\hmac\sha1.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\clib\strsep.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_auto.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_chkpt.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_failchk.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_method.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_rec.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_recover.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_region.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_stat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\txn\txn_util.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\util_cache.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\util_log.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\util_sig.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\xa\xa.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\xa\xa_db.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\xa\xa_map.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bsddbDir)\..\common\zerofill.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_ctypes.vcproj b/PC/VS9.0/_ctypes.vcproj
new file mode 100644 (file)
index 0000000..8e5cba1
--- /dev/null
@@ -0,0 +1,705 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="_ctypes"\r
+       ProjectGUID="{0E9791DB-593A-465F-98BC-681011311618}"\r
+       RootNamespace="_ctypes"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D1A0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D1A0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
+                               SubSystem="0"\r
+                               BaseAddress="0x1D1A0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
+                               SubSystem="0"\r
+                               BaseAddress="0x1D1A0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
+                               SubSystem="0"\r
+                               BaseAddress="0x1D1A0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
+                               SubSystem="0"\r
+                               BaseAddress="0x1D1A0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
+                               SubSystem="0"\r
+                               BaseAddress="0x1D1A0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
+                               SubSystem="0"\r
+                               BaseAddress="0x1D1A0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\ctypes.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\ctypes_dlfcn.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffi.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffi_common.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\fficonfig.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffitarget.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\_ctypes.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\callbacks.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\callproc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\cfield.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffi.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\malloc_closure.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\prep_cif.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\stgdict.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\win32.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="PGInstrument|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="PGUpdate|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\libffi_msvc\win64.asm"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                               CommandLine="ml64 /nologo /c /Zi /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                               Outputs="$(IntDir)\win64.obj"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                               CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                               Outputs="$(IntDir)\win64.obj"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="PGInstrument|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="PGInstrument|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                               CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                               Outputs="$(IntDir)\win64.obj"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="PGUpdate|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="PGUpdate|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                               CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                               Outputs="$(IntDir)\win64.obj"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_ctypes_test.vcproj b/PC/VS9.0/_ctypes_test.vcproj
new file mode 100644 (file)
index 0000000..f662e3a
--- /dev/null
@@ -0,0 +1,521 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_ctypes_test"\r
+       ProjectGUID="{9EC7190A-249F-4180-A900-548FDCF3055F}"\r
+       RootNamespace="_ctypes_test"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\_ctypes_test.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ctypes\_ctypes_test.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_elementtree.vcproj b/PC/VS9.0/_elementtree.vcproj
new file mode 100644 (file)
index 0000000..7414997
--- /dev/null
@@ -0,0 +1,613 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_elementtree"\r
+       ProjectGUID="{17E1E049-C309-4D79-843F-AE483C264AEA}"\r
+       RootNamespace="_elementtree"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\Modules\expat"\r
+                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D100000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\ascii.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\asciitab.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\expat.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\expat_config.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\expat_external.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\iasciitab.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\internal.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\latin1tab.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\macconfig.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\nametab.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\pyexpatns.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\utf8tab.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\winconfig.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmlrole.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmltok.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_elementtree.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmlparse.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmlrole.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmltok.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_hashlib.vcproj b/PC/VS9.0/_hashlib.vcproj
new file mode 100644 (file)
index 0000000..9b63563
--- /dev/null
@@ -0,0 +1,545 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_hashlib"\r
+       ProjectGUID="{447F05A8-F581-4CAC-A466-5AC7936E207E}"\r
+       RootNamespace="_hashlib"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_hashopenssl.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_msi.vcproj b/PC/VS9.0/_msi.vcproj
new file mode 100644 (file)
index 0000000..d84049d
--- /dev/null
@@ -0,0 +1,529 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_msi"\r
+       ProjectGUID="{31FFC478-7B4A-43E8-9954-8D03E2187E9C}"\r
+       RootNamespace="_msi"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
+                               BaseAddress="0x1D160000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\_msi.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_multiprocessing.vcproj b/PC/VS9.0/_multiprocessing.vcproj
new file mode 100644 (file)
index 0000000..4e6ff09
--- /dev/null
@@ -0,0 +1,557 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_multiprocessing"\r
+       ProjectGUID="{9E48B300-37D1-11DD-8C41-005056C00008}"\r
+       RootNamespace="_multiprocessing"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_multiprocessing\multiprocessing.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_multiprocessing\connection.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_multiprocessing\multiprocessing.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_multiprocessing\pipe_connection.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_multiprocessing\semaphore.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_multiprocessing\socket_connection.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_multiprocessing\win32_functions.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_socket.vcproj b/PC/VS9.0/_socket.vcproj
new file mode 100644 (file)
index 0000000..80f0781
--- /dev/null
@@ -0,0 +1,537 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_socket"\r
+       ProjectGUID="{86937F53-C189-40EF-8CE8-8759D8E7D480}"\r
+       RootNamespace="_socket"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               BaseAddress="0x1e1D0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\socketmodule.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\socketmodule.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_sqlite3.vcproj b/PC/VS9.0/_sqlite3.vcproj
new file mode 100644 (file)
index 0000000..f7100f1
--- /dev/null
@@ -0,0 +1,613 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="_sqlite3"\r
+       ProjectGUID="{13CECB97-4119-4316-9D42-8534019A5A44}"\r
+       RootNamespace="_sqlite3"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e180000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\cache.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\connection.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\cursor.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\microprotocols.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\module.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\prepare_protocol.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\row.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\sqlitecompat.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\statement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\util.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\cache.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\connection.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\cursor.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\microprotocols.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\module.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\prepare_protocol.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\row.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\statement.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sqlite\util.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_ssl.vcproj b/PC/VS9.0/_ssl.vcproj
new file mode 100644 (file)
index 0000000..0f91cc7
--- /dev/null
@@ -0,0 +1,545 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_ssl"\r
+       ProjectGUID="{C6E20F84-3247-4AD6-B051-B073268F73BA}"\r
+       RootNamespace="_ssl"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               CommandLine=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_ssl.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_testcapi.vcproj b/PC/VS9.0/_testcapi.vcproj
new file mode 100644 (file)
index 0000000..e814fd4
--- /dev/null
@@ -0,0 +1,521 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_testcapi"\r
+       ProjectGUID="{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"\r
+       RootNamespace="_testcapi"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1e1F0000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_testcapimodule.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/_tkinter.vcproj b/PC/VS9.0/_tkinter.vcproj
new file mode 100644 (file)
index 0000000..a049b9b
--- /dev/null
@@ -0,0 +1,541 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="_tkinter"\r
+       ProjectGUID="{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"\r
+       RootNamespace="_tkinter"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltkLibDebug)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltk64LibDebug)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltkLib)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltk64Lib)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltkLib)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltk64Lib)"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltkLib)"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
+                               PreprocessorDefinitions="WITH_APPINIT"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="$(tcltk64Lib)"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_tkinter.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\tkappinit.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/bdist_wininst.vcproj b/PC/VS9.0/bdist_wininst.vcproj
new file mode 100644 (file)
index 0000000..b8cc7ad
--- /dev/null
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="bdist_wininst"\r
+       ProjectGUID="{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"\r
+       RootNamespace="wininst"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="..\..\lib\distutils\command"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="1"\r
+                               TypeLibraryName=".\..\..\lib\distutils\command\wininst.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="1"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\PC\bdist_wininst;..\..\Include;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="0"\r
+                               AdditionalIncludeDirectories="..\..\PC;..\..\PC\bdist_wininst;..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="comctl32.lib imagehlp.lib"\r
+                               OutputFile="..\..\lib\distutils\command\wininst-9.0.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               IgnoreDefaultLibraryNames="LIBC"\r
+                               ProgramDatabaseFile="..\..\lib\distutils\command\wininst-9.0.pdb"\r
+                               SubSystem="2"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\..\..\lib\distutils\command\wininst.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="1"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\PC\bdist_wininst;..\..\Include;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="0"\r
+                               AdditionalIncludeDirectories="..\..\PC;..\..\PC\bdist_wininst;..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="comctl32.lib imagehlp.lib"\r
+                               OutputFile="..\..\lib\distutils\command\wininst-9.0-amd64.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               IgnoreDefaultLibraryNames="LIBC"\r
+                               ProgramDatabaseFile="..\..\lib\distutils\command\wininst-9.0-amd64.pdb"\r
+                               SubSystem="2"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\bdist_wininst\extract.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\bdist_wininst\install.c"\r
+                               >\r
+                       </File>\r
+                       <Filter\r
+                               Name="zlib"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\adler32.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\crc32.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inffast.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inflate.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inftrees.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\zutil.c"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\bdist_wininst\archive.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\bdist_wininst\install.rc"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\bdist_wininst\PythonPowered.bmp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/build.bat b/PC/VS9.0/build.bat
new file mode 100644 (file)
index 0000000..0fed517
--- /dev/null
@@ -0,0 +1,107 @@
+@echo off\r
+rem A batch program to build or rebuild a particular configuration,\r
+rem just for convenience.\r
+\r
+rem Arguments:\r
+rem  -c  Set the configuration (default: Release)\r
+rem  -p  Set the platform (x64 or Win32, default: Win32)\r
+rem  -r  Target Rebuild instead of Build\r
+rem  -t  Set the target manually (Build, Rebuild, or Clean)\r
+rem  -d  Set the configuration to Debug\r
+rem  -e  Pull in external libraries using get_externals.bat\r
+rem  -k  Attempt to kill any running Pythons before building\r
+\r
+setlocal\r
+set platf=Win32\r
+set vs_platf=x86\r
+set conf=Release\r
+set target=\r
+set dir=%~dp0\r
+set kill=\r
+set build_tkinter=\r
+\r
+:CheckOpts\r
+if '%1'=='-c' (set conf=%2) & shift & shift & goto CheckOpts\r
+if '%1'=='-p' (set platf=%2) & shift & shift & goto CheckOpts\r
+if '%1'=='-r' (set target=/rebuild) & shift & goto CheckOpts\r
+if '%1'=='-t' (\r
+    if '%2'=='Clean' (set target=/clean) & shift & shift & goto CheckOpts\r
+    if '%2'=='Rebuild' (set target=/rebuild) & shift & shift & goto CheckOpts\r
+    if '%2'=='Build' (set target=) & shift & shift & goto CheckOpts\r
+    echo.Unknown target: %2 & goto :eof\r
+)\r
+if '%1'=='-d' (set conf=Debug) & shift & goto CheckOpts\r
+if '%1'=='-e' call "%dir%..\..\PCbuild\get_externals.bat" & (set build_tkinter=true) & shift & goto CheckOpts\r
+if '%1'=='-k' (set kill=true) & shift & goto CheckOpts\r
+\r
+if '%conf%'=='Debug' (set dbg_ext=_d) else (set dbg_ext=)\r
+if '%platf%'=='x64' (\r
+    set vs_platf=x86_amd64\r
+    set builddir=%dir%amd64\\r
+) else (\r
+    set builddir=%dir%\r
+)\r
+rem Can't use builddir until we're in a new command...\r
+if '%platf%'=='x64' (\r
+    rem Needed for buliding OpenSSL\r
+    set HOST_PYTHON=%builddir%python%dbg_ext%.exe\r
+)\r
+\r
+rem Setup the environment\r
+call "%dir%env.bat" %vs_platf%\r
+\r
+if '%kill%'=='true' (\r
+    vcbuild "%dir%kill_python.vcproj" "%conf%|%platf%" && "%builddir%kill_python%dbg_ext%.exe"\r
+)\r
+\r
+set externals_dir=%dir%..\..\externals\r
+if '%build_tkinter%'=='true' (\r
+    if '%platf%'=='x64' (\r
+        set tcltkdir=%externals_dir%\tcltk64\r
+        set machine=AMD64\r
+    ) else (\r
+        set tcltkdir=%externals_dir%\tcltk\r
+        set machine=IX86\r
+    )\r
+    if '%conf%'=='Debug' (\r
+        set tcl_dbg_ext=g\r
+        set debug_flag=1\r
+    ) else (\r
+        set tcl_dbg_ext=\r
+        set debug_flag=0\r
+    )\r
+    set tcldir=%externals_dir%\tcl-8.5.15.0\r
+    set tkdir=%externals_dir%\tk-8.5.15.0\r
+    set tixdir=%externals_dir%\tix-8.4.3.5\r
+)\r
+if '%build_tkinter%'=='true' (\r
+    if not exist "%tcltkdir%\bin\tcl85%tcl_dbg_ext%.dll" (\r
+        @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install\r
+        pushd "%tcldir%\win"\r
+        nmake -f makefile.vc MACHINE=%machine% DEBUG=%debug_flag% INSTALLDIR="%tcltkdir%" clean all\r
+        nmake -f makefile.vc MACHINE=%machine% DEBUG=%debug_flag% INSTALLDIR="%tcltkdir%" install\r
+        popd\r
+    )\r
+\r
+    if not exist "%tcltkdir%\bin\tk85%tcl_dbg_ext%.dll" (\r
+        pushd "%tkdir%\win"\r
+        nmake -f makefile.vc MACHINE=%machine% DEBUG=%debug_flag% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" clean\r
+        nmake -f makefile.vc MACHINE=%machine% DEBUG=%debug_flag% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" all\r
+        nmake -f makefile.vc MACHINE=%machine% DEBUG=%debug_flag% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" install\r
+        popd\r
+    )\r
+\r
+    if not exist "%tcltkdir%\lib\tix8.4.3\tix84%tcl_dbg_ext%.dll" (\r
+        pushd "%tixdir%\win"\r
+        nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" clean\r
+        nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" all\r
+        nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" install\r
+        popd\r
+    )\r
+)\r
+\r
+rem Call on VCBuild to do the work, echo the command.\r
+rem Passing %1-9 is not the preferred option, but argument parsing in\r
+rem batch is, shall we say, "lackluster"\r
+echo on\r
+vcbuild "%dir%pcbuild.sln" %target% "%conf%|%platf%" %1 %2 %3 %4 %5 %6 %7 %8 %9\r
diff --git a/PC/VS9.0/build_env.bat b/PC/VS9.0/build_env.bat
new file mode 100644 (file)
index 0000000..01024cf
--- /dev/null
@@ -0,0 +1 @@
+@%comspec% /k env.bat %*\r
diff --git a/PC/VS9.0/build_pgo.bat b/PC/VS9.0/build_pgo.bat
new file mode 100644 (file)
index 0000000..d28a767
--- /dev/null
@@ -0,0 +1,41 @@
+@echo off\r
+rem A batch program to build PGO (Profile guided optimization) by first\r
+rem building instrumented binaries, then running the testsuite, and\r
+rem finally building the optimized code.\r
+rem Note, after the first instrumented run, one can just keep on\r
+rem building the PGUpdate configuration while developing.\r
+\r
+setlocal\r
+set platf=Win32\r
+\r
+rem use the performance testsuite.  This is quick and simple\r
+set job1=..\..\tools\pybench\pybench.py -n 1 -C 1 --with-gc\r
+set path1=..\..\tools\pybench\r
+\r
+rem or the whole testsuite for more thorough testing\r
+set job2=..\..\lib\test\regrtest.py\r
+set path2=..\..\lib\r
+\r
+set job=%job1%\r
+set clrpath=%path1%\r
+\r
+:CheckOpts\r
+if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts\r
+if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts\r
+\r
+set PGI=%platf%-pgi\r
+set PGO=%platf%-pgo\r
+\r
+@echo on\r
+rem build the instrumented version\r
+call build -p %platf% -c PGInstrument\r
+\r
+rem remove .pyc files, .pgc files and execute the job\r
+%PGI%\python.exe rmpyc.py %clrpath%\r
+del %PGI%\*.pgc\r
+%PGI%\python.exe %job%\r
+\r
+rem finally build the optimized version\r
+if exist %PGO% del /s /q %PGO%\r
+call build -p %platf% -c PGUpdate\r
+\r
diff --git a/PC/VS9.0/build_ssl.bat b/PC/VS9.0/build_ssl.bat
new file mode 100644 (file)
index 0000000..f06c2d1
--- /dev/null
@@ -0,0 +1,12 @@
+@echo off\r
+if not defined HOST_PYTHON (\r
+  if %1 EQU Debug (\r
+    set HOST_PYTHON=python_d.exe\r
+    if not exist python27_d.dll exit 1\r
+  ) ELSE (\r
+    set HOST_PYTHON=python.exe\r
+    if not exist python27.dll exit 1\r
+  )\r
+)\r
+%HOST_PYTHON% build_ssl.py %1 %2 %3\r
+\r
diff --git a/PC/VS9.0/build_ssl.py b/PC/VS9.0/build_ssl.py
new file mode 100644 (file)
index 0000000..95e0e78
--- /dev/null
@@ -0,0 +1,245 @@
+from __future__ import with_statement, print_function
+# Script for building the _ssl and _hashlib modules for Windows.
+# Uses Perl to setup the OpenSSL environment correctly
+# and build OpenSSL, then invokes a simple nmake session
+# for the actual _ssl.pyd and _hashlib.pyd DLLs.
+
+# THEORETICALLY, you can:
+# * Unpack the latest SSL release one level above your main Python source
+#   directory.  It is likely you will already find the zlib library and
+#   any other external packages there.
+# * Install ActivePerl and ensure it is somewhere on your path.
+# * Run this script from the PCBuild directory.
+#
+# it should configure and build SSL, then build the _ssl and _hashlib
+# Python extensions without intervention.
+
+# Modified by Christian Heimes
+# Now this script supports pre-generated makefiles and assembly files.
+# Developers don't need an installation of Perl anymore to build Python. A svn
+# checkout from our svn repository is enough.
+#
+# In Order to create the files in the case of an update you still need Perl.
+# Run build_ssl in this order:
+# python.exe build_ssl.py Release x64
+# python.exe build_ssl.py Release Win32
+
+from __future__ import with_statement
+import os, sys, re, shutil
+
+# Find all "foo.exe" files on the PATH.
+def find_all_on_path(filename, extras = None):
+    entries = os.environ["PATH"].split(os.pathsep)
+    ret = []
+    for p in entries:
+        fname = os.path.abspath(os.path.join(p, filename))
+        if os.path.isfile(fname) and fname not in ret:
+            ret.append(fname)
+    if extras:
+        for p in extras:
+            fname = os.path.abspath(os.path.join(p, filename))
+            if os.path.isfile(fname) and fname not in ret:
+                ret.append(fname)
+    return ret
+
+# Find a suitable Perl installation for OpenSSL.
+# cygwin perl does *not* work.  ActivePerl does.
+# Being a Perl dummy, the simplest way I can check is if the "Win32" package
+# is available.
+def find_working_perl(perls):
+    for perl in perls:
+        fh = os.popen('"%s" -e "use Win32;"' % perl)
+        fh.read()
+        rc = fh.close()
+        if rc:
+            continue
+        return perl
+    print("Can not find a suitable PERL:")
+    if perls:
+        print(" the following perl interpreters were found:")
+        for p in perls:
+            print(" ", p)
+        print(" None of these versions appear suitable for building OpenSSL")
+    else:
+        print(" NO perl interpreters were found on this machine at all!")
+    print(" Please install ActivePerl and ensure it appears on your path")
+    return None
+
+# Fetch SSL directory from VC properties
+def get_ssl_dir():
+    propfile = (os.path.join(os.path.dirname(__file__), 'pyproject.vsprops'))
+    with open(propfile) as f:
+        m = re.search('openssl-([^"]+)"', f.read())
+        return "..\..\externals\openssl-"+m.group(1)
+
+
+def create_makefile64(makefile, m32):
+    """Create and fix makefile for 64bit
+
+    Replace 32 with 64bit directories
+    """
+    if not os.path.isfile(m32):
+        return
+    with open(m32) as fin:
+        with open(makefile, 'w') as fout:
+            for line in fin:
+                line = line.replace("=tmp32", "=tmp64")
+                line = line.replace("=out32", "=out64")
+                line = line.replace("=inc32", "=inc64")
+                # force 64 bit machine
+                line = line.replace("MKLIB=lib", "MKLIB=lib /MACHINE:X64")
+                line = line.replace("LFLAGS=", "LFLAGS=/MACHINE:X64 ")
+                # don't link against the lib on 64bit systems
+                line = line.replace("bufferoverflowu.lib", "")
+                fout.write(line)
+    os.unlink(m32)
+
+def fix_makefile(makefile):
+    """Fix some stuff in all makefiles
+    """
+    if not os.path.isfile(makefile):
+        return
+    fin = open(makefile)
+    with open(makefile) as fin:
+        lines = fin.readlines()
+    with open(makefile, 'w') as fout:
+        for line in lines:
+            if line.startswith("PERL="):
+                continue
+            if line.startswith("CP="):
+                line = "CP=copy\n"
+            if line.startswith("MKDIR="):
+                line = "MKDIR=mkdir\n"
+            if line.startswith("CFLAG="):
+                line = line.strip()
+                for algo in ("RC5", "MDC2", "IDEA"):
+                    noalgo = " -DOPENSSL_NO_%s" % algo
+                    if noalgo not in line:
+                        line = line + noalgo
+                line = line + '\n'
+            fout.write(line)
+
+def run_configure(configure, do_script):
+    print("perl Configure "+configure+" no-idea no-mdc2")
+    os.system("perl Configure "+configure+" no-idea no-mdc2")
+    print(do_script)
+    os.system(do_script)
+
+def main():
+    build_all = "-a" in sys.argv
+    if sys.argv[1] == "Release":
+        debug = False
+    elif sys.argv[1] == "Debug":
+        debug = True
+    else:
+        raise ValueError(str(sys.argv))
+
+    if sys.argv[2] == "Win32":
+        arch = "x86"
+        configure = "VC-WIN32"
+        do_script = "ms\\do_nasm"
+        makefile="ms\\nt.mak"
+        m32 = makefile
+    elif sys.argv[2] == "x64":
+        arch="amd64"
+        configure = "VC-WIN64A"
+        do_script = "ms\\do_win64a"
+        makefile = "ms\\nt64.mak"
+        m32 = makefile.replace('64', '')
+        #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON"
+    else:
+        raise ValueError(str(sys.argv))
+
+    make_flags = ""
+    if build_all:
+        make_flags = "-a"
+    # perl should be on the path, but we also look in "\perl" and "c:\\perl"
+    # as "well known" locations
+    perls = find_all_on_path("perl.exe", [r"\perl\bin",
+                                          r"C:\perl\bin",
+                                          r"\perl64\bin",
+                                          r"C:\perl64\bin",
+                                         ])
+    perl = find_working_perl(perls)
+    if perl:
+        print("Found a working perl at '%s'" % (perl,))
+    else:
+        print("No Perl installation was found. Existing Makefiles are used.")
+    sys.stdout.flush()
+    # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live.
+    ssl_dir = get_ssl_dir()
+    if ssl_dir is None:
+        sys.exit(1)
+
+    # add our copy of NASM to PATH.  It will be on the same level as openssl
+    for dir in os.listdir(os.path.join(ssl_dir, os.pardir)):
+        if dir.startswith('nasm'):
+            nasm_dir = os.path.join(ssl_dir, os.pardir, dir)
+            nasm_dir = os.path.abspath(nasm_dir)
+            old_path = os.environ['PATH']
+            os.environ['PATH'] = os.pathsep.join([nasm_dir, old_path])
+            break
+    else:
+        print('NASM was not found, make sure it is on PATH')
+
+
+    old_cd = os.getcwd()
+    try:
+        os.chdir(ssl_dir)
+        # rebuild makefile when we do the role over from 32 to 64 build
+        if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile):
+            os.unlink(m32)
+
+        # If the ssl makefiles do not exist, we invoke Perl to generate them.
+        # Due to a bug in this script, the makefile sometimes ended up empty
+        # Force a regeneration if it is.
+        if not os.path.isfile(makefile) or os.path.getsize(makefile)==0:
+            if perl is None:
+                print("Perl is required to build the makefiles!")
+                sys.exit(1)
+
+            print("Creating the makefiles...")
+            sys.stdout.flush()
+            # Put our working Perl at the front of our path
+            os.environ["PATH"] = os.path.dirname(perl) + \
+                                          os.pathsep + \
+                                          os.environ["PATH"]
+            run_configure(configure, do_script)
+            if debug:
+                print("OpenSSL debug builds aren't supported.")
+            #if arch=="x86" and debug:
+            #    # the do_masm script in openssl doesn't generate a debug
+            #    # build makefile so we generate it here:
+            #    os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile)
+
+            if arch == "amd64":
+                create_makefile64(makefile, m32)
+            fix_makefile(makefile)
+            shutil.copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
+            shutil.copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
+
+        # Now run make.
+        if arch == "amd64":
+            rc = os.system("nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm")
+            if rc:
+                print("nasm assembler has failed.")
+                sys.exit(rc)
+
+        shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
+        shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
+
+        #makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
+        makeCommand = "nmake /nologo -f \"%s\"" % makefile
+        print("Executing ssl makefiles:", makeCommand)
+        sys.stdout.flush()
+        rc = os.system(makeCommand)
+        if rc:
+            print("Executing "+makefile+" failed")
+            print(rc)
+            sys.exit(rc)
+    finally:
+        os.chdir(old_cd)
+    sys.exit(rc)
+
+if __name__=='__main__':
+    main()
diff --git a/PC/VS9.0/build_tkinter.py b/PC/VS9.0/build_tkinter.py
new file mode 100644 (file)
index 0000000..1241864
--- /dev/null
@@ -0,0 +1,82 @@
+"""Script to compile the dependencies of _tkinter
+
+Copyright (c) 2007 by Christian Heimes <christian@cheimes.de>
+
+Licensed to PSF under a Contributor Agreement.
+"""
+
+import os
+import sys
+
+here = os.path.abspath(os.path.dirname(__file__))
+par = os.path.pardir
+
+TCL = "tcl8.5.2"
+TK = "tk8.5.2"
+TIX = "tix-8.4.0.x"
+
+ROOT = os.path.abspath(os.path.join(here, par, par))
+# Windows 2000 compatibility: WINVER 0x0500
+# http://msdn2.microsoft.com/en-us/library/aa383745.aspx
+NMAKE = ('nmake /nologo /f %s '
+    'COMPILERFLAGS=\"-DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=NTDDI_WIN2KSP4\" '
+    '%s %s')
+
+def nmake(makefile, command="", **kw):
+    defines = ' '.join('%s=%s' % i for i in kw.items())
+    cmd = NMAKE % (makefile, defines, command)
+    print("\n\n"+cmd+"\n")
+    if os.system(cmd) != 0:
+        raise RuntimeError(cmd)
+
+def build(platform, clean):
+    if platform == "Win32":
+        dest = os.path.join(ROOT, "tcltk")
+        machine = "X86"
+    elif platform == "AMD64":
+        dest = os.path.join(ROOT, "tcltk64")
+        machine = "AMD64"
+    else:
+        raise ValueError(platform)
+
+    # TCL
+    tcldir = os.path.join(ROOT, TCL)
+    if 1:
+        os.chdir(os.path.join(tcldir, "win"))
+        if clean:
+            nmake("makefile.vc", "clean")
+        nmake("makefile.vc", MACHINE=machine)
+        nmake("makefile.vc", "install", INSTALLDIR=dest, MACHINE=machine)
+
+    # TK
+    if 1:
+        os.chdir(os.path.join(ROOT, TK, "win"))
+        if clean:
+            nmake("makefile.vc", "clean", DEBUG=0, TCLDIR=tcldir)
+        nmake("makefile.vc", DEBUG=0, MACHINE=machine)
+        nmake("makefile.vc", "install", DEBUG=0, INSTALLDIR=dest, MACHINE=machine)
+
+    # TIX
+    if 1:
+        # python9.mak is available at http://svn.python.org
+        os.chdir(os.path.join(ROOT, TIX, "win"))
+        if clean:
+            nmake("python.mak", "clean")
+        nmake("python.mak", MACHINE=machine, INSTALL_DIR=dest)
+        nmake("python.mak", "install", INSTALL_DIR=dest)
+
+def main():
+    if len(sys.argv) < 2 or sys.argv[1] not in ("Win32", "AMD64"):
+        print("%s Win32|AMD64" % sys.argv[0])
+        sys.exit(1)
+
+    if "-c" in sys.argv:
+        clean = True
+    else:
+        clean = False
+
+    build(sys.argv[1], clean)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/PC/VS9.0/bz2.vcproj b/PC/VS9.0/bz2.vcproj
new file mode 100644 (file)
index 0000000..5593641
--- /dev/null
@@ -0,0 +1,581 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="bz2"\r
+       ProjectGUID="{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"\r
+       RootNamespace="bz2"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="$(bz2Dir)"\r
+                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D170000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\bz2module.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="bzip2 1.0.6 Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\bzlib.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\bzlib_private.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="bzip2 1.0.6 Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\blocksort.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\bzlib.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\compress.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\crctable.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\decompress.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\huffman.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(bz2Dir)\randtable.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/debug.vsprops b/PC/VS9.0/debug.vsprops
new file mode 100644 (file)
index 0000000..bc643cb
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="debug"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               PreprocessorDefinitions="_DEBUG"\r
+       />\r
+       <UserMacro\r
+               Name="KillPythonExe"\r
+               Value="$(OutDir)\kill_python_d.exe"\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/env.bat b/PC/VS9.0/env.bat
new file mode 100644 (file)
index 0000000..57fc116
--- /dev/null
@@ -0,0 +1,4 @@
+@echo off\r
+echo Build environments: x86, ia64, amd64, x86_amd64, x86_ia64\r
+echo.\r
+call "%VS90COMNTOOLS%..\..\VC\vcvarsall.bat" %*\r
diff --git a/PC/VS9.0/field3.py b/PC/VS9.0/field3.py
new file mode 100644 (file)
index 0000000..edcbe36
--- /dev/null
@@ -0,0 +1,35 @@
+# An absurd workaround for the lack of arithmetic in MS's resource compiler.
+# After building Python, run this, then paste the output into the appropriate
+# part of PC\python_nt.rc.
+# Example output:
+#
+# * For 2.3a0,
+# * PY_MICRO_VERSION = 0
+# * PY_RELEASE_LEVEL = 'alpha' = 0xA
+# * PY_RELEASE_SERIAL = 1
+# *
+# * and 0*1000 + 10*10 + 1 = 101.
+# */
+# #define FIELD3 101
+
+import sys
+
+major, minor, micro, level, serial = sys.version_info
+levelnum = {'alpha': 0xA,
+            'beta': 0xB,
+            'candidate': 0xC,
+            'final': 0xF,
+           }[level]
+string = sys.version.split()[0] # like '2.3a0'
+
+print(" * For %s," % string)
+print(" * PY_MICRO_VERSION = %d" % micro)
+print(" * PY_RELEASE_LEVEL = %r = %s" % (level, hex(levelnum)))
+print(" * PY_RELEASE_SERIAL = %d" % serial)
+print(" *")
+
+field3 = micro * 1000 + levelnum * 10 + serial
+
+print(" * and %d*1000 + %d*10 + %d = %d" % (micro, levelnum, serial, field3))
+print(" */")
+print("#define FIELD3", field3)
diff --git a/PC/VS9.0/idle.bat b/PC/VS9.0/idle.bat
new file mode 100644 (file)
index 0000000..5ab15f5
--- /dev/null
@@ -0,0 +1,15 @@
+@echo off\r
+rem start idle\r
+rem Usage:  idle [-d]\r
+rem -d   Run Debug build (python_d.exe).  Else release build.\r
+\r
+setlocal\r
+set exe=python\r
+PATH %PATH%;..\..\tcltk\bin\r
+\r
+if "%1"=="-d" (set exe=python_d) & shift\r
+\r
+set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+\r
+echo on\r
+%cmd%\r
diff --git a/PC/VS9.0/installer.bmp b/PC/VS9.0/installer.bmp
new file mode 100644 (file)
index 0000000..1875e19
Binary files /dev/null and b/PC/VS9.0/installer.bmp differ
diff --git a/PC/VS9.0/kill_python.c b/PC/VS9.0/kill_python.c
new file mode 100644 (file)
index 0000000..f3880fc
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * Helper program for killing lingering python[_d].exe processes before
+ * building, thus attempting to avoid build failures due to files being
+ * locked.
+ */
+
+#include <windows.h>
+#include <wchar.h>
+#include <tlhelp32.h>
+#include <stdio.h>
+
+#pragma comment(lib, "psapi")
+
+#ifdef _DEBUG
+#define PYTHON_EXE          (L"python_d.exe")
+#define PYTHON_EXE_LEN      (12)
+#define KILL_PYTHON_EXE     (L"kill_python_d.exe")
+#define KILL_PYTHON_EXE_LEN (17)
+#else
+#define PYTHON_EXE          (L"python.exe")
+#define PYTHON_EXE_LEN      (10)
+#define KILL_PYTHON_EXE     (L"kill_python.exe")
+#define KILL_PYTHON_EXE_LEN (15)
+#endif
+
+int
+main(int argc, char **argv)
+{
+    HANDLE   hp, hsp, hsm; /* process, snapshot processes, snapshot modules */
+    DWORD    dac, our_pid;
+    size_t   len;
+    wchar_t  path[MAX_PATH+1];
+
+    MODULEENTRY32W  me;
+    PROCESSENTRY32W pe;
+
+    me.dwSize = sizeof(MODULEENTRY32W);
+    pe.dwSize = sizeof(PROCESSENTRY32W);
+
+    memset(path, 0, MAX_PATH+1);
+
+    our_pid = GetCurrentProcessId();
+
+    hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, our_pid);
+    if (hsm == INVALID_HANDLE_VALUE) {
+        printf("CreateToolhelp32Snapshot[1] failed: %d\n", GetLastError());
+        return 1;
+    }
+
+    if (!Module32FirstW(hsm, &me)) {
+        printf("Module32FirstW[1] failed: %d\n", GetLastError());
+        CloseHandle(hsm);
+        return 1;
+    }
+
+    /*
+     * Enumerate over the modules for the current process in order to find
+     * kill_process[_d].exe, then take a note of the directory it lives in.
+     */
+    do {
+        if (_wcsnicmp(me.szModule, KILL_PYTHON_EXE, KILL_PYTHON_EXE_LEN))
+            continue;
+
+        len = wcsnlen_s(me.szExePath, MAX_PATH) - KILL_PYTHON_EXE_LEN;
+        wcsncpy_s(path, MAX_PATH+1, me.szExePath, len); 
+
+        break;
+
+    } while (Module32NextW(hsm, &me));
+
+    CloseHandle(hsm);
+
+    if (path == NULL) {
+        printf("failed to discern directory of running process\n");
+        return 1;
+    }
+
+    /*
+     * Take a snapshot of system processes.  Enumerate over the snapshot,
+     * looking for python processes.  When we find one, verify it lives
+     * in the same directory we live in.  If it does, kill it.  If we're
+     * unable to kill it, treat this as a fatal error and return 1.
+     * 
+     * The rationale behind this is that we're called at the start of the 
+     * build process on the basis that we'll take care of killing any
+     * running instances, such that the build won't encounter permission
+     * denied errors during linking. If we can't kill one of the processes,
+     * we can't provide this assurance, and the build shouldn't start.
+     */
+
+    hsp = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+    if (hsp == INVALID_HANDLE_VALUE) {
+        printf("CreateToolhelp32Snapshot[2] failed: %d\n", GetLastError());
+        return 1;
+    }
+
+    if (!Process32FirstW(hsp, &pe)) {
+        printf("Process32FirstW failed: %d\n", GetLastError());
+        CloseHandle(hsp);
+        return 1;
+    }
+
+    dac = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE;
+    do {
+
+        /*
+         * XXX TODO: if we really wanted to be fancy, we could check the 
+         * modules for all processes (not just the python[_d].exe ones)
+         * and see if any of our DLLs are loaded (i.e. python30[_d].dll),
+         * as that would also inhibit our ability to rebuild the solution.
+         * Not worth loosing sleep over though; for now, a simple check 
+         * for just the python executable should be sufficient.
+         */
+
+        if (_wcsnicmp(pe.szExeFile, PYTHON_EXE, PYTHON_EXE_LEN))
+            /* This isn't a python process. */
+            continue;
+
+        /* It's a python process, so figure out which directory it's in... */
+        hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe.th32ProcessID);
+        if (hsm == INVALID_HANDLE_VALUE)
+            /* 
+             * If our module snapshot fails (which will happen if we don't own
+             * the process), just ignore it and continue.  (It seems different
+             * versions of Windows return different values for GetLastError()
+             * in this situation; it's easier to just ignore it and move on vs.
+             * stopping the build for what could be a false positive.)
+             */
+             continue;
+
+        if (!Module32FirstW(hsm, &me)) {
+            printf("Module32FirstW[2] failed: %d\n", GetLastError());
+            CloseHandle(hsp);
+            CloseHandle(hsm);
+            return 1;
+        }
+
+        do {
+            if (_wcsnicmp(me.szModule, PYTHON_EXE, PYTHON_EXE_LEN))
+                /* Wrong module, we're looking for python[_d].exe... */
+                continue;
+
+            if (_wcsnicmp(path, me.szExePath, len))
+                /* Process doesn't live in our directory. */
+                break;
+
+            /* Python process residing in the right directory, kill it!  */
+            hp = OpenProcess(dac, FALSE, pe.th32ProcessID);
+            if (!hp) {
+                printf("OpenProcess failed: %d\n", GetLastError());
+                CloseHandle(hsp);
+                CloseHandle(hsm);
+                return 1;
+            }
+
+            if (!TerminateProcess(hp, 1)) {
+                printf("TerminateProcess failed: %d\n", GetLastError());
+                CloseHandle(hsp);
+                CloseHandle(hsm);
+                CloseHandle(hp);
+                return 1;
+            }
+
+            CloseHandle(hp);
+            break;
+
+        } while (Module32NextW(hsm, &me));
+
+        CloseHandle(hsm);
+
+    } while (Process32NextW(hsp, &pe));
+
+    CloseHandle(hsp);
+
+    return 0;
+}
+
+/* vi: set ts=8 sw=4 sts=4 expandtab */
diff --git a/PC/VS9.0/kill_python.vcproj b/PC/VS9.0/kill_python.vcproj
new file mode 100644 (file)
index 0000000..a34107a
--- /dev/null
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="kill_python"\r
+       ProjectGUID="{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"\r
+       RootNamespace="kill_python"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName)_d.exe"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName)_d.exe"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\kill_python.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/make_buildinfo.c b/PC/VS9.0/make_buildinfo.c
new file mode 100644 (file)
index 0000000..1cc71f1
--- /dev/null
@@ -0,0 +1,94 @@
+#include <windows.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
+#define CMD_SIZE 500
+
+/* This file creates the getbuildinfo.o object, by first
+   invoking subwcrev.exe (if found), and then invoking cl.exe.
+   As a side effect, it might generate PCBuild\getbuildinfo2.c
+   also. If this isn't a subversion checkout, or subwcrev isn't
+   found, it compiles ..\\Modules\\getbuildinfo.c instead.
+
+   Currently, subwcrev.exe is found from the registry entries
+   of TortoiseSVN.
+
+   No attempt is made to place getbuildinfo.o into the proper
+   binary directory. This isn't necessary, as this tool is
+   invoked as a pre-link step for pythoncore, so that overwrites
+   any previous getbuildinfo.o.
+
+*/
+
+int make_buildinfo2()
+{
+    struct _stat st;
+    HKEY hTortoise;
+    char command[CMD_SIZE+1];
+    DWORD type, size;
+    if (_stat(".svn", &st) < 0)
+        return 0;
+    /* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */
+    if (_stat("no_subwcrev", &st) == 0)
+        return 0;
+    if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS &&
+        RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)
+        /* Tortoise not installed */
+        return 0;
+    command[0] = '"';  /* quote the path to the executable */
+    size = sizeof(command) - 1;
+    if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||
+        type != REG_SZ)
+        /* Registry corrupted */
+        return 0;
+    strcat_s(command, CMD_SIZE, "bin\\subwcrev.exe");
+    if (_stat(command+1, &st) < 0)
+        /* subwcrev.exe not part of the release */
+        return 0;
+    strcat_s(command, CMD_SIZE, "\" .. ..\\..\\Modules\\getbuildinfo.c getbuildinfo2.c");
+    puts(command); fflush(stdout);
+    if (system(command) < 0)
+        return 0;
+    return 1;
+}
+
+int main(int argc, char*argv[])
+{
+    char command[500] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL ";
+    int do_unlink, result;
+    if (argc != 2) {
+        fprintf(stderr, "make_buildinfo $(ConfigurationName)\n");
+        return EXIT_FAILURE;
+    }
+    if (strcmp(argv[1], "Release") == 0) {
+        strcat_s(command, CMD_SIZE, "-MD ");
+    }
+    else if (strcmp(argv[1], "Debug") == 0) {
+        strcat_s(command, CMD_SIZE, "-D_DEBUG -MDd ");
+    }
+    else if (strcmp(argv[1], "ReleaseItanium") == 0) {
+        strcat_s(command, CMD_SIZE, "-MD /USECL:MS_ITANIUM ");
+    }
+    else if (strcmp(argv[1], "ReleaseAMD64") == 0) {
+        strcat_s(command, CMD_SIZE, "-MD ");
+        strcat_s(command, CMD_SIZE, "-MD /USECL:MS_OPTERON ");
+    }
+    else {
+        fprintf(stderr, "unsupported configuration %s\n", argv[1]);
+        return EXIT_FAILURE;
+    }
+
+    if ((do_unlink = make_buildinfo2()))
+        strcat_s(command, CMD_SIZE, "getbuildinfo2.c -DSUBWCREV ");
+    else
+        strcat_s(command, CMD_SIZE, "..\\..\\Modules\\getbuildinfo.c");
+    strcat_s(command, CMD_SIZE, " -Fogetbuildinfo.o -I..\\..\\Include -I..\\..\\PC");
+    puts(command); fflush(stdout);
+    result = system(command);
+    if (do_unlink)
+        _unlink("getbuildinfo2.c");
+    if (result < 0)
+        return EXIT_FAILURE;
+    return 0;
+}
diff --git a/PC/VS9.0/make_buildinfo.vcproj b/PC/VS9.0/make_buildinfo.vcproj
new file mode 100644 (file)
index 0000000..c8646e2
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="windows-1250"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="make_buildinfo"\r
+       ProjectGUID="{C73F0EC1-358B-4177-940F-0846AC8B04CD}"\r
+       RootNamespace="make_buildinfo"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="1"\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               RuntimeLibrary="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)/make_buildinfo.exe"\r
+                               ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\make_buildinfo.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/make_versioninfo.vcproj b/PC/VS9.0/make_versioninfo.vcproj
new file mode 100644 (file)
index 0000000..5c3a6b7
--- /dev/null
@@ -0,0 +1,324 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="make_versioninfo"\r
+       ProjectGUID="{F0E0541E-F17D-430B-97C4-93ADF0DD284E}"\r
+       RootNamespace="make_versioninfo"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                               Description="Build PC/pythonnt_rc(_d).h"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\pythonnt_rc.h&#x0D;&#x0A;"\r
+                               Outputs="$(SolutionDir)..\..\PC\pythonnt_rc.h"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               EnableIntrinsicFunctions="true"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(SolutionDir)make_versioninfo.exe"\r
+                               ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"\r
+                               SubSystem="1"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\python_nt.h&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                               Description="Build PC/pythonnt_rc(_d).h"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\pythonnt_rc.h&#x0D;&#x0A;"\r
+                               Outputs="$(SolutionDir)..\..\PC\pythonnt_rc.h"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               EnableIntrinsicFunctions="true"\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(SolutionDir)make_versioninfo.exe"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\python_nt.h&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                               Description="Build PC/pythonnt_rc(_d).h"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\pythonnt_rc_d.h&#x0D;&#x0A;"\r
+                               Outputs="$(SolutionDir)..\..\PC\pythonnt_rc_d.h"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="1"\r
+                               EnableIntrinsicFunctions="false"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(SolutionDir)make_versioninfo_d.exe"\r
+                               ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"\r
+                               SubSystem="1"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\python_nt_d.h&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                               Description="Build PC/pythonnt_rc(_d).h"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\pythonnt_rc_d.h&#x0D;&#x0A;"\r
+                               Outputs="$(SolutionDir)..\..\PC\pythonnt_rc_d.h"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="1"\r
+                               EnableIntrinsicFunctions="false"\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(SolutionDir)make_versioninfo_d.exe"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\python_nt_d.h&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\make_versioninfo.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/pcbuild.sln b/PC/VS9.0/pcbuild.sln
new file mode 100644 (file)
index 0000000..725c6ea
--- /dev/null
@@ -0,0 +1,559 @@
+Microsoft Visual Studio Solution File, Format Version 10.00\r
+# Visual Studio 2008\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E}\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}"\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"\r
+       ProjectSection(SolutionItems) = preProject\r
+               ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c\r
+               readme.txt = readme.txt\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Debug|x64 = Debug|x64\r
+               PGInstrument|Win32 = PGInstrument|Win32\r
+               PGInstrument|x64 = PGInstrument|x64\r
+               PGUpdate|Win32 = PGUpdate|Win32\r
+               PGUpdate|x64 = PGUpdate|x64\r
+               Release|Win32 = Release|Win32\r
+               Release|x64 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32\r
+               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64\r
+               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64\r
+               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32\r
+               {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64\r
+               {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|Win32.Build.0 = Debug|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.ActiveCfg = Debug|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Debug|x64.Build.0 = Debug|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.ActiveCfg = Release|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|Win32.Build.0 = Release|Win32\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.ActiveCfg = Release|x64\r
+               {B4D38F3F-68FB-42EC-A45D-E00657BB3627}.Release|x64.Build.0 = Release|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64\r
+               {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64\r
+               {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64\r
+               {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64\r
+               {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64\r
+               {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64\r
+               {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64\r
+               {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64\r
+               {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64\r
+               {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64\r
+               {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64\r
+               {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64\r
+               {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32\r
+               {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64\r
+               {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64\r
+               {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64\r
+               {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64\r
+               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/PC/VS9.0/pginstrument.vsprops b/PC/VS9.0/pginstrument.vsprops
new file mode 100644 (file)
index 0000000..99c117b
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="pginstrument"\r
+       OutputDirectory="$(OutDirPGI)"\r
+       IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-pgi\$(ProjectName)\"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               Optimization="2"\r
+               InlineFunctionExpansion="1"\r
+               EnableIntrinsicFunctions="false"\r
+               FavorSizeOrSpeed="2"\r
+               OmitFramePointers="true"\r
+               EnableFiberSafeOptimizations="false"\r
+               WholeProgramOptimization="true"\r
+               StringPooling="true"\r
+               ExceptionHandling="0"\r
+               BufferSecurityCheck="false"\r
+       />\r
+       <Tool\r
+               Name="VCLinkerTool"\r
+               OptimizeReferences="2"\r
+               EnableCOMDATFolding="1"\r
+               LinkTimeCodeGeneration="2"\r
+               ProfileGuidedDatabase="$(SolutionDir)$(PlatformName)-pgi\$(TargetName).pgd"\r
+               ImportLibrary="$(OutDirPGI)\$(TargetName).lib"\r
+       />\r
+       <UserMacro\r
+               Name="OutDirPGI"\r
+               Value="$(SolutionDir)$(PlatformName)-pgi\"\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/pgupdate.vsprops b/PC/VS9.0/pgupdate.vsprops
new file mode 100644 (file)
index 0000000..26cfc2d
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="pgupdate"\r
+       OutputDirectory="$(SolutionDir)$(PlatformName)-pgo\"\r
+       InheritedPropertySheets="$(SolutionDir)\pginstrument.vsprops"\r
+       >\r
+       <Tool\r
+               Name="VCLinkerTool"\r
+               AdditionalManifestDependencies=""\r
+               LinkTimeCodeGeneration="4"\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/pyd.vsprops b/PC/VS9.0/pyd.vsprops
new file mode 100644 (file)
index 0000000..34c21e1
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="pyd"\r
+       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               PreprocessorDefinitions="Py_BUILD_CORE_MODULE"\r
+               RuntimeLibrary="2"\r
+       />\r
+       <Tool\r
+               Name="VCLinkerTool"\r
+               OutputFile="$(OutDir)\$(ProjectName).pyd"\r
+               ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"\r
+               ImportLibrary="$(OutDir)\$(TargetName).lib"\r
+               GenerateManifest="false"\r
+       />\r
+       <Tool\r
+               Name="VCManifestTool"\r
+               EmbedManifest="false"\r
+       />\r
+       <Tool\r
+               Name="VCPostBuildEventTool"\r
+               CommandLine=""\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/pyd_d.vsprops b/PC/VS9.0/pyd_d.vsprops
new file mode 100644 (file)
index 0000000..313a30b
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="pyd_d"\r
+       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               Optimization="0"\r
+               InlineFunctionExpansion="0"\r
+               EnableIntrinsicFunctions="false"\r
+               PreprocessorDefinitions="Py_BUILD_CORE_MODULE"\r
+               RuntimeLibrary="3"\r
+       />\r
+       <Tool\r
+               Name="VCLinkerTool"\r
+               OutputFile="$(OutDir)\$(ProjectName)_d.pyd"\r
+               LinkIncremental="1"\r
+               ProgramDatabaseFile="$(OutDir)\$(ProjectName)_d.pdb"\r
+               ImportLibrary="$(OutDir)\$(TargetName).lib"\r
+               GenerateManifest="false"\r
+       />\r
+       <Tool\r
+               Name="VCManifestTool"\r
+               EmbedManifest="false"\r
+       />\r
+       <Tool\r
+               Name="VCPostBuildEventTool"\r
+               CommandLine=""\r
+       />\r
+       <UserMacro\r
+               Name="PythonExe"\r
+               Value="$(SolutionDir)python_d.exe"\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/pyexpat.vcproj b/PC/VS9.0/pyexpat.vcproj
new file mode 100644 (file)
index 0000000..c616967
--- /dev/null
@@ -0,0 +1,553 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="pyexpat"\r
+       ProjectGUID="{D06B6426-4762-44CC-8BAD-D79052507F2F}"\r
+       RootNamespace="pyexpat"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".\..\..\Modules\expat"\r
+                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmlrole.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmltok.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\pyexpat.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmlparse.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmlrole.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\expat\xmltok.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/pyproject.vsprops b/PC/VS9.0/pyproject.vsprops
new file mode 100644 (file)
index 0000000..5625f9d
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="pyproject"\r
+       OutputDirectory="$(SolutionDir)"\r
+       IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-$(ConfigurationName)\$(ProjectName)\"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               Optimization="2"\r
+               InlineFunctionExpansion="1"\r
+               EnableIntrinsicFunctions="true"\r
+               AdditionalIncludeDirectories="..\..\Include; ..\..\PC"\r
+               PreprocessorDefinitions="_WIN32"\r
+               StringPooling="true"\r
+               ExceptionHandling="0"\r
+               RuntimeLibrary="0"\r
+               EnableFunctionLevelLinking="true"\r
+               WarningLevel="3"\r
+               DebugInformationFormat="3"\r
+               CompileAs="0"\r
+       />\r
+       <Tool\r
+               Name="VCLinkerTool"\r
+               LinkIncremental="1"\r
+               AdditionalLibraryDirectories="$(OutDir)"\r
+               GenerateDebugInformation="true"\r
+               ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"\r
+               SubSystem="2"\r
+               RandomizedBaseAddress="1"\r
+               DataExecutionPrevention="0"\r
+               TargetMachine="1"\r
+       />\r
+       <Tool\r
+               Name="VCResourceCompilerTool"\r
+               AdditionalIncludeDirectories="..\..\PC;..\..\Include"\r
+       />\r
+       <UserMacro\r
+               Name="PyDllName"\r
+               Value="python27"\r
+       />\r
+       <UserMacro\r
+               Name="PythonExe"\r
+               Value="$(SolutionDir)\python.exe"\r
+       />\r
+       <UserMacro\r
+               Name="externalsDir"\r
+               Value="..\..\externals"\r
+       />\r
+       <UserMacro\r
+               Name="bsddb47Dir"\r
+               Value="$(externalsDir)\db-4.7.25.0\build_windows"\r
+       />\r
+       <UserMacro\r
+               Name="bsddb47DepLibs"\r
+               Value="ws2_32.lib"\r
+       />\r
+       <UserMacro\r
+               Name="bsddbDir"\r
+               Value="$(bsddb47Dir)"\r
+       />\r
+       <UserMacro\r
+               Name="bsddbDepLibs"\r
+               Value="$(bsddb47DepLibs)"\r
+       />\r
+       <UserMacro\r
+               Name="bsddb44Dir"\r
+               Value="$(externalsDir)\db-4.4.20\build_win32"\r
+       />\r
+       <UserMacro\r
+               Name="bsddb44DepLibs"\r
+               Value=""\r
+       />\r
+       <UserMacro\r
+               Name="sqlite3Dir"\r
+               Value="$(externalsDir)\sqlite-3.6.21"\r
+       />\r
+       <UserMacro\r
+               Name="bz2Dir"\r
+               Value="$(externalsDir)\bzip2-1.0.6"\r
+       />\r
+       <UserMacro\r
+               Name="opensslDir"\r
+               Value="$(externalsDir)\openssl-1.0.2d"\r
+       />\r
+       <UserMacro\r
+               Name="tcltkDir"\r
+               Value="$(externalsDir)\tcltk"\r
+       />\r
+       <UserMacro\r
+               Name="tcltk64Dir"\r
+               Value="$(externalsDir)\tcltk64"\r
+       />\r
+       <UserMacro\r
+               Name="tcltkLib"\r
+               Value="$(tcltkDir)\lib\tcl85.lib $(tcltkDir)\lib\tk85.lib"\r
+       />\r
+       <UserMacro\r
+               Name="tcltkLibDebug"\r
+               Value="$(tcltkDir)\lib\tcl85g.lib $(tcltkDir)\lib\tk85g.lib"\r
+       />\r
+       <UserMacro\r
+               Name="tcltk64Lib"\r
+               Value="$(tcltk64Dir)\lib\tcl85.lib $(tcltk64Dir)\lib\tk85.lib"\r
+       />\r
+       <UserMacro\r
+               Name="tcltk64LibDebug"\r
+               Value="$(tcltk64Dir)\lib\tcl85g.lib $(tcltk64Dir)\lib\tk85g.lib"\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/python.vcproj b/PC/VS9.0/python.vcproj
new file mode 100644 (file)
index 0000000..65b5838
--- /dev/null
@@ -0,0 +1,637 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="python"\r
+       ProjectGUID="{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               EnableIntrinsicFunctions="false"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python_d.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               EnableIntrinsicFunctions="false"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python_d.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2100000"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\python.exe"\r
+                               SubSystem="1"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\pycon.ico"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\python_exe.rc"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\python.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/pythoncore.vcproj b/PC/VS9.0/pythoncore.vcproj
new file mode 100644 (file)
index 0000000..e6f02db
--- /dev/null
@@ -0,0 +1,1889 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="pythoncore"\r
+       ProjectGUID="{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"\r
+       RootNamespace="pythoncore"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDir)$(PyDllName).lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDir)$(PyDllName).lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="0"\r
+                               EnableIntrinsicFunctions="false"\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Debug"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName)_d.dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName)_d.pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDir)$(PyDllName)_d.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               Optimization="0"\r
+                               InlineFunctionExpansion="0"\r
+                               EnableIntrinsicFunctions="false"\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Debug"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName)_d.dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName)_d.pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDir)$(PyDllName)_d.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/Zm200 "\r
+                               AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"\r
+                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
+                               RuntimeLibrary="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories="..\..\Include"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                               Description="Generate build information..."\r
+                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="getbuildinfo.o"\r
+                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
+                               BaseAddress="0x1e000000"\r
+                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Include"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Include\abstract.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\asdl.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\ast.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\bitset.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\boolobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\bufferobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\bytes_methods.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\bytearrayobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\bytesobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\cellobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\ceval.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\classobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\cobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\code.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\codecs.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\compile.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\complexobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\cStringIO.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\datetime.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\descrobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\dictobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\dtoa.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\enumobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\errcode.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\eval.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\fileobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\floatobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\frameobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\funcobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\genobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\graminit.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\grammar.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\import.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\intobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\intrcheck.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\iterobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\listobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\longintrepr.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\longobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\marshal.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\memoryobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\metagrammar.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\methodobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\modsupport.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\moduleobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\node.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\object.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\objimpl.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\opcode.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\osdefs.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\parsetok.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\patchlevel.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pgen.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pgenheaders.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\py_curses.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pyarena.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pycapsule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pyctype.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pydebug.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pyerrors.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pyexpat.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pyfpe.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pygetopt.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pymactoolbox.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pymath.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pymem.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pyport.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pystate.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pystrcmp.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pystrtod.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\Python-ast.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\Python.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pythonrun.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\pythread.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\rangeobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\setobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\sliceobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\stringobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\structmember.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\structseq.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\symtable.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\sysmodule.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\timefuncs.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\token.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\traceback.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\tupleobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\ucnhash.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\unicodeobject.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Include\weakrefobject.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Modules"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\_bisectmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_codecsmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_collectionsmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_csv.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_functoolsmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_heapqmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_hotshot.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_json.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_localemodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_lsprof.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_math.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_math.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_randommodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_sre.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_struct.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\_weakref.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\arraymodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\audioop.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\binascii.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\cmathmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\cPickle.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\cStringIO.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\datetimemodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\errnomodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\future_builtins.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\gcmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\imageop.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\itertoolsmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\main.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\mathmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\md5.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\md5.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\md5module.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\mmapmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\operator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\parsermodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\posixmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\rotatingtree.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\rotatingtree.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\sha256module.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\sha512module.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\shamodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\signalmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\stropmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\symtablemodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\threadmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\timemodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\xxsubtype.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\zipimport.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\zlibmodule.c"\r
+                               >\r
+                       </File>\r
+                       <Filter\r
+                               Name="zlib"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\adler32.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\compress.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\crc32.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\crc32.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\deflate.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\deflate.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\gzclose.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\gzlib.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\gzread.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\gzwrite.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\infback.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inffast.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inffast.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inffixed.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inflate.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inflate.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inftrees.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\inftrees.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\trees.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\trees.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\uncompr.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\zconf.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\zconf.in.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\zlib.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\zutil.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\zlib\zutil.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+                       <Filter\r
+                               Name="cjkcodecs"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\_codecs_cn.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\_codecs_hk.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\_codecs_iso2022.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\_codecs_jp.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\_codecs_kr.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\_codecs_tw.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\alg_jisx0201.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\cjkcodecs.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\emu_jisx0213_2000.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\mappings_cn.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\mappings_hk.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\mappings_jisx0213_pair.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\mappings_jp.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\mappings_kr.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\mappings_tw.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\multibytecodec.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\cjkcodecs\multibytecodec.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+                       <Filter\r
+                               Name="_io"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\_iomodule.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\_iomodule.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\bufferedio.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\bytesio.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\fileio.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\iobase.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\stringio.c"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\Modules\_io\textio.c"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Objects"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Objects\abstract.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\boolobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\bufferobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\bytes_methods.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\bytearrayobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\capsule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\cellobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\classobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\cobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\codeobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\complexobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\stringlib\count.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\descrobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\dictobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\enumobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\exceptions.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\stringlib\fastsearch.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\fileobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\stringlib\find.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\floatobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\frameobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\funcobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\genobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\intobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\iterobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\listobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\longobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\memoryobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\methodobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\moduleobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\object.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\obmalloc.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\stringlib\partition.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\rangeobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\setobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\sliceobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\stringlib\split.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\stringobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\structseq.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\tupleobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\typeobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\unicodectype.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\unicodeobject.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\unicodetype_db.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Objects\weakrefobject.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Parser"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Parser\acceler.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\bitset.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\firstsets.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\grammar.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\grammar1.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\listnode.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\metagrammar.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\myreadline.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\node.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\parser.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\parser.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\parsetok.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\tokenizer.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Parser\tokenizer.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="PC"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\_subprocess.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\_winreg.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\config.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\dl_nt.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\errmap.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\getpathp.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\import_nt.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\msvcrtmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\PC\pyconfig.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Python"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Python\_warnings.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\asdl.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\ast.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\bltinmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\ceval.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\codecs.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\compile.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\dtoa.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\dynload_win.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\errors.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\formatter_string.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\formatter_unicode.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\frozen.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\future.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\getargs.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\getcompiler.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\getcopyright.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\getopt.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\getplatform.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\getversion.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\graminit.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\import.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\importdl.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\importdl.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\marshal.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\modsupport.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\mysnprintf.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\mystrtoul.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\peephole.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pyarena.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pyctype.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pyfpe.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pymath.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pystate.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pystrcmp.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pystrtod.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\Python-ast.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\pythonrun.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\random.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\structmember.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\symtable.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\sysmodule.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\thread.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\thread_nt.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Python\traceback.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\python_nt.rc"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r\r
diff --git a/PC/VS9.0/pythonw.vcproj b/PC/VS9.0/pythonw.vcproj
new file mode 100644 (file)
index 0000000..f7cc832
--- /dev/null
@@ -0,0 +1,618 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="pythonw"\r
+       ProjectGUID="{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               EnableIntrinsicFunctions="false"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               RuntimeLibrary="3"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw_d.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               EnableIntrinsicFunctions="false"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               RuntimeLibrary="3"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw_d.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                               PreprocessorDefinitions="_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\pythonw.exe"\r
+                               StackReserveSize="2000000"\r
+                               BaseAddress="0x1d000000"\r
+                               ImportLibrary=""\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\python_exe.rc"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\WinMain.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/readme.txt b/PC/VS9.0/readme.txt
new file mode 100644 (file)
index 0000000..92d5c8a
--- /dev/null
@@ -0,0 +1,253 @@
+Building Python using VC++ 9.0\r
+------------------------------\r
+\r
+This directory is used to build Python for Win32 and x64 platforms, e.g.\r
+Windows 2000, XP, Vista and Windows Server 2008.  In order to build 32-bit\r
+debug and release executables, Microsoft Visual C++ 2008 Express Edition is\r
+required at the very least.  In order to build 64-bit debug and release\r
+executables, Visual Studio 2008 Standard Edition is required at the very\r
+least.  In order to build all of the above, as well as generate release builds\r
+that make use of Profile Guided Optimisation (PG0), Visual Studio 2008\r
+Professional Edition is required at the very least.  The official Python\r
+releases are built with this version of Visual Studio.\r
+\r
+For other Windows platforms and compilers, see PC/readme.txt.\r
+\r
+All you need to do is open the workspace "pcbuild.sln" in Visual Studio,\r
+select the desired combination of configuration and platform and eventually\r
+build the solution. Unless you are going to debug a problem in the core or\r
+you are going to create an optimized build you want to select "Release" as\r
+configuration.\r
+\r
+The PCbuild directory is compatible with all versions of Visual Studio from\r
+VS C++ Express Edition over the standard edition up to the professional\r
+edition. However the express edition does not support features like solution\r
+folders or profile guided optimization (PGO). The missing bits and pieces\r
+won't stop you from building Python.\r
+\r
+The solution is configured to build the projects in the correct order. "Build\r
+Solution" or F7 takes care of dependencies except for x64 builds. To make\r
+cross compiling x64 builds on a 32bit OS possible the x64 builds require a\r
+32bit version of Python.\r
+\r
+NOTE:\r
+   You probably don't want to build most of the other subprojects, unless\r
+   you're building an entire Python distribution from scratch, or\r
+   specifically making changes to the subsystems they implement, or are\r
+   running a Python core buildbot test slave; see SUBPROJECTS below)\r
+\r
+When using the Debug setting, the output files have a _d added to\r
+their name:  python27_d.dll, python_d.exe, parser_d.pyd, and so on. Both\r
+the build and rt batch files accept a -d option for debug builds.\r
+\r
+The 32bit builds end up in the solution folder PCbuild while the x64 builds\r
+land in the amd64 subfolder. The PGI and PGO builds for profile guided\r
+optimization end up in their own folders, too.\r
+\r
+Legacy support\r
+--------------\r
+\r
+You can find build directories for older versions of Visual Studio and\r
+Visual C++ in the PC directory. The legacy build directories are no longer\r
+actively maintained and may not work out of the box.\r
+\r
+PC/VC6/\r
+    Visual C++ 6.0\r
+PC/VS7.1/\r
+    Visual Studio 2003 (7.1)\r
+PC/VS8.0/\r
+    Visual Studio 2005 (8.0)\r
+\r
+\r
+C RUNTIME\r
+---------\r
+\r
+Visual Studio 2008 uses version 9 of the C runtime (MSVCRT9).  The executables\r
+are linked to a CRT "side by side" assembly which must be present on the target\r
+machine.  This is available under the VC/Redist folder of your visual studio\r
+distribution. On XP and later operating systems that support\r
+side-by-side assemblies it is not enough to have the msvcrt90.dll present,\r
+it has to be there as a whole assembly, that is, a folder with the .dll\r
+and a .manifest.  Also, a check is made for the correct version.\r
+Therefore, one should distribute this assembly with the dlls, and keep\r
+it in the same directory.  For compatibility with older systems, one should\r
+also set the PATH to this directory so that the dll can be found.\r
+For more info, see the Readme in the VC/Redist folder.\r
+\r
+SUBPROJECTS\r
+-----------\r
+These subprojects should build out of the box.  Subprojects other than the\r
+main ones (pythoncore, python, pythonw) generally build a DLL (renamed to\r
+.pyd) from a specific module so that users don't have to load the code\r
+supporting that module unless they import the module.\r
+\r
+pythoncore\r
+    .dll and .lib\r
+python\r
+    .exe\r
+pythonw\r
+    pythonw.exe, a variant of python.exe that doesn't pop up a DOS box\r
+_socket\r
+    socketmodule.c\r
+_testcapi\r
+    tests of the Python C API, run via Lib/test/test_capi.py, and\r
+    implemented by module Modules/_testcapimodule.c\r
+pyexpat\r
+    Python wrapper for accelerated XML parsing, which incorporates stable\r
+    code from the Expat project:  http://sourceforge.net/projects/expat/\r
+select\r
+    selectmodule.c\r
+unicodedata\r
+    large tables of Unicode data\r
+winsound\r
+    play sounds (typically .wav files) under Windows\r
+\r
+Python-controlled subprojects that wrap external projects:\r
+_bsddb\r
+    Wraps Berkeley DB 4.7.25, which is currently built by _bsddb.vcproj.\r
+    project.\r
+_sqlite3\r
+    Wraps SQLite 3.6.21, which is currently built by sqlite3.vcproj.\r
+_tkinter\r
+    Wraps the Tk windowing system.  Unlike _bsddb and _sqlite3, there's no\r
+    corresponding tcltk.vcproj-type project that builds Tcl/Tk from vcproj's\r
+    within our pcbuild.sln, which means this module expects to find a\r
+    pre-built Tcl/Tk in either ..\externals\tcltk for 32-bit or\r
+    ..\externals\tcltk64 for 64-bit (relative to this directory).  See below\r
+    for instructions to build Tcl/Tk.\r
+bz2\r
+    Python wrapper for the libbz2 compression library.  Homepage\r
+        http://sources.redhat.com/bzip2/\r
+    Download the source from the python.org copy into the dist\r
+    directory:\r
+\r
+    svn export http://svn.python.org/projects/external/bzip2-1.0.6\r
+\r
+    ** NOTE: if you use the PCbuild\get_externals.bat approach for\r
+    obtaining external sources then you don't need to manually get the source\r
+    above via subversion. **\r
+\r
+_ssl\r
+    Python wrapper for the secure sockets library.\r
+\r
+    Get the source code through\r
+\r
+    svn export http://svn.python.org/projects/external/openssl-1.0.2d\r
+\r
+    ** NOTE: if you use the PCbuild\get_externals.bat approach for\r
+    obtaining external sources then you don't need to manually get the source\r
+    above via subversion. **\r
+\r
+    The NASM assembler is required to build OpenSSL.  If you use the\r
+    PCbuild\get_externals.bat script to get external library sources, it also\r
+    downloads a version of NASM, which the ssl build script will add to PATH.\r
+    Otherwise, you can download the NASM installer from\r
+        http://www.nasm.us/\r
+    and add NASM to your PATH.\r
+\r
+    You can also install ActivePerl from\r
+        http://www.activestate.com/activeperl/\r
+    if you like to use the official sources instead of the files from\r
+    python's subversion repository. The svn version contains pre-build\r
+    makefiles and assembly files.\r
+\r
+    The build process makes sure that no patented algorithms are included.\r
+    For now RC5, MDC2 and IDEA are excluded from the build. You may have\r
+    to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if the build process\r
+    complains about missing files or forbidden IDEA. Again the files provided\r
+    in the subversion repository are already fixed.\r
+\r
+    The MSVC project simply invokes PCBuild/build_ssl.py to perform\r
+    the build.  This Python script locates and builds your OpenSSL\r
+    installation, then invokes a simple makefile to build the final .pyd.\r
+\r
+    build_ssl.py attempts to catch the most common errors (such as not\r
+    being able to find OpenSSL sources, or not being able to find a Perl\r
+    that works with OpenSSL) and give a reasonable error message.\r
+    If you have a problem that doesn't seem to be handled correctly\r
+    (eg, you know you have ActivePerl but we can't find it), please take\r
+    a peek at build_ssl.py and suggest patches.  Note that build_ssl.py\r
+    should be able to be run directly from the command-line.\r
+\r
+    build_ssl.py/MSVC isn't clever enough to clean OpenSSL - you must do\r
+    this by hand.\r
+\r
+The subprojects above wrap external projects Python doesn't control, and as\r
+such, a little more work is required in order to download the relevant source\r
+files for each project before they can be built.  The easiest way to do this\r
+is to use the `build.bat` script in this directory to build Python, and pass\r
+the '-e' switch to tell it to use get_externals.bat to fetch external sources\r
+and build Tcl/Tk and Tix.  To use get_externals.bat, you'll need to have\r
+Subversion installed and svn.exe on your PATH.  The script will fetch external\r
+library sources from http://svn.python.org/external and place them in\r
+..\externals (relative to this directory).\r
+\r
+Building for Itanium\r
+--------------------\r
+\r
+Official support for Itanium builds have been dropped from the build. Please\r
+contact us and provide patches if you are interested in Itanium builds.\r
+\r
+Building for AMD64\r
+------------------\r
+\r
+The build process for AMD64 / x64 is very similar to standard builds. You just\r
+have to set x64 as platform. In addition, the HOST_PYTHON environment variable\r
+must point to a Python interpreter (at least 2.4), to support cross-compilation.\r
+\r
+Building Python Using the free MS Toolkit Compiler\r
+--------------------------------------------------\r
+\r
+Microsoft has withdrawn the free MS Toolkit Compiler, so this can no longer\r
+be considered a supported option. Instead you can use the free VS C++ Express\r
+Edition.\r
+\r
+Profile Guided Optimization\r
+---------------------------\r
+\r
+The solution has two configurations for PGO. The PGInstrument\r
+configuration must be build first. The PGInstrument binaries are\r
+linked against a profiling library and contain extra debug\r
+information. The PGUpdate configuration takes the profiling data and\r
+generates optimized binaries.\r
+\r
+The build_pgo.bat script automates the creation of optimized binaries. It\r
+creates the PGI files, runs the unit test suite or PyBench with the PGI\r
+python and finally creates the optimized files.\r
+\r
+http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.90).aspx\r
+\r
+Static library\r
+--------------\r
+\r
+The solution has no configuration for static libraries. However it is easy\r
+it build a static library instead of a DLL. You simply have to set the\r
+"Configuration Type" to "Static Library (.lib)" and alter the preprocessor\r
+macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may also have to\r
+change the "Runtime Library" from "Multi-threaded DLL (/MD)" to\r
+"Multi-threaded (/MT)".\r
+\r
+Visual Studio properties\r
+------------------------\r
+\r
+The PCbuild solution makes heavy use of Visual Studio property files\r
+(*.vsprops). The properties can be viewed and altered in the Property\r
+Manager (View -> Other Windows -> Property Manager).\r
+\r
+ * debug (debug macro: _DEBUG)\r
+ * pginstrument (PGO)\r
+ * pgupdate (PGO)\r
+    +-- pginstrument\r
+ * pyd (python extension, release build)\r
+    +-- release\r
+    +-- pyproject\r
+ * pyd_d (python extension, debug build)\r
+    +-- debug\r
+    +-- pyproject\r
+ * pyproject (base settings for all projects, user macros like PyDllName)\r
+ * release (release macro: NDEBUG)\r
+ * x64 (AMD64 / x64 platform specific settings)\r
+\r
+The pyproject propertyfile defines _WIN32 and x64 defines _WIN64 and _M_X64\r
+although the macros are set by the compiler, too. The GUI doesn't always know\r
+about the macros and confuse the user with false information.\r
diff --git a/PC/VS9.0/release.vsprops b/PC/VS9.0/release.vsprops
new file mode 100644 (file)
index 0000000..08def90
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="release"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               PreprocessorDefinitions="NDEBUG"\r
+       />\r
+       <UserMacro\r
+               Name="KillPythonExe"\r
+               Value="$(OutDir)\kill_python.exe"\r
+       />      \r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/rmpyc.py b/PC/VS9.0/rmpyc.py
new file mode 100644 (file)
index 0000000..a1e75bb
--- /dev/null
@@ -0,0 +1,25 @@
+# Remove all the .pyc and .pyo files under ../Lib.
+
+
+def deltree(root):
+    import os
+    from os.path import join
+
+    npyc = npyo = 0
+    for root, dirs, files in os.walk(root):
+        for name in files:
+            delete = False
+            if name.endswith('.pyc'):
+                delete = True
+                npyc += 1
+            elif name.endswith('.pyo'):
+                delete = True
+                npyo += 1
+
+            if delete:
+                os.remove(join(root, name))
+
+    return npyc, npyo
+
+npyc, npyo = deltree("../Lib")
+print(npyc, ".pyc deleted,", npyo, ".pyo deleted")
diff --git a/PC/VS9.0/rt.bat b/PC/VS9.0/rt.bat
new file mode 100644 (file)
index 0000000..a63a47b
--- /dev/null
@@ -0,0 +1,60 @@
+@echo off\r
+rem Run Tests.  Run the regression test suite.\r
+rem Usage:  rt [-d] [-O] [-q] [-x64] regrtest_args\r
+rem -d   Run Debug build (python_d.exe).  Else release build.\r
+rem -O   Run python.exe or python_d.exe (see -d) with -O.\r
+rem -q   "quick" -- normally the tests are run twice, the first time\r
+rem      after deleting all the .py[co] files reachable from Lib/.\r
+rem      -q runs the tests just once, and without deleting .py[co] files.\r
+rem -x64 Run the 64-bit build of python (or python_d if -d was specified)\r
+rem      from the 'amd64' dir instead of the 32-bit build in this dir.\r
+rem All leading instances of these switches are shifted off, and\r
+rem whatever remains (up to 9 arguments) is passed to regrtest.py.\r
+rem For example,\r
+rem     rt -O -d -x test_thread\r
+rem runs\r
+rem     python_d -O ../lib/test/regrtest.py -x test_thread\r
+rem twice, and\r
+rem     rt -q -g test_binascii\r
+rem runs\r
+rem     python_d ../lib/test/regrtest.py -g test_binascii\r
+rem to generate the expected-output file for binascii quickly.\r
+rem\r
+rem Confusing:  if you want to pass a comma-separated list, like\r
+rem     -u network,largefile\r
+rem then you have to quote it on the rt line, like\r
+rem     rt -u "network,largefile"\r
+\r
+setlocal\r
+\r
+set pcbuild=%~dp0\r
+set prefix=%pcbuild%\r
+set suffix=\r
+set qmode=\r
+set dashO=\r
+set tcltk=tcltk\r
+\r
+:CheckOpts\r
+if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts\r
+if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts\r
+if "%1"=="-d" (set suffix=_d)    & shift & goto CheckOpts\r
+if "%1"=="-x64" (set prefix=%prefix%amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts\r
+\r
+PATH %PATH%;%pcbuild%..\..\externals\%tcltk%\bin\r
+set exe="%prefix%\python%suffix%"\r
+set cmd=%exe% %dashO% -Wd -3 -E -tt "%pcbuild%\..\..\Lib\test\regrtest.py" %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+if defined qmode goto Qmode\r
+\r
+echo Deleting .pyc/.pyo files ...\r
+%exe% "%pcbuild%\rmpyc.py"\r
+\r
+echo on\r
+%cmd%\r
+@echo off\r
+\r
+echo About to run again without deleting .pyc/.pyo first:\r
+pause\r
+\r
+:Qmode\r
+echo on\r
+%cmd%\r
diff --git a/PC/VS9.0/select.vcproj b/PC/VS9.0/select.vcproj
new file mode 100644 (file)
index 0000000..f7077c9
--- /dev/null
@@ -0,0 +1,537 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="select"\r
+       ProjectGUID="{18CAE28C-B454-46C1-87A0-493D91D97F03}"\r
+       RootNamespace="select"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="ws2_32.lib"\r
+                               IgnoreDefaultLibraryNames="libc"\r
+                               BaseAddress="0x1D110000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\selectmodule.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/sqlite3.vcproj b/PC/VS9.0/sqlite3.vcproj
new file mode 100644 (file)
index 0000000..e1771f4
--- /dev/null
@@ -0,0 +1,537 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="sqlite3"\r
+       ProjectGUID="{A1A295E5-463C-437F-81CA-1F32367685DA}"\r
+       RootNamespace="sqlite3"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops;.\debug.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName)_d.dll"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops;.\debug.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName)_d.dll"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(sqlite3Dir)&quot;"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="$(sqlite3Dir)\sqlite3.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(sqlite3Dir)\sqlite3ext.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="$(sqlite3Dir)\sqlite3.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/sqlite3.vsprops b/PC/VS9.0/sqlite3.vsprops
new file mode 100644 (file)
index 0000000..b502df5
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="sqlite3"\r
+       InheritedPropertySheets=".\pyproject.vsprops"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
+               PreprocessorDefinitions="SQLITE_API=__declspec(dllexport)"\r
+               WarningLevel="1"\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/VS9.0/unicodedata.vcproj b/PC/VS9.0/unicodedata.vcproj
new file mode 100644 (file)
index 0000000..515b1c7
--- /dev/null
@@ -0,0 +1,533 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="unicodedata"\r
+       ProjectGUID="{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"\r
+       RootNamespace="unicodedata"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               BaseAddress="0x1D120000"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\unicodedata_db.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\Modules\unicodename_db.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\Modules\unicodedata.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/vs9to8.py b/PC/VS9.0/vs9to8.py
new file mode 100644 (file)
index 0000000..a4e6801
--- /dev/null
@@ -0,0 +1,36 @@
+from __future__ import with_statement
+import os
+
+def vs9to8(src, dest):
+    for name in os.listdir(src):
+        path, ext = os.path.splitext(name)
+        if ext.lower() not in ('.sln', '.vcproj', '.vsprops'):
+            continue
+
+        filename = os.path.normpath(os.path.join(src, name))
+        destname = os.path.normpath(os.path.join(dest, name))
+        print("%s -> %s" % (filename, destname))
+
+        with open(filename, 'rU') as fin:
+            lines = fin.read()
+            lines = lines.replace('Version="9,00"', 'Version="8.00"')
+            lines = lines.replace('Version="9.00"', 'Version="8.00"')
+            lines = lines.replace('Format Version 10.00', 'Format Version 9.00')
+            lines = lines.replace('Visual Studio 2008', 'Visual Studio 2005')
+
+            lines = lines.replace('wininst-9.0', 'wininst-8.0')
+            lines = lines.replace('..\\', '..\\..\\')
+            lines = lines.replace('..\\..\\..\\..\\', '..\\..\\..\\')
+
+            # Bah. VS8.0 does not expand macros in file names.
+            # Replace them here.
+            lines = lines.replace('$(sqlite3Dir)', '..\\..\\..\\sqlite-3.6.21')
+            lines = lines.replace('$(bsddbDir)\\..\\..', '..\\..\\..\\db-4.7.25.0\\build_windows\\..')
+            lines = lines.replace('$(bsddbDir)', '..\\..\\..\\db-4.7.25.0\\build_windows')
+
+        with open(destname, 'wb') as fout:
+            lines = lines.replace("\n", "\r\n")
+            fout.write(lines)
+
+if __name__ == "__main__":
+    vs9to8(src=".", dest="../PC/VS8.0")
diff --git a/PC/VS9.0/w9xpopen.vcproj b/PC/VS9.0/w9xpopen.vcproj
new file mode 100644 (file)
index 0000000..9c0e758
--- /dev/null
@@ -0,0 +1,576 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="w9xpopen"\r
+       ProjectGUID="{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"\r
+       RootNamespace="w9xpopen"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               GenerateDebugInformation="false"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               GenerateDebugInformation="false"\r
+                               SubSystem="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               GenerateDebugInformation="false"\r
+                               SubSystem="1"\r
+                               ImportLibrary=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               GenerateDebugInformation="false"\r
+                               SubSystem="1"\r
+                               ImportLibrary=""\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               GenerateDebugInformation="false"\r
+                               SubSystem="1"\r
+                               ImportLibrary=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               GenerateDebugInformation="false"\r
+                               SubSystem="1"\r
+                               ImportLibrary=""\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\w9xpopen.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/winsound.vcproj b/PC/VS9.0/winsound.vcproj
new file mode 100644 (file)
index 0000000..6564b1e
--- /dev/null
@@ -0,0 +1,523 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="winsound"\r
+       ProjectGUID="{28B5D777-DDF2-4B6B-B34F-31D938813856}"\r
+       RootNamespace="winsound"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="winmm.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\PC\winsound.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/PC/VS9.0/x64.vsprops b/PC/VS9.0/x64.vsprops
new file mode 100644 (file)
index 0000000..9f88d44
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioPropertySheet\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="amd64"\r
+       OutputDirectory="$(SolutionDir)\amd64\"\r
+       IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-$(ConfigurationName)\$(ProjectName)\"\r
+       >\r
+       <Tool\r
+               Name="VCCLCompilerTool"\r
+               AdditionalOptions="/USECL:MS_OPTERON /GS-"\r
+               PreprocessorDefinitions="_WIN64;_M_X64"\r
+       />\r
+       <Tool\r
+               Name="VCLinkerTool"\r
+               TargetMachine="17"\r
+       />\r
+       <UserMacro\r
+               Name="PythonExe"\r
+               Value="$(HOST_PYTHON)"\r
+       />\r
+</VisualStudioPropertySheet>\r
diff --git a/PC/bdist_wininst/bdist_wininst.vcxproj b/PC/bdist_wininst/bdist_wininst.vcxproj
new file mode 100644 (file)
index 0000000..2ab474e
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}</ProjectGuid>
+    <RootNamespace>wininst</RootNamespace>
+    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
+    <SupportPGO>false</SupportPGO>
+  </PropertyGroup>
+  <Import Project="..\..\PCBuild\python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="..\..\PCBuild\pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir>$(PySourcePath)lib\distutils\command\</OutDir>
+    <LinkIncremental>false</LinkIncremental>
+    <TargetName>wininst-$(VisualStudioVersion)</TargetName>
+    <TargetName Condition="$(Platform) == 'x64'">$(TargetName)-amd64</TargetName>
+    <TargetExt>.exe</TargetExt>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Midl>
+      <TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>
+    </Midl>
+    <ClCompile>
+      <Optimization>MinSpace</Optimization>
+      <AdditionalIncludeDirectories>$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <ResourceCompile>
+      <AdditionalIncludeDirectories>$(PySourcePath)PC\bdist_wininst;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ResourceCompile>
+    <Link>
+      <AdditionalDependencies>comctl32.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="extract.c" />
+    <ClCompile Include="install.c" />
+    <ClCompile Include="..\..\Modules\zlib\adler32.c" />
+    <ClCompile Include="..\..\Modules\zlib\crc32.c" />
+    <ClCompile Include="..\..\Modules\zlib\inffast.c" />
+    <ClCompile Include="..\..\Modules\zlib\inflate.c" />
+    <ClCompile Include="..\..\Modules\zlib\inftrees.c" />
+    <ClCompile Include="..\..\Modules\zlib\zutil.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="archive.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="install.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="PythonPowered.bmp" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/PC/bdist_wininst/bdist_wininst.vcxproj.filters b/PC/bdist_wininst/bdist_wininst.vcxproj.filters
new file mode 100644 (file)
index 0000000..b4b6a4d
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{293b1092-03ad-4b7c-acb9-c4ab62e52f55}</UniqueIdentifier>
+      <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+    </Filter>
+    <Filter Include="Source Files\zlib">
+      <UniqueIdentifier>{0edc0406-282f-4dbc-b60e-a867c34a2a31}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{ea0c0f0e-3b73-474e-a999-e9689d032ccc}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{0c77c1cf-3f87-4f87-bd86-b425211c2181}</UniqueIdentifier>
+      <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\bdist_wininst\extract.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\bdist_wininst\install.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\adler32.c">
+      <Filter>Source Files\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\crc32.c">
+      <Filter>Source Files\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\inffast.c">
+      <Filter>Source Files\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\inflate.c">
+      <Filter>Source Files\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\inftrees.c">
+      <Filter>Source Files\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\zutil.c">
+      <Filter>Source Files\zlib</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\PC\bdist_wininst\archive.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\bdist_wininst\install.rc">
+      <Filter>Resource Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\PC\bdist_wininst\PythonPowered.bmp">
+      <Filter>Resource Files</Filter>
+    </None>
+  </ItemGroup>
+</Project>
\ No newline at end of file
index 8b5be619c39054a623040aaa71c51b97192b0fe7..6e6766f7f087b4df28a606bbef311d14b96faab9 100644 (file)
@@ -1909,21 +1909,21 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 /*
  * The scheme we have to use depends on the Python version...
  if sys.version < "2.2":
- WINDOWS_SCHEME = {
- 'purelib': '$base',
- 'platlib': '$base',
- 'headers': '$base/Include/$dist_name',
- 'scripts': '$base/Scripts',
- 'data'   : '$base',
- }
   WINDOWS_SCHEME = {
   'purelib': '$base',
   'platlib': '$base',
   'headers': '$base/Include/$dist_name',
   'scripts': '$base/Scripts',
   'data'   : '$base',
   }
  else:
- WINDOWS_SCHEME = {
- 'purelib': '$base/Lib/site-packages',
- 'platlib': '$base/Lib/site-packages',
- 'headers': '$base/Include/$dist_name',
- 'scripts': '$base/Scripts',
- 'data'   : '$base',
- }
   WINDOWS_SCHEME = {
   'purelib': '$base/Lib/site-packages',
   'platlib': '$base/Lib/site-packages',
   'headers': '$base/Include/$dist_name',
   'scripts': '$base/Scripts',
   'data'   : '$base',
   }
 */
             scheme = GetScheme(py_major, py_minor);
             /* Run the pre-install script. */
diff --git a/PC/example_nt/example.c b/PC/example_nt/example.c
deleted file mode 100644 (file)
index 953fb82..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "Python.h"
-
-static PyObject *
-ex_foo(PyObject *self, PyObject *args)
-{
-       printf("Hello, world\n");
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static PyMethodDef example_methods[] = {
-       {"foo", ex_foo, METH_VARARGS, "foo() doc string"},
-       {NULL, NULL}
-};
-
-PyMODINIT_FUNC
-initexample(void)
-{
-       Py_InitModule("example", example_methods);
-}
diff --git a/PC/example_nt/example.sln b/PC/example_nt/example.sln
deleted file mode 100644 (file)
index d8a3119..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj", "{A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-       EndProjectSection\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfiguration) = preSolution\r
-               Debug = Debug\r
-               Release = Release\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfiguration) = postSolution\r
-               {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.ActiveCfg = Debug|Win32\r
-               {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Debug.Build.0 = Debug|Win32\r
-               {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.ActiveCfg = Release|Win32\r
-               {A0608D6F-84ED-44AE-A2A6-A3CC7F4A4030}.Release.Build.0 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(ExtensibilityGlobals) = postSolution\r
-       EndGlobalSection\r
-       GlobalSection(ExtensibilityAddIns) = postSolution\r
-       EndGlobalSection\r
-EndGlobal\r
diff --git a/PC/example_nt/example.vcproj b/PC/example_nt/example.vcproj
deleted file mode 100644 (file)
index 17f1eb3..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="windows-1250"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="7.10"\r
-       Name="example"\r
-       SccProjectName=""\r
-       SccLocalPath="">\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"/>\r
-       </Platforms>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory=".\Release"\r
-                       IntermediateDirectory=".\Release"\r
-                       ConfigurationType="2"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="FALSE">\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\Include,..\PC"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
-                               StringPooling="TRUE"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="TRUE"\r
-                               UsePrecompiledHeader="2"\r
-                               PrecompiledHeaderFile=".\Release/example.pch"\r
-                               AssemblerListingLocation=".\Release/"\r
-                               ObjectFile=".\Release/"\r
-                               ProgramDataBaseFileName=".\Release/"\r
-                               WarningLevel="3"\r
-                               SuppressStartupBanner="TRUE"\r
-                               CompileAs="0"/>\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"/>\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/export:initexample"\r
-                               AdditionalDependencies="odbc32.lib odbccp32.lib python27.lib"\r
-                               OutputFile=".\Release/example.pyd"\r
-                               LinkIncremental="1"\r
-                               SuppressStartupBanner="TRUE"\r
-                               AdditionalLibraryDirectories="..\PCbuild"\r
-                               ModuleDefinitionFile=""\r
-                               ProgramDatabaseFile=".\Release/example.pdb"\r
-                               SubSystem="2"\r
-                               ImportLibrary=".\Release/example.lib"\r
-                               TargetMachine="1"/>\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               MkTypLibCompatible="TRUE"\r
-                               SuppressStartupBanner="TRUE"\r
-                               TargetEnvironment="1"\r
-                               TypeLibraryName=".\Release/example.tlb"\r
-                               HeaderFileName=""/>\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"/>\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"/>\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"/>\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"/>\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"/>\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"/>\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"/>\r
-                       <Tool\r
-                               Name="VCManagedWrapperGeneratorTool"/>\r
-                       <Tool\r
-                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       OutputDirectory=".\Debug"\r
-                       IntermediateDirectory=".\Debug"\r
-                       ConfigurationType="2"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="FALSE">\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               AdditionalIncludeDirectories="..\Include,..\PC"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
-                               RuntimeLibrary="3"\r
-                               UsePrecompiledHeader="2"\r
-                               PrecompiledHeaderFile=".\Debug/example.pch"\r
-                               AssemblerListingLocation=".\Debug/"\r
-                               ObjectFile=".\Debug/"\r
-                               ProgramDataBaseFileName=".\Debug/"\r
-                               WarningLevel="3"\r
-                               SuppressStartupBanner="TRUE"\r
-                               DebugInformationFormat="4"\r
-                               CompileAs="0"/>\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"/>\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/export:initexample"\r
-                               AdditionalDependencies="odbc32.lib odbccp32.lib python27_d.lib"\r
-                               OutputFile=".\Debug/example_d.pyd"\r
-                               LinkIncremental="1"\r
-                               SuppressStartupBanner="TRUE"\r
-                               AdditionalLibraryDirectories="..\PCbuild"\r
-                               ModuleDefinitionFile=""\r
-                               GenerateDebugInformation="TRUE"\r
-                               ProgramDatabaseFile=".\Debug/example_d.pdb"\r
-                               SubSystem="2"\r
-                               ImportLibrary=".\Debug/example_d.lib"\r
-                               TargetMachine="1"/>\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               MkTypLibCompatible="TRUE"\r
-                               SuppressStartupBanner="TRUE"\r
-                               TargetEnvironment="1"\r
-                               TypeLibraryName=".\Debug/example.tlb"\r
-                               HeaderFileName=""/>\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"/>\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"/>\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"/>\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"/>\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"/>\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"/>\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"/>\r
-                       <Tool\r
-                               Name="VCManagedWrapperGeneratorTool"/>\r
-                       <Tool\r
-                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90">\r
-                       <File\r
-                               RelativePath="example.c">\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32">\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;$(NoInherit)"/>\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32">\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;$(NoInherit)"/>\r
-                               </FileConfiguration>\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl;fi;fd">\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">\r
-               </Filter>\r
-               <File\r
-                       RelativePath="readme.txt">\r
-               </File>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PC/example_nt/readme.txt b/PC/example_nt/readme.txt
deleted file mode 100644 (file)
index b83888c..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-Example Python extension for Windows NT
-=======================================
-
-This directory contains everything needed (except for the Python
-distribution!) to build a Python extension module using Microsoft VC++.
-Notice that you need to use the same compiler version that was used to build 
-Python itself.
-
-The simplest way to build this example is to use the distutils script
-'setup.py'.  To do this, simply execute:
-
-  % python setup.py install
-
-after everything builds and installs, you can test it:
-
-  % python -c "import example; example.foo()"
-  Hello, world
-
-See setup.py for more details.  alternatively, see below for instructions on 
-how to build inside the Visual Studio environment.
-
-Visual Studio Build Instructions
-================================
-
-These are instructions how to build an extension using Visual C++.  The
-instructions and project files have not been updated to the latest VC
-version.  In general, it is recommended you use the 'setup.py' instructions
-above.
-
-It has been tested with VC++ 7.1 on Python 2.4.  You can also use earlier 
-versions of VC to build Python extensions, but the sample VC project file 
-(example.dsw in this directory) is in VC 7.1 format.
-
-COPY THIS DIRECTORY!
---------------------
-This "example_nt" directory is a subdirectory of the PC directory, in order
-to keep all the PC-specific files under the same directory.  However, the
-example_nt directory can't actually be used from this location.  You first
-need to copy or move it up one level, so that example_nt is a direct
-sibling of the PC\ and Include\ directories.  Do all your work from within
-this new location -- sorry, but you'll be sorry if you don't.
-
-OPEN THE PROJECT
-----------------
-From VC 7.1, use the
-    File -> Open Solution...
-dialog (*not* the "File -> Open..." dialog!).  Navigate to and select the
-file "example.sln", in the *copy* of the example_nt directory you made
-above.
-Click Open.
-
-BUILD THE EXAMPLE DLL
----------------------
-In order to check that everything is set up right, try building:
-
-1. Select a configuration.  This step is optional.  Do
-       Build -> Configuration Manager... -> Active Solution Configuration
-   and select either "Release" or "Debug".
-   If you skip this step, you'll use the Debug configuration by default.
-
-2. Build the DLL.  Do
-       Build -> Build Solution
-   This creates all intermediate and result files in a subdirectory which
-   is called either Debug or Release, depending on which configuration you
-   picked in the preceding step.
-
-TESTING THE DEBUG-MODE DLL
---------------------------
-Once the Debug build has succeeded, bring up a DOS box, and cd to
-example_nt\Debug.  You should now be able to repeat the following session
-("C>" is the DOS prompt, ">>>" is the Python prompt) (note that various
-debug output from Python may not match this screen dump exactly):
-
-    C>..\..\PCbuild\python_d
-    Adding parser accelerators ...
-    Done.
-    Python 2.2c1+ (#28, Dec 14 2001, 18:06:39) [MSC 32 bit (Intel)] on win32
-    Type "help", "copyright", "credits" or "license" for more information.
-    >>> import example
-    [7052 refs]
-    >>> example.foo()
-    Hello, world
-    [7052 refs]
-    >>>
-
-TESTING THE RELEASE-MODE DLL
-----------------------------
-Once the Release build has succeeded, bring up a DOS box, and cd to
-example_nt\Release.  You should now be able to repeat the following session
-("C>" is the DOS prompt, ">>>" is the Python prompt):
-
-    C>..\..\PCbuild\python
-    Python 2.2c1+ (#28, Dec 14 2001, 18:06:04) [MSC 32 bit (Intel)] on win32
-    Type "help", "copyright", "credits" or "license" for more information.
-    >>> import example
-    >>> example.foo()
-    Hello, world
-    >>>
-
-Congratulations!  You've successfully built your first Python extension
-module.
-
-CREATING YOUR OWN PROJECT
--------------------------
-Choose a name ("spam" is always a winner :-) and create a directory for
-it.  Copy your C sources into it.  Note that the module source file name
-does not necessarily have to match the module name, but the "init" function
-name should match the module name -- i.e. you can only import a module
-"spam" if its init function is called "initspam()", and it should call
-Py_InitModule with the string "spam" as its first argument (use the minimal
-example.c in this directory as a guide).  By convention, it lives in a file
-called "spam.c" or "spammodule.c".  The output file should be called
-"spam.dll" or "spam.pyd" (the latter is supported to avoid confusion with a
-system library "spam.dll" to which your module could be a Python interface)
-in Release mode, or spam_d.dll or spam_d.pyd in Debug mode.
-
-Now your options are:
-
-1) Copy example.sln and example.vcproj, rename them to spam.*, and edit them
-by hand.
-
-or
-
-2) Create a brand new project; instructions are below.
-
-In either case, copy example_nt\example.def to spam\spam.def, and edit the
-new spam.def so its second line contains the string "initspam".  If you
-created a new project yourself, add the file spam.def to the project now.
-(This is an annoying little file with only two lines.  An alternative
-approach is to forget about the .def file, and add the option
-"/export:initspam" somewhere to the Link settings, by manually editing the
-"Project -> Properties -> Linker -> Command Line -> Additional Options" 
-box).
-
-You are now all set to build your extension, unless it requires other
-external libraries, include files, etc.  See Python's Extending and
-Embedding manual for instructions on how to write an extension.
-
-
-CREATING A BRAND NEW PROJECT
-----------------------------
-Use the
-    File -> New -> Project...
-dialog to create a new Project Workspace.  Select "Visual C++ Projects/Win32/
-Win32 Project", enter the name ("spam"), and make sure the "Location" is 
-set to parent of the spam directory you have created (which should be a direct 
-subdirectory of the Python build tree, a sibling of Include and PC).  
-In "Application Settings", select "DLL", and "Empty Project".  Click OK.
-
-You should now create the file spam.def as instructed in the previous
-section. Add the source files (including the .def file) to the project, 
-using "Project", "Add Existing Item".
-
-Now open the
-    Project -> spam properties...
-dialog.  (Impressive, isn't it? :-) You only need to change a few
-settings.  Make sure "All Configurations" is selected from the "Settings
-for:" dropdown list.  Select the "C/C++" tab.  Choose the "General"
-category in the popup menu at the top.  Type the following text in the
-entry box labeled "Addditional Include Directories:"
-
-    ..\Include,..\PC
-
-Then, choose the "General" category in the "Linker" tab, and enter
-    ..\PCbuild
-in the "Additional library Directories" box.
-
-Now you need to add some mode-specific settings (select "Accept"
-when asked to confirm your changes):
-
-Select "Release" in the "Configuration" dropdown list.  Click the
-"Link" tab, choose the "Input" Category, and append "python24.lib" to the
-list in the "Additional Dependencies" box.
-
-Select "Debug" in the "Settings for:" dropdown list, and append
-"python24_d.lib" to the list in the Additional Dependencies" box.  Then
-click on the C/C++ tab, select "Code Generation", and select 
-"Multi-threaded Debug DLL" from the "Runtime library" dropdown list.
-
-Select "Release" again from the "Settings for:" dropdown list.
-Select "Multi-threaded DLL" from the "Use run-time library:" dropdown list.
-
-That's all <wink>.
diff --git a/PC/example_nt/setup.py b/PC/example_nt/setup.py
deleted file mode 100644 (file)
index 0443bc7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# This is an example of a distutils 'setup' script for the example_nt
-# sample.  This provides a simpler way of building your extension
-# and means you can avoid keeping MSVC solution files etc in source-control.
-# It also means it should magically build with all compilers supported by
-# python.
-
-# USAGE: you probably want 'setup.py install' - but execute 'setup.py --help'
-# for all the details.
-
-# NOTE: This is *not* a sample for distutils - it is just the smallest
-# script that can build this.  See distutils docs for more info.
-
-from distutils.core import setup, Extension
-
-example_mod = Extension('example', sources = ['example.c'])
-
-
-setup(name = "example",
-    version = "1.0",
-    description = "A sample extension module",
-    ext_modules = [example_mod],
-)
index a49ce69013981cba852bbe4cfd8dffd185cb93fa..53c8289d60d517d6627c15d5bc1039e7d14861cf 100644 (file)
@@ -148,7 +148,11 @@ WIN32 is still required for the locale module.
 #define COMPILER _Py_PASTE_VERSION("64 bit (Itanium)")
 #define MS_WINI64
 #elif defined(_M_X64) || defined(_M_AMD64)
+#ifdef __INTEL_COMPILER
+#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 64 bit (amd64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
+#else
 #define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
+#endif /* __INTEL_COMPILER */
 #define MS_WINX64
 #else
 #define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
@@ -204,7 +208,11 @@ typedef _W64 int ssize_t;
 
 #if defined(MS_WIN32) && !defined(MS_WIN64)
 #ifdef _M_IX86
+#ifdef __INTEL_COMPILER
+#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
+#else
 #define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
+#endif /* __INTEL_COMPILER */
 #else
 #define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
 #endif
index b5a5a8711861b89b951a678cf0cb1b29fb9b23aa..5b6f88c0d389cb5331f0010ead36718892399638 100644 (file)
@@ -71,8 +71,6 @@ getpathp.c     Default sys.path calculations (for all PC platforms).
 dllbase_nt.txt A (manually maintained) list of base addresses for
                various DLLs, to avoid run-time relocation.
 
-example_nt     A subdirectory showing how to build an extension as a
-               DLL.
 
 Legacy support for older versions of Visual Studio
 ==================================================
diff --git a/PCbuild/_bsddb.vcproj b/PCbuild/_bsddb.vcproj
deleted file mode 100644 (file)
index d9886c6..0000000
+++ /dev/null
@@ -1,1463 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9.00"\r
-       Name="_bsddb"\r
-       ProjectGUID="{B4D38F3F-68FB-42EC-A45D-E00657BB3627}"\r
-       RootNamespace="_bsddb"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bsddbDir),$(bsddbDir)\.."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(bsddbDepLibs)"\r
-                               BaseAddress="0x1e180000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\bsddb.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_bsddb.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Berkeley DB 4.7.25 Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\crypto\aes_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_compact.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_compare.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_conv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_curadj.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_cursor.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_delete.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_open.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_put.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_reclaim.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_recno.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_rsearch.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_search.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_split.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_upgrade.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\bt_verify.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\btree\btree_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\crdel_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\crdel_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\crypto\crypto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_am.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\db_byteorder.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_cam.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_cds.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_conv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_dispatch.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_dup.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\db_err.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\db_getlong.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\db_idspace.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_iface.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_join.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\db_log2.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_meta.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_open.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_overflow.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_ovfl_vrfy.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_pr.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_reclaim.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_remove.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_rename.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_ret.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_setid.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_setlsn.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\db_shash.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_stati.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_truncate.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_upg.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_upg_opd.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_vrfy.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\db\db_vrfyutil.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\dbm\dbm.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\dbreg\dbreg.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\dbreg\dbreg_util.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\dbt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_alloc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_config.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_failchk.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_file.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_globals.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_name.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_open.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_recover.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_region.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_register.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_sig.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\env\env_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\fileops\fileops_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\fileops\fop_basic.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\fileops\fop_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\fileops\fop_util.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_conv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_dup.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_func.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_meta.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_open.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_page.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_reclaim.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_upgrade.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hash\hash_verify.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hmac\hmac.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hsearch\hsearch.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_deadlock.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_failchk.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_id.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_list.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_region.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_timer.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\lock\lock_util.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log_archive.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log_compare.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log_debug.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log_get.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log_put.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\log\log_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\mkpath.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_alloc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_bh.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_fget.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_fmethod.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_fopen.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_fput.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_fset.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_mvcc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_region.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_register.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_resize.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_sync.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mp\mp_trickle.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\crypto\mersenne\mt19937db.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mutex\mut_alloc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mutex\mut_failchk.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mutex\mut_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mutex\mut_region.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mutex\mut_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\mutex\mut_win32.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\openflags.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_abort.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_abs.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_addrinfo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_alloc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_clock.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_config.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_cpu.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_ctime.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_dir.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_errno.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_fid.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_flock.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_fsync.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_getenv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_handle.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_map.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\os_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_mkdir.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_open.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_pid.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_rename.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_root.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_rpath.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_rw.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_seek.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_stack.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_tmpdir.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_truncate.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os\os_uid.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_unlink.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\os_windows\os_yield.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_conv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_files.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_open.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_upgrade.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\qam\qam_verify.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_backup.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_elect.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_lease.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_log.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_record.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_region.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_util.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\rep\rep_verify.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_elect.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_msg.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_net.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_queue.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_sel.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_util.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\repmgr\repmgr_windows.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\crypto\rijndael\rijndael-alg-fst.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\crypto\rijndael\rijndael-api-fst.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\sequence\seq_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\sequence\sequence.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\hmac\sha1.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\clib\strsep.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_auto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_chkpt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_failchk.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_method.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_rec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_recover.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_region.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_stat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\txn\txn_util.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\util_cache.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\util_log.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\util_sig.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\xa\xa.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\xa\xa_db.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\xa\xa_map.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bsddbDir)\..\common\zerofill.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_bsddb.vcxproj b/PCbuild/_bsddb.vcxproj
new file mode 100644 (file)
index 0000000..8ce64b5
--- /dev/null
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B4D38F3F-68FB-42EC-A45D-E00657BB3627}</ProjectGuid>
+    <RootNamespace>_bsddb</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(bsddbDir)\build_windows;$(bsddbDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <BaseAddress>0x1e180000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\bsddb.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_bsddb.c" />
+    <ClCompile Include="$(bsddbDir)\crypto\aes_method.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_compact.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_compare.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_conv.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_curadj.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_cursor.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_delete.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_method.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_open.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_put.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_rec.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_reclaim.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_recno.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_rsearch.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_search.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_split.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_stat.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_upgrade.c" />
+    <ClCompile Include="$(bsddbDir)\btree\bt_verify.c" />
+    <ClCompile Include="$(bsddbDir)\btree\btree_auto.c" />
+    <ClCompile Include="$(bsddbDir)\db\crdel_auto.c" />
+    <ClCompile Include="$(bsddbDir)\db\crdel_rec.c" />
+    <ClCompile Include="$(bsddbDir)\crypto\crypto.c" />
+    <ClCompile Include="$(bsddbDir)\db\db.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_am.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_auto.c" />
+    <ClCompile Include="$(bsddbDir)\common\db_byteorder.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_cam.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_cds.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_conv.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_dispatch.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_dup.c" />
+    <ClCompile Include="$(bsddbDir)\common\db_err.c" />
+    <ClCompile Include="$(bsddbDir)\common\db_getlong.c" />
+    <ClCompile Include="$(bsddbDir)\common\db_idspace.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_iface.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_join.c" />
+    <ClCompile Include="$(bsddbDir)\common\db_log2.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_meta.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_method.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_open.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_overflow.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_ovfl_vrfy.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_pr.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_rec.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_reclaim.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_remove.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_rename.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_ret.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_setid.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_setlsn.c" />
+    <ClCompile Include="$(bsddbDir)\common\db_shash.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_stati.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_truncate.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_upg.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_upg_opd.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_vrfy.c" />
+    <ClCompile Include="$(bsddbDir)\db\db_vrfyutil.c" />
+    <ClCompile Include="$(bsddbDir)\dbm\dbm.c" />
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg.c" />
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_auto.c" />
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_rec.c" />
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_stat.c" />
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_util.c" />
+    <ClCompile Include="$(bsddbDir)\common\dbt.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_alloc.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_config.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_failchk.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_file.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_globals.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_method.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_name.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_open.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_recover.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_region.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_register.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_sig.c" />
+    <ClCompile Include="$(bsddbDir)\env\env_stat.c" />
+    <ClCompile Include="$(bsddbDir)\fileops\fileops_auto.c" />
+    <ClCompile Include="$(bsddbDir)\fileops\fop_basic.c" />
+    <ClCompile Include="$(bsddbDir)\fileops\fop_rec.c" />
+    <ClCompile Include="$(bsddbDir)\fileops\fop_util.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_auto.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_conv.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_dup.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_func.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_meta.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_method.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_open.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_page.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_rec.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_reclaim.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_stat.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_upgrade.c" />
+    <ClCompile Include="$(bsddbDir)\hash\hash_verify.c" />
+    <ClCompile Include="$(bsddbDir)\hmac\hmac.c" />
+    <ClCompile Include="$(bsddbDir)\hsearch\hsearch.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_deadlock.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_failchk.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_id.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_list.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_method.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_region.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_stat.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_timer.c" />
+    <ClCompile Include="$(bsddbDir)\lock\lock_util.c" />
+    <ClCompile Include="$(bsddbDir)\log\log.c" />
+    <ClCompile Include="$(bsddbDir)\log\log_archive.c" />
+    <ClCompile Include="$(bsddbDir)\log\log_compare.c" />
+    <ClCompile Include="$(bsddbDir)\log\log_debug.c" />
+    <ClCompile Include="$(bsddbDir)\log\log_get.c" />
+    <ClCompile Include="$(bsddbDir)\log\log_method.c" />
+    <ClCompile Include="$(bsddbDir)\log\log_put.c" />
+    <ClCompile Include="$(bsddbDir)\log\log_stat.c" />
+    <ClCompile Include="$(bsddbDir)\common\mkpath.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_alloc.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_bh.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_fget.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_fmethod.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_fopen.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_fput.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_fset.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_method.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_mvcc.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_region.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_register.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_resize.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_stat.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_sync.c" />
+    <ClCompile Include="$(bsddbDir)\mp\mp_trickle.c" />
+    <ClCompile Include="$(bsddbDir)\crypto\mersenne\mt19937db.c" />
+    <ClCompile Include="$(bsddbDir)\mutex\mut_alloc.c" />
+    <ClCompile Include="$(bsddbDir)\mutex\mut_failchk.c" />
+    <ClCompile Include="$(bsddbDir)\mutex\mut_method.c" />
+    <ClCompile Include="$(bsddbDir)\mutex\mut_region.c" />
+    <ClCompile Include="$(bsddbDir)\mutex\mut_stat.c" />
+    <ClCompile Include="$(bsddbDir)\mutex\mut_win32.c" />
+    <ClCompile Include="$(bsddbDir)\common\openflags.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_abort.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_abs.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_addrinfo.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_alloc.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_clock.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_config.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_cpu.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_ctime.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_dir.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_errno.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_fid.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_flock.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_fsync.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_getenv.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_handle.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_map.c" />
+    <ClCompile Include="$(bsddbDir)\common\os_method.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_mkdir.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_open.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_pid.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_rename.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_root.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_rpath.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_rw.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_seek.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_stack.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_stat.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_tmpdir.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_truncate.c" />
+    <ClCompile Include="$(bsddbDir)\os\os_uid.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_unlink.c" />
+    <ClCompile Include="$(bsddbDir)\os_windows\os_yield.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_auto.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_conv.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_files.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_method.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_open.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_rec.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_stat.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_upgrade.c" />
+    <ClCompile Include="$(bsddbDir)\qam\qam_verify.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_auto.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_backup.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_elect.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_lease.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_log.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_method.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_record.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_region.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_stat.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_util.c" />
+    <ClCompile Include="$(bsddbDir)\rep\rep_verify.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_auto.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_elect.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_method.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_msg.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_net.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_queue.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_sel.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_stat.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_util.c" />
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_windows.c" />
+    <ClCompile Include="$(bsddbDir)\crypto\rijndael\rijndael-alg-fst.c" />
+    <ClCompile Include="$(bsddbDir)\crypto\rijndael\rijndael-api-fst.c" />
+    <ClCompile Include="$(bsddbDir)\sequence\seq_stat.c" />
+    <ClCompile Include="$(bsddbDir)\sequence\sequence.c" />
+    <ClCompile Include="$(bsddbDir)\hmac\sha1.c" />
+    <ClCompile Include="$(bsddbDir)\clib\strsep.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_auto.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_chkpt.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_failchk.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_method.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_rec.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_recover.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_region.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_stat.c" />
+    <ClCompile Include="$(bsddbDir)\txn\txn_util.c" />
+    <ClCompile Include="$(bsddbDir)\common\util_cache.c" />
+    <ClCompile Include="$(bsddbDir)\common\util_log.c" />
+    <ClCompile Include="$(bsddbDir)\common\util_sig.c" />
+    <ClCompile Include="$(bsddbDir)\xa\xa.c" />
+    <ClCompile Include="$(bsddbDir)\xa\xa_db.c" />
+    <ClCompile Include="$(bsddbDir)\xa\xa_map.c" />
+    <ClCompile Include="$(bsddbDir)\common\zerofill.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_bsddb.vcxproj.filters b/PCbuild/_bsddb.vcxproj.filters
new file mode 100644 (file)
index 0000000..69fd2af
--- /dev/null
@@ -0,0 +1,702 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{82655853-5a03-4804-a421-44510138071e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{c52be92f-9033-4a0f-bf55-1b65c7e7b015}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Berkeley DB 4.7.25 Source Files">
+      <UniqueIdentifier>{49074366-917a-4969-88c7-0f6ec09c7021}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\bsddb.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_bsddb.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\crypto\aes_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_compact.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_compare.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_conv.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_curadj.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_cursor.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_delete.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_open.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_put.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_reclaim.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_recno.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_rsearch.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_search.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_split.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_upgrade.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\bt_verify.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\btree\btree_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\crdel_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\crdel_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\crypto\crypto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_am.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\db_byteorder.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_cam.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_cds.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_conv.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_dispatch.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_dup.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\db_err.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\db_getlong.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\db_idspace.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_iface.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_join.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\db_log2.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_meta.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_open.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_overflow.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_ovfl_vrfy.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_pr.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_reclaim.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_remove.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_rename.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_ret.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_setid.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_setlsn.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\db_shash.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_stati.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_truncate.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_upg.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_upg_opd.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_vrfy.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\db\db_vrfyutil.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\dbm\dbm.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\dbreg\dbreg_util.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\dbt.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_alloc.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_config.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_failchk.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_file.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_globals.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_name.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_open.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_recover.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_region.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_register.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_sig.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\env\env_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\fileops\fileops_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\fileops\fop_basic.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\fileops\fop_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\fileops\fop_util.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_conv.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_dup.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_func.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_meta.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_open.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_page.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_reclaim.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_upgrade.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hash\hash_verify.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hmac\hmac.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hsearch\hsearch.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_deadlock.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_failchk.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_id.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_list.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_region.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_timer.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\lock\lock_util.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log_archive.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log_compare.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log_debug.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log_get.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log_put.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\log\log_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\mkpath.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_alloc.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_bh.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_fget.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_fmethod.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_fopen.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_fput.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_fset.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_mvcc.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_region.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_register.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_resize.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_sync.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mp\mp_trickle.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\crypto\mersenne\mt19937db.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mutex\mut_alloc.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mutex\mut_failchk.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mutex\mut_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mutex\mut_region.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mutex\mut_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\mutex\mut_win32.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\openflags.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_abort.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_abs.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_addrinfo.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_alloc.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_clock.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_config.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_cpu.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_ctime.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_dir.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_errno.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_fid.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_flock.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_fsync.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_getenv.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_handle.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_map.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\os_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_mkdir.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_open.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_pid.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_rename.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_root.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_rpath.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_rw.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_seek.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_stack.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_tmpdir.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_truncate.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os\os_uid.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_unlink.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\os_windows\os_yield.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_conv.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_files.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_open.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_upgrade.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\qam\qam_verify.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_backup.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_elect.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_lease.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_log.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_record.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_region.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_util.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\rep\rep_verify.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_elect.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_msg.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_net.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_queue.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_sel.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_util.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\repmgr\repmgr_windows.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\crypto\rijndael\rijndael-alg-fst.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\crypto\rijndael\rijndael-api-fst.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\sequence\seq_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\sequence\sequence.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\hmac\sha1.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\clib\strsep.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_auto.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_chkpt.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_failchk.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_method.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_rec.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_recover.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_region.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_stat.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\txn\txn_util.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\util_cache.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\util_log.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\util_sig.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\xa\xa.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\xa\xa_db.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\xa\xa_map.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bsddbDir)\common\zerofill.c">
+      <Filter>Berkeley DB 4.7.25 Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_ctypes.vcproj b/PCbuild/_ctypes.vcproj
deleted file mode 100644 (file)
index 1eb8b57..0000000
+++ /dev/null
@@ -1,705 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9.00"\r
-       Name="_ctypes"\r
-       ProjectGUID="{0E9791DB-593A-465F-98BC-681011311618}"\r
-       RootNamespace="_ctypes"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D1A0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D1A0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
-                               SubSystem="0"\r
-                               BaseAddress="0x1D1A0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
-                               SubSystem="0"\r
-                               BaseAddress="0x1D1A0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
-                               SubSystem="0"\r
-                               BaseAddress="0x1D1A0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
-                               SubSystem="0"\r
-                               BaseAddress="0x1D1A0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
-                               SubSystem="0"\r
-                               BaseAddress="0x1D1A0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\_ctypes\libffi_msvc"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"\r
-                               SubSystem="0"\r
-                               BaseAddress="0x1D1A0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\ctypes.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\ctypes_dlfcn.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\ffi.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\ffi_common.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\fficonfig.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\ffitarget.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\_ctypes.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\callbacks.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\callproc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\cfield.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\ffi.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\malloc_closure.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\prep_cif.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\stgdict.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\win32.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Debug|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="PGInstrument|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="PGUpdate|x64"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\libffi_msvc\win64.asm"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|x64"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                               CommandLine="ml64 /nologo /c /Zi /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
-                                               Outputs="$(IntDir)\win64.obj"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Release|x64"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                               CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
-                                               Outputs="$(IntDir)\win64.obj"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="PGInstrument|Win32"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="PGInstrument|x64"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                               CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
-                                               Outputs="$(IntDir)\win64.obj"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="PGUpdate|Win32"\r
-                                       ExcludedFromBuild="true"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="PGUpdate|x64"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCustomBuildTool"\r
-                                               CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
-                                               Outputs="$(IntDir)\win64.obj"\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_ctypes.vcxproj b/PCbuild/_ctypes.vcxproj
new file mode 100644 (file)
index 0000000..5bcf432
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{0E9791DB-593A-465F-98BC-681011311618}</ProjectGuid>
+    <RootNamespace>_ctypes</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <BaseAddress>0x1D1A0000</BaseAddress>
+      <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_ctypes\ctypes.h" />
+    <ClInclude Include="..\Modules\_ctypes\ctypes_dlfcn.h" />
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi.h" />
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi_common.h" />
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\fficonfig.h" />
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffitarget.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_ctypes\_ctypes.c" />
+    <ClCompile Include="..\Modules\_ctypes\callbacks.c" />
+    <ClCompile Include="..\Modules\_ctypes\callproc.c" />
+    <ClCompile Include="..\Modules\_ctypes\cfield.c" />
+    <ClCompile Include="..\Modules\_ctypes\libffi_msvc\ffi.c" />
+    <ClCompile Include="..\Modules\_ctypes\malloc_closure.c" />
+    <ClCompile Include="..\Modules\_ctypes\libffi_msvc\prep_cif.c" />
+    <ClCompile Include="..\Modules\_ctypes\stgdict.c" />
+    <ClCompile Include="..\Modules\_ctypes\libffi_msvc\win32.c">
+      <ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\Modules\_ctypes\libffi_msvc\win64.asm">
+      <ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
+      <Command>ml64 /nologo /c /Zi /Fo "$(IntDir)win64.obj" "%(FullPath)"</Command>
+      <Outputs>$(IntDir)win64.obj;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_ctypes.vcxproj.filters b/PCbuild/_ctypes.vcxproj.filters
new file mode 100644 (file)
index 0000000..3dbd4b9
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{806081ee-2af0-48d0-a83e-ee02a74baa0f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{dbdea1f2-ad8b-44ca-b782-fcf65d91559b}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_ctypes\ctypes.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_ctypes\ctypes_dlfcn.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffi_common.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\fficonfig.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_ctypes\libffi_msvc\ffitarget.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_ctypes\_ctypes.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\callbacks.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\callproc.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\cfield.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\libffi_msvc\ffi.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\malloc_closure.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\libffi_msvc\prep_cif.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\stgdict.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_ctypes\libffi_msvc\win32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\Modules\_ctypes\libffi_msvc\win64.asm">
+      <Filter>Source Files</Filter>
+    </CustomBuild>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_ctypes_test.vcproj b/PCbuild/_ctypes_test.vcproj
deleted file mode 100644 (file)
index 0c7abbe..0000000
+++ /dev/null
@@ -1,521 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_ctypes_test"\r
-       ProjectGUID="{9EC7190A-249F-4180-A900-548FDCF3055F}"\r
-       RootNamespace="_ctypes_test"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\_ctypes_test.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_ctypes\_ctypes_test.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_ctypes_test.vcxproj b/PCbuild/_ctypes_test.vcxproj
new file mode 100644 (file)
index 0000000..4a54106
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9EC7190A-249F-4180-A900-548FDCF3055F}</ProjectGuid>
+    <RootNamespace>_ctypes_test</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+    <SupportPGO>false</SupportPGO>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_ctypes\_ctypes_test.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_ctypes\_ctypes_test.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_ctypes_test.vcxproj.filters b/PCbuild/_ctypes_test.vcxproj.filters
new file mode 100644 (file)
index 0000000..83d0870
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{8fd70119-5481-4e5d-b187-d0b14eb27e38}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{38abc486-e143-49dc-8cf0-8aefab0e0d3d}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_ctypes\_ctypes_test.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_ctypes\_ctypes_test.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_elementtree.vcproj b/PCbuild/_elementtree.vcproj
deleted file mode 100644 (file)
index 3e9631f..0000000
+++ /dev/null
@@ -1,613 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_elementtree"\r
-       ProjectGUID="{17E1E049-C309-4D79-843F-AE483C264AEA}"\r
-       RootNamespace="_elementtree"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="..\Modules\expat"\r
-                               PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D100000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\expat\ascii.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\asciitab.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\expat.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\expat_config.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\expat_external.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\iasciitab.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\internal.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\latin1tab.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\macconfig.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\nametab.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\pyexpatns.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\utf8tab.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\winconfig.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmlrole.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmltok.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_elementtree.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmlparse.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmlrole.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmltok.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_elementtree.vcxproj b/PCbuild/_elementtree.vcxproj
new file mode 100644 (file)
index 0000000..1ce1a04
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{17E1E049-C309-4D79-843F-AE483C264AEA}</ProjectGuid>
+    <RootNamespace>_elementtree</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <BaseAddress>0x1D100000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\expat\ascii.h" />
+    <ClInclude Include="..\Modules\expat\asciitab.h" />
+    <ClInclude Include="..\Modules\expat\expat.h" />
+    <ClInclude Include="..\Modules\expat\expat_config.h" />
+    <ClInclude Include="..\Modules\expat\expat_external.h" />
+    <ClInclude Include="..\Modules\expat\iasciitab.h" />
+    <ClInclude Include="..\Modules\expat\internal.h" />
+    <ClInclude Include="..\Modules\expat\latin1tab.h" />
+    <ClInclude Include="..\Modules\expat\macconfig.h" />
+    <ClInclude Include="..\Modules\expat\nametab.h" />
+    <ClInclude Include="..\Modules\expat\pyexpatns.h" />
+    <ClInclude Include="..\Modules\expat\utf8tab.h" />
+    <ClInclude Include="..\Modules\expat\winconfig.h" />
+    <ClInclude Include="..\Modules\expat\xmlrole.h" />
+    <ClInclude Include="..\Modules\expat\xmltok.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_elementtree.c" />
+    <ClCompile Include="..\Modules\expat\xmlparse.c" />
+    <ClCompile Include="..\Modules\expat\xmlrole.c" />
+    <ClCompile Include="..\Modules\expat\xmltok.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_elementtree.vcxproj.filters b/PCbuild/_elementtree.vcxproj.filters
new file mode 100644 (file)
index 0000000..6acdf35
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{643d8607-d024-40fe-8583-1823c96430f0}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{7b5335ad-059f-486f-85e4-f4757e26a9bf}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\expat\ascii.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\asciitab.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\expat.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\expat_config.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\expat_external.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\iasciitab.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\internal.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\latin1tab.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\macconfig.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\nametab.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\pyexpatns.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\utf8tab.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\winconfig.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\xmlrole.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\xmltok.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_elementtree.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\expat\xmlparse.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\expat\xmlrole.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\expat\xmltok.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_hashlib.vcproj b/PCbuild/_hashlib.vcproj
deleted file mode 100644 (file)
index 50d40d1..0000000
+++ /dev/null
@@ -1,545 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_hashlib"\r
-       ProjectGUID="{447F05A8-F581-4CAC-A466-5AC7936E207E}"\r
-       RootNamespace="_hashlib"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_hashopenssl.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_hashlib.vcxproj b/PCbuild/_hashlib.vcxproj
new file mode 100644 (file)
index 0000000..0f98966
--- /dev/null
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{447F05A8-F581-4CAC-A466-5AC7936E207E}</ProjectGuid>
+    <RootNamespace>_hashlib</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(opensslDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_hashopenssl.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="ssleay.vcxproj">
+      <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="libeay.vcxproj">
+      <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_hashlib.vcxproj.filters b/PCbuild/_hashlib.vcxproj.filters
new file mode 100644 (file)
index 0000000..75d3829
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{cc45963d-bd25-4eb8-bdba-a5507090bca4}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_hashopenssl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_msi.vcproj b/PCbuild/_msi.vcproj
deleted file mode 100644 (file)
index 084efdf..0000000
+++ /dev/null
@@ -1,529 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_msi"\r
-       ProjectGUID="{31FFC478-7B4A-43E8-9954-8D03E2187E9C}"\r
-       RootNamespace="_msi"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"\r
-                               BaseAddress="0x1D160000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\_msi.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_msi.vcxproj b/PCbuild/_msi.vcxproj
new file mode 100644 (file)
index 0000000..6c5fa8c
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{31FFC478-7B4A-43E8-9954-8D03E2187E9C}</ProjectGuid>
+    <RootNamespace>_msi</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <BaseAddress>0x1D160000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\_msi.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_msi.vcxproj.filters b/PCbuild/_msi.vcxproj.filters
new file mode 100644 (file)
index 0000000..1bb4fba
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{bdef7710-e433-4ac0-84e0-14f34454bd3e}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\_msi.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_multiprocessing.vcproj b/PCbuild/_multiprocessing.vcproj
deleted file mode 100644 (file)
index 5d6337d..0000000
+++ /dev/null
@@ -1,557 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_multiprocessing"\r
-       ProjectGUID="{9E48B300-37D1-11DD-8C41-005056C00008}"\r
-       RootNamespace="_multiprocessing"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_multiprocessing\multiprocessing.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_multiprocessing\connection.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_multiprocessing\multiprocessing.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_multiprocessing\pipe_connection.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_multiprocessing\semaphore.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_multiprocessing\socket_connection.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_multiprocessing\win32_functions.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_multiprocessing.vcxproj b/PCbuild/_multiprocessing.vcxproj
new file mode 100644 (file)
index 0000000..3a71c17
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{9E48B300-37D1-11DD-8C41-005056C00008}</ProjectGuid>
+    <RootNamespace>_multiprocessing</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <BaseAddress>0x1e1D0000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_multiprocessing\multiprocessing.h" />
+    <ClInclude Include="..\Modules\_multiprocessing\connection.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_multiprocessing\multiprocessing.c" />
+    <ClCompile Include="..\Modules\_multiprocessing\pipe_connection.c" />
+    <ClCompile Include="..\Modules\_multiprocessing\semaphore.c" />
+    <ClCompile Include="..\Modules\_multiprocessing\socket_connection.c" />
+    <ClCompile Include="..\Modules\_multiprocessing\win32_functions.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_multiprocessing.vcxproj.filters b/PCbuild/_multiprocessing.vcxproj.filters
new file mode 100644 (file)
index 0000000..df8da3c
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{623c956c-1893-43d9-a7dc-96e4fef20f93}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{34615a62-f999-4659-83f5-19d17a644530}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_multiprocessing\multiprocessing.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_multiprocessing\connection.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_multiprocessing\multiprocessing.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_multiprocessing\pipe_connection.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_multiprocessing\semaphore.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_multiprocessing\socket_connection.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_multiprocessing\win32_functions.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_socket.vcproj b/PCbuild/_socket.vcproj
deleted file mode 100644 (file)
index ee72c10..0000000
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_socket"\r
-       ProjectGUID="{86937F53-C189-40EF-8CE8-8759D8E7D480}"\r
-       RootNamespace="_socket"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               BaseAddress="0x1e1D0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\socketmodule.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\socketmodule.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_socket.vcxproj b/PCbuild/_socket.vcxproj
new file mode 100644 (file)
index 0000000..453d3f7
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{86937F53-C189-40EF-8CE8-8759D8E7D480}</ProjectGuid>
+    <RootNamespace>_socket</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <BaseAddress>0x1e1D0000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\socketmodule.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\socketmodule.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_socket.vcxproj.filters b/PCbuild/_socket.vcxproj.filters
new file mode 100644 (file)
index 0000000..f6a8526
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{1452207f-707c-4e84-b532-307193a0fd85}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{1edfe0d0-7b9d-4dc8-a335-b21fef7cc77a}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\socketmodule.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\socketmodule.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_sqlite3.vcproj b/PCbuild/_sqlite3.vcproj
deleted file mode 100644 (file)
index b31f9b6..0000000
+++ /dev/null
@@ -1,613 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9.00"\r
-       Name="_sqlite3"\r
-       ProjectGUID="{13CECB97-4119-4316-9D42-8534019A5A44}"\r
-       RootNamespace="_sqlite3"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-                               PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e180000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\cache.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\connection.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\cursor.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\microprotocols.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\module.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\prepare_protocol.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\row.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\sqlitecompat.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\statement.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\util.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\cache.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\connection.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\cursor.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\microprotocols.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\module.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\prepare_protocol.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\row.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\statement.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sqlite\util.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj
new file mode 100644 (file)
index 0000000..a470335
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{13CECB97-4119-4316-9D42-8534019A5A44}</ProjectGuid>
+    <RootNamespace>_sqlite3</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <BaseAddress>0x1e180000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_sqlite\cache.h" />
+    <ClInclude Include="..\Modules\_sqlite\connection.h" />
+    <ClInclude Include="..\Modules\_sqlite\cursor.h" />
+    <ClInclude Include="..\Modules\_sqlite\microprotocols.h" />
+    <ClInclude Include="..\Modules\_sqlite\module.h" />
+    <ClInclude Include="..\Modules\_sqlite\prepare_protocol.h" />
+    <ClInclude Include="..\Modules\_sqlite\row.h" />
+    <ClInclude Include="..\Modules\_sqlite\sqlitecompat.h" />
+    <ClInclude Include="..\Modules\_sqlite\statement.h" />
+    <ClInclude Include="..\Modules\_sqlite\util.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_sqlite\cache.c" />
+    <ClCompile Include="..\Modules\_sqlite\connection.c" />
+    <ClCompile Include="..\Modules\_sqlite\cursor.c" />
+    <ClCompile Include="..\Modules\_sqlite\microprotocols.c" />
+    <ClCompile Include="..\Modules\_sqlite\module.c" />
+    <ClCompile Include="..\Modules\_sqlite\prepare_protocol.c" />
+    <ClCompile Include="..\Modules\_sqlite\row.c" />
+    <ClCompile Include="..\Modules\_sqlite\statement.c" />
+    <ClCompile Include="..\Modules\_sqlite\util.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="sqlite3.vcxproj">
+      <Project>{a1a295e5-463c-437f-81ca-1f32367685da}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_sqlite3.vcxproj.filters b/PCbuild/_sqlite3.vcxproj.filters
new file mode 100644 (file)
index 0000000..ec0585e
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{dac8ab3b-ce16-4bef-bef9-76463a01f5c4}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{814b187d-44ad-4f2b-baa7-18ca8a8a6a77}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\_sqlite\cache.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\connection.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\cursor.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\microprotocols.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\module.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\prepare_protocol.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\row.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\sqlitecompat.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\statement.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_sqlite\util.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_sqlite\cache.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\connection.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\cursor.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\microprotocols.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\module.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\prepare_protocol.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\row.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\statement.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sqlite\util.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_ssl.vcproj b/PCbuild/_ssl.vcproj
deleted file mode 100644 (file)
index c24dd8b..0000000
+++ /dev/null
@@ -1,545 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_ssl"\r
-       ProjectGUID="{C6E20F84-3247-4AD6-B051-B073268F73BA}"\r
-       RootNamespace="_ssl"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc32"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(opensslDir)\inc64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               CommandLine=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_ssl.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
new file mode 100644 (file)
index 0000000..fff23c7
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C6E20F84-3247-4AD6-B051-B073268F73BA}</ProjectGuid>
+    <RootNamespace>_ssl</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(opensslDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_ssl.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="libeay.vcxproj">
+      <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="ssleay.vcxproj">
+      <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="_socket.vcxproj">
+      <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_ssl.vcxproj.filters b/PCbuild/_ssl.vcxproj.filters
new file mode 100644 (file)
index 0000000..283bb85
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{695348f7-e9f6-4fe1-bc03-5f08ffc8095b}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_ssl.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_testcapi.vcproj b/PCbuild/_testcapi.vcproj
deleted file mode 100644 (file)
index 55f243f..0000000
+++ /dev/null
@@ -1,521 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_testcapi"\r
-       ProjectGUID="{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"\r
-       RootNamespace="_testcapi"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1e1F0000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_testcapimodule.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_testcapi.vcxproj b/PCbuild/_testcapi.vcxproj
new file mode 100644 (file)
index 0000000..77df0cb
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}</ProjectGuid>
+    <RootNamespace>_testcapi</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+    <SupportPGO>false</SupportPGO>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <BaseAddress>0x1e1F0000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_testcapimodule.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_testcapi.vcxproj.filters b/PCbuild/_testcapi.vcxproj.filters
new file mode 100644 (file)
index 0000000..d234d70
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{a76a90d8-8e8b-4c36-8f58-8bd46abe9f5e}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_testcapimodule.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/_tkinter.vcproj b/PCbuild/_tkinter.vcproj
deleted file mode 100644 (file)
index 1c5f0cb..0000000
+++ /dev/null
@@ -1,541 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="_tkinter"\r
-       ProjectGUID="{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"\r
-       RootNamespace="_tkinter"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltkLibDebug)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltk64LibDebug)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltkLib)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltk64Lib)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltkLib)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltk64Lib)"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltkDir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltkLib)"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(tcltk64Dir)\include"\r
-                               PreprocessorDefinitions="WITH_APPINIT"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="$(tcltk64Lib)"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_tkinter.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\tkappinit.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj
new file mode 100644 (file)
index 0000000..e0610a2
--- /dev/null
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}</ProjectGuid>
+    <RootNamespace>_tkinter</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="tcltk.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(tcltkDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_tkinter.c" />
+    <ClCompile Include="..\Modules\tkappinit.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="tcl.vcxproj">
+      <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
+    </ProjectReference>
+    <ProjectReference Include="tk.vcxproj">
+      <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/_tkinter.vcxproj.filters b/PCbuild/_tkinter.vcxproj.filters
new file mode 100644 (file)
index 0000000..413adfa
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{b9ce64dd-cb95-472d-bbe8-5583b2cd375b}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_tkinter.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\tkappinit.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/bdist_wininst.vcproj b/PCbuild/bdist_wininst.vcproj
deleted file mode 100644 (file)
index 68b3931..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9.00"\r
-       Name="bdist_wininst"\r
-       ProjectGUID="{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"\r
-       RootNamespace="wininst"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="..\lib\distutils\command"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               MkTypLibCompatible="true"\r
-                               SuppressStartupBanner="true"\r
-                               TargetEnvironment="1"\r
-                               TypeLibraryName=".\..\lib\distutils\command\wininst.tlb"\r
-                               HeaderFileName=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="1"\r
-                               InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\PC\bdist_wininst;..\Include;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                               WarningLevel="3"\r
-                               SuppressStartupBanner="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="0"\r
-                               AdditionalIncludeDirectories="..\PC;..\PC\bdist_wininst;..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="comctl32.lib imagehlp.lib"\r
-                               OutputFile="..\lib\distutils\command\wininst-9.0.exe"\r
-                               LinkIncremental="1"\r
-                               SuppressStartupBanner="true"\r
-                               IgnoreDefaultLibraryNames="LIBC"\r
-                               ProgramDatabaseFile="..\lib\distutils\command\wininst-9.0.pdb"\r
-                               SubSystem="2"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       OutputDirectory="$(PlatformName)\$(ConfigurationName)"\r
-                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               MkTypLibCompatible="true"\r
-                               SuppressStartupBanner="true"\r
-                               TargetEnvironment="3"\r
-                               TypeLibraryName=".\..\lib\distutils\command\wininst.tlb"\r
-                               HeaderFileName=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="1"\r
-                               InlineFunctionExpansion="1"\r
-                               AdditionalIncludeDirectories="..\PC\bdist_wininst;..\Include;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                               WarningLevel="3"\r
-                               SuppressStartupBanner="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="0"\r
-                               AdditionalIncludeDirectories="..\PC;..\PC\bdist_wininst;..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="comctl32.lib imagehlp.lib"\r
-                               OutputFile="..\lib\distutils\command\wininst-9.0-amd64.exe"\r
-                               LinkIncremental="1"\r
-                               SuppressStartupBanner="true"\r
-                               IgnoreDefaultLibraryNames="LIBC"\r
-                               ProgramDatabaseFile="..\lib\distutils\command\wininst-9.0-amd64.pdb"\r
-                               SubSystem="2"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\bdist_wininst\extract.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\bdist_wininst\install.c"\r
-                               >\r
-                       </File>\r
-                       <Filter\r
-                               Name="zlib"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\adler32.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\crc32.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inffast.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inflate.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inftrees.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\zutil.c"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\bdist_wininst\archive.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\bdist_wininst\install.rc"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\bdist_wininst\PythonPowered.bmp"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
index fb2587913a953a79c7ac6cf3b62b7d9efd034403..f3dcc91eab991a7238291dea8692d7d2a6af7d71 100644 (file)
@@ -1,18 +1,98 @@
 @echo off\r
-rem A batch program to build or rebuild a particular configuration.\r
-rem just for convenience.\r
+goto Run\r
+:Usage\r
+echo.%~nx0 [flags and arguments] [quoted MSBuild options]\r
+echo.\r
+echo.Build CPython from the command line.  Requires the appropriate\r
+echo.version(s) of Microsoft Visual Studio to be installed (see readme.txt).\r
+echo.Also requires Subversion (svn.exe) to be on PATH if the '-e' flag is\r
+echo.given.\r
+echo.\r
+echo.After the flags recognized by this script, up to 9 arguments to be passed\r
+echo.directly to MSBuild may be passed.  If the argument contains an '=', the\r
+echo.entire argument must be quoted (e.g. `%~nx0 "/p:PlatformToolset=v100"`)\r
+echo.\r
+echo.Available flags:\r
+echo.  -h  Display this help message\r
+echo.  -r  Target Rebuild instead of Build\r
+echo.  -d  Set the configuration to Debug\r
+echo.  -e  Build external libraries fetched by get_externals.bat\r
+echo.      Extension modules that depend on external libraries will not attempt\r
+echo.      to build if this flag is not present\r
+echo.  -m  Enable parallel build\r
+echo.  -M  Disable parallel build (disabled by default)\r
+echo.  -v  Increased output messages\r
+echo.  -k  Attempt to kill any running Pythons before building (usually done\r
+echo.      automatically by the pythoncore project)\r
+echo.\r
+echo.Available flags to avoid building certain modules.\r
+echo.These flags have no effect if '-e' is not given:\r
+echo.  --no-ssl      Do not attempt to build _ssl\r
+echo.  --no-tkinter  Do not attempt to build Tkinter\r
+echo.  --no-bsddb    Do not attempt to build _bsddb\r
+echo.\r
+echo.Available arguments:\r
+echo.  -c Release ^| Debug ^| PGInstrument ^| PGUpdate\r
+echo.     Set the configuration (default: Release)\r
+echo.  -p x64 ^| Win32\r
+echo.     Set the platform (default: Win32)\r
+echo.  -t Build ^| Rebuild ^| Clean ^| CleanAll\r
+echo.     Set the target manually\r
+exit /b 127\r
 \r
+:Run\r
 setlocal\r
 set platf=Win32\r
+set vs_platf=x86\r
 set conf=Release\r
-set build=\r
+set target=Build\r
+set dir=%~dp0\r
+set parallel=\r
+set verbose=/nologo /v:m\r
+set kill=\r
 \r
 :CheckOpts\r
-if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts\r
-if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts\r
-if "%1"=="-r" (set build=/rebuild) & shift & goto CheckOpts\r
-if "%1"=="-d" (set conf=Debug) & shift & goto CheckOpts\r
-\r
-set cmd=vcbuild /useenv pcbuild.sln %build% "%conf%|%platf%"\r
-echo %cmd%\r
-%cmd%\r
+if "%~1"=="-h" goto Usage\r
+if "%~1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts\r
+if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts\r
+if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts\r
+if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts\r
+if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts\r
+if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts\r
+if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts\r
+rem These use the actual property names used by MSBuild.  We could just let\r
+rem them in through the environment, but we specify them on the command line\r
+rem anyway for visibility so set defaults after this\r
+if "%~1"=="-e" (set IncludeExternals=true) & shift & goto CheckOpts\r
+if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts\r
+if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts\r
+if "%~1"=="--no-bsddb" (set IncludeBsddb=false) & shift & goto CheckOpts\r
+\r
+if "%IncludeExternals%"=="" set IncludeExternals=false\r
+if "%IncludeSSL%"=="" set IncludeSSL=true\r
+if "%IncludeTkinter%"=="" set IncludeTkinter=true\r
+if "%IncludeBsddb%"=="" set IncludeBsddb=true\r
+\r
+if "%IncludeExternals%"=="true" call "%dir%get_externals.bat"\r
+\r
+if "%platf%"=="x64" (set vs_platf=x86_amd64)\r
+\r
+rem Setup the environment\r
+call "%dir%env.bat" %vs_platf% >nul\r
+\r
+if "%kill%"=="true" (\r
+    msbuild /v:m /nologo /target:KillPython "%dir%\pythoncore.vcxproj" /p:Configuration=%conf% /p:Platform=%platf% /p:KillPython=true\r
+)\r
+\r
+rem Call on MSBuild to do the work, echo the command.\r
+rem Passing %1-9 is not the preferred option, but argument parsing in\r
+rem batch is, shall we say, "lackluster"\r
+echo on\r
+msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^\r
+ /p:Configuration=%conf% /p:Platform=%platf%^\r
+ /p:IncludeExternals=%IncludeExternals%^\r
+ /p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^\r
+ /p:IncludeBsddb=%IncludeBsddb%^\r
+ %1 %2 %3 %4 %5 %6 %7 %8 %9\r
index d7e4e8bdb7af6060e6fc94e090921c4e26f402cc..79ec2670b043653398e6a8bcd1c33cdc847fbff5 100644 (file)
@@ -7,14 +7,16 @@ rem building the PGUpdate configuration while developing.
 \r
 setlocal\r
 set platf=Win32\r
+set parallel=/m\r
+set dir=%~dp0\r
 \r
 rem use the performance testsuite.  This is quick and simple\r
-set job1=..\tools\pybench\pybench.py -n 1 -C 1 --with-gc\r
-set path1=..\tools\pybench\r
+set job1="%dir%..\tools\pybench\pybench.py" -n 1 -C 1 --with-gc\r
+set path1="%dir%..\tools\pybench"\r
 \r
 rem or the whole testsuite for more thorough testing\r
-set job2=..\lib\test\regrtest.py\r
-set path2=..\lib\r
+set job2="%dir%..\lib\test\regrtest.py"\r
+set path2="%dir%..\lib"\r
 \r
 set job=%job1%\r
 set clrpath=%path1%\r
@@ -22,20 +24,25 @@ set clrpath=%path1%
 :CheckOpts\r
 if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts\r
 if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts\r
+if "%1"=="-M" (set parallel=) & shift & goto CheckOpts\r
+\r
+\r
+rem We cannot cross compile PGO builds, as the optimization needs to be run natively\r
+set vs_platf=x86\r
+set PGO=%dir%win32-pgo\r
+\r
+if "%platf%"=="x64" (set vs_platf=amd64) & (set PGO=%dir%amd64-pgo)\r
+rem Setup the environment\r
+call "%dir%env.bat" %vs_platf%\r
 \r
-set PGI=%platf%-pgi\r
-set PGO=%platf%-pgo\r
 \r
-@echo on\r
 rem build the instrumented version\r
-call build -p %platf% -c PGInstrument\r
+msbuild "%dir%pcbuild.proj" %parallel% /t:Build /p:Configuration=PGInstrument /p:Platform=%platf% %1 %2 %3 %4 %5 %6 %7 %8 %9\r
 \r
 rem remove .pyc files, .pgc files and execute the job\r
-%PGI%\python.exe rmpyc.py %clrpath%\r
-del %PGI%\*.pgc\r
-%PGI%\python.exe %job%\r
-\r
-rem finally build the optimized version\r
-if exist %PGO% del /s /q %PGO%\r
-call build -p %platf% -c PGUpdate\r
+"%PGO%\python.exe" "%dir%rmpyc.py" %clrpath%\r
+del "%PGO%\*.pgc"\r
+"%PGO%\python.exe" %job%\r
 \r
+rem build optimized version\r
+msbuild "%dir%pcbuild.proj" %parallel% /t:Build /p:Configuration=PGUpdate /p:Platform=%platf% %1 %2 %3 %4 %5 %6 %7 %8 %9\r
diff --git a/PCbuild/build_ssl.bat b/PCbuild/build_ssl.bat
deleted file mode 100644 (file)
index f06c2d1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-@echo off\r
-if not defined HOST_PYTHON (\r
-  if %1 EQU Debug (\r
-    set HOST_PYTHON=python_d.exe\r
-    if not exist python27_d.dll exit 1\r
-  ) ELSE (\r
-    set HOST_PYTHON=python.exe\r
-    if not exist python27.dll exit 1\r
-  )\r
-)\r
-%HOST_PYTHON% build_ssl.py %1 %2 %3\r
-\r
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py
deleted file mode 100644 (file)
index dd8bb18..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-from __future__ import with_statement, print_function
-# Script for building the _ssl and _hashlib modules for Windows.
-# Uses Perl to setup the OpenSSL environment correctly
-# and build OpenSSL, then invokes a simple nmake session
-# for the actual _ssl.pyd and _hashlib.pyd DLLs.
-
-# THEORETICALLY, you can:
-# * Unpack the latest SSL release one level above your main Python source
-#   directory.  It is likely you will already find the zlib library and
-#   any other external packages there.
-# * Install ActivePerl and ensure it is somewhere on your path.
-# * Run this script from the PCBuild directory.
-#
-# it should configure and build SSL, then build the _ssl and _hashlib
-# Python extensions without intervention.
-
-# Modified by Christian Heimes
-# Now this script supports pre-generated makefiles and assembly files.
-# Developers don't need an installation of Perl anymore to build Python. A svn
-# checkout from our svn repository is enough.
-#
-# In Order to create the files in the case of an update you still need Perl.
-# Run build_ssl in this order:
-# python.exe build_ssl.py Release x64
-# python.exe build_ssl.py Release Win32
-
-import os, sys, re, shutil
-
-# Find all "foo.exe" files on the PATH.
-def find_all_on_path(filename, extras = None):
-    entries = os.environ["PATH"].split(os.pathsep)
-    ret = []
-    for p in entries:
-        fname = os.path.abspath(os.path.join(p, filename))
-        if os.path.isfile(fname) and fname not in ret:
-            ret.append(fname)
-    if extras:
-        for p in extras:
-            fname = os.path.abspath(os.path.join(p, filename))
-            if os.path.isfile(fname) and fname not in ret:
-                ret.append(fname)
-    return ret
-
-# Find a suitable Perl installation for OpenSSL.
-# cygwin perl does *not* work.  ActivePerl does.
-# Being a Perl dummy, the simplest way I can check is if the "Win32" package
-# is available.
-def find_working_perl(perls):
-    for perl in perls:
-        fh = os.popen('"%s" -e "use Win32;"' % perl)
-        fh.read()
-        rc = fh.close()
-        if rc:
-            continue
-        return perl
-    print("Can not find a suitable PERL:")
-    if perls:
-        print(" the following perl interpreters were found:")
-        for p in perls:
-            print(" ", p)
-        print(" None of these versions appear suitable for building OpenSSL")
-    else:
-        print(" NO perl interpreters were found on this machine at all!")
-    print(" Please install ActivePerl and ensure it appears on your path")
-    return None
-
-# Fetch SSL directory from VC properties
-def get_ssl_dir():
-    propfile = (os.path.join(os.path.dirname(__file__), 'pyproject.vsprops'))
-    with open(propfile) as f:
-        m = re.search('openssl-([^"]+)"', f.read())
-        return "..\externals\openssl-"+m.group(1)
-
-
-def create_makefile64(makefile, m32):
-    """Create and fix makefile for 64bit
-
-    Replace 32 with 64bit directories
-    """
-    if not os.path.isfile(m32):
-        return
-    with open(m32) as fin:
-        with open(makefile, 'w') as fout:
-            for line in fin:
-                line = line.replace("=tmp32", "=tmp64")
-                line = line.replace("=out32", "=out64")
-                line = line.replace("=inc32", "=inc64")
-                # force 64 bit machine
-                line = line.replace("MKLIB=lib", "MKLIB=lib /MACHINE:X64")
-                line = line.replace("LFLAGS=", "LFLAGS=/MACHINE:X64 ")
-                # don't link against the lib on 64bit systems
-                line = line.replace("bufferoverflowu.lib", "")
-                fout.write(line)
-    os.unlink(m32)
-
-def fix_makefile(makefile):
-    """Fix some stuff in all makefiles
-    """
-    if not os.path.isfile(makefile):
-        return
-    # 2.4 compatibility
-    fin = open(makefile)
-    if 1: # with open(makefile) as fin:
-        lines = fin.readlines()
-        fin.close()
-    fout = open(makefile, 'w')
-    if 1: # with open(makefile, 'w') as fout:
-        for line in lines:
-            if line.startswith("PERL="):
-                continue
-            if line.startswith("CP="):
-                line = "CP=copy\n"
-            if line.startswith("MKDIR="):
-                line = "MKDIR=mkdir\n"
-            if line.startswith("CFLAG="):
-                line = line.strip()
-                for algo in ("RC5", "MDC2", "IDEA"):
-                    noalgo = " -DOPENSSL_NO_%s" % algo
-                    if noalgo not in line:
-                        line = line + noalgo
-                line = line + '\n'
-            fout.write(line)
-    fout.close()
-
-def run_configure(configure, do_script):
-    print("perl Configure "+configure)
-    os.system("perl Configure "+configure)
-    print(do_script)
-    os.system(do_script)
-
-def main():
-    build_all = "-a" in sys.argv
-    if sys.argv[1] == "Release":
-        debug = False
-    elif sys.argv[1] == "Debug":
-        debug = True
-    else:
-        raise ValueError(str(sys.argv))
-
-    if sys.argv[2] == "Win32":
-        arch = "x86"
-        configure = "VC-WIN32"
-        do_script = "ms\\do_nasm"
-        makefile="ms\\nt.mak"
-        m32 = makefile
-    elif sys.argv[2] == "x64":
-        arch="amd64"
-        configure = "VC-WIN64A"
-        do_script = "ms\\do_win64a"
-        makefile = "ms\\nt64.mak"
-        m32 = makefile.replace('64', '')
-        #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON"
-    else:
-        raise ValueError(str(sys.argv))
-
-    make_flags = ""
-    if build_all:
-        make_flags = "-a"
-    # perl should be on the path, but we also look in "\perl" and "c:\\perl"
-    # as "well known" locations
-    perls = find_all_on_path("perl.exe", [r"\perl\bin",
-                                          r"C:\perl\bin",
-                                          r"\perl64\bin",
-                                          r"C:\perl64\bin",
-                                         ])
-    perl = find_working_perl(perls)
-    if perl:
-        print("Found a working perl at '%s'" % (perl,))
-    else:
-        print("No Perl installation was found. Existing Makefiles are used.")
-    sys.stdout.flush()
-    # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live.
-    ssl_dir = get_ssl_dir()
-    if ssl_dir is None:
-        sys.exit(1)
-
-    # add our copy of NASM to PATH.  It will be on the same level as openssl
-    for dir in os.listdir(os.path.join(ssl_dir, os.pardir)):
-        if dir.startswith('nasm'):
-            nasm_dir = os.path.join(ssl_dir, os.pardir, dir)
-            nasm_dir = os.path.abspath(nasm_dir)
-            old_path = os.environ['PATH']
-            os.environ['PATH'] = os.pathsep.join([nasm_dir, old_path])
-            break
-    else:
-        print('NASM was not found, make sure it is on PATH')
-
-
-    old_cd = os.getcwd()
-    try:
-        os.chdir(ssl_dir)
-        # rebuild makefile when we do the role over from 32 to 64 build
-        if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile):
-            os.unlink(m32)
-
-        # If the ssl makefiles do not exist, we invoke Perl to generate them.
-        # Due to a bug in this script, the makefile sometimes ended up empty
-        # Force a regeneration if it is.
-        if not os.path.isfile(makefile) or os.path.getsize(makefile)==0:
-            if perl is None:
-                print("Perl is required to build the makefiles!")
-                sys.exit(1)
-
-            print("Creating the makefiles...")
-            sys.stdout.flush()
-            # Put our working Perl at the front of our path
-            os.environ["PATH"] = os.path.dirname(perl) + \
-                                          os.pathsep + \
-                                          os.environ["PATH"]
-            run_configure(configure, do_script)
-            if debug:
-                print("OpenSSL debug builds aren't supported.")
-            #if arch=="x86" and debug:
-            #    # the do_masm script in openssl doesn't generate a debug
-            #    # build makefile so we generate it here:
-            #    os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile)
-
-            if arch == "amd64":
-                create_makefile64(makefile, m32)
-            fix_makefile(makefile)
-            shutil.copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
-            shutil.copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
-
-        # Now run make.
-        if arch == "amd64":
-            rc = os.system("nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm")
-            if rc:
-                print("nasm assembler has failed.")
-                sys.exit(rc)
-
-        shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
-        shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
-
-        #makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
-        makeCommand = "nmake /nologo -f \"%s\"" % makefile
-        print("Executing ssl makefiles:", makeCommand)
-        sys.stdout.flush()
-        rc = os.system(makeCommand)
-        if rc:
-            print("Executing "+makefile+" failed")
-            print(rc)
-            sys.exit(rc)
-    finally:
-        os.chdir(old_cd)
-    sys.exit(rc)
-
-if __name__=='__main__':
-    main()
diff --git a/PCbuild/build_tkinter.py b/PCbuild/build_tkinter.py
deleted file mode 100644 (file)
index 1241864..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-"""Script to compile the dependencies of _tkinter
-
-Copyright (c) 2007 by Christian Heimes <christian@cheimes.de>
-
-Licensed to PSF under a Contributor Agreement.
-"""
-
-import os
-import sys
-
-here = os.path.abspath(os.path.dirname(__file__))
-par = os.path.pardir
-
-TCL = "tcl8.5.2"
-TK = "tk8.5.2"
-TIX = "tix-8.4.0.x"
-
-ROOT = os.path.abspath(os.path.join(here, par, par))
-# Windows 2000 compatibility: WINVER 0x0500
-# http://msdn2.microsoft.com/en-us/library/aa383745.aspx
-NMAKE = ('nmake /nologo /f %s '
-    'COMPILERFLAGS=\"-DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=NTDDI_WIN2KSP4\" '
-    '%s %s')
-
-def nmake(makefile, command="", **kw):
-    defines = ' '.join('%s=%s' % i for i in kw.items())
-    cmd = NMAKE % (makefile, defines, command)
-    print("\n\n"+cmd+"\n")
-    if os.system(cmd) != 0:
-        raise RuntimeError(cmd)
-
-def build(platform, clean):
-    if platform == "Win32":
-        dest = os.path.join(ROOT, "tcltk")
-        machine = "X86"
-    elif platform == "AMD64":
-        dest = os.path.join(ROOT, "tcltk64")
-        machine = "AMD64"
-    else:
-        raise ValueError(platform)
-
-    # TCL
-    tcldir = os.path.join(ROOT, TCL)
-    if 1:
-        os.chdir(os.path.join(tcldir, "win"))
-        if clean:
-            nmake("makefile.vc", "clean")
-        nmake("makefile.vc", MACHINE=machine)
-        nmake("makefile.vc", "install", INSTALLDIR=dest, MACHINE=machine)
-
-    # TK
-    if 1:
-        os.chdir(os.path.join(ROOT, TK, "win"))
-        if clean:
-            nmake("makefile.vc", "clean", DEBUG=0, TCLDIR=tcldir)
-        nmake("makefile.vc", DEBUG=0, MACHINE=machine)
-        nmake("makefile.vc", "install", DEBUG=0, INSTALLDIR=dest, MACHINE=machine)
-
-    # TIX
-    if 1:
-        # python9.mak is available at http://svn.python.org
-        os.chdir(os.path.join(ROOT, TIX, "win"))
-        if clean:
-            nmake("python.mak", "clean")
-        nmake("python.mak", MACHINE=machine, INSTALL_DIR=dest)
-        nmake("python.mak", "install", INSTALL_DIR=dest)
-
-def main():
-    if len(sys.argv) < 2 or sys.argv[1] not in ("Win32", "AMD64"):
-        print("%s Win32|AMD64" % sys.argv[0])
-        sys.exit(1)
-
-    if "-c" in sys.argv:
-        clean = True
-    else:
-        clean = False
-
-    build(sys.argv[1], clean)
-
-
-if __name__ == '__main__':
-    main()
diff --git a/PCbuild/bz2.vcproj b/PCbuild/bz2.vcproj
deleted file mode 100644 (file)
index 088fb46..0000000
+++ /dev/null
@@ -1,581 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="bz2"\r
-       ProjectGUID="{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"\r
-       RootNamespace="bz2"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="$(bz2Dir)"\r
-                               PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D170000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\bz2module.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="bzip2 1.0.6 Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\bzlib.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\bzlib_private.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="bzip2 1.0.6 Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\blocksort.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\bzlib.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\compress.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\crctable.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\decompress.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\huffman.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(bz2Dir)\randtable.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/bz2.vcxproj b/PCbuild/bz2.vcxproj
new file mode 100644 (file)
index 0000000..c782e7b
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}</ProjectGuid>
+    <RootNamespace>bz2</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+    <ProjectName>bz2</ProjectName>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <BaseAddress>0x1D170000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\bz2module.c" />
+    <ClCompile Include="$(bz2Dir)\blocksort.c" />
+    <ClCompile Include="$(bz2Dir)\bzlib.c" />
+    <ClCompile Include="$(bz2Dir)\compress.c" />
+    <ClCompile Include="$(bz2Dir)\crctable.c" />
+    <ClCompile Include="$(bz2Dir)\decompress.c" />
+    <ClCompile Include="$(bz2Dir)\huffman.c" />
+    <ClCompile Include="$(bz2Dir)\randtable.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="$(bz2Dir)\bzlib.h" />
+    <ClInclude Include="$(bz2Dir)\bzlib_private.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/bz2.vcxproj.filters b/PCbuild/bz2.vcxproj.filters
new file mode 100644 (file)
index 0000000..13e9aa7
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{f53a859d-dad2-4d5b-ae41-f28d8b571f5a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="bzip2 1.0.6 Header Files">
+      <UniqueIdentifier>{7e0bed05-ae33-43b7-8797-656455bbb7f3}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="bzip2 1.0.6 Source Files">
+      <UniqueIdentifier>{ed574b89-6983-4cdf-9f98-fe7048d9e89c}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\bz2module.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bz2Dir)\blocksort.c">
+      <Filter>bzip2 1.0.6 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bz2Dir)\bzlib.c">
+      <Filter>bzip2 1.0.6 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bz2Dir)\compress.c">
+      <Filter>bzip2 1.0.6 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bz2Dir)\crctable.c">
+      <Filter>bzip2 1.0.6 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bz2Dir)\decompress.c">
+      <Filter>bzip2 1.0.6 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bz2Dir)\huffman.c">
+      <Filter>bzip2 1.0.6 Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="$(bz2Dir)\randtable.c">
+      <Filter>bzip2 1.0.6 Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="$(bz2Dir)\bzlib.h">
+      <Filter>bzip2 1.0.6 Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="$(bz2Dir)\bzlib_private.h">
+      <Filter>bzip2 1.0.6 Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/clean.bat b/PCbuild/clean.bat
new file mode 100644 (file)
index 0000000..78517d2
--- /dev/null
@@ -0,0 +1,5 @@
+@echo off\r
+rem A batch program to clean a particular configuration,\r
+rem just for convenience.\r
+\r
+call %~dp0build.bat -t Clean %*\r
diff --git a/PCbuild/debug.vsprops b/PCbuild/debug.vsprops
deleted file mode 100644 (file)
index bc643cb..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="debug"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               PreprocessorDefinitions="_DEBUG"\r
-       />\r
-       <UserMacro\r
-               Name="KillPythonExe"\r
-               Value="$(OutDir)\kill_python_d.exe"\r
-       />\r
-</VisualStudioPropertySheet>\r
index 1ba7b6d28609c4d9ed407894068d9e1246c12abd..ec8a69539f8ee68784f1c4ec6bf99096829cf867 100644 (file)
@@ -1,5 +1,17 @@
 @echo off\r
-set VS9=%ProgramFiles%\Microsoft Visual Studio 9.0\r
-echo Build environments: x86, ia64, amd64, x86_amd64, x86_ia64\r
+rem This script adds the latest available tools to the path for the current\r
+rem command window. However, all builds of Python should ignore the version\r
+rem of the tools on PATH and use PlatformToolset instead, which should\r
+rem always be 'v90'.\r
+rem\r
+rem To build Python with a newer toolset, pass "/p:PlatformToolset=v100" (or\r
+rem 'v110', 'v120' or 'v140') to the build script.  Note that no toolset\r
+rem other than 'v90' is supported!\r
+\r
+echo Build environments: x86, amd64, x86_amd64\r
 echo.\r
-call "%VS9%\VC\vcvarsall.bat" %1\r
+set VSTOOLS=%VS140COMNTOOLS%\r
+if "%VSTOOLS%"=="" set VSTOOLS=%VS120COMNTOOLS%\r
+if "%VSTOOLS%"=="" set VSTOOLS=%VS110COMNTOOLS%\r
+if "%VSTOOLS%"=="" set VSTOOLS=%VS100COMNTOOLS%\r
+call "%VSTOOLS%..\..\VC\vcvarsall.bat" %*\r
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
new file mode 100644 (file)
index 0000000..ffd1a16
--- /dev/null
@@ -0,0 +1,107 @@
+@echo off\r
+setlocal\r
+rem Simple script to fetch source for external libraries\r
+\r
+if not exist "%~dp0..\externals" mkdir "%~dp0..\externals"\r
+pushd "%~dp0..\externals"\r
+\r
+if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/\r
+\r
+rem Optionally clean up first.  Be warned that this can be very destructive!\r
+if not "%1"=="" (\r
+    for %%c in (-c --clean --clean-only) do (\r
+        if "%1"=="%%c" goto clean\r
+    )\r
+    goto usage\r
+)\r
+goto fetch\r
+\r
+:clean\r
+echo.Cleaning up external libraries.\r
+for /D %%d in (\r
+               bzip2-*\r
+               db-*\r
+               nasm-*\r
+               openssl-*\r
+               tcl-*\r
+               tcltk*\r
+               tk-*\r
+               tix-*\r
+               sqlite-*\r
+               xz-*\r
+               ) do (\r
+    echo.Removing %%d\r
+    rmdir /s /q %%d\r
+)\r
+if "%1"=="--clean-only" (\r
+    goto end\r
+)\r
+\r
+:fetch\r
+rem Fetch current versions\r
+\r
+svn --version > nul 2>&1\r
+if ERRORLEVEL 9009 (\r
+    echo.svn.exe must be on your PATH.\r
+    echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the\r
+    echo.command line tools option.\r
+    popd\r
+    exit /b 1\r
+)\r
+\r
+echo.Fetching external libraries...\r
+\r
+rem When updating these versions, remember to update the relevant property\r
+rem files in both this dir and PC\VS9.0\r
+\r
+set libraries=\r
+set libraries=%libraries%                                    bzip2-1.0.6\r
+if NOT "%IncludeBsddb%"=="false" set libraries=%libraries%   db-4.7.25.0\r
+if NOT "%IncludeSSL%"=="false" set libraries=%libraries%     nasm-2.11.06\r
+if NOT "%IncludeSSL%"=="false" set libraries=%libraries%     openssl-1.0.2d\r
+set libraries=%libraries%                                    sqlite-3.6.21\r
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-8.5.15.0\r
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.5.15.0\r
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.5\r
+\r
+for %%e in (%libraries%) do (\r
+    if exist %%e (\r
+        echo.%%e already exists, skipping.\r
+    ) else (\r
+        echo.Fetching %%e...\r
+        svn export %SVNROOT%%%e\r
+    )\r
+)\r
+\r
+goto end\r
+\r
+:usage\r
+echo.invalid argument: %1\r
+echo.usage: %~n0 [[ -c ^| --clean ] ^| --clean-only ]\r
+echo.\r
+echo.Pull all sources necessary for compiling optional extension modules\r
+echo.that rely on external libraries.  Requires svn.exe to be on your PATH\r
+echo.and pulls sources from %SVNROOT%.\r
+echo.\r
+echo.Use the -c or --clean option to clean up all external library sources\r
+echo.before pulling in the current versions.\r
+echo.\r
+echo.Use the --clean-only option to do the same cleaning, without pulling in\r
+echo.anything new.\r
+echo.\r
+echo.Only the first argument is checked, all others are ignored.\r
+echo.\r
+echo.**WARNING**: the cleaning options unconditionally remove any directory\r
+echo.that is a child of\r
+echo.   %CD%\r
+echo.and matches wildcard patterns beginning with bzip2-, db-, nasm-, openssl-,\r
+echo.tcl-, tcltk, tk-, tix-, sqlite-, or xz-, and as such has the potential\r
+echo.to be very destructive if you are not aware of what it is doing.  Use with\r
+echo.caution!\r
+popd\r
+exit /b -1\r
+\r
+\r
+:end\r
+echo Finished.\r
+popd\r
diff --git a/PCbuild/kill_python.c b/PCbuild/kill_python.c
deleted file mode 100644 (file)
index f3880fc..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Helper program for killing lingering python[_d].exe processes before
- * building, thus attempting to avoid build failures due to files being
- * locked.
- */
-
-#include <windows.h>
-#include <wchar.h>
-#include <tlhelp32.h>
-#include <stdio.h>
-
-#pragma comment(lib, "psapi")
-
-#ifdef _DEBUG
-#define PYTHON_EXE          (L"python_d.exe")
-#define PYTHON_EXE_LEN      (12)
-#define KILL_PYTHON_EXE     (L"kill_python_d.exe")
-#define KILL_PYTHON_EXE_LEN (17)
-#else
-#define PYTHON_EXE          (L"python.exe")
-#define PYTHON_EXE_LEN      (10)
-#define KILL_PYTHON_EXE     (L"kill_python.exe")
-#define KILL_PYTHON_EXE_LEN (15)
-#endif
-
-int
-main(int argc, char **argv)
-{
-    HANDLE   hp, hsp, hsm; /* process, snapshot processes, snapshot modules */
-    DWORD    dac, our_pid;
-    size_t   len;
-    wchar_t  path[MAX_PATH+1];
-
-    MODULEENTRY32W  me;
-    PROCESSENTRY32W pe;
-
-    me.dwSize = sizeof(MODULEENTRY32W);
-    pe.dwSize = sizeof(PROCESSENTRY32W);
-
-    memset(path, 0, MAX_PATH+1);
-
-    our_pid = GetCurrentProcessId();
-
-    hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, our_pid);
-    if (hsm == INVALID_HANDLE_VALUE) {
-        printf("CreateToolhelp32Snapshot[1] failed: %d\n", GetLastError());
-        return 1;
-    }
-
-    if (!Module32FirstW(hsm, &me)) {
-        printf("Module32FirstW[1] failed: %d\n", GetLastError());
-        CloseHandle(hsm);
-        return 1;
-    }
-
-    /*
-     * Enumerate over the modules for the current process in order to find
-     * kill_process[_d].exe, then take a note of the directory it lives in.
-     */
-    do {
-        if (_wcsnicmp(me.szModule, KILL_PYTHON_EXE, KILL_PYTHON_EXE_LEN))
-            continue;
-
-        len = wcsnlen_s(me.szExePath, MAX_PATH) - KILL_PYTHON_EXE_LEN;
-        wcsncpy_s(path, MAX_PATH+1, me.szExePath, len); 
-
-        break;
-
-    } while (Module32NextW(hsm, &me));
-
-    CloseHandle(hsm);
-
-    if (path == NULL) {
-        printf("failed to discern directory of running process\n");
-        return 1;
-    }
-
-    /*
-     * Take a snapshot of system processes.  Enumerate over the snapshot,
-     * looking for python processes.  When we find one, verify it lives
-     * in the same directory we live in.  If it does, kill it.  If we're
-     * unable to kill it, treat this as a fatal error and return 1.
-     * 
-     * The rationale behind this is that we're called at the start of the 
-     * build process on the basis that we'll take care of killing any
-     * running instances, such that the build won't encounter permission
-     * denied errors during linking. If we can't kill one of the processes,
-     * we can't provide this assurance, and the build shouldn't start.
-     */
-
-    hsp = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
-    if (hsp == INVALID_HANDLE_VALUE) {
-        printf("CreateToolhelp32Snapshot[2] failed: %d\n", GetLastError());
-        return 1;
-    }
-
-    if (!Process32FirstW(hsp, &pe)) {
-        printf("Process32FirstW failed: %d\n", GetLastError());
-        CloseHandle(hsp);
-        return 1;
-    }
-
-    dac = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE;
-    do {
-
-        /*
-         * XXX TODO: if we really wanted to be fancy, we could check the 
-         * modules for all processes (not just the python[_d].exe ones)
-         * and see if any of our DLLs are loaded (i.e. python30[_d].dll),
-         * as that would also inhibit our ability to rebuild the solution.
-         * Not worth loosing sleep over though; for now, a simple check 
-         * for just the python executable should be sufficient.
-         */
-
-        if (_wcsnicmp(pe.szExeFile, PYTHON_EXE, PYTHON_EXE_LEN))
-            /* This isn't a python process. */
-            continue;
-
-        /* It's a python process, so figure out which directory it's in... */
-        hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe.th32ProcessID);
-        if (hsm == INVALID_HANDLE_VALUE)
-            /* 
-             * If our module snapshot fails (which will happen if we don't own
-             * the process), just ignore it and continue.  (It seems different
-             * versions of Windows return different values for GetLastError()
-             * in this situation; it's easier to just ignore it and move on vs.
-             * stopping the build for what could be a false positive.)
-             */
-             continue;
-
-        if (!Module32FirstW(hsm, &me)) {
-            printf("Module32FirstW[2] failed: %d\n", GetLastError());
-            CloseHandle(hsp);
-            CloseHandle(hsm);
-            return 1;
-        }
-
-        do {
-            if (_wcsnicmp(me.szModule, PYTHON_EXE, PYTHON_EXE_LEN))
-                /* Wrong module, we're looking for python[_d].exe... */
-                continue;
-
-            if (_wcsnicmp(path, me.szExePath, len))
-                /* Process doesn't live in our directory. */
-                break;
-
-            /* Python process residing in the right directory, kill it!  */
-            hp = OpenProcess(dac, FALSE, pe.th32ProcessID);
-            if (!hp) {
-                printf("OpenProcess failed: %d\n", GetLastError());
-                CloseHandle(hsp);
-                CloseHandle(hsm);
-                return 1;
-            }
-
-            if (!TerminateProcess(hp, 1)) {
-                printf("TerminateProcess failed: %d\n", GetLastError());
-                CloseHandle(hsp);
-                CloseHandle(hsm);
-                CloseHandle(hp);
-                return 1;
-            }
-
-            CloseHandle(hp);
-            break;
-
-        } while (Module32NextW(hsm, &me));
-
-        CloseHandle(hsm);
-
-    } while (Process32NextW(hsp, &pe));
-
-    CloseHandle(hsp);
-
-    return 0;
-}
-
-/* vi: set ts=8 sw=4 sts=4 expandtab */
diff --git a/PCbuild/kill_python.vcproj b/PCbuild/kill_python.vcproj
deleted file mode 100644 (file)
index a34107a..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9.00"\r
-       Name="kill_python"\r
-       ProjectGUID="{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"\r
-       RootNamespace="kill_python"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName)_d.exe"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName)_d.exe"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\kill_python.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/libeay.vcxproj b/PCbuild/libeay.vcxproj
new file mode 100644 (file)
index 0000000..68ef936
--- /dev/null
@@ -0,0 +1,907 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}</ProjectGuid>
+    <RootNamespace>libeay</RootNamespace>
+  </PropertyGroup>
+
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+  </PropertyGroup>
+
+  <Import Project="openssl.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+  <Target Name="CreateBuildinfH" Inputs="$(MSBuildProjectFullPath)" Outputs="$(IntDir)\buildinf.h" AfterTargets="PrepareForBuild">
+    <PropertyGroup>
+      <_DATEValue>#define DATE "$([System.DateTime]::Now.ToString(`ddd MMM dd HH':'mm':'ss yyyy`))"</_DATEValue>
+      <_CFLAGSValue>#define CFLAGS "cl /MD /Ox -W3 -Gs0 -Gy -nologo @(PreprocessorDefinitions->'-D%(Identity)',' ')"</_CFLAGSValue>
+      <_PLATFORMValue Condition="$(Platform)=='Win32'">#define PLATFORM "VC-WIN32"</_PLATFORMValue>
+      <_PLATFORMValue Condition="$(Platform)=='x64'">#define PLATFORM "VC-WIN64A"</_PLATFORMValue>
+    </PropertyGroup>
+    <WriteLinesToFile File="$(IntDir)\buildinf.h"
+                      Lines="$(_DATEValue);$(_CFLAGSValue);$(_PLATFORMValue)"
+                      Overwrite="true" />
+    <Message Text="Updating buildinf.h:
+    $(_DATEValue)
+    $(_CFLAGSValue)
+    $(_PLATFORMValue)" Importance="normal" />
+  </Target>
+
+  <Target Name="SuppressOriginalBuildinfH" Condition="Exists('$(opensslDir)crypto\buildinf.h')" BeforeTargets="PrepareForBuild">
+    <Move SourceFiles="$(opensslDir)crypto\buildinf.h" DestinationFiles="$(opensslDir)crypto\buildinf.h.orig" />
+  </Target>
+
+  <ItemGroup>
+    <ClCompile Include="$(opensslDir)crypto\cversion.c">
+      <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+  </ItemGroup>
+
+  <ItemGroup>
+    <!--
+    <ClCompile Include="$(opensslDir)apps\errstr.c" />
+    <ClCompile Include="$(opensslDir)crypto\aes\aes_cfb.c" />
+    <ClCompile Include="$(opensslDir)crypto\aes\aes_ctr.c" />
+    <ClCompile Include="$(opensslDir)crypto\aes\aes_ecb.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\aes\aes_ige.c" />
+    <ClCompile Include="$(opensslDir)crypto\aes\aes_misc.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\aes\aes_ofb.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\aes\aes_wrap.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_bitstr.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_bool.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_bytes.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_d2i_fp.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_digest.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_dup.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_enum.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_gentm.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_i2d_fp.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_int.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_mbstr.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_object.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_octet.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_print.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_set.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_sign.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_strex.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_strnid.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_time.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_type.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_utctm.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_utf8.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\a_verify.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\ameth_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\asn_mime.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\asn_moid.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\asn_pack.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\asn1_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\asn1_gen.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\asn1_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\asn1_par.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\bio_asn1.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\bio_ndef.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pr.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pu.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\asn1\evp_asn1.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\asn1\f_enum.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\asn1\f_int.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\f_string.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pr.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pu.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\asn1\n_pkey.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\nsseq.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbe.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbev2.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\p8_pkey.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\asn1\t_bitst.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\t_crl.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\asn1\t_pkey.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\asn1\t_req.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\t_spki.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\asn1\t_x509.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\t_x509a.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\tasn_dec.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\tasn_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\tasn_fre.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\tasn_new.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\tasn_prn.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\tasn_typ.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\tasn_utl.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_algor.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_attrib.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_bignum.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_crl.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_exten.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_info.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_long.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_name.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_nx509.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_pkey.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_pubkey.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_req.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_sig.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_spki.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_val.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_x509.c" />
+    <ClCompile Include="$(opensslDir)crypto\asn1\x_x509a.c" />
+    <ClCompile Include="$(opensslDir)crypto\bf\bf_cfb64.c" />
+    <ClCompile Include="$(opensslDir)crypto\bf\bf_ecb.c" />
+    <ClCompile Include="$(opensslDir)crypto\bf\bf_ofb64.c" />
+    <ClCompile Include="$(opensslDir)crypto\bf\bf_skey.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\b_dump.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\b_print.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\b_sock.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bf_buff.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bio\bf_nbio.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bf_null.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bio_cb.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\bio\bio_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bio_lib.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_acpt.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_bio.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_conn.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_dgram.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_fd.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_file.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_log.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_mem.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_null.c" />
+    <ClCompile Include="$(opensslDir)crypto\bio\bss_sock.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_add.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_blind.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_const.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_ctx.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_depr.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_div.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_exp.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_exp2.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_gcd.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_gf2m.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_kron.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_mod.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_mont.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_mpi.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_mul.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_nist.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_prime.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_print.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_rand.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_recp.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_shift.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_sqr.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_sqrt.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_word.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_x931p.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\buffer\buf_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\buffer\buf_str.c" />
+    <ClCompile Include="$(opensslDir)crypto\buffer\buffer.c" />
+    <ClCompile Include="$(opensslDir)crypto\camellia\cmll_cfb.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ctr.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ecb.c" />
+    <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ofb.c" />
+    <ClCompile Include="$(opensslDir)crypto\camellia\cmll_utl.c" />
+    <ClCompile Include="$(opensslDir)crypto\cast\c_cfb64.c" />
+    <ClCompile Include="$(opensslDir)crypto\cast\c_ecb.c" />
+    <ClCompile Include="$(opensslDir)crypto\cast\c_ofb64.c" />
+    <ClCompile Include="$(opensslDir)crypto\cast\c_skey.c" />
+    <ClCompile Include="$(opensslDir)crypto\cmac\cm_ameth.c" />
+    <ClCompile Include="$(opensslDir)crypto\cmac\cm_pmeth.c" />
+    <ClCompile Include="$(opensslDir)crypto\cmac\cmac.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_asn1.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_att.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_cd.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_dd.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_env.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_err.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_ess.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_io.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_kari.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_pwri.c" />
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_sd.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\cms\cms_smime.c" />
+    <ClCompile Include="$(opensslDir)crypto\comp\c_rle.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\comp\c_zlib.c" />
+    <ClCompile Include="$(opensslDir)crypto\comp\comp_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\comp\comp_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\conf\conf_api.c" />
+    <ClCompile Include="$(opensslDir)crypto\conf\conf_def.c" />
+    <ClCompile Include="$(opensslDir)crypto\conf\conf_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\conf\conf_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\conf\conf_mall.c" />
+    <ClCompile Include="$(opensslDir)crypto\conf\conf_mod.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\conf\conf_sap.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\cpt_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\cryptlib.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\cbc_cksm.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\des\cbc_enc.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\des\cfb_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\cfb64ede.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\cfb64enc.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\des\des_old.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\des_old2.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\des\ecb_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\ecb3_enc.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\des\ede_cbcm_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\enc_read.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\enc_writ.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\fcrypt.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\ofb_enc.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\des\ofb64ede.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\ofb64enc.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\des\pcbc_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\qud_cksm.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\rand_key.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\read2pwd.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\rpc_enc.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\des\set_key.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\des\str2key.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\des\xcbc_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_ameth.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_asn1.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_check.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_depr.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_gen.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_kdf.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_key.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_pmeth.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_prn.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\dh\dh_rfc5114.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ameth.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_asn1.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_depr.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_gen.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_key.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ossl.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_pmeth.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_prn.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_sign.c" />
+    <ClCompile Include="$(opensslDir)crypto\dsa\dsa_vrf.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_beos.c" />
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_dl.c" />
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_dlfcn.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_lib.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_null.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_openssl.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_vms.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\dso\dso_win32.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ebcdic.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_ameth.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_asn1.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_check.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_curve.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_cvt.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_key.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_mult.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_oct.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_pmeth.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec_print.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec2_mult.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec2_oct.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ec2_smpl.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\eck_prn.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_mont.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_nist.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp224.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp256.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp521.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistputil.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_oct.c" />
+    <ClCompile Include="$(opensslDir)crypto\ec\ecp_smpl.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdh\ech_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdh\ech_kdf.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdh\ech_key.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdh\ech_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdh\ech_ossl.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_asn1.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_ossl.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_sign.c" />
+    <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_vrf.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_all.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_cnf.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_cryptodev.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_ctrl.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_dyn.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_fat.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_init.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_list.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_openssl.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_pkey.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_rdrand.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_rsax.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\engine\eng_table.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_asnmth.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_cipher.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_dh.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_digest.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_dsa.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdh.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdsa.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_pkmeth.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_rand.c" />
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_rsa.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\engine\tb_store.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\err\err.c" />
+    <ClCompile Include="$(opensslDir)crypto\err\err_all.c" />
+    <ClCompile Include="$(opensslDir)crypto\err\err_prn.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\bio_b64.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\bio_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\bio_md.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\bio_ok.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\c_all.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\c_allc.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\c_alld.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\digest.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_aes.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha1.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha256.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_bf.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_camellia.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_cast.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_des.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_des3.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\e_idea.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\e_null.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\e_old.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\e_rc2.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_rc4.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_rc4_hmac_md5.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\e_rc5.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\e_seed.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\e_xcbc_d.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\encode.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_acnf.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_cnf.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_err.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_fips.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_key.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_pbe.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\evp_pkey.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_dss.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_dss1.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_ecdsa.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_md4.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_md5.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\m_null.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\m_ripemd.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_sha.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_sha1.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_sigver.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\m_wp.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\names.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\p_dec.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\p_lib.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\evp\p_open.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\p_seal.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\evp\p_sign.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\p_verify.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt2.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\pmeth_fn.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\pmeth_gn.c" />
+    <ClCompile Include="$(opensslDir)crypto\evp\pmeth_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\ex_data.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\fips_ers.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\hmac\hm_ameth.c" />
+    <ClCompile Include="$(opensslDir)crypto\hmac\hm_pmeth.c" />
+    <ClCompile Include="$(opensslDir)crypto\hmac\hmac.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\krb5\krb5_asn.c" />
+    <ClCompile Include="$(opensslDir)crypto\lhash\lh_stats.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\lhash\lhash.c" />
+    <ClCompile Include="$(opensslDir)crypto\md4\md4_dgst.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\md4\md4_one.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\md5\md5_dgst.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\md5\md5_one.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\mem.c" />
+    <ClCompile Include="$(opensslDir)crypto\mem_dbg.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\cbc128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\ccm128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\cfb128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\ctr128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\cts128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\gcm128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\ofb128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\wrap128.c" />
+    <ClCompile Include="$(opensslDir)crypto\modes\xts128.c" />
+    <ClCompile Include="$(opensslDir)crypto\o_dir.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\o_fips.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\o_init.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\o_str.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\o_time.c" />
+    <ClCompile Include="$(opensslDir)crypto\objects\o_names.c" />
+    <ClCompile Include="$(opensslDir)crypto\objects\obj_dat.c" />
+    <ClCompile Include="$(opensslDir)crypto\objects\obj_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\objects\obj_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\objects\obj_xref.c" />
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_asn.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_cl.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_err.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ext.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ht.c" />
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_lib.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_prn.c" />
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_srv.c" />
+    <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_vfy.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_all.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_info.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_oth.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_pk8.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_pkey.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_seal.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_sign.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_x509.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pem_xaux.c" />
+    <ClCompile Include="$(opensslDir)crypto\pem\pvkfmt.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_add.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_asn.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_attr.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crpt.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crt.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_decr.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_init.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_key.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_kiss.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_mutl.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_npas.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8d.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8e.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_utl.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs12\pk12err.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\bio_pk7.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_asn1.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_attr.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_doit.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_lib.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_mime.c" />
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_smime.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\pkcs7\pkcs7err.c" />
+    <ClCompile Include="$(opensslDir)crypto\pqueue\pqueue.c" />
+    <ClCompile Include="$(opensslDir)crypto\rand\md_rand.c" />
+    <ClCompile Include="$(opensslDir)crypto\rand\rand_egd.c" />
+    <ClCompile Include="$(opensslDir)crypto\rand\rand_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\rand\rand_lib.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\rand\rand_nw.c" />
+    <ClCompile Include="$(opensslDir)crypto\rand\rand_os2.c" />
+    <ClCompile Include="$(opensslDir)crypto\rand\rand_unix.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\rand\rand_win.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\rand\randfile.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\rc2\rc2_cbc.c" />
+    <ClCompile Include="$(opensslDir)crypto\rc2\rc2_ecb.c" />
+    <ClCompile Include="$(opensslDir)crypto\rc2\rc2_skey.c" />
+    <ClCompile Include="$(opensslDir)crypto\rc2\rc2cfb64.c" />
+    <ClCompile Include="$(opensslDir)crypto\rc2\rc2ofb64.c" />
+    <ClCompile Include="$(opensslDir)crypto\rc4\rc4_utl.c" />
+    <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_dgst.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_one.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ameth.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_asn1.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_chk.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_crpt.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_depr.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_eay.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_gen.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_none.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_null.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_oaep.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pk1.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pmeth.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_prn.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pss.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_saos.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_sign.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ssl.c" />
+    <ClCompile Include="$(opensslDir)crypto\rsa\rsa_x931.c" />
+    <ClCompile Include="$(opensslDir)crypto\seed\seed.c" />
+    <ClCompile Include="$(opensslDir)crypto\seed\seed_cbc.c" />
+    <ClCompile Include="$(opensslDir)crypto\seed\seed_cfb.c" />
+    <ClCompile Include="$(opensslDir)crypto\seed\seed_ecb.c" />
+    <ClCompile Include="$(opensslDir)crypto\seed\seed_ofb.c" />
+    <ClCompile Include="$(opensslDir)crypto\sha\sha_dgst.c" />
+    <ClCompile Include="$(opensslDir)crypto\sha\sha_one.c" />
+    <ClCompile Include="$(opensslDir)crypto\sha\sha1_one.c" />
+    <ClCompile Include="$(opensslDir)crypto\sha\sha1dgst.c" />
+    <ClCompile Include="$(opensslDir)crypto\sha\sha256.c" />
+    <ClCompile Include="$(opensslDir)crypto\sha\sha512.c" />
+    <ClCompile Include="$(opensslDir)crypto\srp\srp_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\srp\srp_vfy.c" />
+    <ClCompile Include="$(opensslDir)crypto\stack\stack.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_asn1.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_conf.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_err.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_req_print.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_req_utils.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_print.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_sign.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_utils.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_verify.c" />
+    <ClCompile Include="$(opensslDir)crypto\ts\ts_verify_ctx.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\txt_db\txt_db.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\ui\ui_compat.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\ui\ui_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\ui\ui_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\ui\ui_openssl.c" />
+    <ClCompile Include="$(opensslDir)crypto\ui\ui_util.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\uid.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_dgst.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\by_dir.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\by_file.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x_all.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_att.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_cmp.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_d2.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_def.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_err.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_ext.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_lu.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_obj.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_r2x.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_req.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_set.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_trs.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_txt.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_v3.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_vfy.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509_vpm.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509cset.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509name.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509\x509rset.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\x509\x509spki.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\x509\x509type.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_cache.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_data.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_map.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_node.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_tree.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_addr.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akey.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akeya.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_alt.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_asid.c" />
+    -->
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bcons.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bitst.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_conf.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_cpols.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_crld.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_enum.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_extku.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_genn.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ia5.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_info.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_int.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_lib.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ncons.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ocsp.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pci.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcia.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcons.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pku.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pmaps.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_prn.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_purp.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_scts.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_skey.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_sxnet.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3_utl.c" />
+    <ClCompile Include="$(opensslDir)crypto\x509v3\v3err.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\e_gost_err.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_ameth.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_asn1.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_crypt.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_ctl.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_eng.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_keywrap.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_md.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_params.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_pmeth.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost_sign.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost2001.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost2001_keyx.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost89.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gost94_keyx.c" />
+    <ClCompile Include="$(opensslDir)engines\ccgost\gosthash.c" />
+    <ClCompile Include="$(opensslDir)engines\e_4758cca.c" />
+    <ClCompile Include="$(opensslDir)engines\e_aep.c" />
+    <ClCompile Include="$(opensslDir)engines\e_atalla.c" />
+    <ClCompile Include="$(opensslDir)engines\e_capi.c" />
+    <ClCompile Include="$(opensslDir)engines\e_chil.c" />
+    <ClCompile Include="$(opensslDir)engines\e_cswift.c" />
+    <ClCompile Include="$(opensslDir)engines\e_gmp.c" />
+    <ClCompile Include="$(opensslDir)engines\e_nuron.c" />
+    <ClCompile Include="$(opensslDir)engines\e_padlock.c" />
+    <ClCompile Include="$(opensslDir)engines\e_sureware.c" />
+    <ClCompile Include="$(opensslDir)engines\e_ubsec.c" />
+    <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />
+    <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />
+    <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />
+    <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />
+    <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_ext.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />
+  </ItemGroup>
+  <ItemGroup Condition="$(Platform) == 'Win32'">
+    <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_block.c" />
+  </ItemGroup>
+  <ItemGroup Condition="$(Platform) == 'x64'">
+    <ClCompile Include="$(opensslDir)crypto\bf\bf_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\bn\bn_asm.c" />
+    <ClCompile Include="$(opensslDir)crypto\camellia\cmll_misc.c" />
+    <ClCompile Include="$(opensslDir)crypto\cast\c_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\des_enc.c" />
+    <ClCompile Include="$(opensslDir)crypto\des\fcrypt_b.c" />
+  </ItemGroup>
+
+  <ItemGroup Condition="$(Platform) == 'Win32'">
+    <NasmCompile Include="$(opensslDir)tmp32\aes-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\aesni-x86.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\bf-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\bn-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\cast-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\cmll-x86.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\co-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\crypt586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\des-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\ghash-x86.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\md5-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\rc4-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\rmd-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\sha1-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\sha256-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\sha512-586.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\vpaes-x86.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\wp-mmx.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\x86cpuid.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\x86-gf2m.asm" />
+    <NasmCompile Include="$(opensslDir)tmp32\x86-mont.asm" />
+  </ItemGroup>
+  <ItemGroup Condition="$(Platform) == 'x64'">
+    <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\aesni-gcm-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\aesni-mb-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\aesni-sha256-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\aesni-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\aes-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\bsaes-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\cmll-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\ghash-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\md5-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\rc4-md5-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\rc4-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\sha1-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\sha1-mb-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\sha256-mb-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\sha256-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\sha512-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\vpaes-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\wp-x86_64.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\x86_64cpuid.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\x86_64-gf2m.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont.asm" />
+    <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont5.asm" />
+  </ItemGroup>
+
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <Target Name="Clean" />
+  <Target Name="CleanAll">
+    <Delete Files="$(TargetPath)" />
+    <RemoveDir Directories="$(IntDir)" />
+  </Target>
+</Project>
diff --git a/PCbuild/make_buildinfo.c b/PCbuild/make_buildinfo.c
deleted file mode 100644 (file)
index 5a3d385..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#include <windows.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-
-#define CMD_SIZE 500
-
-/* This file creates the getbuildinfo.o object, by first
-   invoking subwcrev.exe (if found), and then invoking cl.exe.
-   As a side effect, it might generate PCBuild\getbuildinfo2.c
-   also. If this isn't a subversion checkout, or subwcrev isn't
-   found, it compiles ..\\Modules\\getbuildinfo.c instead.
-
-   Currently, subwcrev.exe is found from the registry entries
-   of TortoiseSVN.
-
-   No attempt is made to place getbuildinfo.o into the proper
-   binary directory. This isn't necessary, as this tool is
-   invoked as a pre-link step for pythoncore, so that overwrites
-   any previous getbuildinfo.o.
-
-*/
-
-int make_buildinfo2()
-{
-    struct _stat st;
-    HKEY hTortoise;
-    char command[CMD_SIZE+1];
-    DWORD type, size;
-    if (_stat(".svn", &st) < 0)
-        return 0;
-    /* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */
-    if (_stat("no_subwcrev", &st) == 0)
-        return 0;
-    if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS &&
-        RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)
-        /* Tortoise not installed */
-        return 0;
-    command[0] = '"';  /* quote the path to the executable */
-    size = sizeof(command) - 1;
-    if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||
-        type != REG_SZ)
-        /* Registry corrupted */
-        return 0;
-    strcat_s(command, CMD_SIZE, "bin\\subwcrev.exe");
-    if (_stat(command+1, &st) < 0)
-        /* subwcrev.exe not part of the release */
-        return 0;
-    strcat_s(command, CMD_SIZE, "\" .. ..\\Modules\\getbuildinfo.c getbuildinfo2.c");
-    puts(command); fflush(stdout);
-    if (system(command) < 0)
-        return 0;
-    return 1;
-}
-
-int main(int argc, char*argv[])
-{
-    char command[500] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL ";
-    int do_unlink, result;
-    if (argc != 2) {
-        fprintf(stderr, "make_buildinfo $(ConfigurationName)\n");
-        return EXIT_FAILURE;
-    }
-    if (strcmp(argv[1], "Release") == 0) {
-        strcat_s(command, CMD_SIZE, "-MD ");
-    }
-    else if (strcmp(argv[1], "Debug") == 0) {
-        strcat_s(command, CMD_SIZE, "-D_DEBUG -MDd ");
-    }
-    else if (strcmp(argv[1], "ReleaseItanium") == 0) {
-        strcat_s(command, CMD_SIZE, "-MD /USECL:MS_ITANIUM ");
-    }
-    else if (strcmp(argv[1], "ReleaseAMD64") == 0) {
-        strcat_s(command, CMD_SIZE, "-MD ");
-        strcat_s(command, CMD_SIZE, "-MD /USECL:MS_OPTERON ");
-    }
-    else {
-        fprintf(stderr, "unsupported configuration %s\n", argv[1]);
-        return EXIT_FAILURE;
-    }
-
-    if ((do_unlink = make_buildinfo2()))
-        strcat_s(command, CMD_SIZE, "getbuildinfo2.c -DSUBWCREV ");
-    else
-        strcat_s(command, CMD_SIZE, "..\\Modules\\getbuildinfo.c");
-    strcat_s(command, CMD_SIZE, " -Fogetbuildinfo.o -I..\\Include -I..\\PC");
-    puts(command); fflush(stdout);
-    result = system(command);
-    if (do_unlink)
-        _unlink("getbuildinfo2.c");
-    if (result < 0)
-        return EXIT_FAILURE;
-    return 0;
-}
diff --git a/PCbuild/make_buildinfo.vcproj b/PCbuild/make_buildinfo.vcproj
deleted file mode 100644 (file)
index c8646e2..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="windows-1250"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="make_buildinfo"\r
-       ProjectGUID="{C73F0EC1-358B-4177-940F-0846AC8B04CD}"\r
-       RootNamespace="make_buildinfo"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               InlineFunctionExpansion="1"\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               RuntimeLibrary="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)/make_buildinfo.exe"\r
-                               ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\make_buildinfo.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/make_versioninfo.vcproj b/PCbuild/make_versioninfo.vcproj
deleted file mode 100644 (file)
index 881f44b..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="make_versioninfo"\r
-       ProjectGUID="{F0E0541E-F17D-430B-97C4-93ADF0DD284E}"\r
-       RootNamespace="make_versioninfo"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                               Description="Build PC/pythonnt_rc(_d).h"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\PC\pythonnt_rc.h&#x0D;&#x0A;"\r
-                               Outputs="$(SolutionDir)..\PC\pythonnt_rc.h"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               EnableIntrinsicFunctions="true"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(SolutionDir)make_versioninfo.exe"\r
-                               ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"\r
-                               SubSystem="1"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\PC\python_nt.h&#x0D;&#x0A;"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                               Description="Build PC/pythonnt_rc(_d).h"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\PC\pythonnt_rc.h&#x0D;&#x0A;"\r
-                               Outputs="$(SolutionDir)..\PC\pythonnt_rc.h"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               EnableIntrinsicFunctions="true"\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(SolutionDir)make_versioninfo.exe"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\PC\python_nt.h&#x0D;&#x0A;"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                               Description="Build PC/pythonnt_rc(_d).h"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\PC\pythonnt_rc_d.h&#x0D;&#x0A;"\r
-                               Outputs="$(SolutionDir)..\PC\pythonnt_rc_d.h"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               InlineFunctionExpansion="1"\r
-                               EnableIntrinsicFunctions="false"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(SolutionDir)make_versioninfo_d.exe"\r
-                               ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"\r
-                               SubSystem="1"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\PC\python_nt_d.h&#x0D;&#x0A;"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                               Description="Build PC/pythonnt_rc(_d).h"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\PC\pythonnt_rc_d.h&#x0D;&#x0A;"\r
-                               Outputs="$(SolutionDir)..\PC\pythonnt_rc_d.h"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               InlineFunctionExpansion="1"\r
-                               EnableIntrinsicFunctions="false"\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(SolutionDir)make_versioninfo_d.exe"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                               CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\PC\python_nt_d.h&#x0D;&#x0A;"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\make_versioninfo.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
new file mode 100644 (file)
index 0000000..54f3596
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="pyproject.props" />
+
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <IntDir>$(opensslDir)tmp\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(opensslDir)tmp\$(ArchName)\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PreprocessorDefinitions Include="DSO_WIN32" />
+    <PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />
+    <PreprocessorDefinitions Include="L_ENDIAN" />
+    <PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />
+    <PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />
+    <PreprocessorDefinitions Include="OPENSSL_THREADS" />
+    <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" />
+    <PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />
+    <PreprocessorDefinitions Include="OPENSSL_CPUID_OBJ" />
+    <PreprocessorDefinitions Include="SHA1_ASM" />
+    <PreprocessorDefinitions Include="SHA256_ASM" />
+    <PreprocessorDefinitions Include="SHA512_ASM" />
+    <PreprocessorDefinitions Include="MD5_ASM" />
+    <PreprocessorDefinitions Include="AES_ASM" />
+    <PreprocessorDefinitions Include="VPAES_ASM" />
+    <PreprocessorDefinitions Include="WHIRLPOOL_ASM" />
+    <PreprocessorDefinitions Include="GHASH_ASM" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_IDEA" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_RC5" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_MD2" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_MDC2" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_KRB5" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_JPAKE" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_RDRAND" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_RSAX" />
+    <PreprocessorDefinitions Include="OPENSSL_NO_DYNAMIC_ENGINE" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(Platform)'=='Win32'">
+    <PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />
+    <PreprocessorDefinitions Include="OPENSSL_BN_ASM_PART_WORDS" />
+    <PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />
+    <PreprocessorDefinitions Include="RMD160_ASM" />
+  </ItemGroup>
+
+  <PropertyGroup>
+    <_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>
+  </PropertyGroup>
+
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->
+      <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
+      <AdditionalIncludeDirectories>$(opensslDir);$(opensslDir)include;$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+
+  <Target Name="FindNasm">
+    <PropertyGroup>
+      <nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>
+      <nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>
+    </PropertyGroup>
+  </Target>
+
+  <Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">
+    <Exec Command='setlocal
+set PATH=$(nasmDir);%PATH%
+$(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />
+    <ItemGroup>
+      <Link Include="$(IntDir)%(NasmCompile.Filename).obj" />
+      <Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />
+    </ItemGroup>
+  </Target>
+</Project>
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
new file mode 100644 (file)
index 0000000..1f95fa5
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{CC9B93A2-439D-4058-9D29-6DCF43774405}</ProjectGuid>
+    <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+    <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+    <IncludeExtensions Condition="'$(IncludeExtensions)' == ''">true</IncludeExtensions>
+    <IncludeExternals Condition="'$(IncludeExternals)' == ''">true</IncludeExternals>
+    <IncludeTests Condition="'$(IncludeTest)' == ''">true</IncludeTests>
+    <IncludeSSL Condition="'$(IncludeSSL)' == ''">true</IncludeSSL>
+    <IncludeTkinter Condition="'$(IncludeTkinter)' == ''">true</IncludeTkinter>
+    <IncludeBsddb Condition="'$(IncludeBsddb)' == ''">true</IncludeBsddb>
+  </PropertyGroup>
+
+  <ItemDefinitionGroup>
+    <Projects>
+      <Platform>$(Platform)</Platform>
+      <Configuration>$(Configuration)</Configuration>
+      <Properties></Properties>
+      <BuildTarget>Build</BuildTarget>
+      <CleanTarget>Clean</CleanTarget>
+      <CleanAllTarget>CleanAll</CleanAllTarget>
+      <BuildInParallel>true</BuildInParallel>
+    </Projects>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <!-- pythonXY.dll -->
+    <!--
+    Parallel build is explicitly disabled for this project because it
+    causes many conflicts between pythoncore and projects that depend
+    on pythoncore. Once the core DLL has been built, subsequent
+    projects will be built in parallel.
+    -->
+    <Projects Include="pythoncore.vcxproj">
+      <BuildInParallel>false</BuildInParallel>
+    </Projects>
+    <!-- python[w].exe -->
+    <Projects Include="python.vcxproj;pythonw.vcxproj" />
+    <!-- Extension modules -->
+    <ExtensionModules Include="_ctypes;_elementtree;_msi;_multiprocessing;pyexpat;select;unicodedata;winsound" />
+    <!-- Extension modules that require external sources -->
+    <ExternalModules Include="bz2;_sqlite3" />
+    <!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->
+    <ExtensionModules Include="_socket" Condition="!$(IncludeSSL) or !$(IncludeExternals)" />
+    <ExternalModules Include="_ssl;_hashlib" Condition="$(IncludeSSL)" />
+    <ExternalModules Include="_tkinter;tix" Condition="$(IncludeTkinter)" />
+    <ExternalModules Include="_bsddb" Condition="$(IncludeBsddb)" />
+    <ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" />
+    <Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" />
+    <!-- Test modules -->
+    <TestModules Include="_ctypes_test;_testcapi" />
+    <Projects Include="@(TestModules->'%(Identity).vcxproj')" Condition="$(IncludeTests)">
+      <!-- Disable parallel build for test modules -->
+      <BuildInParallel>false</BuildInParallel>
+    </Projects>
+  </ItemGroup>
+
+  <Target Name="Build">
+    <MSBuild Projects="@(Projects)"
+             Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+             BuildInParallel="%(BuildInParallel)"
+             Targets="%(BuildTarget)" />
+  </Target>
+
+  <Target Name="Clean">
+    <MSBuild Projects="@(Projects)"
+             Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+             BuildInParallel="%(BuildInParallel)"
+             StopOnFirstFailure="false"
+             Condition="%(CleanTarget) != ''"
+             Targets="%(CleanTarget)" />
+  </Target>
+
+  <Target Name="CleanAll">
+    <MSBuild Projects="@(Projects)"
+             Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+             BuildInParallel="%(BuildInParallel)"
+             StopOnFirstFailure="false"
+             Condition="%(CleanAllTarget) != ''"
+             Targets="%(CleanAllTarget)" />
+  </Target>
+
+  <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
+  <Target Name="RebuildAll" DependsOnTargets="CleanAll;Build" />
+</Project>
index 725c6ea7bf33545ebce968ef60cf13ffefd8b604..1f7fb77f2866a406fe78de317f2b542c8589fe5f 100644 (file)
-Microsoft Visual Studio Solution File, Format Version 10.00\r
-# Visual Studio 2008\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-               {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio 2010\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"\r
+       ProjectSection(SolutionItems) = preProject\r
+               ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c\r
        EndProjectSection\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E}\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
-               {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "w9xpopen", "w9xpopen.vcxproj", "{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"\r
 EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"\r
-       ProjectSection(SolutionItems) = preProject\r
-               ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c\r
-               readme.txt = readme.txt\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcxproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcxproj", "{0E9791DB-593A-465F-98BC-681011311618}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bsddb", "_bsddb.vcproj", "{B4D38F3F-68FB-42EC-A45D-E00657BB3627}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcxproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcxproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcxproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcxproj", "{13CECB97-4119-4316-9D42-8534019A5A44}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcxproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-               {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
-               {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcxproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcxproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bz2", "bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcxproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "..\PC\bdist_wininst\bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcxproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"\r
-       ProjectSection(ProjectDependencies) = postProject\r
-               {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
-       EndProjectSection\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libeay", "libeay.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssleay", "ssleay.vcxproj", "{10615B24-73BF-4EFA-93AA-236916321317}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -160,22 +89,6 @@ Global
                {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32\r
                {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64\r
                {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32\r
-               {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32\r
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32\r
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -196,14 +109,14 @@ Global
                {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32\r
                {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64\r
                {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
-               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = Release|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = Release|x64\r
                {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32\r
                {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32\r
                {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64\r
@@ -292,14 +205,14 @@ Global
                {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32\r
                {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64\r
                {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
-               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = Release|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = Release|x64\r
                {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32\r
                {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32\r
                {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64\r
@@ -536,22 +449,86 @@ Global
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32\r
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64\r
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64\r
-               {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.Build.0 = Debug|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.ActiveCfg = Debug|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.Build.0 = Debug|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.Build.0 = Release|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.Build.0 = Release|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.ActiveCfg = Release|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.Build.0 = Release|Win32\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.ActiveCfg = Release|x64\r
+               {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.Build.0 = Release|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.Build.0 = Debug|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.ActiveCfg = Debug|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.Build.0 = Debug|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.Build.0 = Release|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.Build.0 = Release|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.ActiveCfg = Release|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.Build.0 = Release|Win32\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.ActiveCfg = Release|x64\r
+               {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.Build.0 = Release|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.Build.0 = Debug|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.ActiveCfg = Debug|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.Build.0 = Debug|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.Build.0 = Release|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.Build.0 = Release|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.ActiveCfg = Release|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.Build.0 = Release|Win32\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.ActiveCfg = Release|x64\r
+               {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.Build.0 = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Debug|Win32.Build.0 = Debug|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Debug|x64.ActiveCfg = Debug|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Debug|x64.Build.0 = Debug|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|Win32.ActiveCfg = Release|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|Win32.Build.0 = Release|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|x64.ActiveCfg = Release|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|x64.Build.0 = Release|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|Win32.ActiveCfg = Release|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|Win32.Build.0 = Release|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|x64.ActiveCfg = Release|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|x64.Build.0 = Release|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Release|Win32.ActiveCfg = Release|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Release|Win32.Build.0 = Release|Win32\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Release|x64.ActiveCfg = Release|x64\r
+               {10615B24-73BF-4EFA-93AA-236916321317}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
diff --git a/PCbuild/pginstrument.vsprops b/PCbuild/pginstrument.vsprops
deleted file mode 100644 (file)
index 99c117b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="pginstrument"\r
-       OutputDirectory="$(OutDirPGI)"\r
-       IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-pgi\$(ProjectName)\"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               Optimization="2"\r
-               InlineFunctionExpansion="1"\r
-               EnableIntrinsicFunctions="false"\r
-               FavorSizeOrSpeed="2"\r
-               OmitFramePointers="true"\r
-               EnableFiberSafeOptimizations="false"\r
-               WholeProgramOptimization="true"\r
-               StringPooling="true"\r
-               ExceptionHandling="0"\r
-               BufferSecurityCheck="false"\r
-       />\r
-       <Tool\r
-               Name="VCLinkerTool"\r
-               OptimizeReferences="2"\r
-               EnableCOMDATFolding="1"\r
-               LinkTimeCodeGeneration="2"\r
-               ProfileGuidedDatabase="$(SolutionDir)$(PlatformName)-pgi\$(TargetName).pgd"\r
-               ImportLibrary="$(OutDirPGI)\$(TargetName).lib"\r
-       />\r
-       <UserMacro\r
-               Name="OutDirPGI"\r
-               Value="$(SolutionDir)$(PlatformName)-pgi\"\r
-       />\r
-</VisualStudioPropertySheet>\r
diff --git a/PCbuild/pgupdate.vsprops b/PCbuild/pgupdate.vsprops
deleted file mode 100644 (file)
index 26cfc2d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="pgupdate"\r
-       OutputDirectory="$(SolutionDir)$(PlatformName)-pgo\"\r
-       InheritedPropertySheets="$(SolutionDir)\pginstrument.vsprops"\r
-       >\r
-       <Tool\r
-               Name="VCLinkerTool"\r
-               AdditionalManifestDependencies=""\r
-               LinkTimeCodeGeneration="4"\r
-       />\r
-</VisualStudioPropertySheet>\r
diff --git a/PCbuild/pyd.vsprops b/PCbuild/pyd.vsprops
deleted file mode 100644 (file)
index 34c21e1..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="pyd"\r
-       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               PreprocessorDefinitions="Py_BUILD_CORE_MODULE"\r
-               RuntimeLibrary="2"\r
-       />\r
-       <Tool\r
-               Name="VCLinkerTool"\r
-               OutputFile="$(OutDir)\$(ProjectName).pyd"\r
-               ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"\r
-               ImportLibrary="$(OutDir)\$(TargetName).lib"\r
-               GenerateManifest="false"\r
-       />\r
-       <Tool\r
-               Name="VCManifestTool"\r
-               EmbedManifest="false"\r
-       />\r
-       <Tool\r
-               Name="VCPostBuildEventTool"\r
-               CommandLine=""\r
-       />\r
-</VisualStudioPropertySheet>\r
diff --git a/PCbuild/pyd_d.vsprops b/PCbuild/pyd_d.vsprops
deleted file mode 100644 (file)
index 313a30b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="pyd_d"\r
-       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               Optimization="0"\r
-               InlineFunctionExpansion="0"\r
-               EnableIntrinsicFunctions="false"\r
-               PreprocessorDefinitions="Py_BUILD_CORE_MODULE"\r
-               RuntimeLibrary="3"\r
-       />\r
-       <Tool\r
-               Name="VCLinkerTool"\r
-               OutputFile="$(OutDir)\$(ProjectName)_d.pyd"\r
-               LinkIncremental="1"\r
-               ProgramDatabaseFile="$(OutDir)\$(ProjectName)_d.pdb"\r
-               ImportLibrary="$(OutDir)\$(TargetName).lib"\r
-               GenerateManifest="false"\r
-       />\r
-       <Tool\r
-               Name="VCManifestTool"\r
-               EmbedManifest="false"\r
-       />\r
-       <Tool\r
-               Name="VCPostBuildEventTool"\r
-               CommandLine=""\r
-       />\r
-       <UserMacro\r
-               Name="PythonExe"\r
-               Value="$(SolutionDir)python_d.exe"\r
-       />\r
-</VisualStudioPropertySheet>\r
diff --git a/PCbuild/pyexpat.vcproj b/PCbuild/pyexpat.vcproj
deleted file mode 100644 (file)
index 5a20a51..0000000
+++ /dev/null
@@ -1,553 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="pyexpat"\r
-       ProjectGUID="{D06B6426-4762-44CC-8BAD-D79052507F2F}"\r
-       RootNamespace="pyexpat"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=".\..\Modules\expat"\r
-                               PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmlrole.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmltok.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\pyexpat.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmlparse.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmlrole.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\expat\xmltok.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj
new file mode 100644 (file)
index 0000000..a319ff9
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <ProjectGuid>{D06B6426-4762-44CC-8BAD-D79052507F2F}</ProjectGuid>
+    <RootNamespace>pyexpat</RootNamespace>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\expat\xmlrole.h" />
+    <ClInclude Include="..\Modules\expat\xmltok.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\pyexpat.c" />
+    <ClCompile Include="..\Modules\expat\xmlparse.c" />
+    <ClCompile Include="..\Modules\expat\xmlrole.c" />
+    <ClCompile Include="..\Modules\expat\xmltok.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/pyexpat.vcxproj.filters b/PCbuild/pyexpat.vcxproj.filters
new file mode 100644 (file)
index 0000000..f8d4602
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{ddae77a6-7ca0-4a1b-b71c-deea5f4025de}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{5af9d40c-fc46-4640-ad84-3d1dd34a71d7}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\expat\xmlrole.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\expat\xmltok.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\pyexpat.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\expat\xmlparse.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\expat\xmlrole.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\expat\xmltok.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
new file mode 100644 (file)
index 0000000..fc93347
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Label="Globals">
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+    <OutDir>$(BuildPath)</OutDir>
+    <IntDir>$(SolutionDir)obj\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
+    <IntDir Condition="'$(Configuration)' == 'PGInstrument' or '$(Configuration)' == 'PGUpdate'">$(SolutionDir)obj\$(ArchName)\$(ProjectName)\</IntDir>
+    <TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
+    <TargetName>$(TargetName)$(PyDebugExt)</TargetName>
+    <GenerateManifest Condition="'$(GenerateManifest)' == ''">false</GenerateManifest>
+    <EmbedManifest Condition="'$(EmbedManifest)' == ''">false</EmbedManifest>
+    <!-- For VS2008, we have to embed the manifest to be able to run -->
+    <!-- BasePlatformToolset is for ICC support -->
+    <GenerateManifest Condition="'$(PlatformToolset)' == 'v90' or '$(BasePlatformToolset)' == 'v90'">true</GenerateManifest>
+    <EmbedManifest Condition="'$(PlatformToolset)' == 'v90' or '$(BasePlatformToolset)' == 'v90'">true</EmbedManifest>
+    <SupportPGO Condition="'$(SupportPGO)' == ''">true</SupportPGO>
+    <SupportSigning Condition="'$(SupportSigning)' == ''">true</SupportSigning>
+    <SupportSigning Condition="'$(Configuration)' == 'Debug'">false</SupportSigning>
+    <SupportSigning Condition="'$(ConfigurationType)' == 'StaticLibrary'">false</SupportSigning>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <_DebugPreprocessorDefinition>NDEBUG;</_DebugPreprocessorDefinition>
+    <_DebugPreprocessorDefinition Condition="$(Configuration) == 'Debug'">_DEBUG;</_DebugPreprocessorDefinition>
+    <_PlatformPreprocessorDefinition>_WIN32;</_PlatformPreprocessorDefinition>
+    <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64;_M_X64;</_PlatformPreprocessorDefinition>
+    <_PydPreprocessorDefinition Condition="$(TargetExt) == '.pyd'">Py_BUILD_CORE_MODULE;</_PydPreprocessorDefinition>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+
+      <Optimization>MaxSpeed</Optimization>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <StringPooling>true</StringPooling>
+      <ExceptionHandling></ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <CompileAs>Default</CompileAs>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <WholeProgramOptimization>true</WholeProgramOptimization>
+    </ClCompile>
+    <ClCompile Condition="$(Configuration) == 'Debug'">
+      <Optimization>Disabled</Optimization>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+    </ClCompile>
+    <Link>
+      <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>true</RandomizedBaseAddress>
+      <DataExecutionPrevention>true</DataExecutionPrevention>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+      <TargetMachine>MachineX86</TargetMachine>
+      <TargetMachine Condition="'$(Platform)' == 'x64'">MachineX64</TargetMachine>
+      <ProfileGuidedDatabase Condition="$(SupportPGO)">$(OutDir)$(TargetName).pgd</ProfileGuidedDatabase>
+      <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+      <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">PGInstrument</LinkTimeCodeGeneration>
+      <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">PGUpdate</LinkTimeCodeGeneration>
+    </Link>
+    <Lib>
+      <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">true</LinkTimeCodeGeneration>
+      <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">true</LinkTimeCodeGeneration>
+      <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">true</LinkTimeCodeGeneration>
+    </Lib>
+    <ResourceCompile>
+      <AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Culture>0x0409</Culture>
+    </ResourceCompile>
+    <Midl>
+      <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MkTypLibCompatible>true</MkTypLibCompatible>
+      <SuppressStartupBanner>true</SuppressStartupBanner>
+      <TargetEnvironment>Win32</TargetEnvironment>
+      <TargetEnvironment Condition="'$(Platform)' == 'x64'">X64</TargetEnvironment>
+      <TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>
+      <HeaderFileName>
+      </HeaderFileName>
+    </Midl>
+  </ItemDefinitionGroup>
+
+  <Target Name="GeneratePythonNtRcH"
+          BeforeTargets="$(MakeVersionInfoBeforeTarget)"
+          Inputs="$(PySourcePath)Include\patchlevel.h"
+          Outputs="$(PySourcePath)PC\pythonnt_rc$(PyDebugExt).h">
+    <WriteLinesToFile File="$(PySourcePath)PC\pythonnt_rc$(PyDebugExt).h" Overwrite="true" Encoding="ascii"
+                      Lines='/* This file created by python.props /t:GeneratePythonNtRcH */
+#define FIELD3 $(Field3Value)
+#define MS_DLL_ID "$(SysWinVer)"
+#define PYTHON_DLL_NAME "$(PyDllName).dll"
+' />
+    <ItemGroup>
+        <FileWrites Include="$(PySourcePath)PC\pythonnt_rc$(PyDebugExt).h" />
+    </ItemGroup>
+  </Target>
+
+  <UsingTask TaskName="KillPython" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+    <ParameterGroup>
+      <FileName Required="true" />
+    </ParameterGroup>
+    <Task>
+      <Code Type="Fragment" Language="cs">
+<![CDATA[
+string fullPath = System.IO.Path.GetFullPath(FileName);
+Log.LogMessage("Looking for " + fullPath, MessageImportance.Normal);
+foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses()) {
+    try {
+        Log.LogMessage("Found running process: " + p.MainModule.FileName, MessageImportance.Low);
+        if (fullPath.Equals(System.IO.Path.GetFullPath(p.MainModule.FileName), StringComparison.OrdinalIgnoreCase)) {
+            Log.LogMessage("Terminating " + p.MainModule.FileName, MessageImportance.High);
+            p.Kill();
+        }
+    } catch {
+    }
+}
+]]>
+      </Code>
+    </Task>
+  </UsingTask>
+
+  <Target Name="KillPython" BeforeTargets="PrepareForBuild" Condition="'$(KillPython)' == 'true'">
+    <Message Text="Killing any running python.exe instances..." Importance="high" />
+    <KillPython FileName="$(OutDir)python$(PyDebugExt).exe" />
+  </Target>
+
+  <!--
+  A default target to handle msbuild pcbuild.proj /t:CleanAll.
+
+  Some externals projects don't respond to /t:Clean, so we invoke
+  CleanAll on them when we really want to clean up.
+  -->
+  <Target Name="CleanAll" DependsOnTargets="Clean">
+    <MSBuild Projects="@(ProjectReference->'%(FullPath)')"
+             Properties="Configuration=$(Configuration);Platform=$(Platform)"
+             BuildInParallel="true"
+             StopOnFirstFailure="false"
+             Condition="Exists(%(FullPath))"
+             Targets="CleanAll" />
+  </Target>
+
+  <PropertyGroup Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+    <SignToolPath Condition="'$(SignToolPath)' == '' or !Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86\signtool.exe</SignToolPath>
+    <SignToolPath Condition="!Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86\signtool.exe</SignToolPath>
+    <SignToolPath Condition="!Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\signtool.exe</SignToolPath>
+    <_SignCommand Condition="Exists($(SignToolPath))">"$(SignToolPath)" sign /q /n "$(SigningCertificate)" /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>
+  </PropertyGroup>
+
+  <Target Name="_SignBuild" AfterTargets="AfterBuild" Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+    <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+    <Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />
+  </Target>
+</Project>
diff --git a/PCbuild/pyproject.vsprops b/PCbuild/pyproject.vsprops
deleted file mode 100644 (file)
index 0af1df7..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="pyproject"\r
-       OutputDirectory="$(SolutionDir)"\r
-       IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-$(ConfigurationName)\$(ProjectName)\"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               Optimization="2"\r
-               InlineFunctionExpansion="1"\r
-               EnableIntrinsicFunctions="true"\r
-               AdditionalIncludeDirectories="..\Include; ..\PC"\r
-               PreprocessorDefinitions="_WIN32"\r
-               StringPooling="true"\r
-               ExceptionHandling="0"\r
-               RuntimeLibrary="0"\r
-               EnableFunctionLevelLinking="true"\r
-               WarningLevel="3"\r
-               DebugInformationFormat="3"\r
-               CompileAs="0"\r
-       />\r
-       <Tool\r
-               Name="VCLinkerTool"\r
-               LinkIncremental="1"\r
-               AdditionalLibraryDirectories="$(OutDir)"\r
-               GenerateDebugInformation="true"\r
-               ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"\r
-               SubSystem="2"\r
-               RandomizedBaseAddress="1"\r
-               DataExecutionPrevention="0"\r
-               TargetMachine="1"\r
-       />\r
-       <Tool\r
-               Name="VCResourceCompilerTool"\r
-               AdditionalIncludeDirectories="..\PC;..\Include"\r
-       />\r
-       <UserMacro\r
-               Name="PyDllName"\r
-               Value="python27"\r
-       />\r
-       <UserMacro\r
-               Name="PythonExe"\r
-               Value="$(SolutionDir)\python.exe"\r
-       />\r
-       <UserMacro\r
-               Name="externalsDir"\r
-               Value="..\externals"\r
-       />\r
-       <UserMacro\r
-               Name="bsddb47Dir"\r
-               Value="$(externalsDir)\db-4.7.25.0\build_windows"\r
-       />\r
-       <UserMacro\r
-               Name="bsddb47DepLibs"\r
-               Value="ws2_32.lib"\r
-       />\r
-       <UserMacro\r
-               Name="bsddbDir"\r
-               Value="$(bsddb47Dir)"\r
-       />\r
-       <UserMacro\r
-               Name="bsddbDepLibs"\r
-               Value="$(bsddb47DepLibs)"\r
-       />\r
-       <UserMacro\r
-               Name="bsddb44Dir"\r
-               Value="$(externalsDir)\db-4.4.20\build_win32"\r
-       />\r
-       <UserMacro\r
-               Name="bsddb44DepLibs"\r
-               Value=""\r
-       />\r
-       <UserMacro\r
-               Name="sqlite3Dir"\r
-               Value="$(externalsDir)\sqlite-3.6.21"\r
-       />\r
-       <UserMacro\r
-               Name="bz2Dir"\r
-               Value="$(externalsDir)\bzip2-1.0.6"\r
-       />\r
-       <UserMacro\r
-               Name="opensslDir"\r
-               Value="$(externalsDir)\openssl-1.0.2a"\r
-       />\r
-       <UserMacro\r
-               Name="tcltkDir"\r
-               Value="$(externalsDir)\tcltk"\r
-       />\r
-       <UserMacro\r
-               Name="tcltk64Dir"\r
-               Value="$(externalsDir)\tcltk64"\r
-       />\r
-       <UserMacro\r
-               Name="tcltkLib"\r
-               Value="$(tcltkDir)\lib\tcl85.lib $(tcltkDir)\lib\tk85.lib"\r
-       />\r
-       <UserMacro\r
-               Name="tcltkLibDebug"\r
-               Value="$(tcltkDir)\lib\tcl85g.lib $(tcltkDir)\lib\tk85g.lib"\r
-       />\r
-       <UserMacro\r
-               Name="tcltk64Lib"\r
-               Value="$(tcltk64Dir)\lib\tcl85.lib $(tcltk64Dir)\lib\tk85.lib"\r
-       />\r
-       <UserMacro\r
-               Name="tcltk64LibDebug"\r
-               Value="$(tcltk64Dir)\lib\tcl85g.lib $(tcltk64Dir)\lib\tk85g.lib"\r
-       />\r
-</VisualStudioPropertySheet>\r
diff --git a/PCbuild/python.props b/PCbuild/python.props
new file mode 100644 (file)
index 0000000..245e571
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+    <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+    <!--
+    Use only MSVC 9.0, unless explicitly overridden
+    -->
+    <PlatformToolset Condition="'$(PlatformToolset)' == ''">v90</PlatformToolset>
+    <!--
+    Give a default for BasePlatformToolset as well, it's used by ICC and ignored otherwise
+    -->
+    <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(PlatformToolset)' != 'v90'">v90</BasePlatformToolset>
+    <!--
+    Convincing MSVC/MSBuild to prefer our platform names is too difficult,
+    so we define our own constant ArchName and use wherever we need it.
+    -->
+    <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'x64'">amd64</ArchName>
+    <ArchName Condition="'$(ArchName)' == ''">win32</ArchName>
+    <ArchName Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(ArchName)-pgo</ArchName>
+
+    <!-- Root directory of the repository -->
+    <PySourcePath Condition="'$(PySourcePath)' == ''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath>
+    <PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>
+
+    <!-- Directory where build outputs are put -->
+    <BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCBuild\</BuildPath>
+    <BuildPath Condition="'$(ArchName)' != 'win32'">$(BuildPath)\$(ArchName)\</BuildPath>
+    <BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
+
+    <!-- Directories of external projects. tcltk is handled in tcltk.props -->
+    <ExternalsDir>$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals\`))</ExternalsDir>
+    <sqlite3Dir>$(ExternalsDir)sqlite-3.6.21\</sqlite3Dir>
+    <bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
+    <bsddbDir>$(ExternalsDir)db-4.7.25.0</bsddbDir>
+    <opensslDir>$(ExternalsDir)openssl-1.0.2d\</opensslDir>
+    <nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
+
+    <!-- Suffix for all binaries when building for debug -->
+    <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt>
+
+    <!-- Full path of the resulting python.exe binary -->
+    <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe>
+
+    <!--
+    Read version information from Include\patchlevel.h. The following properties are set:
+
+        MajorVersionNumber  -   the '3' in '3.5.2a1'
+        MinorVersionNumber  -   the '5' in '3.5.2a1'
+        MicroVersionNumber  -   the '2' in '3.5.2a1'
+        ReleaseSerial       -   the '1' in '3.5.2a1'
+        ReleaseLevelName    -   the 'a1' in '3.5.2a1'
+        PythonVersionNumber -   '3.5.2' for '3.5.2a1'
+        PythonVersion       -   '3.5.2a1'
+        PythonVersionHex    -   0x030502a1 for '3.5.2a1'
+        ReleaseLevelNumber  -   10 for alpha, 11 for beta, 12 for RC (gamma), and 15 for final
+        Field3Value         -   2101 for '3.5.2a1' (== 1000*2 + 10*10 ('a') + 1)
+    -->
+    <_PatchLevelContent>$([System.IO.File]::ReadAllText(`$(PySourcePath)Include\patchlevel.h`))</_PatchLevelContent>
+    <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MAJOR_VERSION\s+(\d+)`).Groups[1].Value)</MajorVersionNumber>
+    <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MINOR_VERSION\s+(\d+)`).Groups[1].Value)</MinorVersionNumber>
+    <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MICRO_VERSION\s+(\d+)`).Groups[1].Value)</MicroVersionNumber>
+    <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_LEVEL\s+PY_RELEASE_LEVEL_(\w+)`).Groups[1].Value)</_ReleaseLevel>
+    <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_SERIAL\s+(\d+)`).Groups[1].Value)</ReleaseSerial>
+    <ReleaseLevelNumber>15</ReleaseLevelNumber>
+    <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'ALPHA'">10</ReleaseLevelNumber>
+    <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'BETA'">11</ReleaseLevelNumber>
+    <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'GAMMA'">12</ReleaseLevelNumber>
+    <ReleaseLevelName Condition="$(_ReleaseLevel) == 'ALPHA'">a$(ReleaseSerial)</ReleaseLevelName>
+    <ReleaseLevelName Condition="$(_ReleaseLevel) == 'BETA'">b$(ReleaseSerial)</ReleaseLevelName>
+    <ReleaseLevelName Condition="$(_ReleaseLevel) == 'GAMMA'">rc$(ReleaseSerial)</ReleaseLevelName>
+
+    <PythonVersionNumber>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</PythonVersionNumber>
+    <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName)</PythonVersion>
+    <PythonVersionHex>$([msbuild]::BitwiseOr(
+        $([msbuild]::Multiply($(MajorVersionNumber), 16777216)),
+        $([msbuild]::BitwiseOr(
+            $([msbuild]::Multiply($(MinorVersionNumber), 65536)),
+            $([msbuild]::BitwiseOr(
+                $([msbuild]::Multiply($(MicroVersionNumber), 256)),
+                $([msbuild]::BitwiseOr(
+                    $([msbuild]::Multiply($(ReleaseLevelNumber), 16)),
+                    $(ReleaseSerial)
+                ))
+            ))
+        ))
+    ))</PythonVersionHex>
+    <Field3Value>$([msbuild]::Add(
+        $(ReleaseSerial),
+        $([msbuild]::Add(
+            $([msbuild]::Multiply($(ReleaseLevelNumber), 10)),
+            $([msbuild]::Multiply($(MicroVersionNumber), 1000))
+        ))
+    ))</Field3Value>
+
+    <!-- The name of the resulting pythonXY.dll (without the extension) -->
+    <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName>
+
+    <!-- The version and platform tag to include in .pyd filenames -->
+    <PydTag Condition="$(Platform) == 'Win32' or $(Platform) == 'x86'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag>
+    <PydTag Condition="$(Platform) == 'x64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag>
+
+    <!-- The version number for sys.winver -->
+    <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)</SysWinVer>
+    <SysWinVer Condition="$(Platform) == 'Win32' or $(Platform) == 'x86'">$(SysWinVer)-32</SysWinVer>
+  </PropertyGroup>
+
+  <!-- Displays the calculated version info -->
+  <Target Name="ShowVersionInfo">
+    <Message Importance="high" Text="PythonVersionNumber: $(PythonVersionNumber)" />
+    <Message Importance="high" Text="PythonVersion:       $(PythonVersion)" />
+    <Message Importance="high" Text="$([System.String]::Format(`PythonVersionHex:    0x{0:x}`, $([System.UInt32]::Parse($(PythonVersionHex)))))" />
+    <Message Importance="high" Text="Field3Value:         $(Field3Value)" />
+  </Target>
+</Project>
diff --git a/PCbuild/python.vcproj b/PCbuild/python.vcproj
deleted file mode 100644 (file)
index 47b289e..0000000
+++ /dev/null
@@ -1,637 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="python"\r
-       ProjectGUID="{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               EnableIntrinsicFunctions="false"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               RuntimeLibrary="3"\r
-                               BrowseInformation="1"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python_d.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               EnableIntrinsicFunctions="false"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               RuntimeLibrary="3"\r
-                               BrowseInformation="1"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python_d.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2100000"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_CONSOLE"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\python.exe"\r
-                               SubSystem="1"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\pycon.ico"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\python_exe.rc"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\python.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
new file mode 100644 (file)
index 0000000..a4e9029
--- /dev/null
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}</ProjectGuid>
+    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <StackReserveSize>2000000</StackReserveSize>
+      <BaseAddress>0x1d000000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <None Include="..\PC\pycon.ico" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_exe.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\python.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="w9xpopen.vcxproj">
+      <Project>{e9e0a1f6-0009-4e8c-b8f8-1b8f5d49a058}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+  <Target Name="GeneratePythonBat" AfterTargets="AfterBuild">
+    <PropertyGroup>
+      <_Content>@rem This script invokes the most recently built Python with all arguments
+@rem passed through to the interpreter.  This file is generated by the
+@rem build process and any changes *will* be thrown away by the next
+@rem rebuild.
+@rem This is only meant as a convenience for developing CPython
+@rem and using it outside of that context is ill-advised.
+@echo Running $(Configuration)^|$(Platform) interpreter...
+@"$(OutDir)python$(PyDebugExt).exe" %*
+</_Content>
+      <_ExistingContent Condition="Exists('$(PySourcePath)python.bat')">$([System.IO.File]::ReadAllText('$(PySourcePath)python.bat'))</_ExistingContent>
+    </PropertyGroup>
+    <WriteLinesToFile File="$(PySourcePath)python.bat" Lines="$(_Content)" Overwrite="true" Condition="'$(_Content)' != '$(_ExistingContent)'" />
+  </Target>
+</Project>
diff --git a/PCbuild/python.vcxproj.filters b/PCbuild/python.vcxproj.filters
new file mode 100644 (file)
index 0000000..8f9c058
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{2d690795-de83-4a33-8235-3c5dafe45efa}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{8b010a19-5b29-45f1-a8a0-f672e2bbb11a}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\PC\pycon.ico">
+      <Filter>Resource Files</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_exe.rc">
+      <Filter>Resource Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\python.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/pythoncore.vcproj b/PCbuild/pythoncore.vcproj
deleted file mode 100644 (file)
index 5266d22..0000000
+++ /dev/null
@@ -1,1889 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="pythoncore"\r
-       ProjectGUID="{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"\r
-       RootNamespace="pythoncore"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="2"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDir)$(PyDllName).lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="2"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDir)$(PyDllName).lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               Optimization="0"\r
-                               InlineFunctionExpansion="0"\r
-                               EnableIntrinsicFunctions="false"\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Debug"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName)_d.dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName)_d.pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDir)$(PyDllName)_d.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               Optimization="0"\r
-                               InlineFunctionExpansion="0"\r
-                               EnableIntrinsicFunctions="false"\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Debug"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName)_d.dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName)_d.pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDir)$(PyDllName)_d.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="2"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="2"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="2"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalOptions="/Zm200 "\r
-                               AdditionalIncludeDirectories="..\Python;..\Modules\zlib"\r
-                               PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"\r
-                               RuntimeLibrary="2"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                               AdditionalIncludeDirectories="..\Include"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                               Description="Generate build information..."\r
-                               CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="getbuildinfo.o"\r
-                               OutputFile="$(OutDir)\$(PyDllName).dll"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"\r
-                               BaseAddress="0x1e000000"\r
-                               ImportLibrary="$(OutDirPGI)$(PyDllName).lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Include"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Include\abstract.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\asdl.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\ast.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\bitset.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\boolobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\bufferobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\bytes_methods.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\bytearrayobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\bytesobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\cellobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\ceval.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\classobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\cobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\code.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\codecs.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\compile.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\complexobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\cStringIO.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\datetime.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\descrobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\dictobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\dtoa.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\enumobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\errcode.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\eval.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\fileobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\floatobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\frameobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\funcobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\genobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\graminit.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\grammar.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\import.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\intobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\intrcheck.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\iterobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\listobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\longintrepr.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\longobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\marshal.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\memoryobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\metagrammar.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\methodobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\modsupport.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\moduleobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\node.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\object.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\objimpl.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\opcode.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\osdefs.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\parsetok.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\patchlevel.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pgen.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pgenheaders.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\py_curses.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pyarena.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pycapsule.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pyctype.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pydebug.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pyerrors.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pyexpat.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pyfpe.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pygetopt.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pymactoolbox.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pymath.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pymem.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pyport.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pystate.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pystrcmp.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pystrtod.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\Python-ast.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\Python.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pythonrun.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\pythread.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\rangeobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\setobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\sliceobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\stringobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\structmember.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\structseq.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\symtable.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\sysmodule.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\timefuncs.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\token.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\traceback.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\tupleobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\ucnhash.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\unicodeobject.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Include\weakrefobject.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Modules"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\_bisectmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_codecsmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_collectionsmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_csv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_functoolsmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_heapqmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_hotshot.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_json.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_localemodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_lsprof.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_math.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_math.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_randommodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_sre.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_struct.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\_weakref.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\arraymodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\audioop.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\binascii.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\cmathmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\cPickle.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\cStringIO.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\datetimemodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\errnomodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\future_builtins.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\gcmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\imageop.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\itertoolsmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\main.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\mathmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\md5.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\md5.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\md5module.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\mmapmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\operator.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\parsermodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\posixmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\rotatingtree.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\rotatingtree.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\sha256module.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\sha512module.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\shamodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\signalmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\stropmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\symtablemodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\threadmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\timemodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\xxsubtype.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\zipimport.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\zlibmodule.c"\r
-                               >\r
-                       </File>\r
-                       <Filter\r
-                               Name="zlib"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\adler32.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\compress.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\crc32.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\crc32.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\deflate.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\deflate.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\gzclose.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\gzlib.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\gzread.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\gzwrite.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\infback.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inffast.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inffast.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inffixed.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inflate.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inflate.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inftrees.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\inftrees.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\trees.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\trees.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\uncompr.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\zconf.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\zconf.in.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\zlib.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\zutil.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\zlib\zutil.h"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
-                               Name="cjkcodecs"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\_codecs_cn.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\_codecs_hk.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\_codecs_iso2022.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\_codecs_jp.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\_codecs_kr.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\_codecs_tw.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\alg_jisx0201.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\cjkcodecs.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\emu_jisx0213_2000.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\mappings_cn.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\mappings_hk.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\mappings_jisx0213_pair.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\mappings_jp.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\mappings_kr.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\mappings_tw.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\multibytecodec.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\cjkcodecs\multibytecodec.h"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
-                               Name="_io"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\_iomodule.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\_iomodule.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\bufferedio.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\bytesio.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\fileio.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\iobase.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\stringio.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\Modules\_io\textio.c"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Objects"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Objects\abstract.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\boolobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\bufferobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\bytes_methods.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\bytearrayobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\capsule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\cellobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\classobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\cobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\codeobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\complexobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\stringlib\count.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\descrobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\dictobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\enumobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\exceptions.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\stringlib\fastsearch.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\fileobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\stringlib\find.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\floatobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\frameobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\funcobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\genobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\intobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\iterobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\listobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\longobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\memoryobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\methodobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\moduleobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\object.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\obmalloc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\stringlib\partition.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\rangeobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\setobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\sliceobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\stringlib\split.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\stringobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\structseq.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\tupleobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\typeobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\unicodectype.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\unicodeobject.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\unicodetype_db.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Objects\weakrefobject.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Parser"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Parser\acceler.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\bitset.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\firstsets.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\grammar.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\grammar1.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\listnode.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\metagrammar.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\myreadline.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\node.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\parser.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\parser.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\parsetok.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\tokenizer.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Parser\tokenizer.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="PC"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\_subprocess.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\_winreg.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\config.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\dl_nt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\errmap.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\getpathp.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\import_nt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\msvcrtmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\PC\pyconfig.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Python"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Python\_warnings.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\asdl.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\ast.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\bltinmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\ceval.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\codecs.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\compile.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\dtoa.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\dynload_win.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\errors.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\formatter_string.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\formatter_unicode.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\frozen.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\future.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\getargs.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\getcompiler.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\getcopyright.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\getopt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\getplatform.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\getversion.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\graminit.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\import.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\importdl.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\importdl.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\marshal.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\modsupport.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\mysnprintf.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\mystrtoul.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\peephole.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pyarena.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pyctype.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pyfpe.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pymath.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pystate.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pystrcmp.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pystrtod.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\Python-ast.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\pythonrun.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\random.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\structmember.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\symtable.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\sysmodule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\thread.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\thread_nt.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Python\traceback.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\python_nt.rc"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r\r
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
new file mode 100644 (file)
index 0000000..a29d31e
--- /dev/null
@@ -0,0 +1,408 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}</ProjectGuid>
+    <RootNamespace>pythoncore</RootNamespace>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <PropertyGroup>
+    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
+    <KillPython>true</KillPython>
+  </PropertyGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <TargetName>$(PyDllName)</TargetName>
+  </PropertyGroup>
+  <PropertyGroup>
+    <CustomBuildBeforeTargets>Link</CustomBuildBeforeTargets>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalOptions>/Zm200  %(AdditionalOptions)</AdditionalOptions>
+      <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <BaseAddress>0x1e000000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Include\abstract.h" />
+    <ClInclude Include="..\Include\asdl.h" />
+    <ClInclude Include="..\Include\ast.h" />
+    <ClInclude Include="..\Include\bitset.h" />
+    <ClInclude Include="..\Include\boolobject.h" />
+    <ClInclude Include="..\Include\bufferobject.h" />
+    <ClInclude Include="..\Include\bytes_methods.h" />
+    <ClInclude Include="..\Include\bytearrayobject.h" />
+    <ClInclude Include="..\Include\bytesobject.h" />
+    <ClInclude Include="..\Include\cellobject.h" />
+    <ClInclude Include="..\Include\ceval.h" />
+    <ClInclude Include="..\Include\classobject.h" />
+    <ClInclude Include="..\Include\cobject.h" />
+    <ClInclude Include="..\Include\code.h" />
+    <ClInclude Include="..\Include\codecs.h" />
+    <ClInclude Include="..\Include\compile.h" />
+    <ClInclude Include="..\Include\complexobject.h" />
+    <ClInclude Include="..\Include\cStringIO.h" />
+    <ClInclude Include="..\Include\datetime.h" />
+    <ClInclude Include="..\Include\descrobject.h" />
+    <ClInclude Include="..\Include\dictobject.h" />
+    <ClInclude Include="..\Include\dtoa.h" />
+    <ClInclude Include="..\Include\enumobject.h" />
+    <ClInclude Include="..\Include\errcode.h" />
+    <ClInclude Include="..\Include\eval.h" />
+    <ClInclude Include="..\Include\fileobject.h" />
+    <ClInclude Include="..\Include\floatobject.h" />
+    <ClInclude Include="..\Include\frameobject.h" />
+    <ClInclude Include="..\Include\funcobject.h" />
+    <ClInclude Include="..\Include\genobject.h" />
+    <ClInclude Include="..\Include\graminit.h" />
+    <ClInclude Include="..\Include\grammar.h" />
+    <ClInclude Include="..\Include\import.h" />
+    <ClInclude Include="..\Include\intobject.h" />
+    <ClInclude Include="..\Include\intrcheck.h" />
+    <ClInclude Include="..\Include\iterobject.h" />
+    <ClInclude Include="..\Include\listobject.h" />
+    <ClInclude Include="..\Include\longintrepr.h" />
+    <ClInclude Include="..\Include\longobject.h" />
+    <ClInclude Include="..\Include\marshal.h" />
+    <ClInclude Include="..\Include\memoryobject.h" />
+    <ClInclude Include="..\Include\metagrammar.h" />
+    <ClInclude Include="..\Include\methodobject.h" />
+    <ClInclude Include="..\Include\modsupport.h" />
+    <ClInclude Include="..\Include\moduleobject.h" />
+    <ClInclude Include="..\Include\node.h" />
+    <ClInclude Include="..\Include\object.h" />
+    <ClInclude Include="..\Include\objimpl.h" />
+    <ClInclude Include="..\Include\opcode.h" />
+    <ClInclude Include="..\Include\osdefs.h" />
+    <ClInclude Include="..\Include\parsetok.h" />
+    <ClInclude Include="..\Include\patchlevel.h" />
+    <ClInclude Include="..\Include\pgen.h" />
+    <ClInclude Include="..\Include\pgenheaders.h" />
+    <ClInclude Include="..\Include\py_curses.h" />
+    <ClInclude Include="..\Include\pyarena.h" />
+    <ClInclude Include="..\Include\pycapsule.h" />
+    <ClInclude Include="..\Include\pyctype.h" />
+    <ClInclude Include="..\Include\pydebug.h" />
+    <ClInclude Include="..\Include\pyerrors.h" />
+    <ClInclude Include="..\Include\pyexpat.h" />
+    <ClInclude Include="..\Include\pyfpe.h" />
+    <ClInclude Include="..\Include\pygetopt.h" />
+    <ClInclude Include="..\Include\pymactoolbox.h" />
+    <ClInclude Include="..\Include\pymath.h" />
+    <ClInclude Include="..\Include\pymem.h" />
+    <ClInclude Include="..\Include\pyport.h" />
+    <ClInclude Include="..\Include\pystate.h" />
+    <ClInclude Include="..\Include\pystrcmp.h" />
+    <ClInclude Include="..\Include\pystrtod.h" />
+    <ClInclude Include="..\Include\Python-ast.h" />
+    <ClInclude Include="..\Include\Python.h" />
+    <ClInclude Include="..\Include\pythonrun.h" />
+    <ClInclude Include="..\Include\pythread.h" />
+    <ClInclude Include="..\Include\rangeobject.h" />
+    <ClInclude Include="..\Include\setobject.h" />
+    <ClInclude Include="..\Include\sliceobject.h" />
+    <ClInclude Include="..\Include\stringobject.h" />
+    <ClInclude Include="..\Include\structmember.h" />
+    <ClInclude Include="..\Include\structseq.h" />
+    <ClInclude Include="..\Include\symtable.h" />
+    <ClInclude Include="..\Include\sysmodule.h" />
+    <ClInclude Include="..\Include\timefuncs.h" />
+    <ClInclude Include="..\Include\token.h" />
+    <ClInclude Include="..\Include\traceback.h" />
+    <ClInclude Include="..\Include\tupleobject.h" />
+    <ClInclude Include="..\Include\ucnhash.h" />
+    <ClInclude Include="..\Include\unicodeobject.h" />
+    <ClInclude Include="..\Include\weakrefobject.h" />
+    <ClInclude Include="..\Modules\_math.h" />
+    <ClInclude Include="..\Modules\md5.h" />
+    <ClInclude Include="..\Modules\rotatingtree.h" />
+    <ClInclude Include="..\Modules\zlib\crc32.h" />
+    <ClInclude Include="..\Modules\zlib\deflate.h" />
+    <ClInclude Include="..\Modules\zlib\inffast.h" />
+    <ClInclude Include="..\Modules\zlib\inffixed.h" />
+    <ClInclude Include="..\Modules\zlib\inflate.h" />
+    <ClInclude Include="..\Modules\zlib\inftrees.h" />
+    <ClInclude Include="..\Modules\zlib\trees.h" />
+    <ClInclude Include="..\Modules\zlib\zconf.h" />
+    <ClInclude Include="..\Modules\zlib\zconf.in.h" />
+    <ClInclude Include="..\Modules\zlib\zlib.h" />
+    <ClInclude Include="..\Modules\zlib\zutil.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\alg_jisx0201.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\cjkcodecs.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\emu_jisx0213_2000.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_cn.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_hk.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_jisx0213_pair.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_jp.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_kr.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_tw.h" />
+    <ClInclude Include="..\Modules\cjkcodecs\multibytecodec.h" />
+    <ClInclude Include="..\Modules\_io\_iomodule.h" />
+    <ClInclude Include="..\Objects\stringlib\count.h" />
+    <ClInclude Include="..\Objects\stringlib\fastsearch.h" />
+    <ClInclude Include="..\Objects\stringlib\find.h" />
+    <ClInclude Include="..\Objects\stringlib\partition.h" />
+    <ClInclude Include="..\Objects\stringlib\split.h" />
+    <ClInclude Include="..\Objects\unicodetype_db.h" />
+    <ClInclude Include="..\Parser\parser.h" />
+    <ClInclude Include="..\Parser\tokenizer.h" />
+    <ClInclude Include="..\PC\errmap.h" />
+    <ClInclude Include="..\PC\pyconfig.h" />
+    <ClInclude Include="..\Python\importdl.h" />
+    <ClInclude Include="..\Python\thread_nt.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_bisectmodule.c" />
+    <ClCompile Include="..\Modules\_codecsmodule.c" />
+    <ClCompile Include="..\Modules\_collectionsmodule.c" />
+    <ClCompile Include="..\Modules\_csv.c" />
+    <ClCompile Include="..\Modules\_functoolsmodule.c" />
+    <ClCompile Include="..\Modules\_heapqmodule.c" />
+    <ClCompile Include="..\Modules\_hotshot.c" />
+    <ClCompile Include="..\Modules\_json.c" />
+    <ClCompile Include="..\Modules\_localemodule.c" />
+    <ClCompile Include="..\Modules\_lsprof.c" />
+    <ClCompile Include="..\Modules\_math.c" />
+    <ClCompile Include="..\Modules\_randommodule.c" />
+    <ClCompile Include="..\Modules\_sre.c" />
+    <ClCompile Include="..\Modules\_struct.c" />
+    <ClCompile Include="..\Modules\_weakref.c" />
+    <ClCompile Include="..\Modules\arraymodule.c" />
+    <ClCompile Include="..\Modules\audioop.c" />
+    <ClCompile Include="..\Modules\binascii.c" />
+    <ClCompile Include="..\Modules\cmathmodule.c" />
+    <ClCompile Include="..\Modules\cPickle.c" />
+    <ClCompile Include="..\Modules\cStringIO.c" />
+    <ClCompile Include="..\Modules\datetimemodule.c" />
+    <ClCompile Include="..\Modules\errnomodule.c" />
+    <ClCompile Include="..\Modules\future_builtins.c" />
+    <ClCompile Include="..\Modules\gcmodule.c" />
+    <ClCompile Include="..\Modules\imageop.c" />
+    <ClCompile Include="..\Modules\itertoolsmodule.c" />
+    <ClCompile Include="..\Modules\main.c" />
+    <ClCompile Include="..\Modules\mathmodule.c" />
+    <ClCompile Include="..\Modules\md5.c" />
+    <ClCompile Include="..\Modules\md5module.c" />
+    <ClCompile Include="..\Modules\mmapmodule.c" />
+    <ClCompile Include="..\Modules\operator.c" />
+    <ClCompile Include="..\Modules\parsermodule.c" />
+    <ClCompile Include="..\Modules\posixmodule.c" />
+    <ClCompile Include="..\Modules\rotatingtree.c" />
+    <ClCompile Include="..\Modules\sha256module.c" />
+    <ClCompile Include="..\Modules\sha512module.c" />
+    <ClCompile Include="..\Modules\shamodule.c" />
+    <ClCompile Include="..\Modules\signalmodule.c" />
+    <ClCompile Include="..\Modules\stropmodule.c" />
+    <ClCompile Include="..\Modules\symtablemodule.c" />
+    <ClCompile Include="..\Modules\threadmodule.c" />
+    <ClCompile Include="..\Modules\timemodule.c" />
+    <ClCompile Include="..\Modules\xxsubtype.c" />
+    <ClCompile Include="..\Modules\zipimport.c" />
+    <ClCompile Include="..\Modules\zlibmodule.c" />
+    <ClCompile Include="..\Modules\zlib\adler32.c" />
+    <ClCompile Include="..\Modules\zlib\compress.c" />
+    <ClCompile Include="..\Modules\zlib\crc32.c" />
+    <ClCompile Include="..\Modules\zlib\deflate.c" />
+    <ClCompile Include="..\Modules\zlib\gzclose.c" />
+    <ClCompile Include="..\Modules\zlib\gzlib.c" />
+    <ClCompile Include="..\Modules\zlib\gzread.c" />
+    <ClCompile Include="..\Modules\zlib\gzwrite.c" />
+    <ClCompile Include="..\Modules\zlib\infback.c" />
+    <ClCompile Include="..\Modules\zlib\inffast.c" />
+    <ClCompile Include="..\Modules\zlib\inflate.c" />
+    <ClCompile Include="..\Modules\zlib\inftrees.c" />
+    <ClCompile Include="..\Modules\zlib\trees.c" />
+    <ClCompile Include="..\Modules\zlib\uncompr.c" />
+    <ClCompile Include="..\Modules\zlib\zutil.c" />
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_cn.c" />
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_hk.c" />
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_iso2022.c" />
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_jp.c" />
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_kr.c" />
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_tw.c" />
+    <ClCompile Include="..\Modules\cjkcodecs\multibytecodec.c" />
+    <ClCompile Include="..\Modules\_io\_iomodule.c" />
+    <ClCompile Include="..\Modules\_io\bufferedio.c" />
+    <ClCompile Include="..\Modules\_io\bytesio.c" />
+    <ClCompile Include="..\Modules\_io\fileio.c" />
+    <ClCompile Include="..\Modules\_io\iobase.c" />
+    <ClCompile Include="..\Modules\_io\stringio.c" />
+    <ClCompile Include="..\Modules\_io\textio.c" />
+    <ClCompile Include="..\Objects\abstract.c" />
+    <ClCompile Include="..\Objects\boolobject.c" />
+    <ClCompile Include="..\Objects\bufferobject.c" />
+    <ClCompile Include="..\Objects\bytes_methods.c" />
+    <ClCompile Include="..\Objects\bytearrayobject.c" />
+    <ClCompile Include="..\Objects\capsule.c" />
+    <ClCompile Include="..\Objects\cellobject.c" />
+    <ClCompile Include="..\Objects\classobject.c" />
+    <ClCompile Include="..\Objects\cobject.c" />
+    <ClCompile Include="..\Objects\codeobject.c" />
+    <ClCompile Include="..\Objects\complexobject.c" />
+    <ClCompile Include="..\Objects\descrobject.c" />
+    <ClCompile Include="..\Objects\dictobject.c" />
+    <ClCompile Include="..\Objects\enumobject.c" />
+    <ClCompile Include="..\Objects\exceptions.c" />
+    <ClCompile Include="..\Objects\fileobject.c" />
+    <ClCompile Include="..\Objects\floatobject.c" />
+    <ClCompile Include="..\Objects\frameobject.c" />
+    <ClCompile Include="..\Objects\funcobject.c" />
+    <ClCompile Include="..\Objects\genobject.c" />
+    <ClCompile Include="..\Objects\intobject.c" />
+    <ClCompile Include="..\Objects\iterobject.c" />
+    <ClCompile Include="..\Objects\listobject.c" />
+    <ClCompile Include="..\Objects\longobject.c" />
+    <ClCompile Include="..\Objects\memoryobject.c" />
+    <ClCompile Include="..\Objects\methodobject.c" />
+    <ClCompile Include="..\Objects\moduleobject.c" />
+    <ClCompile Include="..\Objects\object.c" />
+    <ClCompile Include="..\Objects\obmalloc.c" />
+    <ClCompile Include="..\Objects\rangeobject.c" />
+    <ClCompile Include="..\Objects\setobject.c" />
+    <ClCompile Include="..\Objects\sliceobject.c" />
+    <ClCompile Include="..\Objects\stringobject.c" />
+    <ClCompile Include="..\Objects\structseq.c" />
+    <ClCompile Include="..\Objects\tupleobject.c" />
+    <ClCompile Include="..\Objects\typeobject.c" />
+    <ClCompile Include="..\Objects\unicodectype.c" />
+    <ClCompile Include="..\Objects\unicodeobject.c" />
+    <ClCompile Include="..\Objects\weakrefobject.c" />
+    <ClCompile Include="..\Parser\acceler.c" />
+    <ClCompile Include="..\Parser\bitset.c" />
+    <ClCompile Include="..\Parser\firstsets.c" />
+    <ClCompile Include="..\Parser\grammar.c" />
+    <ClCompile Include="..\Parser\grammar1.c" />
+    <ClCompile Include="..\Parser\listnode.c" />
+    <ClCompile Include="..\Parser\metagrammar.c" />
+    <ClCompile Include="..\Parser\myreadline.c" />
+    <ClCompile Include="..\Parser\node.c" />
+    <ClCompile Include="..\Parser\parser.c" />
+    <ClCompile Include="..\Parser\parsetok.c" />
+    <ClCompile Include="..\Parser\tokenizer.c" />
+    <ClCompile Include="..\PC\_subprocess.c" />
+    <ClCompile Include="..\PC\_winreg.c" />
+    <ClCompile Include="..\PC\config.c" />
+    <ClCompile Include="..\PC\dl_nt.c" />
+    <ClCompile Include="..\PC\getpathp.c" />
+    <ClCompile Include="..\PC\import_nt.c" />
+    <ClCompile Include="..\PC\msvcrtmodule.c" />
+    <ClCompile Include="..\Python\_warnings.c" />
+    <ClCompile Include="..\Python\asdl.c" />
+    <ClCompile Include="..\Python\ast.c" />
+    <ClCompile Include="..\Python\bltinmodule.c" />
+    <ClCompile Include="..\Python\ceval.c" />
+    <ClCompile Include="..\Python\codecs.c" />
+    <ClCompile Include="..\Python\compile.c" />
+    <ClCompile Include="..\Python\dtoa.c" />
+    <ClCompile Include="..\Python\dynload_win.c" />
+    <ClCompile Include="..\Python\errors.c" />
+    <ClCompile Include="..\Python\formatter_string.c" />
+    <ClCompile Include="..\Python\formatter_unicode.c" />
+    <ClCompile Include="..\Python\frozen.c" />
+    <ClCompile Include="..\Python\future.c" />
+    <ClCompile Include="..\Python\getargs.c" />
+    <ClCompile Include="..\Python\getcompiler.c" />
+    <ClCompile Include="..\Python\getcopyright.c" />
+    <ClCompile Include="..\Python\getopt.c" />
+    <ClCompile Include="..\Python\getplatform.c" />
+    <ClCompile Include="..\Python\getversion.c" />
+    <ClCompile Include="..\Python\graminit.c" />
+    <ClCompile Include="..\Python\import.c" />
+    <ClCompile Include="..\Python\importdl.c" />
+    <ClCompile Include="..\Python\marshal.c" />
+    <ClCompile Include="..\Python\modsupport.c" />
+    <ClCompile Include="..\Python\mysnprintf.c" />
+    <ClCompile Include="..\Python\mystrtoul.c" />
+    <ClCompile Include="..\Python\peephole.c" />
+    <ClCompile Include="..\Python\pyarena.c" />
+    <ClCompile Include="..\Python\pyctype.c" />
+    <ClCompile Include="..\Python\pyfpe.c" />
+    <ClCompile Include="..\Python\pymath.c" />
+    <ClCompile Include="..\Python\pystate.c" />
+    <ClCompile Include="..\Python\pystrcmp.c" />
+    <ClCompile Include="..\Python\pystrtod.c" />
+    <ClCompile Include="..\Python\Python-ast.c" />
+    <ClCompile Include="..\Python\pythonrun.c" />
+    <ClCompile Include="..\Python\random.c" />
+    <ClCompile Include="..\Python\structmember.c" />
+    <ClCompile Include="..\Python\symtable.c" />
+    <ClCompile Include="..\Python\sysmodule.c" />
+    <ClCompile Include="..\Python\thread.c" />
+    <ClCompile Include="..\Python\traceback.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+  <Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">
+    <Exec Command="hg id -b &gt; &quot;$(IntDir)hgbranch.txt&quot;" ContinueOnError="true" />
+    <Exec Command="hg id -i &gt; &quot;$(IntDir)hgversion.txt&quot;" ContinueOnError="true" />
+    <Exec Command="hg id -t &gt; &quot;$(IntDir)hgtag.txt&quot;" ContinueOnError="true" />
+    <PropertyGroup>
+      <HgBranch Condition="Exists('$(IntDir)hgbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgbranch.txt').Trim())</HgBranch>
+      <HgVersion Condition="Exists('$(IntDir)hgversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgversion.txt').Trim())</HgVersion>
+      <HgTag Condition="Exists('$(IntDir)hgtag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgtag.txt').Trim())</HgTag>
+    </PropertyGroup>
+    <ItemGroup>
+      <ClCompile Include="..\Modules\getbuildinfo.c">
+        <PreprocessorDefinitions>HGVERSION="$(HgVersion)";HGTAG="$(HgTag)";HGBRANCH="$(HgBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      </ClCompile>
+    </ItemGroup>
+  </Target>
+  <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v90'">
+    <Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
+  </Target>
+</Project>
diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters
new file mode 100644 (file)
index 0000000..49066b6
--- /dev/null
@@ -0,0 +1,953 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Include">
+      <UniqueIdentifier>{086b0afb-270c-4603-a02a-63d46f0b2b92}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Modules">
+      <UniqueIdentifier>{8e81609f-13ca-4eae-9fdb-f8af20c710c7}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Modules\_io">
+      <UniqueIdentifier>{8787c5bb-bab6-4586-a42e-4a27c7b3ffb6}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Modules\zlib">
+      <UniqueIdentifier>{5d6d2d6c-9e61-4a1d-b0b2-5cc2f446d69e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Modules\cjkcodecs">
+      <UniqueIdentifier>{9f12c4b1-322e-431e-abf1-e02550f50032}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Objects">
+      <UniqueIdentifier>{ab29a558-143d-4fe7-a039-b431fb429856}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Parser">
+      <UniqueIdentifier>{97349fee-0abf-48b0-a8f5-771bf39b8aee}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="PC">
+      <UniqueIdentifier>{ea21fc98-de89-4746-a979-c5616964329a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Python">
+      <UniqueIdentifier>{f2696406-14bc-48bd-90c5-e93ab82a21ac}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{c3e03a5c-56c7-45fd-8543-e5d2326b907d}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Include\abstract.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\asdl.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\ast.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\bitset.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\boolobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\bufferobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\bytes_methods.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\bytearrayobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\bytesobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\cellobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\ceval.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\classobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\cobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\code.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\codecs.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\compile.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\complexobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\cStringIO.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\datetime.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\descrobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\dictobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\dtoa.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\enumobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\errcode.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\eval.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\fileobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\floatobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\frameobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\funcobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\genobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\graminit.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\grammar.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\import.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\intobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\intrcheck.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\iterobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\listobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\longintrepr.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\longobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\marshal.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\memoryobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\metagrammar.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\methodobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\modsupport.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\moduleobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\node.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\object.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\objimpl.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\opcode.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\osdefs.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\parsetok.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\patchlevel.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pgen.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pgenheaders.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\py_curses.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pyarena.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pycapsule.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pyctype.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pydebug.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pyerrors.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pyexpat.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pyfpe.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pygetopt.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pymactoolbox.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pymath.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pymem.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pyport.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pystate.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pystrcmp.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pystrtod.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\Python-ast.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\Python.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pythonrun.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\pythread.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\rangeobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\setobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\sliceobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\stringobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\structmember.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\structseq.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\symtable.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\sysmodule.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\timefuncs.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\token.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\traceback.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\tupleobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\ucnhash.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\unicodeobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Include\weakrefobject.h">
+      <Filter>Include</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_math.h">
+      <Filter>Modules</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\md5.h">
+      <Filter>Modules</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\rotatingtree.h">
+      <Filter>Modules</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\crc32.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\deflate.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\inffast.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\inffixed.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\inflate.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\inftrees.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\trees.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\zconf.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\zconf.in.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\zlib.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\zlib\zutil.h">
+      <Filter>Modules\zlib</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\alg_jisx0201.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\cjkcodecs.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\emu_jisx0213_2000.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_cn.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_hk.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_jisx0213_pair.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_jp.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_kr.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\mappings_tw.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\cjkcodecs\multibytecodec.h">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\_io\_iomodule.h">
+      <Filter>Modules\_io</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Objects\stringlib\count.h">
+      <Filter>Objects</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Objects\stringlib\fastsearch.h">
+      <Filter>Objects</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Objects\stringlib\find.h">
+      <Filter>Objects</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Objects\stringlib\partition.h">
+      <Filter>Objects</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Objects\stringlib\split.h">
+      <Filter>Objects</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Objects\unicodetype_db.h">
+      <Filter>Objects</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Parser\parser.h">
+      <Filter>Parser</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Parser\tokenizer.h">
+      <Filter>Parser</Filter>
+    </ClInclude>
+    <ClInclude Include="..\PC\errmap.h">
+      <Filter>PC</Filter>
+    </ClInclude>
+    <ClInclude Include="..\PC\pyconfig.h">
+      <Filter>PC</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Python\importdl.h">
+      <Filter>Python</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Python\thread_nt.h">
+      <Filter>Python</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\_bisectmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_codecsmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_collectionsmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_csv.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_functoolsmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_heapqmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_hotshot.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_json.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_localemodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_lsprof.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_math.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_randommodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_sre.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_struct.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_weakref.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\arraymodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\audioop.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\binascii.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cmathmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cPickle.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cStringIO.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\datetimemodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\errnomodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\future_builtins.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\gcmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\imageop.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\itertoolsmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\main.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\mathmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\md5.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\md5module.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\mmapmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\operator.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\parsermodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\posixmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\rotatingtree.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\sha256module.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\sha512module.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\shamodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\signalmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\stropmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\symtablemodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\threadmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\timemodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\xxsubtype.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zipimport.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlibmodule.c">
+      <Filter>Modules</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\adler32.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\compress.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\crc32.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\deflate.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\gzclose.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\gzlib.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\gzread.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\gzwrite.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\infback.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\inffast.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\inflate.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\inftrees.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\trees.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\uncompr.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\zlib\zutil.c">
+      <Filter>Modules\zlib</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_cn.c">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_hk.c">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_iso2022.c">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_jp.c">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_kr.c">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cjkcodecs\_codecs_tw.c">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\cjkcodecs\multibytecodec.c">
+      <Filter>Modules\cjkcodecs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_io\_iomodule.c">
+      <Filter>Modules\_io</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_io\bufferedio.c">
+      <Filter>Modules\_io</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_io\bytesio.c">
+      <Filter>Modules\_io</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_io\fileio.c">
+      <Filter>Modules\_io</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_io\iobase.c">
+      <Filter>Modules\_io</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_io\stringio.c">
+      <Filter>Modules\_io</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Modules\_io\textio.c">
+      <Filter>Modules\_io</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\abstract.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\boolobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\bufferobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\bytes_methods.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\bytearrayobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\capsule.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\cellobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\classobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\cobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\codeobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\complexobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\descrobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\dictobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\enumobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\exceptions.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\fileobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\floatobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\frameobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\funcobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\genobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\intobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\iterobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\listobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\longobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\memoryobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\methodobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\moduleobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\object.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\obmalloc.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\rangeobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\setobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\sliceobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\stringobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\structseq.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\tupleobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\typeobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\unicodectype.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\unicodeobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Objects\weakrefobject.c">
+      <Filter>Objects</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\acceler.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\bitset.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\firstsets.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\grammar.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\grammar1.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\listnode.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\metagrammar.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\myreadline.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\node.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\parser.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\parsetok.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Parser\tokenizer.c">
+      <Filter>Parser</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\_subprocess.c">
+      <Filter>PC</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\_winreg.c">
+      <Filter>PC</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\config.c">
+      <Filter>PC</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\dl_nt.c">
+      <Filter>PC</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\getpathp.c">
+      <Filter>PC</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\import_nt.c">
+      <Filter>PC</Filter>
+    </ClCompile>
+    <ClCompile Include="..\PC\msvcrtmodule.c">
+      <Filter>PC</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\_warnings.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\asdl.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\ast.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\bltinmodule.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\ceval.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\codecs.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\compile.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\dtoa.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\dynload_win.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\errors.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\formatter_string.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\formatter_unicode.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\frozen.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\future.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\getargs.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\getcompiler.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\getcopyright.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\getopt.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\getplatform.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\getversion.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\graminit.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\import.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\importdl.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\marshal.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\modsupport.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\mysnprintf.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\mystrtoul.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\peephole.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pyarena.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pyctype.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pyfpe.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pymath.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pystate.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pystrcmp.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pystrtod.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\Python-ast.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\pythonrun.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\random.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\structmember.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\symtable.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\sysmodule.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\thread.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+    <ClCompile Include="..\Python\traceback.c">
+      <Filter>Python</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_nt.rc">
+      <Filter>Resource Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/pythonw.vcproj b/PCbuild/pythonw.vcproj
deleted file mode 100644 (file)
index 7ae562a..0000000
+++ /dev/null
@@ -1,618 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="pythonw"\r
-       ProjectGUID="{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               EnableIntrinsicFunctions="false"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               RuntimeLibrary="3"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw_d.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               EnableIntrinsicFunctions="false"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               RuntimeLibrary="3"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw_d.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                               PreprocessorDefinitions="_WINDOWS"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="2"\r
-                               EnableFunctionLevelLinking="true"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\pythonw.exe"\r
-                               StackReserveSize="2000000"\r
-                               BaseAddress="0x1d000000"\r
-                               ImportLibrary=""\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\python_exe.rc"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\WinMain.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
new file mode 100644 (file)
index 0000000..ea5f1c8
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{F4229CC3-873C-49AE-9729-DD308ED4CD4A}</ProjectGuid>
+    <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
+    <SupportPGO>false</SupportPGO>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <StackReserveSize>2000000</StackReserveSize>
+      <BaseAddress>0x1d000000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_exe.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\WinMain.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/pythonw.vcxproj.filters b/PCbuild/pythonw.vcxproj.filters
new file mode 100644 (file)
index 0000000..a28c03c
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{0434cf11-a311-4a92-8a6c-4164aa79a7f2}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{e1d8ea6b-c65d-42f4-9eed-6010846ed378}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="..\PC\python_exe.rc">
+      <Filter>Resource Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\WinMain.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
index 71fb0212d8c8f4c3df7c876985221f15837fc3d5..2388535cf050f03a07a0246f141cc8de3f597106 100644 (file)
-Building Python using VC++ 9.0\r
-------------------------------\r
+Quick Start Guide\r
+-----------------\r
+\r
+1.  Install Microsoft Visual Studio 2008, any edition.\r
+2.  Install Microsoft Visual Studio 2010, any edition, or Windows SDK 7.1\r
+    and any version of Microsoft Visual Studio newer than 2010.\r
+3.  Install Subversion, and make sure 'svn.exe' is on your PATH.\r
+4.  Run "build.bat -e" to build Python in 32-bit Release configuration.\r
+5.  (Optional, but recommended) Run the test suite with "rt.bat -q".\r
+\r
+\r
+Building Python using MSVC 9.0 via MSBuild\r
+------------------------------------------\r
 \r
 This directory is used to build Python for Win32 and x64 platforms, e.g.\r
-Windows 2000, XP, Vista and Windows Server 2008.  In order to build 32-bit\r
-debug and release executables, Microsoft Visual C++ 2008 Express Edition is\r
-required at the very least.  In order to build 64-bit debug and release\r
-executables, Visual Studio 2008 Standard Edition is required at the very\r
-least.  In order to build all of the above, as well as generate release builds\r
-that make use of Profile Guided Optimisation (PG0), Visual Studio 2008\r
-Professional Edition is required at the very least.  The official Python\r
-releases are built with this version of Visual Studio.\r
+Windows 2000 and later.  In order to use the project files in this\r
+directory, you must have installed the MSVC 9.0 compilers, the v90\r
+PlatformToolset project files for MSBuild, and MSBuild version 4.0 or later.\r
+The easiest way to make sure you have all of these components is to install\r
+Visual Studio 2008 and Visual Studio 2010.  Another configuration proven\r
+to work is Visual Studio 2008, Windows SDK 7.1, and Visual Studio 2013.\r
+\r
+If you only have Visual Studio 2008 available, use the project files in\r
+../PC/VS9.0 which are fully supported and specifically for VS 2008.\r
+\r
+If you do not have Visual Studio 2008 available, you can use these project\r
+files to build using a different version of MSVC.  For example, use\r
+\r
+   PCbuild\build.bat "/p:PlatformToolset=v100"\r
+\r
+to build using MSVC10 (Visual Studio 2010).\r
+\r
+***WARNING***\r
+Building Python 2.7 for Windows using any toolchain that doesn't link\r
+against MSVCRT90.dll is *unsupported* as the resulting python.exe will\r
+not be able to use precompiled extension modules that do link against\r
+MSVCRT90.dll.\r
 \r
 For other Windows platforms and compilers, see ../PC/readme.txt.\r
 \r
-All you need to do is open the workspace "pcbuild.sln" in Visual Studio,\r
-select the desired combination of configuration and platform and eventually\r
-build the solution. Unless you are going to debug a problem in the core or\r
-you are going to create an optimized build you want to select "Release" as\r
-configuration.\r
-\r
-The PCbuild directory is compatible with all versions of Visual Studio from\r
-VS C++ Express Edition over the standard edition up to the professional\r
-edition. However the express edition does not support features like solution\r
-folders or profile guided optimization (PGO). The missing bits and pieces\r
-won't stop you from building Python.\r
-\r
-The solution is configured to build the projects in the correct order. "Build\r
-Solution" or F7 takes care of dependencies except for x64 builds. To make\r
-cross compiling x64 builds on a 32bit OS possible the x64 builds require a\r
-32bit version of Python.\r
-\r
-NOTE:\r
-   You probably don't want to build most of the other subprojects, unless\r
-   you're building an entire Python distribution from scratch, or\r
-   specifically making changes to the subsystems they implement, or are\r
-   running a Python core buildbot test slave; see SUBPROJECTS below)\r
-\r
-When using the Debug setting, the output files have a _d added to\r
-their name:  python27_d.dll, python_d.exe, parser_d.pyd, and so on. Both\r
-the build and rt batch files accept a -d option for debug builds.\r
-\r
-The 32bit builds end up in the solution folder PCbuild while the x64 builds\r
-land in the amd64 subfolder. The PGI and PGO builds for profile guided\r
-optimization end up in their own folders, too.\r
+All you need to do to build is open the solution "pcbuild.sln" in Visual\r
+Studio, select the desired combination of configuration and platform,\r
+then build with "Build Solution".  You can also build from the command\r
+line using the "build.bat" script in this directory; see below for\r
+details.  The solution is configured to build the projects in the correct\r
+order.\r
+\r
+The solution currently supports two platforms.  The Win32 platform is\r
+used to build standard x86-compatible 32-bit binaries, output into this\r
+directory.  The x64 platform is used for building 64-bit AMD64 (aka\r
+x86_64 or EM64T) binaries, output into the amd64 sub-directory.  The\r
+Itanium (IA-64) platform is no longer supported.\r
+\r
+Four configuration options are supported by the solution:\r
+Debug\r
+    Used to build Python with extra debugging capabilities, equivalent\r
+    to using ./configure --with-pydebug on UNIX.  All binaries built\r
+    using this configuration have "_d" added to their name:\r
+    python27_d.dll, python_d.exe, parser_d.pyd, and so on.  Both the\r
+    build and rt (run test) batch files in this directory accept a -d\r
+    option for debug builds.  If you are building Python to help with\r
+    development of CPython, you will most likely use this configuration.\r
+PGInstrument, PGUpdate\r
+    Used to build Python in Release configuration using PGO, which\r
+    requires Professional Edition of Visual Studio 2008.  See the\r
+    "Profile Guided Optimization" section below for more information.\r
+    Build output from each of these configurations lands in its own\r
+    sub-directory of this directory.  The official Python releases may\r
+    be built using these configurations.\r
+Release\r
+    Used to build Python as it is meant to be used in production\r
+    settings, though without PGO.\r
+\r
+\r
+Building Python using the build.bat script\r
+----------------------------------------------\r
+\r
+In this directory you can find build.bat, a script designed to make\r
+building Python on Windows simpler.  This script will use the env.bat\r
+script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of\r
+which contains a usable version of MSBuild.\r
+\r
+By default, build.bat will build Python in Release configuration for\r
+the 32-bit Win32 platform.  It accepts several arguments to change\r
+this behavior, try `build.bat -h` to learn more.\r
+\r
 \r
 Legacy support\r
 --------------\r
 \r
 You can find build directories for older versions of Visual Studio and\r
-Visual C++ in the PC directory. The legacy build directories are no longer\r
-actively maintained and may not work out of the box.\r
+Visual C++ in the PC directory.  The project files in PC/VS9.0/ are\r
+specific to Visual Studio 2008, and will be fully supported for the life\r
+of Python 2.7.\r
+\r
+The following legacy build directories are no longer maintained and may\r
+not work out of the box.\r
 \r
 PC/VC6/\r
     Visual C++ 6.0\r
@@ -59,7 +104,7 @@ PC/VS8.0/
     Visual Studio 2005 (8.0)\r
 \r
 \r
-C RUNTIME\r
+C Runtime\r
 ---------\r
 \r
 Visual Studio 2008 uses version 9 of the C runtime (MSVCRT9).  The executables\r
@@ -74,210 +119,196 @@ it in the same directory.  For compatibility with older systems, one should
 also set the PATH to this directory so that the dll can be found.\r
 For more info, see the Readme in the VC/Redist folder.\r
 \r
-SUBPROJECTS\r
------------\r
-These subprojects should build out of the box.  Subprojects other than the\r
-main ones (pythoncore, python, pythonw) generally build a DLL (renamed to\r
-.pyd) from a specific module so that users don't have to load the code\r
-supporting that module unless they import the module.\r
 \r
+Sub-Projects\r
+------------\r
+\r
+The CPython project is split up into several smaller sub-projects which\r
+are managed by the pcbuild.sln solution file.  Each sub-project is\r
+represented by a .vcxproj and a .vcxproj.filters file starting with the\r
+name of the sub-project.  These sub-projects fall into a few general\r
+categories:\r
+\r
+The following sub-projects represent the bare minimum required to build\r
+a functioning CPython interpreter.  If nothing else builds but these,\r
+you'll have a very limited but usable python.exe:\r
 pythoncore\r
     .dll and .lib\r
 python\r
     .exe\r
+\r
+These sub-projects provide extra executables that are useful for running\r
+CPython in different ways:\r
 pythonw\r
-    pythonw.exe, a variant of python.exe that doesn't pop up a DOS box\r
+    pythonw.exe, a variant of python.exe that doesn't open a Command\r
+    Prompt window\r
+pylauncher\r
+    py.exe, the Python Launcher for Windows, see\r
+        http://docs.python.org/3/using/windows.html#launcher\r
+pywlauncher\r
+    pyw.exe, a variant of py.exe that doesn't open a Command Prompt\r
+    window\r
+\r
+The following sub-projects are for individual modules of the standard\r
+library which are implemented in C; each one builds a DLL (renamed to\r
+.pyd) of the same name as the project:\r
+_ctypes\r
+_ctypes_test\r
+_elementtree\r
+_hashlib\r
+_msi\r
+_multiprocessing\r
 _socket\r
-    socketmodule.c\r
 _testcapi\r
-    tests of the Python C API, run via Lib/test/test_capi.py, and\r
-    implemented by module Modules/_testcapimodule.c\r
 pyexpat\r
-    Python wrapper for accelerated XML parsing, which incorporates stable\r
-    code from the Expat project:  http://sourceforge.net/projects/expat/\r
 select\r
-    selectmodule.c\r
 unicodedata\r
-    large tables of Unicode data\r
 winsound\r
-    play sounds (typically .wav files) under Windows\r
 \r
-Python-controlled subprojects that wrap external projects:\r
+There is also a w9xpopen project to build w9xpopen.exe, which is used\r
+for platform.popen() on platforms whose COMSPEC points to 'command.com'.\r
+\r
+The following Python-controlled sub-projects wrap external projects.\r
+Note that these external libraries are not necessary for a working\r
+interpreter, but they do implement several major features.  See the\r
+"Getting External Sources" section below for additional information\r
+about getting the source for building these libraries.  The sub-projects\r
+are:\r
 _bsddb\r
-    Wraps Berkeley DB 4.7.25, which is currently built by _bsddb.vcproj.\r
-    project.\r
+    Python wrapper for Berkeley DB version 4.7.25.\r
+    Homepage:\r
+        http://www.oracle.com/us/products/database/berkeley-db/\r
+_bz2\r
+    Python wrapper for version 1.0.6 of the libbzip2 compression library\r
+    Homepage:\r
+        http://www.bzip.org/\r
+_ssl\r
+    Python wrapper for version 1.0.2d of the OpenSSL secure sockets\r
+    library, which is built by ssl.vcxproj\r
+    Homepage:\r
+        http://www.openssl.org/\r
+\r
+    Building OpenSSL requires nasm.exe (the Netwide Assembler), version\r
+    2.10 or newer from\r
+        http://www.nasm.us/\r
+    to be somewhere on your PATH.  More recent versions of OpenSSL may\r
+    need a later version of NASM. If OpenSSL's self tests don't pass,\r
+    you should first try to update NASM and do a full rebuild of\r
+    OpenSSL.  If you use the PCbuild\get_externals.bat method\r
+    for getting sources, it also downloads a version of NASM which the\r
+    libeay/ssleay sub-projects use.\r
+\r
+    The libeay/ssleay sub-projects expect your OpenSSL sources to have\r
+    already been configured and be ready to build.  If you get your sources\r
+    from svn.python.org as suggested in the "Getting External Sources"\r
+    section below, the OpenSSL source will already be ready to go.  If\r
+    you want to build a different version, you will need to run\r
+\r
+       PCbuild\prepare_ssl.py path\to\openssl-source-dir\r
+\r
+    That script will prepare your OpenSSL sources in the same way that\r
+    those available on svn.python.org have been prepared.  Note that\r
+    Perl must be installed and available on your PATH to configure\r
+    OpenSSL.  ActivePerl is recommended and is available from\r
+        http://www.activestate.com/activeperl/\r
+\r
+    The libeay and ssleay sub-projects will build the modules of OpenSSL\r
+    required by _ssl and _hashlib and may need to be manually updated when\r
+    upgrading to a newer version of OpenSSL or when adding new\r
+    functionality to _ssl or _hashlib. They will not clean up their output\r
+    with the normal Clean target; CleanAll should be used instead.\r
 _sqlite3\r
-    Wraps SQLite 3.6.21, which is currently built by sqlite3.vcproj.\r
+    Wraps SQLite 3.6.21, which is itself built by sqlite3.vcxproj\r
+    Homepage:\r
+        http://www.sqlite.org/\r
 _tkinter\r
-    Wraps the Tk windowing system.  Unlike _bsddb and _sqlite3, there's no\r
-    corresponding tcltk.vcproj-type project that builds Tcl/Tk from vcproj's\r
-    within our pcbuild.sln, which means this module expects to find a\r
-    pre-built Tcl/Tk in either ..\externals\tcltk for 32-bit or\r
-    ..\externals\tcltk64 for 64-bit (relative to this directory).  See below\r
-    for instructions to build Tcl/Tk.\r
-bz2\r
-    Python wrapper for the libbz2 compression library.  Homepage\r
-        http://sources.redhat.com/bzip2/\r
-    Download the source from the python.org copy into the dist\r
-    directory:\r
-\r
-    svn export http://svn.python.org/projects/external/bzip2-1.0.6\r
-\r
-    ** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for\r
-    obtaining external sources then you don't need to manually get the source\r
-    above via subversion. **\r
+    Wraps version 8.5.15 of the Tk windowing system.\r
+    Homepage:\r
+        http://www.tcl.tk/\r
 \r
-_ssl\r
-    Python wrapper for the secure sockets library.\r
+    Tkinter's dependencies are built by the tcl.vcxproj and tk.vcxproj\r
+    projects.  The tix.vcxproj project also builds the Tix extended\r
+    widget set for use with Tkinter.\r
 \r
-    Get the source code through\r
+    Those three projects install their respective components in a\r
+    directory alongside the source directories called "tcltk" on\r
+    Win32 and "tcltk64" on x64.  They also copy the Tcl and Tk DLLs\r
+    into the current output directory, which should ensure that Tkinter\r
+    is able to load Tcl/Tk without having to change your PATH.\r
 \r
-    svn export http://svn.python.org/projects/external/openssl-1.0.2a\r
+    The tcl, tk, and tix sub-projects do not clean their builds with\r
+    the normal Clean target; if you need to rebuild, you should use the\r
+    CleanAll target or manually delete their builds.\r
 \r
-    ** NOTE: if you use the Tools\buildbot\external(-amd64).bat approach for\r
-    obtaining external sources then you don't need to manually get the source\r
-    above via subversion. **\r
 \r
-    The NASM assembler is required to build OpenSSL.  If you use the\r
-    Tools\buildbot\external(-amd64).bat method for getting sources, it also\r
-    downloads a version of NASM, which the ssl build script will add to PATH.\r
-    Otherwise, you can download the NASM installer from\r
-        http://www.nasm.us/\r
-    and add NASM to your PATH.\r
+Getting External Sources\r
+------------------------\r
+\r
+The last category of sub-projects listed above wrap external projects\r
+Python doesn't control, and as such a little more work is required in\r
+order to download the relevant source files for each project before they\r
+can be built.  However, a simple script is provided to make this as\r
+painless as possible, called "get_externals.bat" and located in this\r
+directory.  This script extracts all the external sub-projects from\r
+    http://svn.python.org/projects/external\r
+via Subversion (so you'll need svn.exe on your PATH) and places them\r
+in ..\externals (relative to this directory).\r
+\r
+It is also possible to download sources from each project's homepage,\r
+though you may have to change folder names or pass the names to MSBuild\r
+as the values of certain properties in order for the build solution to\r
+find them.  This is an advanced topic and not necessarily fully\r
+supported.\r
+\r
+The get_externals.bat script is called automatically by build.bat when\r
+you pass the '-e' option to it.\r
 \r
-    You can also install ActivePerl from\r
-        http://www.activestate.com/activeperl/\r
-    if you like to use the official sources instead of the files from\r
-    python's subversion repository. The svn version contains pre-build\r
-    makefiles and assembly files.\r
-\r
-    The build process makes sure that no patented algorithms are included.\r
-    For now RC5, MDC2 and IDEA are excluded from the build. You may have\r
-    to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if the build process\r
-    complains about missing files or forbidden IDEA. Again the files provided\r
-    in the subversion repository are already fixed.\r
-\r
-    The MSVC project simply invokes PCBuild/build_ssl.py to perform\r
-    the build.  This Python script locates and builds your OpenSSL\r
-    installation, then invokes a simple makefile to build the final .pyd.\r
-\r
-    build_ssl.py attempts to catch the most common errors (such as not\r
-    being able to find OpenSSL sources, or not being able to find a Perl\r
-    that works with OpenSSL) and give a reasonable error message.\r
-    If you have a problem that doesn't seem to be handled correctly\r
-    (eg, you know you have ActivePerl but we can't find it), please take\r
-    a peek at build_ssl.py and suggest patches.  Note that build_ssl.py\r
-    should be able to be run directly from the command-line.\r
-\r
-    build_ssl.py/MSVC isn't clever enough to clean OpenSSL - you must do\r
-    this by hand.\r
-\r
-The subprojects above wrap external projects Python doesn't control, and as\r
-such, a little more work is required in order to download the relevant source\r
-files for each project before they can be built.  The buildbots do this each\r
-time they're built, so the easiest approach is to run either external.bat or\r
-external-amd64.bat in the ..\Tools\buildbot directory from ..\, i.e.:\r
-\r
-    C:\..\svn.python.org\projects\python\trunk\PCbuild>cd ..\r
-    C:\..\svn.python.org\projects\python\trunk>Tools\buildbot\external.bat\r
-\r
-This extracts all the external subprojects from http://svn.python.org/external\r
-via Subversion (so you'll need an svn.exe on your PATH) and places them in\r
-..\externals (relative to this directory).  The external(-amd64).bat scripts\r
-will also build a debug build of Tcl/Tk; there aren't any equivalent batch files\r
-for building release versions of Tcl/Tk lying around in the Tools\buildbot\r
-directory.  If you need to build a release version of Tcl/Tk it isn't hard\r
-though, take a look at the relevant external(-amd64).bat file and find the\r
-two nmake lines, then call each one without the 'DEBUG=1' parameter, i.e.:\r
-\r
-The external-amd64.bat file contains this for tcl:\r
-    nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install\r
-\r
-So for a release build, you'd call it as:\r
-    nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all install\r
-\r
-    XXX Should we compile with OPTS=threads?\r
-    XXX Our installer copies a lot of stuff out of the Tcl/Tk install\r
-    XXX directory.  Is all of that really needed for Python use of Tcl/Tk?\r
-\r
-This will be cleaned up in the future; ideally Tcl/Tk will be brought into our\r
-pcbuild.sln as custom .vcproj files, just as we've recently done with the\r
-_bsddb.vcproj and sqlite3.vcproj files, which will remove the need for\r
-Tcl/Tk to be built separately via a batch file.\r
-\r
-Building for Itanium\r
---------------------\r
-\r
-Official support for Itanium builds have been dropped from the build. Please\r
-contact us and provide patches if you are interested in Itanium builds.\r
-\r
-Building for AMD64\r
-------------------\r
-\r
-The build process for AMD64 / x64 is very similar to standard builds. You just\r
-have to set x64 as platform. In addition, the HOST_PYTHON environment variable\r
-must point to a Python interpreter (at least 2.4), to support cross-compilation.\r
-\r
-Building Python Using the free MS Toolkit Compiler\r
---------------------------------------------------\r
-\r
-Microsoft has withdrawn the free MS Toolkit Compiler, so this can no longer\r
-be considered a supported option. Instead you can use the free VS C++ Express\r
-Edition.\r
 \r
 Profile Guided Optimization\r
 ---------------------------\r
 \r
 The solution has two configurations for PGO. The PGInstrument\r
-configuration must be build first. The PGInstrument binaries are\r
-linked against a profiling library and contain extra debug\r
-information. The PGUpdate configuration takes the profiling data and\r
-generates optimized binaries.\r
+configuration must be built first. The PGInstrument binaries are linked\r
+against a profiling library and contain extra debug information. The\r
+PGUpdate configuration takes the profiling data and generates optimized\r
+binaries.\r
+\r
+The build_pgo.bat script automates the creation of optimized binaries.\r
+It creates the PGI files, runs the unit test suite or PyBench with the\r
+PGI python, and finally creates the optimized files.\r
 \r
-The build_pgo.bat script automates the creation of optimized binaries. It\r
-creates the PGI files, runs the unit test suite or PyBench with the PGI\r
-python and finally creates the optimized files.\r
+See\r
+    http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.90).aspx\r
+for more on this topic.\r
 \r
-http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.90).aspx\r
 \r
 Static library\r
 --------------\r
 \r
-The solution has no configuration for static libraries. However it is easy\r
-it build a static library instead of a DLL. You simply have to set the\r
-"Configuration Type" to "Static Library (.lib)" and alter the preprocessor\r
-macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may also have to\r
-change the "Runtime Library" from "Multi-threaded DLL (/MD)" to\r
-"Multi-threaded (/MT)".\r
+The solution has no configuration for static libraries. However it is\r
+easy to build a static library instead of a DLL. You simply have to set\r
+the "Configuration Type" to "Static Library (.lib)" and alter the\r
+preprocessor macro "Py_ENABLE_SHARED" to "Py_NO_ENABLE_SHARED". You may\r
+also have to change the "Runtime Library" from "Multi-threaded DLL\r
+(/MD)" to "Multi-threaded (/MT)".\r
+\r
 \r
 Visual Studio properties\r
 ------------------------\r
 \r
-The PCbuild solution makes heavy use of Visual Studio property files\r
-(*.vsprops). The properties can be viewed and altered in the Property\r
-Manager (View -> Other Windows -> Property Manager).\r
-\r
- * debug (debug macro: _DEBUG)\r
- * pginstrument (PGO)\r
- * pgupdate (PGO)\r
-    +-- pginstrument\r
- * pyd (python extension, release build)\r
-    +-- release\r
-    +-- pyproject\r
- * pyd_d (python extension, debug build)\r
-    +-- debug\r
-    +-- pyproject\r
- * pyproject (base settings for all projects, user macros like PyDllName)\r
- * release (release macro: NDEBUG)\r
- * x64 (AMD64 / x64 platform specific settings)\r
-\r
-The pyproject propertyfile defines _WIN32 and x64 defines _WIN64 and _M_X64\r
-although the macros are set by the compiler, too. The GUI doesn't always know\r
-about the macros and confuse the user with false information.\r
-\r
-YOUR OWN EXTENSION DLLs\r
------------------------\r
-\r
-If you want to create your own extension module DLL, there's an example\r
-with easy-to-follow instructions in ../PC/example/; read the file\r
-readme.txt there first.\r
+The PCbuild solution makes use of Visual Studio property files (*.props)\r
+to simplify each project. The properties can be viewed in the Property\r
+Manager (View -> Other Windows -> Property Manager) but should be\r
+carefully modified by hand.\r
+\r
+The property files used are:\r
+ * python (versions, directories and build names)\r
+ * pyproject (base settings for all projects)\r
+ * openssl (used by libeay and ssleay projects)\r
+ * tcltk (used by _tkinter, tcl, tk and tix projects)\r
+\r
+The pyproject property file defines all of the build settings for each\r
+project, with some projects overriding certain specific values. The GUI\r
+doesn't always reflect the correct settings and may confuse the user\r
+with false information, especially for settings that automatically adapt\r
+for diffirent configurations.\r
diff --git a/PCbuild/release.vsprops b/PCbuild/release.vsprops
deleted file mode 100644 (file)
index 08def90..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="release"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               PreprocessorDefinitions="NDEBUG"\r
-       />\r
-       <UserMacro\r
-               Name="KillPythonExe"\r
-               Value="$(OutDir)\kill_python.exe"\r
-       />      \r
-</VisualStudioPropertySheet>\r
index ebe88a258fa1f3bb00202cd21bf6628692f37939..a65d818cec9772fbf68267d201972179da22e7cf 100644 (file)
@@ -9,7 +9,8 @@ rem      -q runs the tests just once, and without deleting .py[co] files.
 rem -x64 Run the 64-bit build of python (or python_d if -d was specified)\r
 rem      from the 'amd64' dir instead of the 32-bit build in this dir.\r
 rem All leading instances of these switches are shifted off, and\r
-rem whatever remains is passed to regrtest.py.  For example,\r
+rem whatever remains (up to 9 arguments) is passed to regrtest.py.\r
+rem For example,\r
 rem     rt -O -d -x test_thread\r
 rem runs\r
 rem     python_d -O ../lib/test/regrtest.py -x test_thread\r
@@ -26,25 +27,26 @@ rem     rt -u "network,largefile"
 \r
 setlocal\r
 \r
-set prefix=.\\r
+set pcbuild=%~dp0\r
+set prefix=%pcbuild%\r
 set suffix=\r
 set qmode=\r
 set dashO=\r
-set tcltk=tcltk\r
+set regrtestargs=\r
 \r
 :CheckOpts\r
 if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts\r
 if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts\r
 if "%1"=="-d" (set suffix=_d)    & shift & goto CheckOpts\r
-if "%1"=="-x64" (set prefix=amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts\r
+if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts\r
+if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts\r
 \r
-PATH %PATH%;%~dp0..\externals\%tcltk%\bin\r
-set exe=%prefix%\python%suffix%\r
-set cmd=%exe% %dashO% -Wd -3 -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+set exe=%prefix%python%suffix%\r
+set cmd="%exe%" %dashO% -Wd -3 -E -tt "%pcbuild%..\Lib\test\regrtest.py" %regrtestargs%\r
 if defined qmode goto Qmode\r
 \r
 echo Deleting .pyc/.pyo files ...\r
-%exe% rmpyc.py\r
+"%exe%" "%pcbuild%rmpyc.py"\r
 \r
 echo on\r
 %cmd%\r
diff --git a/PCbuild/select.vcproj b/PCbuild/select.vcproj
deleted file mode 100644 (file)
index 02e0a2f..0000000
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="select"\r
-       ProjectGUID="{18CAE28C-B454-46C1-87A0-493D91D97F03}"\r
-       RootNamespace="select"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="ws2_32.lib"\r
-                               IgnoreDefaultLibraryNames="libc"\r
-                               BaseAddress="0x1D110000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\selectmodule.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/select.vcxproj b/PCbuild/select.vcxproj
new file mode 100644 (file)
index 0000000..1cae1ef
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{18CAE28C-B454-46C1-87A0-493D91D97F03}</ProjectGuid>
+    <RootNamespace>select</RootNamespace>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <BaseAddress>0x1D110000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\selectmodule.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/select.vcxproj.filters b/PCbuild/select.vcxproj.filters
new file mode 100644 (file)
index 0000000..3803394
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{98346077-900c-4c7a-852f-a23470e37b40}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\selectmodule.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/sqlite3.vcproj b/PCbuild/sqlite3.vcproj
deleted file mode 100644 (file)
index e1771f4..0000000
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="sqlite3"\r
-       ProjectGUID="{A1A295E5-463C-437F-81CA-1F32367685DA}"\r
-       RootNamespace="sqlite3"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops;.\debug.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName)_d.dll"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops;.\debug.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName)_d.dll"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(sqlite3Dir)&quot;"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               OutputFile="$(OutDir)\$(ProjectName).dll"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="$(sqlite3Dir)\sqlite3.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="$(sqlite3Dir)\sqlite3ext.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="$(sqlite3Dir)\sqlite3.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj
new file mode 100644 (file)
index 0000000..3720545
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A1A295E5-463C-437F-81CA-1F32367685DA}</ProjectGuid>
+    <RootNamespace>sqlite3</RootNamespace>
+    <TargetExt>.pyd</TargetExt>
+    <SupportPGO>false</SupportPGO>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <WarningLevel>Level1</WarningLevel>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="$(sqlite3Dir)\sqlite3.h" />
+    <ClInclude Include="$(sqlite3Dir)\sqlite3ext.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="$(sqlite3Dir)\sqlite3.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/sqlite3.vcxproj.filters b/PCbuild/sqlite3.vcxproj.filters
new file mode 100644 (file)
index 0000000..2e0e8df
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{ce5b649d-a6f7-4459-9425-c883795d79df}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{0e842fe2-176b-4e83-9d1f-0ad13a859efd}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="$(sqlite3Dir)\sqlite3.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="$(sqlite3Dir)\sqlite3ext.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="$(sqlite3Dir)\sqlite3.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/sqlite3.vsprops b/PCbuild/sqlite3.vsprops
deleted file mode 100644 (file)
index b502df5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="sqlite3"\r
-       InheritedPropertySheets=".\pyproject.vsprops"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               AdditionalIncludeDirectories="$(sqlite3Dir)"\r
-               PreprocessorDefinitions="SQLITE_API=__declspec(dllexport)"\r
-               WarningLevel="1"\r
-       />\r
-</VisualStudioPropertySheet>\r
diff --git a/PCbuild/ssleay.vcxproj b/PCbuild/ssleay.vcxproj
new file mode 100644 (file)
index 0000000..9ad6733
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{10615B24-73BF-4EFA-93AA-236916321317}</ProjectGuid>
+    <RootNamespace>ssleay</RootNamespace>
+  </PropertyGroup>
+
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+  </PropertyGroup>
+
+  <Import Project="openssl.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+  <ItemGroup>
+    <!--
+    <ClCompile Include="$(opensslDir)ssl\bio_ssl.c" />
+    -->
+    <ClCompile Include="$(opensslDir)ssl\d1_both.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />
+    <ClCompile Include="$(opensslDir)ssl\d1_enc.c" />
+    -->
+    <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />
+    -->
+    <ClCompile Include="$(opensslDir)ssl\d1_pkt.c" />
+    <ClCompile Include="$(opensslDir)ssl\d1_srtp.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />
+    <ClCompile Include="$(opensslDir)ssl\kssl.c" />
+    -->
+    <ClCompile Include="$(opensslDir)ssl\s2_clnt.c" />
+    <ClCompile Include="$(opensslDir)ssl\s2_enc.c" />
+    <ClCompile Include="$(opensslDir)ssl\s2_lib.c" />
+    <ClCompile Include="$(opensslDir)ssl\s2_meth.c" />
+    <ClCompile Include="$(opensslDir)ssl\s2_pkt.c" />
+    <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />
+    <ClCompile Include="$(opensslDir)ssl\s23_clnt.c" />
+    <ClCompile Include="$(opensslDir)ssl\s23_lib.c" />
+    <ClCompile Include="$(opensslDir)ssl\s23_meth.c" />
+    <ClCompile Include="$(opensslDir)ssl\s23_pkt.c" />
+    <ClCompile Include="$(opensslDir)ssl\s23_srvr.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_both.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_cbc.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_clnt.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_enc.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_lib.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_meth.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_pkt.c" />
+    <ClCompile Include="$(opensslDir)ssl\s3_srvr.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_algs.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_asn1.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_cert.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_ciph.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_err.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_err2.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_lib.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_rsa.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_sess.c" />
+    <!--
+    <ClCompile Include="$(opensslDir)ssl\ssl_stat.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_txt.c" />
+    <ClCompile Include="$(opensslDir)ssl\ssl_utst.c" />
+    -->
+    <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_enc.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_lib.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_meth.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_reneg.c" />
+    <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />
+    <ClCompile Include="$(opensslDir)ssl\tls_srp.c" />
+  </ItemGroup>
+
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <Target Name="Clean" />
+  <Target Name="CleanAll">
+    <Delete Files="$(TargetPath)" />
+    <RemoveDir Directories="$(IntDir)" />
+  </Target>
+</Project>
diff --git a/PCbuild/tcl.vcxproj b/PCbuild/tcl.vcxproj
new file mode 100644 (file)
index 0000000..c19f53e
--- /dev/null
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B5FD6F1D-129E-4BFF-9340-03606FAC7283}</ProjectGuid>
+  </PropertyGroup>
+
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <Import Project="tcltk.props" />
+
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <OutDir>$(tcltkDir)</OutDir>
+    <TargetPath>$(OutDir)bin\$(tclDLLName)</TargetPath>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ExpectedOutputs Include="
+        $(OutDir)\bin\$(tclDLLName);
+        $(OutDir)\bin\$(tclShExeName);
+        $(OutDir)\include\tcl.h;
+        $(OutDir)\lib\tcl$(TclMajorVersion);
+        $(OutDir)\lib\tcl$(TclMajorVersion).$(TclMinorVersion);
+        $(OutDir)\lib\$(tclLibName)" />
+  </ItemGroup>
+
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+  <PropertyGroup>
+    <TclOpts Condition="$(Configuration) == 'Debug'">symbols</TclOpts>
+    <TclDirs>INSTALLDIR="$(OutDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TclDirs>
+    <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
+    <NMakeBuildCommandLine>setlocal
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
+')
+goto :eof
+:build
+set VCINSTALLDIR=$(VCInstallDir)
+cd /D "$(tclDir)win"
+nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) core shell dlls
+nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) install-binaries install-libraries
+</NMakeBuildCommandLine>
+  </PropertyGroup>
+
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+
+  <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tclDLLName)" Outputs="$(BuildPath)$(tclDLLName)" AfterTargets="Build">
+    <Copy SourceFiles="$(OutDir)\bin\$(tclDLLName)" DestinationFiles="$(BuildPath)$(tclDLLName)" />
+  </Target>
+
+  <Target Name="Clean" />
+  <Target Name="CleanAll">
+    <Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
+    <RemoveDir Directories="$(IntDir)" />
+  </Target>
+</Project>
diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props
new file mode 100644 (file)
index 0000000..9660a9f
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="pyproject.props" />
+  <PropertyGroup>
+    <TclMajorVersion>8</TclMajorVersion>
+    <TclMinorVersion>5</TclMinorVersion>
+    <TclPatchLevel>15</TclPatchLevel>
+    <TclRevision>0</TclRevision>
+    <TkMajorVersion>$(TclMajorVersion)</TkMajorVersion>
+    <TkMinorVersion>$(TclMinorVersion)</TkMinorVersion>
+    <TkPatchLevel>$(TclPatchLevel)</TkPatchLevel>
+    <TkRevision>$(TclRevision)</TkRevision>
+    <TixMajorVersion>8</TixMajorVersion>
+    <TixMinorVersion>4</TixMinorVersion>
+    <TixPatchLevel>3</TixPatchLevel>
+    <TixRevision>5</TixRevision>
+    <tclDir>$(ExternalsDir)tcl-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\</tclDir>
+    <tkDir>$(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\</tkDir>
+    <tixDir>$(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\</tixDir>
+    <tcltkDir>$(ExternalsDir)tcltk\</tcltkDir>
+    <tcltkDir Condition="'$(Platform)' == 'x64'">$(ExternalsDir)tcltk64\</tcltkDir>
+    <TclDebugExt Condition="'$(Configuration)' == 'Debug'">g</TclDebugExt>
+    <tclDLLName>tcl$(TclMajorVersion)$(TclMinorVersion)$(TclDebugExt).dll</tclDLLName>
+    <tclLibName>tcl$(TclMajorVersion)$(TclMinorVersion)$(TclDebugExt).lib</tclLibName>
+    <tclShExeName>tclsh$(TclMajorVersion)$(TclMinorVersion)$(TclDebugExt).exe</tclShExeName>
+    <tkDLLName>tk$(TkMajorVersion)$(TkMinorVersion)$(TclDebugExt).dll</tkDLLName>
+    <tkLibName>tk$(TkMajorVersion)$(TkMinorVersion)$(TclDebugExt).lib</tkLibName>
+    <tixDLLName>tix$(TixMajorVersion)$(TixMinorVersion)$(TclDebugExt).dll</tixDLLName>
+    <tixDLLPath>$(tcltkDir)lib\tix$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel)\$(tixDLLName)</tixDLLPath>
+    <tcltkLib>$(tcltkDir)lib\tcl$(TclMajorVersion)$(TclMinorVersion)$(TclDebugExt).lib;$(tcltkDir)lib\tk$(TkMajorVersion)$(TkMinorVersion)$(TclDebugExt).lib</tcltkLib>
+    <TclMachine>IX86</TclMachine>
+    <TclMachine Condition="'$(Platform)' == 'x64'">AMD64</TclMachine>
+    <TclVersions>TCL_MAJOR_VERSION=$(TclMajorVersion) TCL_MINOR_VERSION=$(TclMinorVersion) TCL_PATCH_LEVEL=$(TclPatchLevel)</TclVersions>
+    <TclShortVersions>TCL_MAJOR=$(TclMajorVersion) TCL_MINOR=$(TclMinorVersion) TCL_PATCH=$(TclPatchLevel)</TclShortVersions>
+    <TkVersions>TK_MAJOR_VERSION=$(TkMajorVersion) TK_MINOR_VERSION=$(TkMinorVersion) TK_PATCH_LEVEL=$(TkPatchLevel)</TkVersions>
+
+    <BuildDirTop>Release</BuildDirTop>
+    <BuildDirTop Condition="$(Configuration) == 'Debug'">Debug</BuildDirTop>
+    <BuildDirTop Condition="$(TclMachine) != 'IX86'">$(BuildDirTop)_$(TclMachine)</BuildDirTop>
+    <!-- This completely breaks building Tix for any toolset but v90 and should be fixed -->
+    <BuildDirTop>$(BuildDirTop)_VC9</BuildDirTop>
+  </PropertyGroup>
+</Project>
diff --git a/PCbuild/tix.vcxproj b/PCbuild/tix.vcxproj
new file mode 100644 (file)
index 0000000..5d2a66f
--- /dev/null
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}</ProjectGuid>
+    <RootNamespace>tix</RootNamespace>
+  </PropertyGroup>
+
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <Import Project="tcltk.props" />
+
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <OutDir>$(tcltkDir)</OutDir>
+    <TargetPath>$(tixDLLPath)</TargetPath>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ExpectedOutputs Include="$(TargetPath)" />
+  </ItemGroup>
+
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+  <PropertyGroup>
+    <TkOpts>msvcrt</TkOpts>
+    <TkOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TkOpts>
+    <TixDirs>BUILDDIRTOP="$(BuildDirTop)" TCL_DIR="$(tclDir.TrimEnd(`\`))" TK_DIR="$(tkDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TixDirs>
+    <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUG=1 NODEBUG=0 TCL_DBGX=g DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
+    <DebugFlags Condition="'$(Configuration)' != 'Debug'">DEBUG=0 NODEBUG=1</DebugFlags>
+    <NMakeBuildCommandLine>setlocal
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
+')
+goto :eof
+:build
+set VCINSTALLDIR=$(VCInstallDir)
+cd /D "$(tixDir)win"
+nmake /nologo -f makefile.vc MACHINE=$(TclMachine) $(DebugFlags) $(TclShortVersions) $(TixDirs) all install
+</NMakeBuildCommandLine>
+    <NMakeCleanCommandLine>rmdir /q/s "$(OutDir.TrimEnd(`\`))"</NMakeCleanCommandLine>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="tcl.vcxproj">
+      <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="tk.vcxproj">
+      <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+
+  <Target Name="Clean" />
+  <Target Name="CleanAll">
+    <RemoveDir Directories="$(OutDir)" />
+    <RemoveDir Directories="$(IntDir)" />
+  </Target>
+</Project>
diff --git a/PCbuild/tk.vcxproj b/PCbuild/tk.vcxproj
new file mode 100644 (file)
index 0000000..36f4f50
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}</ProjectGuid>
+    <RootNamespace>tk</RootNamespace>
+  </PropertyGroup>
+
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <Import Project="tcltk.props" />
+
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <OutDir>$(tcltkDir)</OutDir>
+    <TargetPath>$(OutDir)bin\$(tkDLLName)</TargetPath>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ExpectedOutputs Include="
+        $(OutDir)bin\$(tkDLLName);
+        $(OutDir)include\tk.h;
+        $(OutDir)lib\$(tkLibName);
+        $(OutDir)lib\tk$(TkMajorVersion).$(TkMinorVersion)" />
+  </ItemGroup>
+
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+  <PropertyGroup>
+    <TkOpts>msvcrt</TkOpts>
+    <TkOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TkOpts>
+    <TkDirs>TCLDIR="$(tclDir.TrimEnd(`\`))" INSTALLDIR="$(OutDir.TrimEnd(`\`))"</TkDirs>
+    <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
+    <NMakeBuildCommandLine>setlocal
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
+')
+goto :eof
+:build
+set VCINSTALLDIR=$(VCInstallDir)
+cd /D "$(tkDir)win"
+nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) all
+nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) install-binaries install-libraries
+</NMakeBuildCommandLine>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="tcl.vcxproj">
+      <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+
+  <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tkDLLName)" Outputs="$(BuildPath)$(tkDLLName)" AfterTargets="Build">
+    <Copy SourceFiles="$(OutDir)\bin\$(tkDLLName)" DestinationFiles="$(BuildPath)$(tkDLLName)" />
+  </Target>
+
+  <Target Name="Clean" />
+  <Target Name="CleanAll">
+    <Delete Files="$(TargetPath);$(BuildPath)$(tkDLLName)" />
+    <RemoveDir Directories="$(IntDir)" />
+  </Target>
+</Project>
diff --git a/PCbuild/unicodedata.vcproj b/PCbuild/unicodedata.vcproj
deleted file mode 100644 (file)
index 59682a1..0000000
+++ /dev/null
@@ -1,533 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="unicodedata"\r
-       ProjectGUID="{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"\r
-       RootNamespace="unicodedata"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               BaseAddress="0x1D120000"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\unicodedata_db.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\Modules\unicodename_db.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\Modules\unicodedata.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/unicodedata.vcxproj b/PCbuild/unicodedata.vcxproj
new file mode 100644 (file)
index 0000000..92df09b
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}</ProjectGuid>
+    <RootNamespace>unicodedata</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <BaseAddress>0x1D120000</BaseAddress>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\unicodedata_db.h" />
+    <ClInclude Include="..\Modules\unicodename_db.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\unicodedata.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/unicodedata.vcxproj.filters b/PCbuild/unicodedata.vcxproj.filters
new file mode 100644 (file)
index 0000000..eec7e97
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{b939a8f1-ccd7-420a-974a-243606dccd74}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{e2c055bb-ec62-4bbc-aa1c-d88da4d4ad1c}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Modules\unicodedata_db.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\Modules\unicodename_db.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Modules\unicodedata.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/vs9to8.py b/PCbuild/vs9to8.py
deleted file mode 100644 (file)
index a4e6801..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-from __future__ import with_statement
-import os
-
-def vs9to8(src, dest):
-    for name in os.listdir(src):
-        path, ext = os.path.splitext(name)
-        if ext.lower() not in ('.sln', '.vcproj', '.vsprops'):
-            continue
-
-        filename = os.path.normpath(os.path.join(src, name))
-        destname = os.path.normpath(os.path.join(dest, name))
-        print("%s -> %s" % (filename, destname))
-
-        with open(filename, 'rU') as fin:
-            lines = fin.read()
-            lines = lines.replace('Version="9,00"', 'Version="8.00"')
-            lines = lines.replace('Version="9.00"', 'Version="8.00"')
-            lines = lines.replace('Format Version 10.00', 'Format Version 9.00')
-            lines = lines.replace('Visual Studio 2008', 'Visual Studio 2005')
-
-            lines = lines.replace('wininst-9.0', 'wininst-8.0')
-            lines = lines.replace('..\\', '..\\..\\')
-            lines = lines.replace('..\\..\\..\\..\\', '..\\..\\..\\')
-
-            # Bah. VS8.0 does not expand macros in file names.
-            # Replace them here.
-            lines = lines.replace('$(sqlite3Dir)', '..\\..\\..\\sqlite-3.6.21')
-            lines = lines.replace('$(bsddbDir)\\..\\..', '..\\..\\..\\db-4.7.25.0\\build_windows\\..')
-            lines = lines.replace('$(bsddbDir)', '..\\..\\..\\db-4.7.25.0\\build_windows')
-
-        with open(destname, 'wb') as fout:
-            lines = lines.replace("\n", "\r\n")
-            fout.write(lines)
-
-if __name__ == "__main__":
-    vs9to8(src=".", dest="../PC/VS8.0")
diff --git a/PCbuild/w9xpopen.vcproj b/PCbuild/w9xpopen.vcproj
deleted file mode 100644 (file)
index 05d8f81..0000000
+++ /dev/null
@@ -1,576 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="w9xpopen"\r
-       ProjectGUID="{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}"\r
-       RootNamespace="w9xpopen"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               GenerateDebugInformation="false"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               GenerateDebugInformation="false"\r
-                               SubSystem="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               GenerateDebugInformation="false"\r
-                               SubSystem="1"\r
-                               ImportLibrary=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               GenerateDebugInformation="false"\r
-                               SubSystem="1"\r
-                               ImportLibrary=""\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               GenerateDebugInformation="false"\r
-                               SubSystem="1"\r
-                               ImportLibrary=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="2"\r
-                               InlineFunctionExpansion="1"\r
-                               StringPooling="true"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               GenerateDebugInformation="false"\r
-                               SubSystem="1"\r
-                               ImportLibrary=""\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\w9xpopen.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/w9xpopen.vcxproj b/PCbuild/w9xpopen.vcxproj
new file mode 100644 (file)
index 0000000..4dd9cca
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}</ProjectGuid>
+    <RootNamespace>w9xpopen</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+    <SupportPGO>false</SupportPGO>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <Optimization>MaxSpeed</Optimization>
+      <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\w9xpopen.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/w9xpopen.vcxproj.filters b/PCbuild/w9xpopen.vcxproj.filters
new file mode 100644 (file)
index 0000000..d185226
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{abc2dffd-3f2a-47bd-b89b-0314c99ef21e}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\w9xpopen.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/winsound.vcproj b/PCbuild/winsound.vcproj
deleted file mode 100644 (file)
index 69470cc..0000000
+++ /dev/null
@@ -1,523 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="winsound"\r
-       ProjectGUID="{28B5D777-DDF2-4B6B-B34F-31D938813856}"\r
-       RootNamespace="winsound"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="196613"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-               <Platform\r
-                       Name="x64"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGInstrument|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="PGUpdate|x64"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
-                       CharacterSet="0"\r
-                       WholeProgramOptimization="1"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TargetEnvironment="3"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="winmm.lib"\r
-                               TargetMachine="17"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\PC\winsound.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/PCbuild/winsound.vcxproj b/PCbuild/winsound.vcxproj
new file mode 100644 (file)
index 0000000..211e676
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|Win32">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGInstrument|x64">
+      <Configuration>PGInstrument</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|Win32">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="PGUpdate|x64">
+      <Configuration>PGUpdate</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{28B5D777-DDF2-4B6B-B34F-31D938813856}</ProjectGuid>
+    <RootNamespace>winsound</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="python.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>NotSet</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <PropertyGroup>
+    <TargetExt>.pyd</TargetExt>
+  </PropertyGroup>
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="pyproject.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <Link>
+      <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\winsound.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="pythoncore.vcxproj">
+      <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/PCbuild/winsound.vcxproj.filters b/PCbuild/winsound.vcxproj.filters
new file mode 100644 (file)
index 0000000..0705a8a
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\PC\winsound.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+</Project>
diff --git a/PCbuild/x64.vsprops b/PCbuild/x64.vsprops
deleted file mode 100644 (file)
index 9f88d44..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioPropertySheet\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="amd64"\r
-       OutputDirectory="$(SolutionDir)\amd64\"\r
-       IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-$(ConfigurationName)\$(ProjectName)\"\r
-       >\r
-       <Tool\r
-               Name="VCCLCompilerTool"\r
-               AdditionalOptions="/USECL:MS_OPTERON /GS-"\r
-               PreprocessorDefinitions="_WIN64;_M_X64"\r
-       />\r
-       <Tool\r
-               Name="VCLinkerTool"\r
-               TargetMachine="17"\r
-       />\r
-       <UserMacro\r
-               Name="PythonExe"\r
-               Value="$(HOST_PYTHON)"\r
-       />\r
-</VisualStudioPropertySheet>\r
index d0e4a0e2745ab2f627e52dc6bb1d2773e1cebf47..7e4a300a6f98055b2898c55e40b60e3cce9215de 100644 (file)
@@ -169,7 +169,8 @@ error_ret(struct tok_state *tok) /* XXX */
     tok->decoding_erred = 1;
     if (tok->fp != NULL && tok->buf != NULL) /* see PyTokenizer_Free */
         PyMem_FREE(tok->buf);
-    tok->buf = NULL;
+    tok->buf = tok->cur = tok->end = tok->inp = tok->start = NULL;
+    tok->done = E_DECODE;
     return NULL;                /* as if it were EOF */
 }
 
@@ -235,7 +236,10 @@ get_coding_spec(const char *s, Py_ssize_t size)
 
             if (begin < t) {
                 char* r = new_string(begin, t - begin);
-                char* q = get_normal_name(r);
+                char* q;
+                if (!r)
+                    return NULL;
+                q = get_normal_name(r);
                 if (r != q) {
                     PyMem_FREE(r);
                     r = new_string(q, strlen(q));
@@ -918,7 +922,6 @@ tok_nextc(register struct tok_state *tok)
                 if (tok->buf != NULL)
                     PyMem_FREE(tok->buf);
                 tok->buf = newtok;
-                tok->line_start = tok->buf;
                 tok->cur = tok->buf;
                 tok->line_start = tok->buf;
                 tok->inp = strchr(tok->buf, '\0');
@@ -941,7 +944,8 @@ tok_nextc(register struct tok_state *tok)
                 }
                 if (decoding_fgets(tok->buf, (int)(tok->end - tok->buf),
                           tok) == NULL) {
-                    tok->done = E_EOF;
+                    if (!tok->decoding_erred)
+                        tok->done = E_EOF;
                     done = 1;
                 }
                 else {
@@ -975,6 +979,8 @@ tok_nextc(register struct tok_state *tok)
                     return EOF;
                 }
                 tok->buf = newbuf;
+                tok->cur = tok->buf + cur;
+                tok->line_start = tok->cur;
                 tok->inp = tok->buf + curvalid;
                 tok->end = tok->buf + newsize;
                 tok->start = curstart < 0 ? NULL :
index f0525742eecb0385ace844c17e2d588ed2c25b8f..d99b6763f915cae778cd2e7d7044d62e347b792d 100644 (file)
@@ -538,18 +538,29 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
         }
         return result;
     }
-
+    if (PyString_Check(cmd)) {
+        str = PyString_AS_STRING(cmd);
+        length = PyString_GET_SIZE(cmd);
+    }
 #ifdef Py_USING_UNICODE
-    if (PyUnicode_Check(cmd)) {
+    else if (PyUnicode_Check(cmd)) {
         tmp = PyUnicode_AsUTF8String(cmd);
         if (tmp == NULL)
             return NULL;
-        cmd = tmp;
         cf.cf_flags |= PyCF_SOURCE_IS_UTF8;
+        str = PyString_AS_STRING(tmp);
+        length = PyString_GET_SIZE(tmp);
     }
 #endif
-
-    if (PyObject_AsReadBuffer(cmd, (const void **)&str, &length))
+    else if (!PyObject_AsReadBuffer(cmd, (const void **)&str, &length)) {
+        /* Copy to NUL-terminated buffer. */
+        tmp = PyString_FromStringAndSize(str, length);
+        if (tmp == NULL)
+            return NULL;
+        str = PyString_AS_STRING(tmp);
+        length = PyString_GET_SIZE(tmp);
+    }
+    else
         goto cleanup;
     if ((size_t)length != strlen(str)) {
         PyErr_SetString(PyExc_TypeError,
index fa6bb60517ba112cc554ed9a2bbf24e72988402a..4fcf25eaae6eb45b615f40984758129925d15ba9 100644 (file)
@@ -615,7 +615,7 @@ Py_SetRecursionLimit(int new_limit)
    to guarantee that _Py_CheckRecursiveCall() is regularly called.
    Without USE_STACKCHECK, there is no need for this. */
 int
-_Py_CheckRecursiveCall(char *where)
+_Py_CheckRecursiveCall(const char *where)
 {
     PyThreadState *tstate = PyThreadState_GET();
 
@@ -688,6 +688,100 @@ PyEval_EvalFrame(PyFrameObject *f) {
 PyObject *
 PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
 {
+#ifdef DYNAMIC_EXECUTION_PROFILE
+  #undef USE_COMPUTED_GOTOS
+#endif
+#ifdef HAVE_COMPUTED_GOTOS
+    #ifndef USE_COMPUTED_GOTOS
+    #define USE_COMPUTED_GOTOS 1
+    #endif
+#else
+    #if defined(USE_COMPUTED_GOTOS) && USE_COMPUTED_GOTOS
+    #error "Computed gotos are not supported on this compiler."
+    #endif
+    #undef USE_COMPUTED_GOTOS
+    #define USE_COMPUTED_GOTOS 0
+#endif
+#if USE_COMPUTED_GOTOS
+/* Import the static jump table */
+#include "opcode_targets.h"
+
+  /* This macro is used when several opcodes defer to the same implementation
+   (e.g. SETUP_LOOP, SETUP_FINALLY) */
+#define TARGET_WITH_IMPL(op, impl) \
+        TARGET_##op: \
+        opcode = op; \
+        oparg = NEXTARG(); \
+        case op: \
+        goto impl; \
+
+#define TARGET_WITH_IMPL_NOARG(op, impl) \
+        TARGET_##op: \
+        opcode = op; \
+        case op: \
+        goto impl; \
+
+#define TARGET_NOARG(op) \
+        TARGET_##op: \
+        opcode = op; \
+        case op:\
+
+#define TARGET(op) \
+        TARGET_##op: \
+        opcode = op; \
+        oparg = NEXTARG(); \
+        case op:\
+
+
+#define DISPATCH() \
+        { \
+    int _tick = _Py_Ticker - 1; \
+    _Py_Ticker = _tick; \
+    if (_tick >= 0) { \
+        FAST_DISPATCH(); \
+    } \
+    continue; \
+        }
+
+#ifdef LLTRACE
+#define FAST_DISPATCH() \
+        { \
+    if (!lltrace && !_Py_TracingPossible) { \
+        f->f_lasti = INSTR_OFFSET(); \
+        goto *opcode_targets[*next_instr++]; \
+    } \
+    goto fast_next_opcode; \
+        }
+#else
+#define FAST_DISPATCH() { \
+        if (!_Py_TracingPossible) { \
+            f->f_lasti = INSTR_OFFSET(); \
+            goto *opcode_targets[*next_instr++]; \
+        } \
+        goto fast_next_opcode;\
+}
+#endif
+
+#else
+#define TARGET(op) \
+        case op:
+#define TARGET_WITH_IMPL(op, impl) \
+        /* silence compiler warnings about `impl` unused */ \
+        if (0) goto impl; \
+        case op:\
+
+#define TARGET_NOARG(op) \
+        case op:\
+
+#define TARGET_WITH_IMPL_NOARG(op, impl) \
+        if (0) goto impl; \
+        case op:\
+
+#define DISPATCH() continue
+#define FAST_DISPATCH() goto fast_next_opcode
+#endif
+
+
 #ifdef DXPAIRS
     int lastopcode = 0;
 #endif
@@ -805,14 +899,17 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
     counter updates for both opcodes.
 */
 
-#ifdef DYNAMIC_EXECUTION_PROFILE
+
+#if defined(DYNAMIC_EXECUTION_PROFILE) || USE_COMPUTED_GOTOS
 #define PREDICT(op)             if (0) goto PRED_##op
+#define PREDICTED(op)           PRED_##op:
+#define PREDICTED_WITH_ARG(op)  PRED_##op:
 #else
 #define PREDICT(op)             if (*next_instr == op) goto PRED_##op
-#endif
-
 #define PREDICTED(op)           PRED_##op: next_instr++
 #define PREDICTED_WITH_ARG(op)  PRED_##op: oparg = PEEKARG(); next_instr += 3
+#endif
+
 
 /* Stack manipulation macros */
 
@@ -1108,55 +1205,70 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
 
         /* case STOP_CODE: this is an error! */
 
-        case NOP:
-            goto fast_next_opcode;
+        TARGET_NOARG(NOP)
+        {
+            FAST_DISPATCH();
+        }
 
-        case LOAD_FAST:
+        TARGET(LOAD_FAST)
+        {
             x = GETLOCAL(oparg);
             if (x != NULL) {
                 Py_INCREF(x);
                 PUSH(x);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             format_exc_check_arg(PyExc_UnboundLocalError,
                 UNBOUNDLOCAL_ERROR_MSG,
                 PyTuple_GetItem(co->co_varnames, oparg));
             break;
+        }
 
-        case LOAD_CONST:
+        TARGET(LOAD_CONST)
+        {
             x = GETITEM(consts, oparg);
             Py_INCREF(x);
             PUSH(x);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
         PREDICTED_WITH_ARG(STORE_FAST);
-        case STORE_FAST:
+        TARGET(STORE_FAST)
+        {
             v = POP();
             SETLOCAL(oparg, v);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
-        case POP_TOP:
+        TARGET_NOARG(POP_TOP)
+        {
             v = POP();
             Py_DECREF(v);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
-        case ROT_TWO:
+        TARGET_NOARG(ROT_TWO)
+        {
             v = TOP();
             w = SECOND();
             SET_TOP(w);
             SET_SECOND(v);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
-        case ROT_THREE:
+        TARGET_NOARG(ROT_THREE)
+        {
             v = TOP();
             w = SECOND();
             x = THIRD();
             SET_TOP(w);
             SET_SECOND(x);
             SET_THIRD(v);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
-        case ROT_FOUR:
+        TARGET_NOARG(ROT_FOUR)
+         {
             u = TOP();
             v = SECOND();
             w = THIRD();
@@ -1165,15 +1277,21 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             SET_SECOND(w);
             SET_THIRD(x);
             SET_FOURTH(u);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
-        case DUP_TOP:
+       
+        TARGET_NOARG(DUP_TOP)
+        {
             v = TOP();
             Py_INCREF(v);
             PUSH(v);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
-        case DUP_TOPX:
+
+        TARGET(DUP_TOPX)
+        {
             if (oparg == 2) {
                 x = TOP();
                 Py_INCREF(x);
@@ -1182,7 +1300,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 STACKADJ(2);
                 SET_TOP(x);
                 SET_SECOND(w);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             } else if (oparg == 3) {
                 x = TOP();
                 Py_INCREF(x);
@@ -1194,84 +1312,100 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 SET_TOP(x);
                 SET_SECOND(w);
                 SET_THIRD(v);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             Py_FatalError("invalid argument to DUP_TOPX"
                           " (bytecode corruption?)");
             /* Never returns, so don't bother to set why. */
             break;
+        }
 
-        case UNARY_POSITIVE:
+        TARGET_NOARG(UNARY_POSITIVE)
+        {
             v = TOP();
             x = PyNumber_Positive(v);
             Py_DECREF(v);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case UNARY_NEGATIVE:
+        TARGET_NOARG( UNARY_NEGATIVE)
+        {
             v = TOP();
             x = PyNumber_Negative(v);
             Py_DECREF(v);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case UNARY_NOT:
+        TARGET_NOARG(UNARY_NOT)
+        {
             v = TOP();
             err = PyObject_IsTrue(v);
             Py_DECREF(v);
             if (err == 0) {
                 Py_INCREF(Py_True);
                 SET_TOP(Py_True);
-                continue;
+                DISPATCH();
             }
             else if (err > 0) {
                 Py_INCREF(Py_False);
                 SET_TOP(Py_False);
                 err = 0;
-                continue;
+                DISPATCH();
             }
             STACKADJ(-1);
             break;
+        }
 
-        case UNARY_CONVERT:
+        TARGET_NOARG(UNARY_CONVERT)
+        {
             v = TOP();
             x = PyObject_Repr(v);
             Py_DECREF(v);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case UNARY_INVERT:
+        TARGET_NOARG(UNARY_INVERT)
+        {
             v = TOP();
             x = PyNumber_Invert(v);
             Py_DECREF(v);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_POWER:
+        TARGET_NOARG(BINARY_POWER)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_Power(v, w, Py_None);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_MULTIPLY:
+        TARGET_NOARG(BINARY_MULTIPLY)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_Multiply(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if(x!=NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_DIVIDE:
+        TARGET_NOARG(BINARY_DIVIDE)
+        {
             if (!_Py_QnewFlag) {
                 w = POP();
                 v = TOP();
@@ -1279,32 +1413,37 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 Py_DECREF(v);
                 Py_DECREF(w);
                 SET_TOP(x);
-                if (x != NULL) continue;
+                if (x != NULL) DISPATCH();
                 break;
             }
-            /* -Qnew is in effect:  fall through to
-               BINARY_TRUE_DIVIDE */
-        case BINARY_TRUE_DIVIDE:
+        }
+        /* -Qnew is in effect:  fall through to BINARY_TRUE_DIVIDE */
+        TARGET_NOARG(BINARY_TRUE_DIVIDE)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_TrueDivide(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_FLOOR_DIVIDE:
+        TARGET_NOARG(BINARY_FLOOR_DIVIDE)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_FloorDivide(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_MODULO:
+        TARGET_NOARG(BINARY_MODULO)
+        {
             w = POP();
             v = TOP();
             if (PyString_CheckExact(v))
@@ -1314,10 +1453,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_ADD:
+        TARGET_NOARG(BINARY_ADD)
+        {
             w = POP();
             v = TOP();
             if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
@@ -1346,10 +1487,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
           skip_decref_vx:
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_SUBTRACT:
+        TARGET_NOARG(BINARY_SUBTRACT)
+        {
             w = POP();
             v = TOP();
             if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
@@ -1371,10 +1514,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_SUBSCR:
+        TARGET_NOARG(BINARY_SUBSCR)
+        {
             w = POP();
             v = TOP();
             if (PyList_CheckExact(v) && PyInt_CheckExact(w)) {
@@ -1395,102 +1540,122 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_LSHIFT:
+        TARGET_NOARG(BINARY_LSHIFT)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_Lshift(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_RSHIFT:
+        TARGET_NOARG(BINARY_RSHIFT)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_Rshift(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_AND:
+        TARGET_NOARG(BINARY_AND)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_And(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_XOR:
+        TARGET_NOARG(BINARY_XOR)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_Xor(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case BINARY_OR:
+        TARGET_NOARG(BINARY_OR)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_Or(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case LIST_APPEND:
+        TARGET(LIST_APPEND)
+        {
             w = POP();
             v = PEEK(oparg);
             err = PyList_Append(v, w);
             Py_DECREF(w);
             if (err == 0) {
                 PREDICT(JUMP_ABSOLUTE);
-                continue;
+                DISPATCH();
             }
             break;
+        }
 
-        case SET_ADD:
+        TARGET(SET_ADD)
+        {
             w = POP();
             v = stack_pointer[-oparg];
             err = PySet_Add(v, w);
             Py_DECREF(w);
             if (err == 0) {
                 PREDICT(JUMP_ABSOLUTE);
-                continue;
+                DISPATCH();
             }
             break;
+        }
 
-        case INPLACE_POWER:
+        TARGET_NOARG(INPLACE_POWER)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlacePower(v, w, Py_None);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_MULTIPLY:
+        TARGET_NOARG(INPLACE_MULTIPLY)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceMultiply(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_DIVIDE:
+        TARGET_NOARG(INPLACE_DIVIDE)
+        {
             if (!_Py_QnewFlag) {
                 w = POP();
                 v = TOP();
@@ -1498,42 +1663,50 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 Py_DECREF(v);
                 Py_DECREF(w);
                 SET_TOP(x);
-                if (x != NULL) continue;
+                if (x != NULL) DISPATCH();
                 break;
             }
+        }
             /* -Qnew is in effect:  fall through to
                INPLACE_TRUE_DIVIDE */
-        case INPLACE_TRUE_DIVIDE:
+        TARGET_NOARG(INPLACE_TRUE_DIVIDE)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceTrueDivide(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_FLOOR_DIVIDE:
+        TARGET_NOARG(INPLACE_FLOOR_DIVIDE)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceFloorDivide(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_MODULO:
+        TARGET_NOARG(INPLACE_MODULO)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceRemainder(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_ADD:
+        TARGET_NOARG(INPLACE_ADD)
+        {
             w = POP();
             v = TOP();
             if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
@@ -1560,10 +1733,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
           skip_decref_v:
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_SUBTRACT:
+        TARGET_NOARG(INPLACE_SUBTRACT)
+        {
             w = POP();
             v = TOP();
             if (PyInt_CheckExact(v) && PyInt_CheckExact(w)) {
@@ -1583,63 +1758,78 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_LSHIFT:
+        TARGET_NOARG(INPLACE_LSHIFT)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceLshift(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_RSHIFT:
+        TARGET_NOARG(INPLACE_RSHIFT)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceRshift(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_AND:
+        TARGET_NOARG(INPLACE_AND)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceAnd(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_XOR:
+        TARGET_NOARG(INPLACE_XOR)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceXor(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case INPLACE_OR:
+        TARGET_NOARG(INPLACE_OR)
+        {
             w = POP();
             v = TOP();
             x = PyNumber_InPlaceOr(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
+
 
-        case SLICE+0:
-        case SLICE+1:
-        case SLICE+2:
-        case SLICE+3:
+     
+        TARGET_WITH_IMPL_NOARG(SLICE, _slice)
+        TARGET_WITH_IMPL_NOARG(SLICE_1, _slice)
+        TARGET_WITH_IMPL_NOARG(SLICE_2, _slice)
+        TARGET_WITH_IMPL_NOARG(SLICE_3, _slice)
+        _slice:
+        {
             if ((opcode-SLICE) & 2)
                 w = POP();
             else
@@ -1654,13 +1844,17 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_XDECREF(v);
             Py_XDECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case STORE_SLICE+0:
-        case STORE_SLICE+1:
-        case STORE_SLICE+2:
-        case STORE_SLICE+3:
+     
+        TARGET_WITH_IMPL_NOARG(STORE_SLICE, _store_slice)
+        TARGET_WITH_IMPL_NOARG(STORE_SLICE_1, _store_slice)
+        TARGET_WITH_IMPL_NOARG(STORE_SLICE_2, _store_slice)
+        TARGET_WITH_IMPL_NOARG(STORE_SLICE_3, _store_slice)
+        _store_slice:
+        {
             if ((opcode-STORE_SLICE) & 2)
                 w = POP();
             else
@@ -1676,13 +1870,17 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(u);
             Py_XDECREF(v);
             Py_XDECREF(w);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case DELETE_SLICE+0:
-        case DELETE_SLICE+1:
-        case DELETE_SLICE+2:
-        case DELETE_SLICE+3:
+
+        TARGET_WITH_IMPL_NOARG(DELETE_SLICE, _delete_slice)
+        TARGET_WITH_IMPL_NOARG(DELETE_SLICE_1, _delete_slice)
+        TARGET_WITH_IMPL_NOARG(DELETE_SLICE_2, _delete_slice)
+        TARGET_WITH_IMPL_NOARG(DELETE_SLICE_3, _delete_slice)
+        _delete_slice:
+        {
             if ((opcode-DELETE_SLICE) & 2)
                 w = POP();
             else
@@ -1697,10 +1895,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(u);
             Py_XDECREF(v);
             Py_XDECREF(w);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case STORE_SUBSCR:
+        TARGET_NOARG(STORE_SUBSCR)
+        {
             w = TOP();
             v = SECOND();
             u = THIRD();
@@ -1710,10 +1910,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(u);
             Py_DECREF(v);
             Py_DECREF(w);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case DELETE_SUBSCR:
+        TARGET_NOARG(DELETE_SUBSCR)
+        {
             w = TOP();
             v = SECOND();
             STACKADJ(-2);
@@ -1721,10 +1923,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             err = PyObject_DelItem(v, w);
             Py_DECREF(v);
             Py_DECREF(w);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case PRINT_EXPR:
+        TARGET_NOARG(PRINT_EXPR)
+        {
             v = POP();
             w = PySys_GetObject("displayhook");
             if (w == NULL) {
@@ -1747,12 +1951,16 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_XDECREF(x);
             break;
+        }
 
-        case PRINT_ITEM_TO:
+        TARGET_NOARG(PRINT_ITEM_TO)
+        {
             w = stream = POP();
             /* fall through to PRINT_ITEM */
+        }
 
-        case PRINT_ITEM:
+        TARGET_NOARG(PRINT_ITEM)
+        {
             v = POP();
             if (stream == NULL || stream == Py_None) {
                 w = PySys_GetObject("stdout");
@@ -1798,16 +2006,20 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_XDECREF(stream);
             stream = NULL;
-            if (err == 0)
-                continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case PRINT_NEWLINE_TO:
+        TARGET_NOARG(PRINT_NEWLINE_TO)
+        {
             w = stream = POP();
             /* fall through to PRINT_NEWLINE */
+        }
 
-        case PRINT_NEWLINE:
-            if (stream == NULL || stream == Py_None) {
+        TARGET_NOARG(PRINT_NEWLINE)
+        {
+            if (stream == NULL || stream == Py_None)
+            {
                 w = PySys_GetObject("stdout");
                 if (w == NULL) {
                     PyErr_SetString(PyExc_RuntimeError,
@@ -1827,12 +2039,14 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_XDECREF(stream);
             stream = NULL;
             break;
-
+        }
 
 #ifdef CASE_TOO_BIG
         default: switch (opcode) {
 #endif
-        case RAISE_VARARGS:
+
+        TARGET(RAISE_VARARGS)
+            {
             u = v = w = NULL;
             switch (oparg) {
             case 3:
@@ -1853,28 +2067,37 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 break;
             }
             break;
+            }
 
-        case LOAD_LOCALS:
-            if ((x = f->f_locals) != NULL) {
+        TARGET_NOARG(LOAD_LOCALS)
+        {
+            if ((x = f->f_locals) != NULL)
+            {
                 Py_INCREF(x);
                 PUSH(x);
-                continue;
+                DISPATCH();
             }
             PyErr_SetString(PyExc_SystemError, "no locals");
             break;
+        }
 
-        case RETURN_VALUE:
+        TARGET_NOARG(RETURN_VALUE)
+        {
             retval = POP();
             why = WHY_RETURN;
             goto fast_block_end;
+        }
 
-        case YIELD_VALUE:
+        TARGET_NOARG(YIELD_VALUE)
+        {
             retval = POP();
             f->f_stacktop = stack_pointer;
             why = WHY_YIELD;
             goto fast_yield;
+        }
 
-        case EXEC_STMT:
+        TARGET_NOARG(EXEC_STMT)
+        {
             w = TOP();
             v = SECOND();
             u = THIRD();
@@ -1886,8 +2109,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_DECREF(w);
             break;
+        }
 
-        case POP_BLOCK:
+        TARGET_NOARG(POP_BLOCK)
+        {
             {
                 PyTryBlock *b = PyFrame_BlockPop(f);
                 while (STACK_LEVEL() > b->b_level) {
@@ -1895,10 +2120,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                     Py_DECREF(v);
                 }
             }
-            continue;
+            DISPATCH();
+        }
 
         PREDICTED(END_FINALLY);
-        case END_FINALLY:
+        TARGET_NOARG(END_FINALLY)
+        {
             v = POP();
             if (PyInt_Check(v)) {
                 why = (enum why_code) PyInt_AS_LONG(v);
@@ -1922,8 +2149,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             }
             Py_DECREF(v);
             break;
+        }
 
-        case BUILD_CLASS:
+        TARGET_NOARG(BUILD_CLASS)
+        {
             u = TOP();
             v = SECOND();
             w = THIRD();
@@ -1934,8 +2163,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_DECREF(w);
             break;
+        }
 
-        case STORE_NAME:
+        TARGET(STORE_NAME)
+        {
             w = GETITEM(names, oparg);
             v = POP();
             if ((x = f->f_locals) != NULL) {
@@ -1944,7 +2175,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 else
                     err = PyObject_SetItem(x, w, v);
                 Py_DECREF(v);
-                if (err == 0) continue;
+                if (err == 0) DISPATCH();
                 break;
             }
             t = PyObject_Repr(w);
@@ -1955,8 +2186,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                          PyString_AS_STRING(t));
             Py_DECREF(t);
             break;
+        }
 
-        case DELETE_NAME:
+        TARGET(DELETE_NAME)
+        {
             w = GETITEM(names, oparg);
             if ((x = f->f_locals) != NULL) {
                 if ((err = PyObject_DelItem(x, w)) != 0)
@@ -1973,9 +2206,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                          PyString_AS_STRING(w));
             Py_DECREF(t);
             break;
+        }
 
         PREDICTED_WITH_ARG(UNPACK_SEQUENCE);
-        case UNPACK_SEQUENCE:
+        TARGET(UNPACK_SEQUENCE)
+        {
             v = POP();
             if (PyTuple_CheckExact(v) &&
                 PyTuple_GET_SIZE(v) == oparg) {
@@ -1987,7 +2222,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                     PUSH(w);
                 }
                 Py_DECREF(v);
-                continue;
+                DISPATCH();
             } else if (PyList_CheckExact(v) &&
                        PyList_GET_SIZE(v) == oparg) {
                 PyObject **items = \
@@ -2006,8 +2241,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             }
             Py_DECREF(v);
             break;
+        }
+
 
-        case STORE_ATTR:
+        TARGET(STORE_ATTR)
+        {
             w = GETITEM(names, oparg);
             v = TOP();
             u = SECOND();
@@ -2015,33 +2253,42 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             err = PyObject_SetAttr(v, w, u); /* v.w = u */
             Py_DECREF(v);
             Py_DECREF(u);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case DELETE_ATTR:
+        TARGET(DELETE_ATTR)
+        {
             w = GETITEM(names, oparg);
             v = POP();
             err = PyObject_SetAttr(v, w, (PyObject *)NULL);
                                             /* del v.w */
             Py_DECREF(v);
             break;
+        }
 
-        case STORE_GLOBAL:
+
+        TARGET(STORE_GLOBAL)
+        {
             w = GETITEM(names, oparg);
             v = POP();
             err = PyDict_SetItem(f->f_globals, w, v);
             Py_DECREF(v);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case DELETE_GLOBAL:
+        TARGET(DELETE_GLOBAL)
+        {
             w = GETITEM(names, oparg);
             if ((err = PyDict_DelItem(f->f_globals, w)) != 0)
                 format_exc_check_arg(
                     PyExc_NameError, GLOBAL_NAME_ERROR_MSG, w);
             break;
+        }
 
-        case LOAD_NAME:
+        TARGET(LOAD_NAME)
+        {
             w = GETITEM(names, oparg);
             if ((v = f->f_locals) == NULL) {
                 why = WHY_EXCEPTION;
@@ -2081,9 +2328,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 Py_INCREF(x);
             }
             PUSH(x);
-            continue;
+            DISPATCH();
+        }
 
-        case LOAD_GLOBAL:
+        TARGET(LOAD_GLOBAL)
+        {
             w = GETITEM(names, oparg);
             if (PyString_CheckExact(w)) {
                 /* Inline the PyDict_GetItem() calls.
@@ -2103,7 +2352,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                     if (x != NULL) {
                         Py_INCREF(x);
                         PUSH(x);
-                        continue;
+                        DISPATCH();
                     }
                     d = (PyDictObject *)(f->f_builtins);
                     e = d->ma_lookup(d, w, hash);
@@ -2115,7 +2364,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                     if (x != NULL) {
                         Py_INCREF(x);
                         PUSH(x);
-                        continue;
+                        DISPATCH();
                     }
                     goto load_global_error;
                 }
@@ -2134,13 +2383,15 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             }
             Py_INCREF(x);
             PUSH(x);
-            continue;
+            DISPATCH();
+        }
 
-        case DELETE_FAST:
+        TARGET(DELETE_FAST)
+        {
             x = GETLOCAL(oparg);
             if (x != NULL) {
                 SETLOCAL(oparg, NULL);
-                continue;
+                DISPATCH();
             }
             format_exc_check_arg(
                 PyExc_UnboundLocalError,
@@ -2148,20 +2399,24 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 PyTuple_GetItem(co->co_varnames, oparg)
                 );
             break;
+        }
 
-        case LOAD_CLOSURE:
+        TARGET(LOAD_CLOSURE)
+        {
             x = freevars[oparg];
             Py_INCREF(x);
             PUSH(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case LOAD_DEREF:
+        TARGET(LOAD_DEREF)
+        {
             x = freevars[oparg];
             w = PyCell_Get(x);
             if (w != NULL) {
                 PUSH(w);
-                continue;
+                DISPATCH();
             }
             err = -1;
             /* Don't stomp existing exception */
@@ -2181,15 +2436,19 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                                      UNBOUNDFREE_ERROR_MSG, v);
             }
             break;
+        }
 
-        case STORE_DEREF:
+        TARGET(STORE_DEREF)
+        {
             w = POP();
             x = freevars[oparg];
             PyCell_Set(x, w);
             Py_DECREF(w);
-            continue;
+            DISPATCH();
+        }
 
-        case BUILD_TUPLE:
+        TARGET(BUILD_TUPLE)
+        {
             x = PyTuple_New(oparg);
             if (x != NULL) {
                 for (; --oparg >= 0;) {
@@ -2197,11 +2456,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                     PyTuple_SET_ITEM(x, oparg, w);
                 }
                 PUSH(x);
-                continue;
+                DISPATCH();
             }
             break;
+        }
 
-        case BUILD_LIST:
+        TARGET(BUILD_LIST)
+        {
             x =  PyList_New(oparg);
             if (x != NULL) {
                 for (; --oparg >= 0;) {
@@ -2209,11 +2470,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                     PyList_SET_ITEM(x, oparg, w);
                 }
                 PUSH(x);
-                continue;
+                DISPATCH();
             }
             break;
+        }
 
-        case BUILD_SET:
+        TARGET(BUILD_SET)
+        {
             x = PySet_New(NULL);
             if (x != NULL) {
                 for (; --oparg >= 0;) {
@@ -2227,18 +2490,21 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                     break;
                 }
                 PUSH(x);
-                continue;
+                DISPATCH();
             }
             break;
+        }
 
-
-        case BUILD_MAP:
+        TARGET(BUILD_MAP)
+        {
             x = _PyDict_NewPresized((Py_ssize_t)oparg);
             PUSH(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case STORE_MAP:
+        TARGET_NOARG(STORE_MAP)
+        {
             w = TOP();     /* key */
             u = SECOND();  /* value */
             v = THIRD();   /* dict */
@@ -2247,10 +2513,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             err = PyDict_SetItem(v, w, u);  /* v[w] = u */
             Py_DECREF(u);
             Py_DECREF(w);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case MAP_ADD:
+        TARGET(MAP_ADD)
+        {
             w = TOP();     /* key */
             u = SECOND();  /* value */
             STACKADJ(-2);
@@ -2261,20 +2529,24 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(w);
             if (err == 0) {
                 PREDICT(JUMP_ABSOLUTE);
-                continue;
+                DISPATCH();
             }
             break;
+        }
 
-        case LOAD_ATTR:
+        TARGET(LOAD_ATTR)
+        {
             w = GETITEM(names, oparg);
             v = TOP();
             x = PyObject_GetAttr(v, w);
             Py_DECREF(v);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case COMPARE_OP:
+        TARGET(COMPARE_OP)
+        {
             w = POP();
             v = TOP();
             if (PyInt_CheckExact(w) && PyInt_CheckExact(v)) {
@@ -2307,9 +2579,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             if (x == NULL) break;
             PREDICT(POP_JUMP_IF_FALSE);
             PREDICT(POP_JUMP_IF_TRUE);
-            continue;
+            DISPATCH();
+        }
 
-        case IMPORT_NAME:
+        TARGET(IMPORT_NAME)
+        {
             w = GETITEM(names, oparg);
             x = PyDict_GetItemString(f->f_builtins, "__import__");
             if (x == NULL) {
@@ -2350,10 +2624,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             READ_TIMESTAMP(intr1);
             Py_DECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case IMPORT_STAR:
+        TARGET_NOARG(IMPORT_STAR)
+        {
             v = POP();
             PyFrame_FastToLocals(f);
             if ((x = f->f_locals) == NULL) {
@@ -2366,34 +2642,40 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             READ_TIMESTAMP(intr1);
             PyFrame_LocalsToFast(f, 0);
             Py_DECREF(v);
-            if (err == 0) continue;
+            if (err == 0) DISPATCH();
             break;
+        }
 
-        case IMPORT_FROM:
+        TARGET(IMPORT_FROM)
+        {
             w = GETITEM(names, oparg);
             v = TOP();
             READ_TIMESTAMP(intr0);
             x = import_from(v, w);
             READ_TIMESTAMP(intr1);
             PUSH(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case JUMP_FORWARD:
+        TARGET(JUMP_FORWARD)
+        {
             JUMPBY(oparg);
-            goto fast_next_opcode;
+            FAST_DISPATCH();
+        }
 
         PREDICTED_WITH_ARG(POP_JUMP_IF_FALSE);
-        case POP_JUMP_IF_FALSE:
+        TARGET(POP_JUMP_IF_FALSE)
+        {
             w = POP();
             if (w == Py_True) {
                 Py_DECREF(w);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             if (w == Py_False) {
                 Py_DECREF(w);
                 JUMPTO(oparg);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             Py_DECREF(w);
@@ -2403,19 +2685,21 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 JUMPTO(oparg);
             else
                 break;
-            continue;
+            DISPATCH();
+        }
 
         PREDICTED_WITH_ARG(POP_JUMP_IF_TRUE);
-        case POP_JUMP_IF_TRUE:
+        TARGET(POP_JUMP_IF_TRUE)
+        {
             w = POP();
             if (w == Py_False) {
                 Py_DECREF(w);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             if (w == Py_True) {
                 Py_DECREF(w);
                 JUMPTO(oparg);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             Py_DECREF(w);
@@ -2427,18 +2711,20 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 ;
             else
                 break;
-            continue;
+            DISPATCH();
+        }
 
-        case JUMP_IF_FALSE_OR_POP:
+        TARGET(JUMP_IF_FALSE_OR_POP)
+        {
             w = TOP();
             if (w == Py_True) {
                 STACKADJ(-1);
                 Py_DECREF(w);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             if (w == Py_False) {
                 JUMPTO(oparg);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             if (err > 0) {
@@ -2450,18 +2736,20 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 JUMPTO(oparg);
             else
                 break;
-            continue;
+            DISPATCH();
+        }
 
-        case JUMP_IF_TRUE_OR_POP:
+        TARGET(JUMP_IF_TRUE_OR_POP)
+        {
             w = TOP();
             if (w == Py_False) {
                 STACKADJ(-1);
                 Py_DECREF(w);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             if (w == Py_True) {
                 JUMPTO(oparg);
-                goto fast_next_opcode;
+                FAST_DISPATCH();
             }
             err = PyObject_IsTrue(w);
             if (err > 0) {
@@ -2474,10 +2762,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             }
             else
                 break;
-            continue;
+            DISPATCH();
+        }
 
         PREDICTED_WITH_ARG(JUMP_ABSOLUTE);
-        case JUMP_ABSOLUTE:
+        TARGET(JUMP_ABSOLUTE)
+        {
             JUMPTO(oparg);
 #if FAST_LOOPS
             /* Enabling this path speeds-up all while and for-loops by bypassing
@@ -2489,10 +2779,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             */
             goto fast_next_opcode;
 #else
-            continue;
+            DISPATCH();
 #endif
+        }
 
-        case GET_ITER:
+        TARGET_NOARG(GET_ITER)
+        {
             /* before: [obj]; after [getiter(obj)] */
             v = TOP();
             x = PyObject_GetIter(v);
@@ -2500,13 +2792,15 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             if (x != NULL) {
                 SET_TOP(x);
                 PREDICT(FOR_ITER);
-                continue;
+                DISPATCH();
             }
             STACKADJ(-1);
             break;
+        }
 
         PREDICTED_WITH_ARG(FOR_ITER);
-        case FOR_ITER:
+        TARGET(FOR_ITER)
+        {
             /* before: [iter]; after: [iter, iter()] *or* [] */
             v = TOP();
             x = (*v->ob_type->tp_iternext)(v);
@@ -2514,7 +2808,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 PUSH(x);
                 PREDICT(STORE_FAST);
                 PREDICT(UNPACK_SEQUENCE);
-                continue;
+                DISPATCH();
             }
             if (PyErr_Occurred()) {
                 if (!PyErr_ExceptionMatches(
@@ -2526,13 +2820,17 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             x = v = POP();
             Py_DECREF(v);
             JUMPBY(oparg);
-            continue;
+            DISPATCH();
+        }
 
-        case BREAK_LOOP:
+        TARGET_NOARG(BREAK_LOOP)
+        {
             why = WHY_BREAK;
             goto fast_block_end;
+        }
 
-        case CONTINUE_LOOP:
+        TARGET(CONTINUE_LOOP)
+        {
             retval = PyInt_FromLong(oparg);
             if (!retval) {
                 x = NULL;
@@ -2540,10 +2838,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             }
             why = WHY_CONTINUE;
             goto fast_block_end;
+        }
 
-        case SETUP_LOOP:
-        case SETUP_EXCEPT:
-        case SETUP_FINALLY:
+        TARGET_WITH_IMPL(SETUP_LOOP, _setup_finally)
+        TARGET_WITH_IMPL(SETUP_EXCEPT, _setup_finally)
+        TARGET(SETUP_FINALLY)
+        _setup_finally:
+        {
             /* NOTE: If you add any new block-setup opcodes that
                are not try/except/finally handlers, you may need
                to update the PyGen_NeedsFinalizing() function.
@@ -2551,9 +2852,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
 
             PyFrame_BlockSetup(f, opcode, INSTR_OFFSET() + oparg,
                                STACK_LEVEL());
-            continue;
+            DISPATCH();
+        }
+
 
-        case SETUP_WITH:
+
+        TARGET(SETUP_WITH)
+        {
         {
             static PyObject *exit, *enter;
             w = TOP();
@@ -2579,10 +2884,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                                STACK_LEVEL());
 
             PUSH(x);
-            continue;
+                DISPATCH();
+            }
         }
 
-        case WITH_CLEANUP:
+        TARGET_NOARG(WITH_CLEANUP)
         {
             /* At the top of the stack are 1-3 values indicating
                how/why we entered the finally clause:
@@ -2670,7 +2976,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             break;
         }
 
-        case CALL_FUNCTION:
+        TARGET(CALL_FUNCTION)
         {
             PyObject **sp;
             PCALL(PCALL_ALL);
@@ -2682,14 +2988,14 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
 #endif
             stack_pointer = sp;
             PUSH(x);
-            if (x != NULL)
-                continue;
+            if (x != NULL) DISPATCH();
             break;
         }
 
-        case CALL_FUNCTION_VAR:
-        case CALL_FUNCTION_KW:
-        case CALL_FUNCTION_VAR_KW:
+        TARGET_WITH_IMPL(CALL_FUNCTION_VAR, _call_function_var_kw)
+        TARGET_WITH_IMPL(CALL_FUNCTION_KW, _call_function_var_kw)
+        TARGET(CALL_FUNCTION_VAR_KW)
+        _call_function_var_kw:
         {
             int na = oparg & 0xff;
             int nk = (oparg>>8) & 0xff;
@@ -2727,12 +3033,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
                 Py_DECREF(w);
             }
             PUSH(x);
-            if (x != NULL)
-                continue;
+            if (x != NULL) DISPATCH();
             break;
         }
 
-        case MAKE_FUNCTION:
+
+        TARGET(MAKE_FUNCTION)
+        {
             v = POP(); /* code object */
             x = PyFunction_New(v, f->f_globals);
             Py_DECREF(v);
@@ -2753,8 +3060,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             }
             PUSH(x);
             break;
+        }
 
-        case MAKE_CLOSURE:
+        TARGET(MAKE_CLOSURE)
         {
             v = POP(); /* code object */
             x = PyFunction_New(v, f->f_globals);
@@ -2789,7 +3097,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             break;
         }
 
-        case BUILD_SLICE:
+        TARGET(BUILD_SLICE)
+        {
             if (oparg == 3)
                 w = POP();
             else
@@ -2801,14 +3110,20 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             Py_DECREF(v);
             Py_XDECREF(w);
             SET_TOP(x);
-            if (x != NULL) continue;
+            if (x != NULL) DISPATCH();
             break;
+        }
 
-        case EXTENDED_ARG:
+        TARGET(EXTENDED_ARG)
+        {
             opcode = NEXTOP();
             oparg = oparg<<16 | NEXTARG();
             goto dispatch_opcode;
+        }
 
+#if USE_COMPUTED_GOTOS
+        _unknown_opcode:
+#endif
         default:
             fprintf(stderr,
                 "XXX lineno: %d, opcode: %d\n",
index a901d6de032f84eef7a026d26738365227255534..d672362c4ce49715f85b021c6d98ac0e9034fc41 100644 (file)
@@ -217,20 +217,15 @@ PyObject *codec_getitem(const char *encoding, int index)
     return v;
 }
 
-/* Helper function to create an incremental codec. */
-
+/* Helper functions to create an incremental codec. */
 static
-PyObject *codec_getincrementalcodec(const char *encoding,
-                                    const char *errors,
-                                    const char *attrname)
+PyObject *codec_makeincrementalcodec(PyObject *codec_info,
+                                     const char *errors,
+                                     const char *attrname)
 {
-    PyObject *codecs, *ret, *inccodec;
+    PyObject *ret, *inccodec;
 
-    codecs = _PyCodec_Lookup(encoding);
-    if (codecs == NULL)
-        return NULL;
-    inccodec = PyObject_GetAttrString(codecs, attrname);
-    Py_DECREF(codecs);
+    inccodec = PyObject_GetAttrString(codec_info, attrname);
     if (inccodec == NULL)
         return NULL;
     if (errors)
@@ -241,6 +236,21 @@ PyObject *codec_getincrementalcodec(const char *encoding,
     return ret;
 }
 
+static
+PyObject *codec_getincrementalcodec(const char *encoding,
+                                    const char *errors,
+                                    const char *attrname)
+{
+    PyObject *codec_info, *ret;
+
+    codec_info = _PyCodec_Lookup(encoding);
+    if (codec_info == NULL)
+        return NULL;
+    ret = codec_makeincrementalcodec(codec_info, errors, attrname);
+    Py_DECREF(codec_info);
+    return ret;
+}
+
 /* Helper function to create a stream codec. */
 
 static
@@ -264,6 +274,24 @@ PyObject *codec_getstreamcodec(const char *encoding,
     return streamcodec;
 }
 
+/* Helpers to work with the result of _PyCodec_Lookup
+
+ */
+PyObject *_PyCodecInfo_GetIncrementalDecoder(PyObject *codec_info,
+                                             const char *errors)
+{
+    return codec_makeincrementalcodec(codec_info, errors,
+                                      "incrementaldecoder");
+}
+
+PyObject *_PyCodecInfo_GetIncrementalEncoder(PyObject *codec_info,
+                                             const char *errors)
+{
+    return codec_makeincrementalcodec(codec_info, errors,
+                                      "incrementalencoder");
+}
+
+
 /* Convenience APIs to query the Codec registry.
 
    All APIs return a codec object with incremented refcount.
@@ -311,18 +339,15 @@ PyObject *PyCodec_StreamWriter(const char *encoding,
 
    errors is passed to the encoder factory as argument if non-NULL. */
 
-PyObject *PyCodec_Encode(PyObject *object,
-                         const char *encoding,
-                         const char *errors)
+static PyObject *
+_PyCodec_EncodeInternal(PyObject *object,
+                        PyObject *encoder,
+                        const char *encoding,
+                        const char *errors)
 {
-    PyObject *encoder = NULL;
     PyObject *args = NULL, *result = NULL;
     PyObject *v;
 
-    encoder = PyCodec_Encoder(encoding);
-    if (encoder == NULL)
-        goto onError;
-
     args = args_tuple(object, errors);
     if (args == NULL)
         goto onError;
@@ -358,18 +383,15 @@ PyObject *PyCodec_Encode(PyObject *object,
 
    errors is passed to the decoder factory as argument if non-NULL. */
 
-PyObject *PyCodec_Decode(PyObject *object,
-                         const char *encoding,
-                         const char *errors)
+static PyObject *
+_PyCodec_DecodeInternal(PyObject *object,
+                        PyObject *decoder,
+                        const char *encoding,
+                        const char *errors)
 {
-    PyObject *decoder = NULL;
     PyObject *args = NULL, *result = NULL;
     PyObject *v;
 
-    decoder = PyCodec_Decoder(encoding);
-    if (decoder == NULL)
-        goto onError;
-
     args = args_tuple(object, errors);
     if (args == NULL)
         goto onError;
@@ -399,6 +421,139 @@ PyObject *PyCodec_Decode(PyObject *object,
     return NULL;
 }
 
+/* Generic encoding/decoding API */
+PyObject *PyCodec_Encode(PyObject *object,
+                         const char *encoding,
+                         const char *errors)
+{
+    PyObject *encoder;
+
+    encoder = PyCodec_Encoder(encoding);
+    if (encoder == NULL)
+        return NULL;
+
+    return _PyCodec_EncodeInternal(object, encoder, encoding, errors);
+}
+
+PyObject *PyCodec_Decode(PyObject *object,
+                         const char *encoding,
+                         const char *errors)
+{
+    PyObject *decoder;
+
+    decoder = PyCodec_Decoder(encoding);
+    if (decoder == NULL)
+        return NULL;
+
+    return _PyCodec_DecodeInternal(object, decoder, encoding, errors);
+}
+
+/* Text encoding/decoding API */
+PyObject * _PyCodec_LookupTextEncoding(const char *encoding,
+                                       const char *alternate_command)
+{
+    PyObject *codec;
+    PyObject *attr;
+    int is_text_codec;
+
+    codec = _PyCodec_Lookup(encoding);
+    if (codec == NULL)
+        return NULL;
+
+    /* Backwards compatibility: assume any raw tuple describes a text
+     * encoding, and the same for anything lacking the private
+     * attribute.
+     */
+    if (Py_Py3kWarningFlag && !PyTuple_CheckExact(codec)) {
+        attr = PyObject_GetAttrString(codec, "_is_text_encoding");
+        if (attr == NULL) {
+            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+                goto onError;
+            PyErr_Clear();
+        } else {
+            is_text_codec = PyObject_IsTrue(attr);
+            Py_DECREF(attr);
+            if (is_text_codec < 0)
+                goto onError;
+            if (!is_text_codec) {
+                PyObject *msg = PyString_FromFormat(
+                            "'%.400s' is not a text encoding; "
+                            "use %s to handle arbitrary codecs",
+                            encoding, alternate_command);
+                if (msg == NULL)
+                    goto onError;
+                if (PyErr_WarnPy3k(PyString_AS_STRING(msg), 1) < 0) {
+                    Py_DECREF(msg);
+                    goto onError;
+                }
+                Py_DECREF(msg);
+            }
+        }
+    }
+
+    /* This appears to be a valid text encoding */
+    return codec;
+
+ onError:
+    Py_DECREF(codec);
+    return NULL;
+}
+
+
+static
+PyObject *codec_getitem_checked(const char *encoding,
+                                const char *alternate_command,
+                                int index)
+{
+    PyObject *codec;
+    PyObject *v;
+
+    codec = _PyCodec_LookupTextEncoding(encoding, alternate_command);
+    if (codec == NULL)
+        return NULL;
+
+    v = PyTuple_GET_ITEM(codec, index);
+    Py_INCREF(v);
+    Py_DECREF(codec);
+    return v;
+}
+
+static PyObject * _PyCodec_TextEncoder(const char *encoding)
+{
+    return codec_getitem_checked(encoding, "codecs.encode()", 0);
+}
+
+static PyObject * _PyCodec_TextDecoder(const char *encoding)
+{
+    return codec_getitem_checked(encoding, "codecs.decode()", 1);
+}
+
+PyObject *_PyCodec_EncodeText(PyObject *object,
+                              const char *encoding,
+                              const char *errors)
+{
+    PyObject *encoder;
+
+    encoder = _PyCodec_TextEncoder(encoding);
+    if (encoder == NULL)
+        return NULL;
+
+    return _PyCodec_EncodeInternal(object, encoder, encoding, errors);
+}
+
+PyObject *_PyCodec_DecodeText(PyObject *object,
+                              const char *encoding,
+                              const char *errors)
+{
+    PyObject *decoder;
+
+    decoder = _PyCodec_TextDecoder(encoding);
+    if (decoder == NULL)
+        return NULL;
+
+    return _PyCodec_DecodeInternal(object, decoder, encoding, errors);
+}
+
 /* Register the error handling callback function error under the name
    name. This function will be called by the codec when it encounters
    an unencodable characters/undecodable bytes and doesn't know the
@@ -472,15 +627,16 @@ PyObject *PyCodec_StrictErrors(PyObject *exc)
 PyObject *PyCodec_IgnoreErrors(PyObject *exc)
 {
     Py_ssize_t end;
-    if (PyObject_IsInstance(exc, PyExc_UnicodeEncodeError)) {
+
+    if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
         if (PyUnicodeEncodeError_GetEnd(exc, &end))
             return NULL;
     }
-    else if (PyObject_IsInstance(exc, PyExc_UnicodeDecodeError)) {
+    else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
         if (PyUnicodeDecodeError_GetEnd(exc, &end))
             return NULL;
     }
-    else if (PyObject_IsInstance(exc, PyExc_UnicodeTranslateError)) {
+    else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) {
         if (PyUnicodeTranslateError_GetEnd(exc, &end))
             return NULL;
     }
@@ -500,7 +656,7 @@ PyObject *PyCodec_ReplaceErrors(PyObject *exc)
     Py_ssize_t end;
     Py_ssize_t i;
 
-    if (PyObject_IsInstance(exc, PyExc_UnicodeEncodeError)) {
+    if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
         PyObject *res;
         Py_UNICODE *p;
         if (PyUnicodeEncodeError_GetStart(exc, &start))
@@ -517,13 +673,13 @@ PyObject *PyCodec_ReplaceErrors(PyObject *exc)
         Py_DECREF(res);
         return restuple;
     }
-    else if (PyObject_IsInstance(exc, PyExc_UnicodeDecodeError)) {
+    else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
         Py_UNICODE res = Py_UNICODE_REPLACEMENT_CHARACTER;
         if (PyUnicodeDecodeError_GetEnd(exc, &end))
             return NULL;
         return Py_BuildValue("(u#n)", &res, (Py_ssize_t)1, end);
     }
-    else if (PyObject_IsInstance(exc, PyExc_UnicodeTranslateError)) {
+    else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) {
         PyObject *res;
         Py_UNICODE *p;
         if (PyUnicodeTranslateError_GetStart(exc, &start))
@@ -548,7 +704,7 @@ PyObject *PyCodec_ReplaceErrors(PyObject *exc)
 
 PyObject *PyCodec_XMLCharRefReplaceErrors(PyObject *exc)
 {
-    if (PyObject_IsInstance(exc, PyExc_UnicodeEncodeError)) {
+    if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
         PyObject *restuple;
         PyObject *object;
         Py_ssize_t start;
@@ -673,7 +829,7 @@ static Py_UNICODE hexdigits[] = {
 
 PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
 {
-    if (PyObject_IsInstance(exc, PyExc_UnicodeEncodeError)) {
+    if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
         PyObject *restuple;
         PyObject *object;
         Py_ssize_t start;
index 1f59c8c9a4d2758e9de30250e428a3ac759a16c4..290075763a69e1f03335fcbec0641732ba13f0b1 100644 (file)
@@ -1979,9 +1979,12 @@ compiler_import(struct compiler *c, stmt_ty s)
             identifier tmp = alias->name;
             const char *base = PyString_AS_STRING(alias->name);
             char *dot = strchr(base, '.');
-            if (dot)
+            if (dot) {
                 tmp = PyString_FromStringAndSize(base,
                                                  dot - base);
+                if (tmp == NULL)
+                    return 0;
+            }
             r = compiler_nameop(c, tmp, Store);
             if (dot) {
                 Py_DECREF(tmp);
@@ -2931,9 +2934,9 @@ expr_constant(expr_ty e)
        BLOCK
    finally:
        if an exception was raised:
-       exc = copy of (exception, instance, traceback)
+           exc = copy of (exception, instance, traceback)
        else:
-       exc = (None, None, None)
+           exc = (None, None, None)
        exit(*exc)
  */
 static int
diff --git a/Python/makeopcodetargets.py b/Python/makeopcodetargets.py
new file mode 100755 (executable)
index 0000000..fcbf5ef
--- /dev/null
@@ -0,0 +1,45 @@
+#! /usr/bin/env python
+"""Generate C code for the jump table of the threaded code interpreter
+(for compilers supporting computed gotos or "labels-as-values", such as gcc).
+"""
+
+# This code should stay compatible with Python 2.3, at least while
+# some of the buildbots have Python 2.3 as their system Python.
+
+import imp
+import os
+
+
+def find_module(modname):
+    """Finds and returns a module in the local dist/checkout.
+    """
+    modpath = os.path.join(
+        os.path.dirname(os.path.dirname(__file__)), "Lib")
+    return imp.load_module(modname, *imp.find_module(modname, [modpath]))
+
+def write_contents(f):
+    """Write C code contents to the target file object.
+    """
+    opcode = find_module("opcode")
+    targets = ['_unknown_opcode'] * 256
+    for opname, op in opcode.opmap.items():
+        if opname == "STOP_CODE":
+            continue
+        targets[op] = "TARGET_%s" % opname.replace("+0", " ").replace("+", "_")
+    f.write("static void *opcode_targets[256] = {\n")
+    f.write(",\n".join(["    &&%s" % s for s in targets]))
+    f.write("\n};\n")
+
+
+if __name__ == "__main__":
+    import sys
+    assert len(sys.argv) < 3, "Too many arguments"
+    if len(sys.argv) == 2:
+        target = sys.argv[1]
+    else:
+        target = "Python/opcode_targets.h"
+    f = open(target, "w")
+    try:
+        write_contents(f)
+    finally:
+        f.close()
diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h
new file mode 100644 (file)
index 0000000..95eb127
--- /dev/null
@@ -0,0 +1,258 @@
+static void *opcode_targets[256] = {
+    &&_unknown_opcode,
+    &&TARGET_POP_TOP,
+    &&TARGET_ROT_TWO,
+    &&TARGET_ROT_THREE,
+    &&TARGET_DUP_TOP,
+    &&TARGET_ROT_FOUR,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&TARGET_NOP,
+    &&TARGET_UNARY_POSITIVE,
+    &&TARGET_UNARY_NEGATIVE,
+    &&TARGET_UNARY_NOT,
+    &&TARGET_UNARY_CONVERT,
+    &&_unknown_opcode,
+    &&TARGET_UNARY_INVERT,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&TARGET_BINARY_POWER,
+    &&TARGET_BINARY_MULTIPLY,
+    &&TARGET_BINARY_DIVIDE,
+    &&TARGET_BINARY_MODULO,
+    &&TARGET_BINARY_ADD,
+    &&TARGET_BINARY_SUBTRACT,
+    &&TARGET_BINARY_SUBSCR,
+    &&TARGET_BINARY_FLOOR_DIVIDE,
+    &&TARGET_BINARY_TRUE_DIVIDE,
+    &&TARGET_INPLACE_FLOOR_DIVIDE,
+    &&TARGET_INPLACE_TRUE_DIVIDE,
+    &&TARGET_SLICE ,
+    &&TARGET_SLICE_1,
+    &&TARGET_SLICE_2,
+    &&TARGET_SLICE_3,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&TARGET_STORE_SLICE ,
+    &&TARGET_STORE_SLICE_1,
+    &&TARGET_STORE_SLICE_2,
+    &&TARGET_STORE_SLICE_3,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&TARGET_DELETE_SLICE ,
+    &&TARGET_DELETE_SLICE_1,
+    &&TARGET_DELETE_SLICE_2,
+    &&TARGET_DELETE_SLICE_3,
+    &&TARGET_STORE_MAP,
+    &&TARGET_INPLACE_ADD,
+    &&TARGET_INPLACE_SUBTRACT,
+    &&TARGET_INPLACE_MULTIPLY,
+    &&TARGET_INPLACE_DIVIDE,
+    &&TARGET_INPLACE_MODULO,
+    &&TARGET_STORE_SUBSCR,
+    &&TARGET_DELETE_SUBSCR,
+    &&TARGET_BINARY_LSHIFT,
+    &&TARGET_BINARY_RSHIFT,
+    &&TARGET_BINARY_AND,
+    &&TARGET_BINARY_XOR,
+    &&TARGET_BINARY_OR,
+    &&TARGET_INPLACE_POWER,
+    &&TARGET_GET_ITER,
+    &&_unknown_opcode,
+    &&TARGET_PRINT_EXPR,
+    &&TARGET_PRINT_ITEM,
+    &&TARGET_PRINT_NEWLINE,
+    &&TARGET_PRINT_ITEM_TO,
+    &&TARGET_PRINT_NEWLINE_TO,
+    &&TARGET_INPLACE_LSHIFT,
+    &&TARGET_INPLACE_RSHIFT,
+    &&TARGET_INPLACE_AND,
+    &&TARGET_INPLACE_XOR,
+    &&TARGET_INPLACE_OR,
+    &&TARGET_BREAK_LOOP,
+    &&TARGET_WITH_CLEANUP,
+    &&TARGET_LOAD_LOCALS,
+    &&TARGET_RETURN_VALUE,
+    &&TARGET_IMPORT_STAR,
+    &&TARGET_EXEC_STMT,
+    &&TARGET_YIELD_VALUE,
+    &&TARGET_POP_BLOCK,
+    &&TARGET_END_FINALLY,
+    &&TARGET_BUILD_CLASS,
+    &&TARGET_STORE_NAME,
+    &&TARGET_DELETE_NAME,
+    &&TARGET_UNPACK_SEQUENCE,
+    &&TARGET_FOR_ITER,
+    &&TARGET_LIST_APPEND,
+    &&TARGET_STORE_ATTR,
+    &&TARGET_DELETE_ATTR,
+    &&TARGET_STORE_GLOBAL,
+    &&TARGET_DELETE_GLOBAL,
+    &&TARGET_DUP_TOPX,
+    &&TARGET_LOAD_CONST,
+    &&TARGET_LOAD_NAME,
+    &&TARGET_BUILD_TUPLE,
+    &&TARGET_BUILD_LIST,
+    &&TARGET_BUILD_SET,
+    &&TARGET_BUILD_MAP,
+    &&TARGET_LOAD_ATTR,
+    &&TARGET_COMPARE_OP,
+    &&TARGET_IMPORT_NAME,
+    &&TARGET_IMPORT_FROM,
+    &&TARGET_JUMP_FORWARD,
+    &&TARGET_JUMP_IF_FALSE_OR_POP,
+    &&TARGET_JUMP_IF_TRUE_OR_POP,
+    &&TARGET_JUMP_ABSOLUTE,
+    &&TARGET_POP_JUMP_IF_FALSE,
+    &&TARGET_POP_JUMP_IF_TRUE,
+    &&TARGET_LOAD_GLOBAL,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&TARGET_CONTINUE_LOOP,
+    &&TARGET_SETUP_LOOP,
+    &&TARGET_SETUP_EXCEPT,
+    &&TARGET_SETUP_FINALLY,
+    &&_unknown_opcode,
+    &&TARGET_LOAD_FAST,
+    &&TARGET_STORE_FAST,
+    &&TARGET_DELETE_FAST,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&TARGET_RAISE_VARARGS,
+    &&TARGET_CALL_FUNCTION,
+    &&TARGET_MAKE_FUNCTION,
+    &&TARGET_BUILD_SLICE,
+    &&TARGET_MAKE_CLOSURE,
+    &&TARGET_LOAD_CLOSURE,
+    &&TARGET_LOAD_DEREF,
+    &&TARGET_STORE_DEREF,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&TARGET_CALL_FUNCTION_VAR,
+    &&TARGET_CALL_FUNCTION_KW,
+    &&TARGET_CALL_FUNCTION_VAR_KW,
+    &&TARGET_SETUP_WITH,
+    &&_unknown_opcode,
+    &&TARGET_EXTENDED_ARG,
+    &&TARGET_SET_ADD,
+    &&TARGET_MAP_ADD,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode,
+    &&_unknown_opcode
+};
index ade5efee0c478338267cb10b47135d2c3a593972..ece709c337e7a4166527d88e92f7a911e4381838 100644 (file)
@@ -137,6 +137,20 @@ add_flag(int flag, const char *envs)
     return flag;
 }
 
+static int
+isatty_no_error(PyObject *sys_stream)
+{
+    PyObject *sys_isatty = PyObject_CallMethod(sys_stream, "isatty", "");
+    if (sys_isatty) {
+        int isatty = PyObject_IsTrue(sys_isatty);
+        Py_DECREF(sys_isatty);
+        if (isatty >= 0)
+            return isatty;
+    }
+    PyErr_Clear();
+    return 0;
+}
+
 void
 Py_InitializeEx(int install_sigs)
 {
@@ -150,7 +164,7 @@ Py_InitializeEx(int install_sigs)
     char *errors = NULL;
     int free_codeset = 0;
     int overridden = 0;
-    PyObject *sys_stream, *sys_isatty;
+    PyObject *sys_stream;
 #if defined(Py_USING_UNICODE) && defined(HAVE_LANGINFO_H) && defined(CODESET)
     char *saved_locale, *loc_codeset;
 #endif
@@ -336,40 +350,25 @@ Py_InitializeEx(int install_sigs)
 
     if (codeset) {
         sys_stream = PySys_GetObject("stdin");
-        sys_isatty = PyObject_CallMethod(sys_stream, "isatty", "");
-        if (!sys_isatty)
-            PyErr_Clear();
-        if ((overridden ||
-             (sys_isatty && PyObject_IsTrue(sys_isatty))) &&
-           PyFile_Check(sys_stream)) {
+        if ((overridden || isatty_no_error(sys_stream)) &&
+            PyFile_Check(sys_stream)) {
             if (!PyFile_SetEncodingAndErrors(sys_stream, icodeset, errors))
                 Py_FatalError("Cannot set codeset of stdin");
         }
-        Py_XDECREF(sys_isatty);
 
         sys_stream = PySys_GetObject("stdout");
-        sys_isatty = PyObject_CallMethod(sys_stream, "isatty", "");
-        if (!sys_isatty)
-            PyErr_Clear();
-        if ((overridden ||
-             (sys_isatty && PyObject_IsTrue(sys_isatty))) &&
-           PyFile_Check(sys_stream)) {
+        if ((overridden || isatty_no_error(sys_stream)) &&
+            PyFile_Check(sys_stream)) {
             if (!PyFile_SetEncodingAndErrors(sys_stream, codeset, errors))
                 Py_FatalError("Cannot set codeset of stdout");
         }
-        Py_XDECREF(sys_isatty);
 
         sys_stream = PySys_GetObject("stderr");
-        sys_isatty = PyObject_CallMethod(sys_stream, "isatty", "");
-        if (!sys_isatty)
-            PyErr_Clear();
-        if((overridden ||
-            (sys_isatty && PyObject_IsTrue(sys_isatty))) &&
-           PyFile_Check(sys_stream)) {
+        if ((overridden || isatty_no_error(sys_stream)) &&
+            PyFile_Check(sys_stream)) {
             if (!PyFile_SetEncodingAndErrors(sys_stream, codeset, errors))
                 Py_FatalError("Cannot set codeset of stderr");
         }
-        Py_XDECREF(sys_isatty);
 
         if (free_codeset)
             free(codeset);
index d94f89a562c63cd2bf2e274c0aa7982d4d87f67f..50f4ac972d118d3e13c2c230030a81ac34ba7105 100644 (file)
@@ -93,7 +93,11 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
     return 0;
 }
 
-#elif HAVE_GETENTROPY
+/* Issue #25003: Don' use getentropy() on Solaris (available since
+ * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
+#elif defined(HAVE_GETENTROPY) && !defined(sun)
+#define PY_GETENTROPY 1
+
 /* Fill buffer with size pseudo-random bytes generated by getentropy().
    Return 0 on success, or raise an exception and return -1 on error.
    If fatal is nonzero, call Py_FatalError() instead of raising an exception
@@ -333,7 +337,7 @@ _PyOS_URandom(void *buffer, Py_ssize_t size)
 
 #ifdef MS_WINDOWS
     return win32_urandom((unsigned char *)buffer, size, 1);
-#elif HAVE_GETENTROPY
+#elif defined(PY_GETENTROPY)
     return py_getentropy(buffer, size, 0);
 #else
 # ifdef __VMS
@@ -396,7 +400,7 @@ _PyRandom_Init(void)
         (void)win32_urandom((unsigned char *)secret, secret_size, 0);
 #elif __VMS
         vms_urandom((unsigned char *)secret, secret_size, 0);
-#elif HAVE_GETENTROPY
+#elif defined(PY_GETENTROPY)
         (void)py_getentropy(secret, secret_size, 1);
 #else
         dev_urandom_noraise(secret, secret_size);
@@ -412,7 +416,7 @@ _PyRandom_Fini(void)
         CryptReleaseContext(hCryptProv, 0);
         hCryptProv = 0;
     }
-#elif HAVE_GETENTROPY
+#elif defined(PY_GETENTROPY)
     /* nothing to clean */
 #else
     dev_urandom_close();
diff --git a/README b/README
index 252d90ea5cbc8889fdeb009077c92e0413373fd7..16b7a468e15dd68ac21595ce5fb07ae0f2910763 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This is Python version 2.7.10
+This is Python version 2.7.11
 =============================
 
 Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
@@ -173,6 +173,11 @@ rebuilt.  In this case, you may have to run make again to correctly
 build your desired target.  The interpreter executable is built in the
 top level directory.
 
+If you need an optimized version of Python, you type "make profile-opt"
+in the top level directory. This will rebuild the interpreter executable
+using Profile Guided Optimization (PGO). For more details, see the
+section below.
+
 Once you have built a Python interpreter, see the subsections below on
 testing and installation.  If you run into trouble, see the next
 section.
@@ -185,6 +190,30 @@ guidance of the setup.py script, which is run by Make after the
 interpreter has been built.
 
 
+Profile Guided Optimization
+---------------------------
+
+PGO takes advantage of recent versions of the GCC or Clang compilers.
+If ran, the "profile-opt" rule will do several steps.
+
+First, the entire Python directory is cleaned of temporary files that
+may resulted in a previous compilation.
+
+Then, an instrumented version of the interpreter is built, using suitable
+compiler flags for each flavour. Note that this is just an intermediary
+step and the binary resulted after this step is not good for real life
+workloads, as it has profiling instructions embedded inside.
+
+After this instrumented version of the interpreter is built, the Makefile
+will automatically run a training workload. This is necessary in order to
+profile the interpreter execution. Note also that any output, both stdout
+and stderr, that may appear at this step is supressed.
+
+Finally, the last step is to rebuild the interpreter, using the information
+collected in the previous one. The end result will be a the Python binary
+that is optimized and suitable for distribution or production installation.
+
+
 Troubleshooting
 ---------------
 
diff --git a/Tools/buildbot/README.tcltk-AMD64 b/Tools/buildbot/README.tcltk-AMD64
deleted file mode 100644 (file)
index edc89eb..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-Comments on building tcl/tk for AMD64 with the MS SDK compiler
-==============================================================
-
-I did have to build tcl/tk manually.
-
-First, I had to build the nmakehlp.exe helper utility manually by executing
-   cl nmakehlp.c /link bufferoverflowU.lib
-in both the tcl8.4.12\win and tk8.4.12\win directories.
-
-Second, the AMD64 compiler refuses to compile the file
-tcl8.4.12\generic\tclExecute.c because it insists on using intrinsics
-for the 'ceil' and 'floor' functions:
-
-  ..\generic\tclExecute.c(394) : error C2099: initializer is not a constant
-  ..\generic\tclExecute.c(398) : error C2099: initializer is not a constant
-
-I did comment out these lines; an alternative would have been to use
-the /Oi- compiler flag to disable the intrinsic functions.
-The commands then used were these:
-
-   svn export http://svn.python.org/projects/external/tcl8.4.12
-   cd tcl8.4.12\win
-   REM
-   echo patch the tcl8.4.12\generic\tclExecute.c file
-   pause 
-   REM
-   cl nmakehlp.c /link bufferoverflowU.lib
-   nmake -f makefile.vc MACHINE=AMD64
-   nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
-   cd ..\..
-   svn export http://svn.python.org/projects/external/tk8.4.12
-   cd tk8.4.12\win
-   cl nmakehlp.c /link bufferoverflowU.lib
-   nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 MACHINE=AMD64
-   nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install
-   cd ..\..
index b5b10d6d4b22cd313cd1ef201db4db2a5f2e63b9..f77407bcf7031c0a59a4c89c6e6f440d79ce49cc 100644 (file)
@@ -1,7 +1,5 @@
-@rem Used by the buildbot "compile" step.\r
-set HOST_PYTHON="%CD%\PCbuild\amd64\python_d.exe"\r
-cmd /c Tools\buildbot\external-amd64.bat\r
-call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64\r
-cmd /c Tools\buildbot\clean-amd64.bat\r
-vcbuild /useenv PCbuild\kill_python.vcproj "Debug|x64" && PCbuild\amd64\kill_python_d.exe\r
-vcbuild PCbuild\pcbuild.sln "Debug|x64"\r
+@rem Formerly used by the buildbot "compile" step.\r
+@echo This script is no longer used and may be removed in the future.\r
+@echo To get the same effect as this script, use\r
+@echo     PCbuild\build.bat -d -e -k -p x64\r
+call "%~dp0build.bat" -p x64 %*\r
index 976ce72b0f9e4c788e3b0e7de661fb5f1625dd8e..3d825fed179237b52563760be9180437f3e0afdc 100644 (file)
@@ -1,7 +1,18 @@
 @rem Used by the buildbot "compile" step.\r
-cmd /c Tools\buildbot\external.bat\r
-call "%VS90COMNTOOLS%vsvars32.bat"\r
-cmd /c Tools\buildbot\clean.bat\r
-vcbuild /useenv PCbuild\kill_python.vcproj "Debug|Win32" && PCbuild\kill_python_d.exe\r
-vcbuild /useenv PCbuild\pcbuild.sln "Debug|Win32"\r
+@setlocal\r
 \r
+@rem Clean up\r
+call "%~dp0clean.bat" %*\r
+\r
+@rem If you need the buildbots to start fresh (such as when upgrading to\r
+@rem a new version of an external library, especially Tcl/Tk):\r
+@rem 1) uncomment the following line:\r
+\r
+@rem    call "%~dp0..\..\PCbuild\get_externals.bat" --clean-only\r
+\r
+@rem 2) commit and push\r
+@rem 3) wait for all Windows bots to start a build with that changeset\r
+@rem 4) re-comment, commit and push again\r
+\r
+@rem Do the build\r
+call "%~dp0..\..\PCbuild\build.bat" -v -e -d -k %*\r
index 0f6b3b4b078d2575bc9e269666b6809e7ad3fb76..b53c7c1038d39151d0c7aad2ee9d07a61eeaa1bd 100644 (file)
@@ -1,10 +1,5 @@
-@rem Used by the buildbot "clean" step.\r
-call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64\r
-@echo Deleting .pyc/.pyo files ...\r
-del /s Lib\*.pyc Lib\*.pyo\r
-@echo Deleting test leftovers ...\r
-rmdir /s /q build\r
-cd PCbuild\r
-vcbuild /clean pcbuild.sln "Release|x64"\r
-vcbuild /clean pcbuild.sln "Debug|x64"\r
-cd ..\r
+@rem Formerly used by the buildbot "clean" step.\r
+@echo This script is no longer used and may be removed in the future.\r
+@echo To get the same effect as this script, use `clean.bat` from this\r
+@echo directory and pass `-p x64` as two arguments.\r
+call "%~dp0clean.bat" -p x64 %*\r
index cf8a6b747ca62773e4aaa561f3dbef064119a02d..0fc68fd727192da84c3abe8fc00fb322dd8c0bf5 100644 (file)
@@ -1,10 +1,16 @@
-@rem Used by the buildbot "clean" step.\r
-call "%VS90COMNTOOLS%vsvars32.bat"\r
-@echo Deleting .pyc/.pyo files ...\r
-del /s Lib\*.pyc Lib\*.pyo\r
-@echo Deleting test leftovers ...\r
-rmdir /s /q build\r
-cd PCbuild\r
-vcbuild /clean pcbuild.sln "Release|Win32"\r
-vcbuild /clean pcbuild.sln "Debug|Win32"\r
-cd ..\r
+@echo off\r
+rem Used by the buildbot "clean" step.\r
+\r
+setlocal\r
+set root=%~dp0..\..\r
+set pcbuild=%root%\PCbuild\r
+\r
+echo Deleting build\r
+call "%pcbuild%\build.bat" -t Clean -k %*\r
+call "%pcbuild%\build.bat" -t Clean -k -d %*\r
+\r
+echo Deleting .pyc/.pyo files ...\r
+del /s "%root%\Lib\*.pyc" "%root%\Lib\*.pyo"\r
+\r
+echo Deleting test leftovers ...\r
+rmdir /s /q "%root%\build"\r
index 16fc40536be2a020850b7d2baa7fd703ba2f6061..bfaef055f54b98195cf2f735d5c62dccc119efb6 100644 (file)
@@ -1,28 +1,3 @@
-@rem Fetches (and builds if necessary) external dependencies\r
-\r
-@rem Assume we start inside the Python source directory\r
-call "Tools\buildbot\external-common.bat"\r
-call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64\r
-\r
-if not exist tcltk64\bin\tcl85g.dll (\r
-    cd tcl-8.5.15.0\win\r
-    nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all\r
-    nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install\r
-    cd ..\..\r
-)\r
-\r
-if not exist tcltk64\bin\tk85g.dll (\r
-    cd tk-8.5.15.0\win\r
-    nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.15.0 clean\r
-    nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.15.0 all\r
-    nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.15.0 install\r
-    cd ..\..\r
-)\r
-\r
-if not exist tcltk64\lib\tix8.4.3\tix84g.dll (\r
-    cd tix-8.4.3.5\win\r
-    nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk64 clean\r
-    nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk64 all\r
-    nmake -f python.mak DEBUG=1 MACHINE=AMD64 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk64 install\r
-    cd ..\..\r
-)\r
+@echo This script is no longer used and may be removed in the future.\r
+@echo Please use PCbuild\get_externals.bat instead.\r
+@"%~dp0..\..\PCbuild\get_externals.bat" %*\r
diff --git a/Tools/buildbot/external-common.bat b/Tools/buildbot/external-common.bat
deleted file mode 100644 (file)
index 12e2517..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-@rem Common file shared between external.bat and external-amd64.bat.  Responsible for\r
-@rem fetching external components into the root\externals directory.\r
-\r
-if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/\r
-\r
-if not exist externals mkdir externals\r
-cd externals\r
-@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment\r
-@rem the following, check it in, then check it out, comment it out, then check it back in.\r
-@rem if exist bzip2-1.0.6 rd /s/q bzip2-1.0.6\r
-@rem if exist tcltk rd /s/q tcltk\r
-@rem if exist tcltk64 rd /s/q tcltk64\r
-@rem if exist tcl8.4.12 rd /s/q tcl8.4.12\r
-@rem if exist tcl8.4.16 rd /s/q tcl8.4.16\r
-@rem if exist tcl-8.4.18.1 rd /s/q tcl-8.4.18.1\r
-@rem if exist tcl-8.5.2.1 rd /s/q tcl-8.5.2.1\r
-@rem if exist tcl-8.5.15.0 rd /s/q tcl-8.5.15.0\r
-@rem if exist tk8.4.12 rd /s/q tk8.4.12\r
-@rem if exist tk8.4.16 rd /s/q tk8.4.16\r
-@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1\r
-@rem if exist tk-8.5.2.0 rd /s/q tk-8.5.2.0\r
-@rem if exist tk-8.5.15.0 rd /s/q tk-8.5.15.0\r
-@rem if exist tix-8.4.3.5 rd /s/q tix-8.4.3.5\r
-@rem if exist db-4.4.20 rd /s/q db-4.4.20\r
-@rem if exist db-4.7.25.0 rd /s/q db-4.7.25.0\r
-@rem if exist openssl-0.9.8y rd /s/q openssl-0.9.8y\r
-@rem if exist openssl-1.0.1g rd /s/q openssl-1.0.1g\r
-@rem if exist openssl-1.0.1h rd /s/q openssl-1.0.1h\r
-@rem if exist openssl-1.0.1i rd /s/q openssl-1.0.1i\r
-@rem if exist openssl-1.0.1j rd /s/q openssl-1.0.1j\r
-@rem if exist openssl-1.0.1l rd /s/q openssl-1.0.1l\r
-@rem if exist openssl-1.0.2a rd /s/q openssl-1.0.2a\r
-@rem if exist sqlite-3.6.21 rd /s/q sqlite-3.6.21\r
-\r
-@rem bzip\r
-if not exist bzip2-1.0.6 (\r
-   rd /s/q bzip2-1.0.5\r
-  svn export %SVNROOT%bzip2-1.0.6\r
-)\r
-\r
-@rem Berkeley DB\r
-if exist db-4.4.20 rd /s/q db-4.4.20\r
-if not exist db-4.7.25.0 svn export %SVNROOT%db-4.7.25.0\r
-\r
-@rem NASM, for OpenSSL build\r
-@rem if exist nasm-2.11.06 rd /s/q nasm-2.11.06\r
-if not exist nasm-2.11.06 svn export %SVNROOT%nasm-2.11.06\r
-\r
-@rem OpenSSL\r
-if exist openssl-1.0.1l rd /s/q openssl-1.0.1l\r
-if not exist openssl-1.0.2a svn export %SVNROOT%openssl-1.0.2a\r
-\r
-@rem tcl/tk\r
-if not exist tcl-8.5.15.0 (\r
-   rd /s/q tcltk tcltk64 tcl-8.5.2.1 tk-8.5.2.0\r
-   svn export %SVNROOT%tcl-8.5.15.0\r
-)\r
-if not exist tk-8.5.15.0 svn export %SVNROOT%tk-8.5.15.0\r
-if not exist tix-8.4.3.5 svn export %SVNROOT%tix-8.4.3.5\r
-\r
-@rem sqlite3\r
-if not exist sqlite-3.6.21 (\r
-  rd /s/q sqlite-source-3.3.4\r
-  svn export %SVNROOT%sqlite-3.6.21\r
-)\r
index 416d5f3e2bdeda816719ae81d83c109b6e262f04..bfaef055f54b98195cf2f735d5c62dccc119efb6 100644 (file)
@@ -1,29 +1,3 @@
-@rem Fetches (and builds if necessary) external dependencies\r
-\r
-@rem Assume we start inside the Python source directory\r
-call "Tools\buildbot\external-common.bat"\r
-call "%VS90COMNTOOLS%\vsvars32.bat"\r
-\r
-if not exist tcltk\bin\tcl85g.dll (\r
-    @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install\r
-    cd tcl-8.5.15.0\win\r
-    nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk clean all\r
-    nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk install\r
-    cd ..\..\r
-)\r
-\r
-if not exist tcltk\bin\tk85g.dll (\r
-    cd tk-8.5.15.0\win\r
-    nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.15.0 clean\r
-    nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.15.0 all\r
-    nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.15.0 install\r
-    cd ..\..\r
-)\r
-\r
-if not exist tcltk\lib\tix8.4.3\tix84g.dll (\r
-    cd tix-8.4.3.5\win\r
-    nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk clean\r
-    nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk all\r
-    nmake -f python.mak DEBUG=1 MACHINE=IX86 TCL_DIR=..\..\tcl-8.5.15.0 TK_DIR=..\..\tk-8.5.15.0 INSTALL_DIR=..\..\tcltk install\r
-    cd ..\..\r
-)\r
+@echo This script is no longer used and may be removed in the future.\r
+@echo Please use PCbuild\get_externals.bat instead.\r
+@"%~dp0..\..\PCbuild\get_externals.bat" %*\r
index c6cfae5649339e7564347ceaf52d955647d2b7d1..e48329c0b30f3c78074380c4fda70c2e98165fc0 100644 (file)
@@ -1,3 +1,6 @@
-@rem Used by the buildbot "test" step.\r
-cd PCbuild\r
-call rt.bat -d -q -x64 -uall -rwW %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+@rem Formerly used by the buildbot "test" step.\r
+@echo This script is no longer used and may be removed in the future.\r
+@echo To get the same effect as this script, use\r
+@echo     PCbuild\rt.bat -q -d -x64 -uall -rwW\r
+@echo or use `test.bat` in this directory and pass `-x64` as an argument.\r
+call "%~dp0test.bat" -x64 %*\r
index e20cf549a8b30e41dac3524b29c3b0a615ff2104..b9dde0111351e128c7244bc32be935847e0c8371 100644 (file)
@@ -1,3 +1,19 @@
-@rem Used by the buildbot "test" step.\r
-cd PCbuild\r
-call rt.bat -d -q -uall -rwW %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+@echo off\r
+rem Used by the buildbot "test" step.\r
+setlocal\r
+\r
+set here=%~dp0\r
+set rt_opts=-q -d\r
+set regrtest_args=\r
+\r
+:CheckOpts\r
+if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts\r
+if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts\r
+if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts\r
+if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts\r
+\r
+echo on\r
+call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW %regrtest_args%\r
index 8c6444cf5ad8669517826295f85a7e205a108d17..10f199c94351d03ebcca5ffd6174449522ef712f 100644 (file)
@@ -118,7 +118,7 @@ def get_extension_defn(moduleName, mapFileName, prefix):
 
     for exc in exclude:
         if exc in module.sourceFiles:
-            modules.sourceFiles.remove(exc)
+            module.sourceFiles.remove(exc)
 
     return module
 
index bbb22d0e45c0066a81bed9f6d845e65e497a5cd3..390ea29259c9933cc7e88910ad381b785c6e61ee 100755 (executable)
@@ -45,6 +45,7 @@ The module also extends gdb with some python-specific commands.
 
 from __future__ import print_function, with_statement
 import gdb
+import locale
 import os
 import sys
 
@@ -76,6 +77,8 @@ Py_TPFLAGS_TYPE_SUBCLASS     = (1 << 31)
 
 MAX_OUTPUT_LEN=1024
 
+ENCODING = locale.getpreferredencoding()
+
 class NullPyObjectPtr(RuntimeError):
     pass
 
@@ -92,6 +95,18 @@ def safe_range(val):
     # threshold in case the data was corrupted
     return xrange(safety_limit(int(val)))
 
+if sys.version_info[0] >= 3:
+    def write_unicode(file, text):
+        file.write(text)
+else:
+    def write_unicode(file, text):
+        # Write a byte or unicode string to file. Unicode strings are encoded to
+        # ENCODING encoding with 'backslashreplace' error handler to avoid
+        # UnicodeEncodeError.
+        if isinstance(text, unicode):
+            text = text.encode(ENCODING, 'backslashreplace')
+        file.write(text)
+
 
 class StringTruncated(RuntimeError):
     pass
@@ -903,7 +918,12 @@ class PyFrameObjectPtr(PyObjectPtr):
         newline character'''
         if self.is_optimized_out():
             return '(frame information optimized out)'
-        with open(self.filename(), 'r') as f:
+        filename = self.filename()
+        try:
+            f = open(filename, 'r')
+        except IOError:
+            return None
+        with f:
             all_lines = f.readlines()
             # Convert from 1-based current_line_num to 0-based list offset:
             return all_lines[self.current_line_num()-1]
@@ -914,9 +934,9 @@ class PyFrameObjectPtr(PyObjectPtr):
             return
         out.write('Frame 0x%x, for file %s, line %i, in %s ('
                   % (self.as_address(),
-                     self.co_filename,
+                     self.co_filename.proxyval(visited),
                      self.current_line_num(),
-                     self.co_name))
+                     self.co_name.proxyval(visited)))
         first = True
         for pyop_name, pyop_value in self.iter_locals():
             if not first:
@@ -929,6 +949,16 @@ class PyFrameObjectPtr(PyObjectPtr):
 
         out.write(')')
 
+    def print_traceback(self):
+        if self.is_optimized_out():
+            sys.stdout.write('  (frame information optimized out)\n')
+            return
+        visited = set()
+        sys.stdout.write('  File "%s", line %i, in %s\n'
+                  % (self.co_filename.proxyval(visited),
+                     self.current_line_num(),
+                     self.co_name.proxyval(visited)))
+
 class PySetObjectPtr(PyObjectPtr):
     _typename = 'PySetObject'
 
@@ -1222,6 +1252,23 @@ class Frame(object):
             iter_frame = iter_frame.newer()
         return index
 
+    # We divide frames into:
+    #   - "python frames":
+    #       - "bytecode frames" i.e. PyEval_EvalFrameEx
+    #       - "other python frames": things that are of interest from a python
+    #         POV, but aren't bytecode (e.g. GC, GIL)
+    #   - everything else
+
+    def is_python_frame(self):
+        '''Is this a PyEval_EvalFrameEx frame, or some other important
+        frame? (see is_other_python_frame for what "important" means in this
+        context)'''
+        if self.is_evalframeex():
+            return True
+        if self.is_other_python_frame():
+            return True
+        return False
+
     def is_evalframeex(self):
         '''Is this a PyEval_EvalFrameEx frame?'''
         if self._gdbframe.name() == 'PyEval_EvalFrameEx':
@@ -1238,6 +1285,50 @@ class Frame(object):
 
         return False
 
+    def is_other_python_frame(self):
+        '''Is this frame worth displaying in python backtraces?
+        Examples:
+          - waiting on the GIL
+          - garbage-collecting
+          - within a CFunction
+         If it is, return a descriptive string
+         For other frames, return False
+         '''
+        if self.is_waiting_for_gil():
+            return 'Waiting for the GIL'
+        elif self.is_gc_collect():
+            return 'Garbage-collecting'
+        else:
+            # Detect invocations of PyCFunction instances:
+            older = self.older()
+            if older and older._gdbframe.name() == 'PyCFunction_Call':
+                # Within that frame:
+                #   "func" is the local containing the PyObject* of the
+                # PyCFunctionObject instance
+                #   "f" is the same value, but cast to (PyCFunctionObject*)
+                #   "self" is the (PyObject*) of the 'self'
+                try:
+                    # Use the prettyprinter for the func:
+                    func = older._gdbframe.read_var('func')
+                    return str(func)
+                except RuntimeError:
+                    return 'PyCFunction invocation (unable to read "func")'
+
+        # This frame isn't worth reporting:
+        return False
+
+    def is_waiting_for_gil(self):
+        '''Is this frame waiting on the GIL?'''
+        # This assumes the _POSIX_THREADS version of Python/ceval_gil.h:
+        name = self._gdbframe.name()
+        if name:
+            return ('PyThread_acquire_lock' in name
+                    and 'lock_PyThread_acquire_lock' not in name)
+
+    def is_gc_collect(self):
+        '''Is this frame "collect" within the garbage-collector?'''
+        return self._gdbframe.name() == 'collect'
+
     def get_pyop(self):
         try:
             f = self._gdbframe.read_var('f')
@@ -1267,8 +1358,22 @@ class Frame(object):
 
     @classmethod
     def get_selected_python_frame(cls):
-        '''Try to obtain the Frame for the python code in the selected frame,
-        or None'''
+        '''Try to obtain the Frame for the python-related code in the selected
+        frame, or None'''
+        frame = cls.get_selected_frame()
+
+        while frame:
+            if frame.is_python_frame():
+                return frame
+            frame = frame.older()
+
+        # Not found:
+        return None
+
+    @classmethod
+    def get_selected_bytecode_frame(cls):
+        '''Try to obtain the Frame for the python bytecode interpreter in the
+        selected GDB frame, or None'''
         frame = cls.get_selected_frame()
 
         while frame:
@@ -1283,14 +1388,38 @@ class Frame(object):
         if self.is_evalframeex():
             pyop = self.get_pyop()
             if pyop:
-                sys.stdout.write('#%i %s\n' % (self.get_index(), pyop.get_truncated_repr(MAX_OUTPUT_LEN)))
+                line = pyop.get_truncated_repr(MAX_OUTPUT_LEN)
+                write_unicode(sys.stdout, '#%i %s\n' % (self.get_index(), line))
                 if not pyop.is_optimized_out():
                     line = pyop.current_line()
-                    sys.stdout.write('    %s\n' % line.strip())
+                    if line is not None:
+                        sys.stdout.write('    %s\n' % line.strip())
             else:
                 sys.stdout.write('#%i (unable to read python frame information)\n' % self.get_index())
         else:
-            sys.stdout.write('#%i\n' % self.get_index())
+            info = self.is_other_python_frame()
+            if info:
+                sys.stdout.write('#%i %s\n' % (self.get_index(), info))
+            else:
+                sys.stdout.write('#%i\n' % self.get_index())
+
+    def print_traceback(self):
+        if self.is_evalframeex():
+            pyop = self.get_pyop()
+            if pyop:
+                pyop.print_traceback()
+                if not pyop.is_optimized_out():
+                    line = pyop.current_line()
+                    if line is not None:
+                        sys.stdout.write('    %s\n' % line.strip())
+            else:
+                sys.stdout.write('  (unable to read python frame information)\n')
+        else:
+            info = self.is_other_python_frame()
+            if info:
+                sys.stdout.write('  %s\n' % info)
+            else:
+                sys.stdout.write('  (not a python frame)\n')
 
 class PyList(gdb.Command):
     '''List the current Python source code, if any
@@ -1326,9 +1455,10 @@ class PyList(gdb.Command):
         if m:
             start, end = map(int, m.groups())
 
-        frame = Frame.get_selected_python_frame()
+        # py-list requires an actual PyEval_EvalFrameEx frame:
+        frame = Frame.get_selected_bytecode_frame()
         if not frame:
-            print('Unable to locate python frame')
+            print('Unable to locate gdb frame for python bytecode interpreter')
             return
 
         pyop = frame.get_pyop()
@@ -1346,7 +1476,13 @@ class PyList(gdb.Command):
         if start<1:
             start = 1
 
-        with open(filename, 'r') as f:
+        try:
+            f = open(filename, 'r')
+        except IOError as err:
+            sys.stdout.write('Unable to open %s: %s\n'
+                             % (filename, err))
+            return
+        with f:
             all_lines = f.readlines()
             # start and end are 1-based, all_lines is 0-based;
             # so [start-1:end] as a python slice gives us [start, end] as a
@@ -1374,7 +1510,7 @@ def move_in_stack(move_up):
         if not iter_frame:
             break
 
-        if iter_frame.is_evalframeex():
+        if iter_frame.is_python_frame():
             # Result:
             if iter_frame.select():
                 iter_frame.print_summary()
@@ -1416,6 +1552,24 @@ if hasattr(gdb.Frame, 'select'):
     PyUp()
     PyDown()
 
+class PyBacktraceFull(gdb.Command):
+    'Display the current python frame and all the frames within its call stack (if any)'
+    def __init__(self):
+        gdb.Command.__init__ (self,
+                              "py-bt-full",
+                              gdb.COMMAND_STACK,
+                              gdb.COMPLETE_NONE)
+
+
+    def invoke(self, args, from_tty):
+        frame = Frame.get_selected_python_frame()
+        while frame:
+            if frame.is_python_frame():
+                frame.print_summary()
+            frame = frame.older()
+
+PyBacktraceFull()
+
 class PyBacktrace(gdb.Command):
     'Display the current python frame and all the frames within its call stack (if any)'
     def __init__(self):
@@ -1426,10 +1580,11 @@ class PyBacktrace(gdb.Command):
 
 
     def invoke(self, args, from_tty):
+        sys.stdout.write('Traceback (most recent call first):\n')
         frame = Frame.get_selected_python_frame()
         while frame:
-            if frame.is_evalframeex():
-                frame.print_summary()
+            if frame.is_python_frame():
+                frame.print_traceback()
             frame = frame.older()
 
 PyBacktrace()
index af891fe454044ee3a2a3888de2becce99a03a332..219c0edf78a54936670b81c5cfce85d28e0ae76d 100644 (file)
@@ -147,7 +147,7 @@ def build_mingw_lib(dll_path, def_file, dll_file, mingw_lib):
     if msilib.Win64:
         dlltool_command += " -m i386:x86-64"
     else:
-        dlltool_command += " -m i386"
+        dlltool_command += " -m i386 --as-flags=--32"
 
     f = open(def_file,'w')
     gendef_pipe = os.popen(gendef_command)
index d8c426a3db1beec28887c2618d4e47462eceb701..6c274835637171a1126f031050b36723b5ead3a2 100644 (file)
@@ -68,4 +68,16 @@ product_codes = {
     '2.7.8150':'{61121B12-88BD-4261-A6EE-AB32610A56DD}', # 2.7.8
     '2.7.9121':'{AAB1E8FF-6D00-4409-8F13-BE365AB92FFE}', # 2.7.9rc1
     '2.7.9150':'{79F081BF-7454-43DB-BD8F-9EE596813232}', # 2.7.9
+    '2.7.10121':'{872BE558-2E5F-4E9C-A42D-8561FA43811C}', # 2.7.10rc1
+    '2.7.10150':'{E2B51919-207A-43EB-AE78-733F9C6797C2}', # 2.7.10
+    '2.7.11121':'{9872896F-3558-4361-8518-23E611FCA35A}', # 2.7.11rc1
+    '2.7.11150':'{16E52445-1392-469F-9ADB-FC03AF00CD61}', # 2.7.11
+    '2.7.12121':'{3FC2B676-0216-4361-AFAC-73D299065CC5}', # 2.7.12rc1
+    '2.7.12150':'{9DA28CE5-0AA5-429E-86D8-686ED898C665}', # 2.7.12
+    '2.7.13121':'{FC03C4BD-2D42-4E0E-8B4F-FCC2FB0EC8E3}', # 2.7.13rc1
+    '2.7.13150':'{4A656C6C-D24A-473F-9747-3A8D00907A03}', # 2.7.13
+    '2.7.14121':'{614347BE-6269-4F2C-A34A-30AFC080C50B}', # 2.7.14rc1
+    '2.7.14150':'{0398A685-FD8D-46B3-9816-C47319B0CF5E}', # 2.7.14
+    '2.7.15121':'{B4B95EEC-7227-4F69-A918-043AF75653AC}', # 2.7.15rc1
+    '2.7.15150':'{16CD92A4-0152-4CB7-8FD6-9788D3363616}', # 2.7.15
 }
index 2bbd3d52c2ec855b16c501506b9667f44a66a9ca..20a35024593d04eea2d1cf9ec614b788b273f8cd 100755 (executable)
@@ -335,8 +335,6 @@ class FileContext:
         self.buffer.append(line)
         self.lineno += 1
         return line
-    def truncate(self):
-        del self.buffer[-window:]
     def __getitem__(self, index):
         self.fill()
         bufstart = self.lineno - len(self.buffer)
index 8cf777e19b8336f8a471774aa56503558ef53487..7dab8975f1a56de969ebcfe0c29779a4b16762ad 100755 (executable)
--- a/configure
+++ b/configure
@@ -661,6 +661,12 @@ LDSHARED
 SO
 LIBTOOL_CRUFT
 OTHER_LIBTOOL_OPT
+LLVM_PROF_FOUND
+LLVM_PROF_ERR
+LLVM_PROF_FILE
+LLVM_PROF_MERGER
+PGO_PROF_USE_FLAG
+PGO_PROF_GEN_FLAG
 UNIVERSAL_ARCH_FLAGS
 BASECFLAGS
 OPT
@@ -811,6 +817,7 @@ with_libm
 with_libc
 enable_big_digits
 enable_unicode
+with_computed_gotos
 with_ensurepip
 '
       ac_precious_vars='build_alias
@@ -1494,6 +1501,9 @@ Optional Packages:
   --with-fpectl           enable SIGFPE catching
   --with-libm=STRING      math library
   --with-libc=STRING      C library
+  --with(out)-computed-gotos
+                          Use computed gotos in evaluation loop (enabled by
+                          default on supported compilers)
   --with(out)-ensurepip=[=OPTION]
                           "install" or "upgrade" using bundled pip, default is
                           "no"
@@ -6322,6 +6332,82 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   CFLAGS=$save_CFLAGS
 fi
 
+
+# Enable PGO flags.
+# Extract the first word of "llvm-profdata", so it can be a program name with args.
+set dummy llvm-profdata; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LLVM_PROF_FOUND"; then
+  ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LLVM_PROF_FOUND="found"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
+fi
+fi
+LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
+if test -n "$LLVM_PROF_FOUND"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
+$as_echo "$LLVM_PROF_FOUND" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+LLVM_PROF_ERR=no
+case $CC in
+  *clang*)
+    # Any changes made here should be reflected in the GCC+Darwin case below
+    PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+    PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+    LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+    LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+    if test $LLVM_PROF_FOUND = not-found
+    then
+      LLVM_PROF_ERR=yes
+    fi
+    ;;
+  *gcc*)
+    case $ac_sys_system in
+      Darwin*)
+        PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+        PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+        LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+        LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+        if test $LLVM_PROF_FOUND = not-found
+        then
+          LLVM_PROF_ERR=yes
+        fi
+        ;;
+      *)
+        PGO_PROF_GEN_FLAG="-fprofile-generate"
+        PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
+        LLVM_PROF_MERGER="true"
+        LLVM_PROF_FILE=""
+        ;;
+    esac
+    ;;
+esac
+
+
 # On some compilers, pthreads are available without further options
 # (e.g. MacOS X). On some of these systems, the compiler will not
 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
@@ -12743,12 +12829,13 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   have_gcc_asm_for_x87=yes
 else
   have_gcc_asm_for_x87=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
 $as_echo "$have_gcc_asm_for_x87" >&6; }
 if test "$have_gcc_asm_for_x87" = yes
@@ -14685,6 +14772,85 @@ for dir in $SRCDIRS; do
         mkdir $dir
     fi
 done
+
+# BEGIN_COMPUTED_GOTO
+# Check for --with-computed-gotos
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
+$as_echo_n "checking for --with-computed-gotos... " >&6; }
+
+# Check whether --with-computed-gotos was given.
+if test "${with_computed_gotos+set}" = set; then :
+  withval=$with_computed_gotos;
+if test "$withval" = yes
+then
+
+$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+if test "$withval" = no
+then
+
+$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
+$as_echo "no value specified" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
+$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
+if ${ac_cv_computed_gotos+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  if test "${with_computed_gotos+set}" = set; then
+   ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
+ else
+   ac_cv_computed_gotos=no
+ fi
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int main(int argc, char **argv)
+{
+    static void *targets[1] = { &&LABEL1 };
+    goto LABEL2;
+LABEL1:
+    return 0;
+LABEL2:
+    goto *targets[0];
+    return 1;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_computed_gotos=yes
+else
+  ac_cv_computed_gotos=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
+$as_echo "$ac_cv_computed_gotos" >&6; }
+case "$ac_cv_computed_gotos" in yes*)
+
+$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
+
+esac
+# END_COMPUTED_GOTO
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
 $as_echo "done" >&6; }
 
index 78fe3c785fc983010710797c3fddf1e6d3b8857f..decf0ec7424bc1fac0040e1d7e837a32823198a2 100644 (file)
@@ -1352,6 +1352,51 @@ then
   CFLAGS=$save_CFLAGS
 fi
 
+
+# Enable PGO flags.
+AC_SUBST(PGO_PROF_GEN_FLAG)
+AC_SUBST(PGO_PROF_USE_FLAG)
+AC_SUBST(LLVM_PROF_MERGER)
+AC_SUBST(LLVM_PROF_FILE)
+AC_SUBST(LLVM_PROF_ERR)
+AC_SUBST(LLVM_PROF_FOUND)
+AC_CHECK_PROG(LLVM_PROF_FOUND, llvm-profdata, found, not-found)
+LLVM_PROF_ERR=no
+case $CC in
+  *clang*)
+    # Any changes made here should be reflected in the GCC+Darwin case below
+    PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+    PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+    LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+    LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+    if test $LLVM_PROF_FOUND = not-found
+    then
+      LLVM_PROF_ERR=yes
+    fi
+    ;;
+  *gcc*)
+    case $ac_sys_system in
+      Darwin*)
+        PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+        PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+        LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+        LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+        if test $LLVM_PROF_FOUND = not-found
+        then
+          LLVM_PROF_ERR=yes
+        fi
+        ;;
+      *)
+        PGO_PROF_GEN_FLAG="-fprofile-generate"
+        PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
+        LLVM_PROF_MERGER="true"
+        LLVM_PROF_FILE=""
+        ;;
+    esac
+    ;;
+esac
+
+
 # On some compilers, pthreads are available without further options
 # (e.g. MacOS X). On some of these systems, the compiler will not
 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
@@ -3723,7 +3768,7 @@ fi
 # so we try it on all platforms.
 
 AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
   unsigned short cw;
   __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
   __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
@@ -4557,6 +4602,57 @@ for dir in $SRCDIRS; do
         mkdir $dir
     fi
 done
+
+# BEGIN_COMPUTED_GOTO 
+# Check for --with-computed-gotos
+AC_MSG_CHECKING(for --with-computed-gotos)
+AC_ARG_WITH(computed-gotos,
+            AS_HELP_STRING([--with(out)-computed-gotos],
+                           [Use computed gotos in evaluation loop (enabled by default on supported compilers)]),
+[
+if test "$withval" = yes
+then 
+  AC_DEFINE(USE_COMPUTED_GOTOS, 1,
+  [Define if you want to use computed gotos in ceval.c.]) 
+  AC_MSG_RESULT(yes)
+fi
+if test "$withval" = no
+then 
+  AC_DEFINE(USE_COMPUTED_GOTOS, 0,
+  [Define if you want to use computed gotos in ceval.c.]) 
+  AC_MSG_RESULT(no)
+fi
+],
+[AC_MSG_RESULT(no value specified)])
+
+AC_MSG_CHECKING(whether $CC supports computed gotos)
+AC_CACHE_VAL(ac_cv_computed_gotos,
+AC_RUN_IFELSE([AC_LANG_SOURCE([[[
+int main(int argc, char **argv)
+{
+    static void *targets[1] = { &&LABEL1 };
+    goto LABEL2;
+LABEL1:
+    return 0;
+LABEL2:
+    goto *targets[0];
+    return 1;
+}
+]]])],
+[ac_cv_computed_gotos=yes],
+[ac_cv_computed_gotos=no],
+[if test "${with_computed_gotos+set}" = set; then
+   ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
+ else
+   ac_cv_computed_gotos=no
+ fi]))
+AC_MSG_RESULT($ac_cv_computed_gotos)
+case "$ac_cv_computed_gotos" in yes*)
+  AC_DEFINE(HAVE_COMPUTED_GOTOS, 1,
+  [Define if the C compiler supports computed gotos.])
+esac
+# END_COMPUTED_GOTO
+
 AC_MSG_RESULT(done)
 
 # ensurepip option
index 8e810daf3e0b71094527f7e27cd31b43c373a699..219bff3417456c0fd4f46ac7187a5238a590e00d 100644 (file)
 /* Define to 1 if you have the `clock' function. */
 #undef HAVE_CLOCK
 
+/* Define if the C compiler supports computed gotos. */
+#undef HAVE_COMPUTED_GOTOS
+
 /* Define to 1 if you have the `confstr' function. */
 #undef HAVE_CONFSTR
 
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 #undef TM_IN_SYS_TIME
 
+/* Define if you want to use computed gotos in ceval.c. */
+#undef USE_COMPUTED_GOTOS
+
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE