From d9ee28364c29c1cf64c3291e4e0f920309bc9731 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 12 Jul 2017 11:04:35 +0900 Subject: [PATCH] Imported Upstream version 2.7.9 Change-Id: If7320cd9a5b047aa0471ec569221ef7d9bc978b4 Signed-off-by: DongHun Kwak --- Demo/scripts/newslist.doc | 59 - Demo/scripts/newslist.py | 362 - Demo/turtle/demohelp.txt | 5 +- Demo/turtle/tdemo_chaos.py | 4 +- Demo/turtle/tdemo_clock.py | 8 +- Demo/turtle/tdemo_minimal_hanoi.py | 1 - Demo/turtle/tdemo_nim.py | 27 +- Demo/turtle/tdemo_two_canvases.py | 54 + Demo/turtle/turtleDemo.py | 226 +- Demo/turtle/turtledemo_two_canvases.py | 49 - Doc/Makefile | 78 +- Doc/README.txt | 99 +- Doc/about.rst | 4 +- Doc/bugs.rst | 8 +- Doc/c-api/long.rst | 28 - Doc/c-api/type.rst | 5 + Doc/c-api/typeobj.rst | 2 +- Doc/c-api/unicode.rst | 4 +- Doc/conf.py | 67 +- Doc/contents.rst | 12 +- Doc/distributing/index.rst | 170 + Doc/distutils/apiref.rst | 2 +- Doc/distutils/builtdist.rst | 40 +- Doc/distutils/configfile.rst | 4 +- Doc/distutils/examples.rst | 18 +- Doc/distutils/extending.rst | 4 +- Doc/distutils/packageindex.rst | 146 +- Doc/distutils/setupscript.rst | 42 +- Doc/distutils/sourcedist.rst | 12 +- Doc/extending/building.rst | 2 +- Doc/extending/extending.rst | 5 +- Doc/extending/newtypes.rst | 2 +- Doc/faq/design.rst | 68 +- Doc/faq/extending.rst | 11 +- Doc/faq/general.rst | 123 +- Doc/faq/gui.rst | 8 +- Doc/faq/installed.rst | 2 +- Doc/faq/library.rst | 14 +- Doc/faq/programming.rst | 195 +- Doc/faq/windows.rst | 6 +- Doc/glossary.rst | 16 +- Doc/howto/argparse.rst | 2 + Doc/howto/cporting.rst | 9 +- Doc/howto/descriptor.rst | 19 +- Doc/howto/functional.rst | 2 +- Doc/howto/logging-cookbook.rst | 11 +- Doc/howto/pyporting.rst | 60 +- Doc/howto/unicode.rst | 10 +- Doc/howto/urllib2.rst | 8 +- Doc/howto/webservers.rst | 45 +- Doc/includes/email-alternative.py | 4 +- Doc/install/index.rst | 6 +- Doc/installing/index.rst | 215 + Doc/library/2to3.rst | 35 +- Doc/library/_winreg.rst | 2 +- Doc/library/argparse.rst | 80 +- Doc/library/ast.rst | 14 +- Doc/library/asyncore.rst | 5 + Doc/library/bz2.rst | 2 +- Doc/library/cmd.rst | 9 +- Doc/library/collections.rst | 6 +- Doc/library/compileall.rst | 7 +- Doc/library/cookielib.rst | 2 +- Doc/library/crypto.rst | 5 +- Doc/library/csv.rst | 25 + Doc/library/ctypes.rst | 24 +- Doc/library/datetime.rst | 4 +- Doc/library/difflib.rst | 4 +- Doc/library/dis.rst | 10 +- Doc/library/distribution.rst | 13 + Doc/library/email.rst | 2 +- Doc/library/ensurepip.rst | 130 + Doc/library/functions.rst | 110 +- Doc/library/functools.rst | 17 +- Doc/library/gettext.rst | 4 +- Doc/library/hashlib.rst | 18 + Doc/library/heapq.rst | 4 +- Doc/library/httplib.rst | 23 +- Doc/library/index.rst | 3 +- Doc/library/io.rst | 2 +- Doc/library/logging.config.rst | 2 +- Doc/library/logging.rst | 10 +- Doc/library/mailbox.rst | 2 +- Doc/library/mimetypes.rst | 2 +- Doc/library/msilib.rst | 64 +- Doc/library/multiprocessing.rst | 6 +- Doc/library/os.path.rst | 27 +- Doc/library/os.rst | 8 +- Doc/library/othergui.rst | 4 +- Doc/library/pdb.rst | 3 + Doc/library/plistlib.rst | 2 +- Doc/library/popen2.rst | 2 +- Doc/library/pydoc.rst | 9 +- Doc/library/pyexpat.rst | 2 +- Doc/library/python.rst | 1 - Doc/library/re.rst | 19 +- Doc/library/repr.rst | 1 + Doc/library/socket.rst | 10 +- Doc/library/ssl.rst | 1439 +++- Doc/library/stdtypes.rst | 16 +- Doc/library/symtable.rst | 4 + Doc/library/sys.rst | 2 +- Doc/library/sysconfig.rst | 4 + Doc/library/tarfile.rst | 26 +- Doc/library/tempfile.rst | 2 +- Doc/library/thread.rst | 4 - Doc/library/time.rst | 2 +- Doc/library/tkinter.rst | 2 +- Doc/library/turtle.rst | 2 +- Doc/library/unittest.rst | 4 +- Doc/library/urllib.rst | 18 +- Doc/library/urllib2.rst | 30 +- Doc/library/urlparse.rst | 5 +- Doc/library/xml.dom.minidom.rst | 2 +- Doc/library/xml.dom.rst | 2 +- Doc/library/xml.etree.elementtree.rst | 2 +- Doc/library/xmllib.rst | 4 +- Doc/library/xmlrpclib.rst | 15 +- Doc/license.rst | 10 +- Doc/make.bat | 148 +- Doc/reference/compound_stmts.rst | 2 +- Doc/reference/datamodel.rst | 32 +- Doc/reference/expressions.rst | 11 +- Doc/reference/introduction.rst | 2 +- Doc/reference/simple_stmts.rst | 20 +- Doc/tools/dailybuild.py | 135 - Doc/tools/extensions/c_annotations.py | 121 + Doc/tools/{sphinxext => extensions}/patchlevel.py | 2 +- Doc/tools/{sphinxext => extensions}/pyspecific.py | 69 +- Doc/tools/{sphinxext => extensions}/suspicious.py | 54 +- Doc/tools/roman.py | 80 - Doc/tools/rstlint.py | 14 +- Doc/tools/sphinx-build.py | 28 - Doc/tools/sphinxext/indexsidebar.html | 17 - Doc/tools/sphinxext/opensearch.xml | 4 - Doc/tools/{sphinxext => }/static/basic.css | 0 Doc/tools/{sphinxext => }/static/copybutton.js | 0 Doc/tools/{sphinxext => }/static/py.png | Bin Doc/tools/{sphinxext => }/static/sidebar.js | 0 Doc/tools/{sphinxext => }/static/version_switch.js | 2 +- Doc/tools/{sphinxext => }/susp-ignored.csv | 0 Doc/tools/{sphinxext => templates}/download.html | 4 +- .../{sphinxext => templates}/indexcontent.html | 0 Doc/tools/templates/indexsidebar.html | 17 + Doc/tools/{sphinxext => templates}/layout.html | 4 +- Doc/tools/templates/opensearch.xml | 4 + Doc/tutorial/appendix.rst | 124 + Doc/tutorial/classes.rst | 16 +- Doc/tutorial/datastructures.rst | 6 +- Doc/tutorial/errors.rst | 2 +- Doc/tutorial/index.rst | 3 +- Doc/tutorial/interpreter.rst | 114 +- Doc/tutorial/introduction.rst | 556 +- Doc/tutorial/whatnow.rst | 10 +- Doc/using/cmdline.rst | 2 +- Doc/using/mac.rst | 14 +- Doc/using/unix.rst | 14 +- Doc/using/windows.rst | 27 +- Doc/whatsnew/2.0.rst | 6 +- Doc/whatsnew/2.1.rst | 6 +- Doc/whatsnew/2.2.rst | 6 +- Doc/whatsnew/2.3.rst | 12 +- Doc/whatsnew/2.4.rst | 2 +- Doc/whatsnew/2.5.rst | 6 +- Doc/whatsnew/2.6.rst | 14 +- Doc/whatsnew/2.7.rst | 138 +- Include/node.h | 4 +- Include/object.h | 4 +- Include/patchlevel.h | 4 +- Include/pythonrun.h | 3 +- Include/sysmodule.h | 2 + Lib/CGIHTTPServer.py | 10 +- Lib/Cookie.py | 28 +- Lib/SocketServer.py | 8 +- Lib/_abcoll.py | 2 +- Lib/argparse.py | 9 +- Lib/asynchat.py | 9 +- Lib/bsddb/test/test_queue.py | 1 + Lib/cookielib.py | 4 +- Lib/ctypes/test/test_pointers.py | 8 + Lib/ctypes/test/test_python_api.py | 2 +- Lib/ctypes/test/test_win32.py | 31 +- Lib/decimal.py | 8 +- Lib/distutils/__init__.py | 2 +- Lib/distutils/command/build_ext.py | 2 +- Lib/distutils/command/upload.py | 9 +- Lib/distutils/file_util.py | 34 +- Lib/distutils/sysconfig.py | 3 +- Lib/distutils/tests/test_bdist_rpm.py | 3 + Lib/distutils/tests/test_dist.py | 3 +- Lib/distutils/tests/test_file_util.py | 43 + Lib/distutils/tests/test_sysconfig.py | 21 + Lib/distutils/tests/test_upload.py | 2 +- Lib/doctest.py | 2 +- Lib/email/feedparser.py | 33 +- Lib/email/mime/nonmultipart.py | 2 +- Lib/email/test/test_email.py | 58 +- Lib/ensurepip/__init__.py | 227 + Lib/ensurepip/__main__.py | 4 + .../_bundled/pip-1.5.6-py2.py3-none-any.whl | Bin 0 -> 1002021 bytes .../_bundled/setuptools-7.0-py2.py3-none-any.whl | Bin 0 -> 534549 bytes Lib/ensurepip/_uninstall.py | 30 + Lib/glob.py | 11 +- Lib/gzip.py | 13 +- Lib/hashlib.py | 14 +- Lib/httplib.py | 31 +- Lib/idlelib/Bindings.py | 3 +- Lib/idlelib/CallTipWindow.py | 54 +- Lib/idlelib/ClassBrowser.py | 15 +- Lib/idlelib/ColorDelegator.py | 41 +- Lib/idlelib/Debugger.py | 1 - Lib/idlelib/EditorWindow.py | 44 +- Lib/idlelib/GrepDialog.py | 6 +- Lib/idlelib/IOBinding.py | 17 +- Lib/idlelib/NEWS.txt | 330 +- Lib/idlelib/PyShell.py | 50 +- Lib/idlelib/ReplaceDialog.py | 2 +- Lib/idlelib/SearchDialogBase.py | 124 +- Lib/idlelib/SearchEngine.py | 2 +- Lib/idlelib/StackViewer.py | 4 +- Lib/idlelib/TreeWidget.py | 7 +- Lib/idlelib/WidgetRedirector.py | 97 +- Lib/idlelib/aboutDialog.py | 3 +- Lib/idlelib/config-extensions.def | 118 +- Lib/idlelib/configDialog.py | 1559 ++-- Lib/idlelib/configHandler.py | 581 +- Lib/idlelib/dynOptionMenuWidget.py | 30 +- Lib/idlelib/idle_test/htest.py | 74 +- Lib/idlelib/idle_test/mock_idle.py | 5 +- Lib/idlelib/idle_test/test_calltips.py | 2 +- Lib/idlelib/idle_test/test_configdialog.py | 32 + Lib/idlelib/idle_test/test_searchdialogbase.py | 165 + Lib/idlelib/idle_test/test_textview.py | 6 +- Lib/idlelib/idle_test/test_widgetredir.py | 122 + Lib/idlelib/idlever.py | 2 +- Lib/idlelib/macosxSupport.py | 6 +- Lib/lib-tk/FixTk.py | 4 +- Lib/lib-tk/Tkinter.py | 143 +- Lib/lib-tk/test/test_tkinter/test_font.py | 28 + .../test/test_tkinter/test_geometry_managers.py | 96 +- Lib/lib-tk/test/test_tkinter/test_images.py | 31 +- Lib/lib-tk/test/test_tkinter/test_text.py | 21 +- Lib/lib-tk/test/test_tkinter/test_variables.py | 6 +- Lib/lib-tk/test/test_tkinter/test_widgets.py | 138 +- Lib/lib-tk/test/test_ttk/support.py | 59 +- Lib/lib-tk/test/test_ttk/test_extensions.py | 121 +- Lib/lib-tk/test/test_ttk/test_functions.py | 27 +- Lib/lib-tk/test/test_ttk/test_style.py | 18 +- Lib/lib-tk/test/test_ttk/test_widgets.py | 326 +- Lib/lib-tk/test/widget_tests.py | 51 +- Lib/lib-tk/tkColorChooser.py | 4 +- Lib/lib-tk/tkFont.py | 21 +- Lib/lib-tk/ttk.py | 68 +- Lib/lib-tk/turtle.py | 4 +- Lib/lib2to3/fixes/fix_asserts.py | 34 + Lib/lib2to3/pgen2/tokenize.py | 3 + Lib/lib2to3/tests/test_fixers.py | 50 + Lib/locale.py | 117 +- Lib/logging/handlers.py | 26 +- Lib/macpath.py | 2 +- Lib/multiprocessing/dummy/__init__.py | 2 +- Lib/ntpath.py | 2 +- Lib/poplib.py | 12 +- Lib/pydoc.py | 2 +- Lib/pydoc_data/topics.py | 159 +- Lib/re.py | 21 +- Lib/smtplib.py | 15 +- Lib/sqlite3/test/dbapi.py | 4 +- Lib/sqlite3/test/regression.py | 10 + Lib/sqlite3/test/types.py | 10 +- Lib/sqlite3/test/userfunctions.py | 20 +- Lib/sre_compile.py | 362 +- Lib/sre_parse.py | 45 +- Lib/ssl.py | 809 +- Lib/string.py | 12 +- Lib/subprocess.py | 10 +- Lib/sysconfig.py | 8 +- Lib/tarfile.py | 77 +- Lib/tempfile.py | 8 +- Lib/test/_mock_backport.py | 2357 +++++ Lib/test/capath/4e1295a3.0 | 14 + Lib/test/capath/5ed36f99.0 | 41 + Lib/test/capath/6e88d7b8.0 | 14 + Lib/test/capath/99d0fa06.0 | 41 + Lib/test/data/README | 2 +- Lib/test/dh512.pem | 9 + Lib/test/keycert.passwd.pem | 33 + Lib/test/keycert2.pem | 31 + Lib/test/keycert3.pem | 73 + Lib/test/keycert4.pem | 73 + Lib/test/make_ssl_certs.py | 176 + Lib/test/pycacert.pem | 78 + Lib/test/re_tests.py | 2 +- Lib/test/regrtest.py | 19 +- Lib/test/revocation.crl | 11 + Lib/test/selfsigned_pythontestdotnet.pem | 16 + Lib/test/sha256.pem | 222 +- Lib/test/ssl_cert.pem | 15 + Lib/test/ssl_key.passwd.pem | 18 + Lib/test/ssl_key.pem | 16 + Lib/test/ssl_servers.py | 209 + Lib/test/string_tests.py | 13 +- Lib/test/test___all__.py | 9 +- Lib/test/test_argparse.py | 7 + Lib/test/test_asynchat.py | 32 +- Lib/test/test_codecmaps_cn.py | 8 +- Lib/test/test_codecmaps_hk.py | 2 +- Lib/test/test_codecmaps_jp.py | 12 +- Lib/test/test_codecmaps_kr.py | 8 +- Lib/test/test_codecmaps_tw.py | 6 +- Lib/test/test_codecs.py | 4 + Lib/test/test_collections.py | 43 +- Lib/test/test_compile.py | 38 +- Lib/test/test_complex.py | 9 +- Lib/test/test_cookie.py | 67 + Lib/test/test_decimal.py | 14 +- Lib/test/test_doctest.py | 26 + Lib/test/test_ensurepip.py | 352 + Lib/test/test_file2k.py | 17 +- Lib/test/test_ftplib.py | 6 +- Lib/test/test_gdb.py | 17 +- Lib/test/test_gzip.py | 15 + Lib/test/test_hash.py | 3 +- Lib/test/test_hashlib.py | 9 + Lib/test/test_hmac.py | 16 +- Lib/test/test_httplib.py | 164 +- Lib/test/test_httpservers.py | 16 +- Lib/test/test_io.py | 6 + Lib/test/test_itertools.py | 1 + Lib/test/test_kqueue.py | 25 + Lib/test/test_list.py | 2 +- Lib/test/test_locale.py | 2 +- Lib/test/test_macpath.py | 20 + Lib/test/test_mmap.py | 11 +- Lib/test/test_normalization.py | 2 +- Lib/test/test_ntpath.py | 1 + Lib/test/test_pep292.py | 34 + Lib/test/test_poplib.py | 4 + Lib/test/test_posix.py | 12 + Lib/test/test_pyclbr.py | 2 +- Lib/test/test_re.py | 376 +- Lib/test/test_readline.py | 26 +- Lib/test/test_robotparser.py | 5 +- Lib/test/test_smtplib.py | 45 +- Lib/test/test_socket.py | 56 +- Lib/test/test_socketserver.py | 10 + Lib/test/test_ssl.py | 2698 ++++-- Lib/test/test_string.py | 11 +- Lib/test/test_support.py | 44 +- Lib/test/test_sys.py | 25 + Lib/test/test_sysconfig.py | 8 + Lib/test/test_tcl.py | 88 +- Lib/test/test_threading.py | 122 +- Lib/test/test_ttk_guionly.py | 21 +- Lib/test/test_unicode.py | 114 +- Lib/test/test_urllib2.py | 13 + Lib/test/test_urllib2_localnet.py | 165 +- Lib/test/test_urllib2net.py | 4 +- Lib/test/test_urllibnet.py | 20 +- Lib/test/test_userstring.py | 12 +- Lib/test/test_uu.py | 20 + Lib/test/test_uuid.py | 18 + Lib/test/test_warnings.py | 19 + Lib/test/test_weakref.py | 2 + Lib/test/test_weakset.py | 54 - Lib/test/test_winreg.py | 15 +- Lib/test/test_wsgiref.py | 5 + Lib/test/test_xdrlib.py | 24 + Lib/test/test_xmlrpc.py | 19 +- Lib/test/test_zipfile.py | 102 +- Lib/test/test_zipfile64.py | 37 +- Lib/threading.py | 16 +- Lib/unittest/test/test_case.py | 2 +- Lib/unittest/test/test_discovery.py | 1 + Lib/unittest/test/test_functiontestcase.py | 2 +- Lib/unittest/test/test_program.py | 1 + Lib/unittest/test/test_runner.py | 3 +- Lib/unittest/test/test_skipping.py | 2 +- Lib/unittest/test/test_suite.py | 2 +- Lib/urllib.py | 24 +- Lib/urllib2.py | 66 +- Lib/uuid.py | 77 +- Lib/warnings.py | 3 +- Lib/wsgiref/simple_server.py | 9 +- Lib/xdrlib.py | 33 +- Lib/xml/sax/saxutils.py | 13 +- Lib/xmlrpclib.py | 23 +- Lib/zipfile.py | 68 +- Mac/BuildScript/README.txt | 73 +- Mac/BuildScript/build-installer.py | 288 +- Mac/BuildScript/openssl_sdk_makedepend.patch | 48 + Mac/BuildScript/resources/ReadMe.txt | 136 +- Mac/BuildScript/resources/Welcome.rtf | 24 +- Mac/BuildScript/resources/license.rtf | 146 + Mac/BuildScript/resources/readme.rtf | 176 + Mac/BuildScript/scripts/postflight.ensurepip | 69 + Mac/Makefile.in | 29 +- Mac/PythonLauncher/Makefile.in | 2 - Makefile.pre.in | 49 +- Misc/ACKS | 18 + Misc/NEWS | 470 +- Misc/RPM/python-2.7.spec | 2 +- Misc/python-config.in | 5 +- Modules/_ctypes/_ctypes_test.c | 43 + Modules/_ctypes/callproc.c | 15 +- Modules/_ctypes/libffi.diff | 145 +- Modules/_ctypes/libffi/.gitignore | 21 - Modules/_ctypes/libffi/.travis.yml | 8 - Modules/_ctypes/libffi/ChangeLog | 9106 ++++++++++---------- Modules/_ctypes/libffi/ChangeLog.libffi-3.1 | 6000 +++++++++++++ Modules/_ctypes/libffi/ChangeLog.v1 | 2 +- Modules/_ctypes/libffi/LICENSE | 2 +- Modules/_ctypes/libffi/Makefile.am | 117 +- Modules/_ctypes/libffi/Makefile.in | 722 +- Modules/_ctypes/libffi/README | 57 +- Modules/_ctypes/libffi/aclocal.m4 | 334 +- Modules/_ctypes/libffi/build-ios.sh | 67 - Modules/_ctypes/libffi/compile | 232 +- Modules/_ctypes/libffi/config.guess | 151 +- Modules/_ctypes/libffi/config.sub | 32 +- Modules/_ctypes/libffi/configure | 5965 +++++++++++-- Modules/_ctypes/libffi/configure.ac | 105 +- Modules/_ctypes/libffi/configure.host | 11 - Modules/_ctypes/libffi/depcomp | 531 +- Modules/_ctypes/libffi/doc/libffi.info | 328 +- Modules/_ctypes/libffi/doc/libffi.texi | 31 +- Modules/_ctypes/libffi/doc/stamp-vti | 8 +- Modules/_ctypes/libffi/doc/version.texi | 8 +- Modules/_ctypes/libffi/fficonfig.h.in | 13 +- Modules/_ctypes/libffi/fficonfig.py.in | 7 +- .../libffi/generate-darwin-source-and-headers.py | 209 + .../libffi/generate-ios-source-and-headers.py | 160 - .../libffi/generate-osx-source-and-headers.py | 153 - Modules/_ctypes/libffi/include/Makefile.in | 167 +- Modules/_ctypes/libffi/include/ffi.h.in | 5 + Modules/_ctypes/libffi/include/ffi_common.h | 18 +- Modules/_ctypes/libffi/install-sh | 35 +- Modules/_ctypes/libffi/libffi.pc.in | 3 +- .../libffi/libffi.xcodeproj/project.pbxproj | 718 +- Modules/_ctypes/libffi/libtool-version | 2 +- Modules/_ctypes/libffi/ltmain.sh | 5343 +++++++----- Modules/_ctypes/libffi/m4/ax_gcc_archflag.m4 | 2 +- Modules/_ctypes/libffi/m4/libtool.m4 | 1969 +++-- Modules/_ctypes/libffi/m4/ltoptions.m4 | 72 +- Modules/_ctypes/libffi/m4/ltsugar.m4 | 7 +- Modules/_ctypes/libffi/m4/ltversion.m4 | 12 +- Modules/_ctypes/libffi/m4/lt~obsolete.m4 | 7 +- Modules/_ctypes/libffi/man/Makefile.in | 122 +- Modules/_ctypes/libffi/mdate-sh | 49 +- Modules/_ctypes/libffi/missing | 461 +- Modules/_ctypes/libffi/msvcc.sh | 46 +- Modules/_ctypes/libffi/src/aarch64/ffi.c | 138 +- Modules/_ctypes/libffi/src/aarch64/ffitarget.h | 6 +- Modules/_ctypes/libffi/src/aarch64/sysv.S | 58 +- Modules/_ctypes/libffi/src/arc/arcompact.S | 135 + Modules/_ctypes/libffi/src/arc/ffi.c | 268 + Modules/_ctypes/libffi/src/arc/ffitarget.h | 53 + Modules/_ctypes/libffi/src/arm/ffi.c | 407 +- Modules/_ctypes/libffi/src/arm/gentramp.sh | 2 +- Modules/_ctypes/libffi/src/arm/sysv.S | 72 +- Modules/_ctypes/libffi/src/bfin/ffi.c | 3 +- Modules/_ctypes/libffi/src/bfin/sysv.S | 42 +- Modules/_ctypes/libffi/src/closures.c | 28 +- Modules/_ctypes/libffi/src/dlmalloc.c | 22 +- Modules/_ctypes/libffi/src/ia64/ffi.c | 2 +- Modules/_ctypes/libffi/src/m88k/ffi.c | 400 + Modules/_ctypes/libffi/src/m88k/ffitarget.h | 49 + Modules/_ctypes/libffi/src/m88k/obsd.S | 209 + Modules/_ctypes/libffi/src/microblaze/ffi.c | 2 +- Modules/_ctypes/libffi/src/microblaze/sysv.S | 6 +- Modules/_ctypes/libffi/src/mips/ffi.c | 7 + Modules/_ctypes/libffi/src/mips/n32.S | 32 +- Modules/_ctypes/libffi/src/nios2/ffi.c | 304 + Modules/_ctypes/libffi/src/nios2/ffitarget.h | 52 + Modules/_ctypes/libffi/src/nios2/sysv.S | 136 + Modules/_ctypes/libffi/src/powerpc/darwin.S | 9 +- .../_ctypes/libffi/src/powerpc/darwin_closure.S | 35 +- Modules/_ctypes/libffi/src/powerpc/ffi.c | 1500 +--- Modules/_ctypes/libffi/src/powerpc/ffi_darwin.c | 2 +- Modules/_ctypes/libffi/src/powerpc/ffi_linux64.c | 943 ++ Modules/_ctypes/libffi/src/powerpc/ffi_powerpc.h | 77 + Modules/_ctypes/libffi/src/powerpc/ffi_sysv.c | 931 ++ Modules/_ctypes/libffi/src/powerpc/ffitarget.h | 110 +- Modules/_ctypes/libffi/src/powerpc/linux64.S | 92 +- .../_ctypes/libffi/src/powerpc/linux64_closure.S | 297 +- Modules/_ctypes/libffi/src/powerpc/ppc_closure.S | 48 +- Modules/_ctypes/libffi/src/powerpc/sysv.S | 25 +- Modules/_ctypes/libffi/src/prep_cif.c | 22 +- Modules/_ctypes/libffi/src/sh/ffi.c | 2 +- Modules/_ctypes/libffi/src/tile/tile.S | 2 +- Modules/_ctypes/libffi/src/types.c | 15 + Modules/_ctypes/libffi/src/vax/elfbsd.S | 195 + Modules/_ctypes/libffi/src/vax/ffi.c | 276 + Modules/_ctypes/libffi/src/vax/ffitarget.h | 49 + Modules/_ctypes/libffi/src/x86/ffi.c | 94 +- Modules/_ctypes/libffi/src/x86/ffi64.c | 43 +- Modules/_ctypes/libffi/src/x86/ffitarget.h | 3 + Modules/_ctypes/libffi/src/x86/freebsd.S | 5 + Modules/_ctypes/libffi/src/x86/win32.S | 357 +- Modules/_ctypes/libffi/stamp-h.in | 1 - Modules/_ctypes/libffi/testsuite/Makefile.am | 45 +- Modules/_ctypes/libffi/testsuite/Makefile.in | 163 +- Modules/_ctypes/libffi/testsuite/lib/libffi.exp | 44 + .../_ctypes/libffi/testsuite/libffi.call/call.exp | 15 +- .../{closure_stdcall.c => closure_simple.c} | 31 +- .../testsuite/libffi.call/closure_thiscall.c | 72 - .../libffi/testsuite/libffi.call/cls_double_va.c | 10 +- .../testsuite/libffi.call/cls_longdouble_va.c | 11 +- .../libffi/testsuite/libffi.call/cls_struct_va1.c | 2 +- .../libffi/testsuite/libffi.call/cls_uint_va.c | 4 +- .../_ctypes/libffi/testsuite/libffi.call/ffitest.h | 19 +- .../_ctypes/libffi/testsuite/libffi.call/many.c | 22 +- .../_ctypes/libffi/testsuite/libffi.call/many2.c | 4 +- .../libffi/testsuite/libffi.call/many2_win32.c | 63 - .../libffi/testsuite/libffi.call/many_win32.c | 63 - .../libffi/testsuite/libffi.call/nested_struct11.c | 2 +- .../_ctypes/libffi/testsuite/libffi.call/strlen.c | 4 +- .../libffi.call/{fastthis1_win32.c => strlen2.c} | 15 +- .../libffi/testsuite/libffi.call/strlen2_win32.c | 44 - .../libffi.call/{fastthis2_win32.c => strlen3.c} | 15 +- .../libffi.call/{fastthis3_win32.c => strlen4.c} | 15 +- .../libffi/testsuite/libffi.call/strlen_win32.c | 44 - .../_ctypes/libffi/testsuite/libffi.call/struct1.c | 4 +- .../libffi/testsuite/libffi.call/struct1_win32.c | 67 - .../_ctypes/libffi/testsuite/libffi.call/struct2.c | 4 +- .../libffi/testsuite/libffi.call/struct2_win32.c | 67 - .../_ctypes/libffi/testsuite/libffi.call/struct3.c | 4 +- .../_ctypes/libffi/testsuite/libffi.call/struct4.c | 4 +- .../_ctypes/libffi/testsuite/libffi.call/struct5.c | 4 +- .../_ctypes/libffi/testsuite/libffi.call/struct6.c | 4 +- .../_ctypes/libffi/testsuite/libffi.call/struct7.c | 4 +- .../_ctypes/libffi/testsuite/libffi.call/struct8.c | 4 +- .../_ctypes/libffi/testsuite/libffi.call/struct9.c | 4 +- .../{libffi.special => libffi.call}/unwindtest.cc | 12 +- .../unwindtest_ffi_call.cc | 2 +- .../_ctypes/libffi/testsuite/libffi.call/va_1.c | 2 +- .../libffi/testsuite/libffi.call/va_struct1.c | 2 +- .../libffi/testsuite/libffi.special/ffitestcxx.h | 55 - .../libffi/testsuite/libffi.special/special.exp | 39 - Modules/_ctypes/libffi/texinfo.tex | 282 +- Modules/_ctypes/libffi_msvc/ffi.c | 29 +- Modules/_ctypes/libffi_msvc/prep_cif.c | 18 +- Modules/_ctypes/libffi_msvc/types.c | 2 +- Modules/_hashopenssl.c | 66 +- Modules/_io/_iomodule.c | 8 +- Modules/_io/bufferedio.c | 2 + Modules/_io/fileio.c | 12 +- Modules/_sqlite/connection.c | 3 +- Modules/_sqlite/row.c | 28 +- Modules/_sqlite/statement.c | 7 +- Modules/_sre.c | 2 +- Modules/_ssl.c | 3329 +++++-- Modules/_ssl_data.h | 1653 ++++ Modules/_tkinter.c | 76 +- Modules/fcntlmodule.c | 4 +- Modules/grpmodule.c | 12 +- Modules/mmapmodule.c | 16 + Modules/posixmodule.c | 2 +- Modules/posixmodule.h | 2 - Modules/readline.c | 22 +- Modules/socketmodule.c | 35 +- Modules/socketmodule.h | 1 + Modules/zlib/ChangeLog | 619 +- Modules/zlib/FAQ | 267 +- Modules/zlib/INDEX | 41 +- Modules/zlib/Makefile | 157 +- Modules/zlib/Makefile.in | 264 +- Modules/zlib/README | 94 +- Modules/zlib/adler32.c | 102 +- Modules/zlib/algorithm.txt | 4 +- Modules/zlib/compress.c | 7 +- Modules/zlib/configure | 740 +- Modules/zlib/crc32.c | 112 +- Modules/zlib/crc32.h | 2 +- Modules/zlib/deflate.c | 523 +- Modules/zlib/deflate.h | 45 +- Modules/zlib/example.c | 92 +- Modules/zlib/gzclose.c | 25 + Modules/zlib/gzguts.h | 209 + Modules/zlib/gzio.c | 1026 --- Modules/zlib/gzlib.c | 634 ++ Modules/zlib/gzread.c | 594 ++ Modules/zlib/gzwrite.c | 577 ++ Modules/zlib/infback.c | 105 +- Modules/zlib/inffast.c | 84 +- Modules/zlib/inffast.h | 4 +- Modules/zlib/inffixed.h | 6 +- Modules/zlib/inflate.c | 410 +- Modules/zlib/inflate.h | 31 +- Modules/zlib/inftrees.c | 93 +- Modules/zlib/inftrees.h | 27 +- Modules/zlib/make_vms.com | 748 +- Modules/zlib/minigzip.c | 345 +- Modules/zlib/trees.c | 145 +- Modules/zlib/trees.h | 4 +- Modules/zlib/uncompr.c | 6 +- Modules/zlib/zconf.h | 289 +- Modules/zlib/zconf.h.cmakein | 513 ++ Modules/zlib/{zconf.in.h => zconf.h.in} | 289 +- Modules/zlib/zlib.3 | 70 +- Modules/zlib/zlib.h | 1377 +-- Modules/zlib/zlib.map | 83 + Modules/zlib/zlib.pc.in | 13 + Modules/zlib/zutil.c | 56 +- Modules/zlib/zutil.h | 142 +- Objects/classobject.c | 2 +- Objects/complexobject.c | 8 +- Objects/fileobject.c | 15 +- Objects/intobject.c | 8 +- Objects/stringobject.c | 7 +- Objects/typeobject.c | 4 +- Objects/unicodeobject.c | 87 +- PC/VC6/pythoncore.dsp | 14 +- PC/VS7.1/pythoncore.vcproj | 11 +- PC/VS8.0/pythoncore.vcproj | 14 +- PC/_winreg.c | 4 +- PC/bdist_wininst/install.c | 10 + PC/pyconfig.h | 9 + PCbuild/_ssl.vcproj | 16 +- PCbuild/build_ssl.py | 13 +- PCbuild/build_tkinter.py | 2 +- PCbuild/pyproject.vsprops | 4 +- PCbuild/pythoncore.vcproj | 16 +- PCbuild/readme.txt | 46 +- PCbuild/rt.bat | 2 +- Parser/tokenizer.c | 20 +- Python/_warnings.c | 1 + Python/ast.c | 12 + Python/ceval.c | 32 +- Python/codecs.c | 17 +- Python/compile.c | 12 +- Python/pythonrun.c | 10 +- Python/random.c | 94 +- Python/symtable.c | 2 +- Python/sysmodule.c | 78 +- Python/thread_pthread.h | 4 +- README | 2 +- Tools/buildbot/external-amd64.bat | 18 +- Tools/buildbot/external-common.bat | 15 +- Tools/buildbot/external.bat | 14 +- Tools/msi/msi.py | 61 +- Tools/msi/msilib.py | 7 +- Tools/msi/uuids.py | 1 + Tools/scripts/checkpip.py | 31 + Tools/scripts/findnocoding.py | 4 +- Tools/scripts/patchcheck.py | 3 +- Tools/ssl/make_ssl_data.py | 68 + Tools/ssl/test_multiple_versions.py | 241 + config.guess | 192 +- config.sub | 23 +- configure | 33 + configure.ac | 18 + setup.py | 4 +- 653 files changed, 59926 insertions(+), 24439 deletions(-) delete mode 100644 Demo/scripts/newslist.doc delete mode 100755 Demo/scripts/newslist.py create mode 100644 Demo/turtle/tdemo_two_canvases.py delete mode 100755 Demo/turtle/turtledemo_two_canvases.py create mode 100644 Doc/distributing/index.rst mode change 100644 => 100755 Doc/includes/email-alternative.py create mode 100644 Doc/installing/index.rst create mode 100644 Doc/library/distribution.rst create mode 100644 Doc/library/ensurepip.rst delete mode 100755 Doc/tools/dailybuild.py create mode 100644 Doc/tools/extensions/c_annotations.py rename Doc/tools/{sphinxext => extensions}/patchlevel.py (97%) rename Doc/tools/{sphinxext => extensions}/pyspecific.py (79%) rename Doc/tools/{sphinxext => extensions}/suspicious.py (85%) delete mode 100644 Doc/tools/roman.py delete mode 100644 Doc/tools/sphinx-build.py delete mode 100644 Doc/tools/sphinxext/indexsidebar.html delete mode 100644 Doc/tools/sphinxext/opensearch.xml rename Doc/tools/{sphinxext => }/static/basic.css (100%) rename Doc/tools/{sphinxext => }/static/copybutton.js (100%) rename Doc/tools/{sphinxext => }/static/py.png (100%) rename Doc/tools/{sphinxext => }/static/sidebar.js (100%) rename Doc/tools/{sphinxext => }/static/version_switch.js (95%) rename Doc/tools/{sphinxext => }/susp-ignored.csv (100%) rename Doc/tools/{sphinxext => templates}/download.html (94%) rename Doc/tools/{sphinxext => templates}/indexcontent.html (100%) create mode 100644 Doc/tools/templates/indexsidebar.html rename Doc/tools/{sphinxext => templates}/layout.html (93%) create mode 100644 Doc/tools/templates/opensearch.xml create mode 100644 Doc/tutorial/appendix.rst create mode 100644 Lib/ensurepip/__init__.py create mode 100644 Lib/ensurepip/__main__.py create mode 100644 Lib/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl create mode 100644 Lib/ensurepip/_bundled/setuptools-7.0-py2.py3-none-any.whl create mode 100644 Lib/ensurepip/_uninstall.py create mode 100644 Lib/idlelib/idle_test/test_configdialog.py create mode 100644 Lib/idlelib/idle_test/test_searchdialogbase.py create mode 100644 Lib/idlelib/idle_test/test_widgetredir.py create mode 100644 Lib/lib-tk/test/test_tkinter/test_font.py create mode 100644 Lib/lib2to3/fixes/fix_asserts.py create mode 100644 Lib/test/_mock_backport.py create mode 100644 Lib/test/capath/4e1295a3.0 create mode 100644 Lib/test/capath/5ed36f99.0 create mode 100644 Lib/test/capath/6e88d7b8.0 create mode 100644 Lib/test/capath/99d0fa06.0 create mode 100644 Lib/test/dh512.pem create mode 100644 Lib/test/keycert.passwd.pem create mode 100644 Lib/test/keycert2.pem create mode 100644 Lib/test/keycert3.pem create mode 100644 Lib/test/keycert4.pem create mode 100644 Lib/test/make_ssl_certs.py create mode 100644 Lib/test/pycacert.pem create mode 100644 Lib/test/revocation.crl create mode 100644 Lib/test/selfsigned_pythontestdotnet.pem create mode 100644 Lib/test/ssl_cert.pem create mode 100644 Lib/test/ssl_key.passwd.pem create mode 100644 Lib/test/ssl_key.pem create mode 100644 Lib/test/ssl_servers.py create mode 100644 Lib/test/test_ensurepip.py create mode 100644 Mac/BuildScript/openssl_sdk_makedepend.patch create mode 100644 Mac/BuildScript/resources/license.rtf create mode 100644 Mac/BuildScript/resources/readme.rtf create mode 100755 Mac/BuildScript/scripts/postflight.ensurepip delete mode 100644 Modules/_ctypes/libffi/.gitignore delete mode 100644 Modules/_ctypes/libffi/.travis.yml create mode 100644 Modules/_ctypes/libffi/ChangeLog.libffi-3.1 delete mode 100755 Modules/_ctypes/libffi/build-ios.sh delete mode 100644 Modules/_ctypes/libffi/configure.host create mode 100644 Modules/_ctypes/libffi/generate-darwin-source-and-headers.py delete mode 100755 Modules/_ctypes/libffi/generate-ios-source-and-headers.py delete mode 100755 Modules/_ctypes/libffi/generate-osx-source-and-headers.py mode change 100644 => 100755 Modules/_ctypes/libffi/mdate-sh create mode 100644 Modules/_ctypes/libffi/src/arc/arcompact.S create mode 100644 Modules/_ctypes/libffi/src/arc/ffi.c create mode 100644 Modules/_ctypes/libffi/src/arc/ffitarget.h create mode 100644 Modules/_ctypes/libffi/src/m88k/ffi.c create mode 100644 Modules/_ctypes/libffi/src/m88k/ffitarget.h create mode 100644 Modules/_ctypes/libffi/src/m88k/obsd.S create mode 100644 Modules/_ctypes/libffi/src/nios2/ffi.c create mode 100644 Modules/_ctypes/libffi/src/nios2/ffitarget.h create mode 100644 Modules/_ctypes/libffi/src/nios2/sysv.S create mode 100644 Modules/_ctypes/libffi/src/powerpc/ffi_linux64.c create mode 100644 Modules/_ctypes/libffi/src/powerpc/ffi_powerpc.h create mode 100644 Modules/_ctypes/libffi/src/powerpc/ffi_sysv.c create mode 100644 Modules/_ctypes/libffi/src/vax/elfbsd.S create mode 100644 Modules/_ctypes/libffi/src/vax/ffi.c create mode 100644 Modules/_ctypes/libffi/src/vax/ffitarget.h delete mode 100644 Modules/_ctypes/libffi/stamp-h.in rename Modules/_ctypes/libffi/testsuite/libffi.call/{closure_stdcall.c => closure_simple.c} (55%) delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.call/closure_thiscall.c delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.call/many2_win32.c delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.call/many_win32.c rename Modules/_ctypes/libffi/testsuite/libffi.call/{fastthis1_win32.c => strlen2.c} (61%) delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.call/strlen2_win32.c rename Modules/_ctypes/libffi/testsuite/libffi.call/{fastthis2_win32.c => strlen3.c} (61%) rename Modules/_ctypes/libffi/testsuite/libffi.call/{fastthis3_win32.c => strlen4.c} (63%) delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.call/strlen_win32.c delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.call/struct1_win32.c delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.call/struct2_win32.c rename Modules/_ctypes/libffi/testsuite/{libffi.special => libffi.call}/unwindtest.cc (96%) rename Modules/_ctypes/libffi/testsuite/{libffi.special => libffi.call}/unwindtest_ffi_call.cc (97%) delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.special/ffitestcxx.h delete mode 100644 Modules/_ctypes/libffi/testsuite/libffi.special/special.exp create mode 100644 Modules/_ssl_data.h create mode 100644 Modules/zlib/gzclose.c create mode 100644 Modules/zlib/gzguts.h delete mode 100644 Modules/zlib/gzio.c create mode 100644 Modules/zlib/gzlib.c create mode 100644 Modules/zlib/gzread.c create mode 100644 Modules/zlib/gzwrite.c create mode 100644 Modules/zlib/zconf.h.cmakein rename Modules/zlib/{zconf.in.h => zconf.h.in} (54%) create mode 100644 Modules/zlib/zlib.map create mode 100644 Modules/zlib/zlib.pc.in create mode 100644 Tools/scripts/checkpip.py create mode 100755 Tools/ssl/make_ssl_data.py create mode 100644 Tools/ssl/test_multiple_versions.py diff --git a/Demo/scripts/newslist.doc b/Demo/scripts/newslist.doc deleted file mode 100644 index 87fd9ba..0000000 --- a/Demo/scripts/newslist.doc +++ /dev/null @@ -1,59 +0,0 @@ - NEWSLIST - ======== - A program to assist HTTP browsing of newsgroups - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -WWW browsers such as NCSA Mosaic allow the user to read newsgroup -articles by specifying the group name in a URL eg 'news:comp.answers'. - -To browse through many groups, though, (and there are several thousand -of them) you really need a page or pages containing links to all the -groups. There are some good ones out there, for example, - - http://info.cern.ch/hypertext/DataSources/News/Groups/Overview.html - -is the standard one at CERN, but it only shows the groups available there, -which may be rather different from those available on your machine. - -Newslist is a program which creates a hierarchy of pages for you based -on the groups available from YOUR server. It is written in python - a -splendid interpreted object-oriented language which I suggest you get -right now from the directory /pub/python at ftp.cwi.nl, if you haven't -already got it. - -You should be able to see some sample output by looking at: - http://pelican.cl.cam.ac.uk/newspage/root.html - -Descriptions of newsgroups can be added from a file with one group -per line. eg: - - alt.foo Articles about foo - comp.bar Programming in 'bar' and related languages - -A suitable list detailing most groups can be found at ftp.uu.net in -/uunet-info/newsgroups.gz. - -Make sure you read the information at the beginning of the program source and -configure the variables before running. - -In addition to python, you need: - - An NNTP-based news feed. - A directory in which to put the pages. - -The programming is not very beautiful, but it works! It comes with no -warranty, express or implied, but with the hope that some others may -find it useful. - -Comments, improvements & suggestions welcomed. -Quentin Stafford-Fraser - - ---------------------------------------------------------------------- - Quentin Stafford-Fraser - http://pelican.cl.cam.ac.uk/people/qs101/me.html - - Cambridge University Computer Lab Rank Xerox Cambridge EuroPARC - qs101@cl.cam.ac.uk fraser@europarc.xerox.com - Tel: +44 223 334411 Tel: +44 223 341521 - Fax: +44 223 334679 Fax: +44 223 341510 - ---------------------------------------------------------------------- diff --git a/Demo/scripts/newslist.py b/Demo/scripts/newslist.py deleted file mode 100755 index a91e901..0000000 --- a/Demo/scripts/newslist.py +++ /dev/null @@ -1,362 +0,0 @@ -#! /usr/bin/env python -####################################################################### -# Newslist $Revision$ -# -# Syntax: -# newslist [ -a ] -# -# This is a program to create a directory full of HTML pages -# which between them contain links to all the newsgroups available -# on your server. -# -# The -a option causes a complete list of all groups to be read from -# the server rather than just the ones which have appeared since last -# execution. This recreates the local list from scratch. Use this on -# the first invocation of the program, and from time to time thereafter. -# When new groups are first created they may appear on your server as -# empty groups. By default, empty groups are ignored by the -a option. -# However, these new groups will not be created again, and so will not -# appear in the server's list of 'new groups' at a later date. Hence it -# won't appear until you do a '-a' after some articles have appeared. -# -# I should really keep a list of ignored empty groups and re-check them -# for articles on every run, but I haven't got around to it yet. -# -# This assumes an NNTP news feed. -# -# Feel free to copy, distribute and modify this code for -# non-commercial use. If you make any useful modifications, let me -# know! -# -# (c) Quentin Stafford-Fraser 1994 -# fraser@europarc.xerox.com qs101@cl.cam.ac.uk -# # -####################################################################### -import sys, nntplib, marshal, time, os - -####################################################################### -# Check these variables before running! # - -# Top directory. -# Filenames which don't start with / are taken as being relative to this. -topdir = os.path.expanduser('~/newspage') - -# The name of your NNTP host -# eg. -# newshost = 'nntp-serv.cl.cam.ac.uk' -# or use following to get the name from the NNTPSERVER environment -# variable: -# newshost = os.environ['NNTPSERVER'] -newshost = 'news.example.com' - -# The filename for a local cache of the newsgroup list -treefile = 'grouptree' - -# The filename for descriptions of newsgroups -# I found a suitable one at ftp.uu.net in /uunet-info/newgroups.gz -# You can set this to '' if you don't wish to use one. -descfile = 'newsgroups' - -# The directory in which HTML pages should be created -# eg. -# pagedir = '/usr/local/lib/html/newspage' -# pagedir = 'pages' -pagedir = topdir - -# The html prefix which will refer to this directory -# eg. -# httppref = '/newspage/', -# or leave blank for relative links between pages: (Recommended) -# httppref = '' -httppref = '' - -# The name of the 'root' news page in this directory. -# A .html suffix will be added. -rootpage = 'root' - -# Set skipempty to 0 if you wish to see links to empty groups as well. -# Only affects the -a option. -skipempty = 1 - -# pagelinkicon can contain html to put an icon after links to -# further pages. This helps to make important links stand out. -# Set to '' if not wanted, or '...' is quite a good one. -pagelinkicon = '... ' - -# --------------------------------------------------------------------- -# Less important personal preferences: - -# Sublistsize controls the maximum number of items the will appear as -# an indented sub-list before the whole thing is moved onto a different -# page. The smaller this is, the more pages you will have, but the -# shorter each will be. -sublistsize = 4 - -# That should be all. # -####################################################################### - -for dir in os.curdir, os.environ['HOME']: - rcfile = os.path.join(dir, '.newslistrc.py') - if os.path.exists(rcfile): - print rcfile - execfile(rcfile) - break - -from nntplib import NNTP -from stat import * - -rcsrev = '$Revision$' -rcsrev = ' '.join(filter(lambda s: '$' not in s, rcsrev.split())) -desc = {} - -# Make (possibly) relative filenames into absolute ones -treefile = os.path.join(topdir,treefile) -descfile = os.path.join(topdir,descfile) -page = os.path.join(topdir,pagedir) - -# First the bits for creating trees --------------------------- - -# Addtotree creates/augments a tree from a list of group names -def addtotree(tree, groups): - print 'Updating tree...' - for i in groups: - parts = i.split('.') - makeleaf(tree, parts) - -# Makeleaf makes a leaf and the branch leading to it if necessary -def makeleaf(tree,path): - j = path[0] - l = len(path) - - if j not in tree: - tree[j] = {} - if l == 1: - tree[j]['.'] = '.' - if l > 1: - makeleaf(tree[j],path[1:]) - -# Then the bits for outputting trees as pages ---------------- - -# Createpage creates an HTML file named .html containing links -# to those groups beginning with . - -def createpage(root, tree, p): - filename = os.path.join(pagedir, root+'.html') - if root == rootpage: - detail = '' - else: - detail = ' under ' + root - with open(filename, 'w') as f: - # f.write('Content-Type: text/html\n') - f.write('\n\n') - f.write('Newsgroups available%s\n' % detail) - f.write('\n\n') - f.write('

Newsgroups available%s

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

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

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

  • ' % (httppref, p[1:])) - f.write(p[1:] + '.*') - f.write('%s\n' % pagelinkicon) - createpage(p[1:], tree, p) - return - - kl = tree.keys() - - if l > 1: - kl.sort() - if indent > 0: - # Create a sub-list - f.write('
  • %s\n