{"id":16981525,"url":"https://github.com/saadbazaz/chinesepython","last_synced_at":"2026-05-14T20:02:11.458Z","repository":{"id":109373913,"uuid":"453787876","full_name":"SaadBazaz/ChinesePython","owner":"SaadBazaz","description":"Unofficial upload of ChinesePython, a translation of the Python programming language in Chinese [Provided by UrduPython engineers]","archived":false,"fork":false,"pushed_at":"2022-01-30T20:14:53.000Z","size":6330,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T00:44:06.079Z","etag":null,"topics":["chinese","programming-language"],"latest_commit_sha":null,"homepage":"http://www.chinesepython.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SaadBazaz.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-30T20:02:44.000Z","updated_at":"2022-02-12T08:51:12.000Z","dependencies_parsed_at":"2023-03-10T14:01:01.848Z","dependency_job_id":null,"html_url":"https://github.com/SaadBazaz/ChinesePython","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SaadBazaz/ChinesePython","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadBazaz%2FChinesePython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadBazaz%2FChinesePython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadBazaz%2FChinesePython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadBazaz%2FChinesePython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SaadBazaz","download_url":"https://codeload.github.com/SaadBazaz/ChinesePython/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SaadBazaz%2FChinesePython/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33041204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese","programming-language"],"created_at":"2024-10-14T02:05:43.185Z","updated_at":"2026-05-14T20:02:11.438Z","avatar_url":"https://github.com/SaadBazaz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Downloaded from SourceForge: https://sourceforge.net/projects/chinesepython/\n# (Uploaded as is)\n\n----------------------------------------------------------------------------------\n\nThis is Python version 2.1.3\n============================\n\nCopyright (c) 2001-2002 Python Software Foundation.\nAll rights reserved.\n\nCopyright (c) 2000 BeOpen.com.\nAll rights reserved.\n\nCopyright (c) 1995-2001 Corporation for National Research Initiatives.\nAll rights reserved.\n\nCopyright (c) 1991-1995 Stichting Mathematisch Centrum.\nAll rights reserved.\n\n\nLicense information\n-------------------\n\nSee the file \"LICENSE\" for information on the history of this\nsoftware, terms \u0026 conditions for usage, and a DISCLAIMER OF ALL\nWARRANTIES.\n\nThis Python distribution contains no GNU General Public Licensed\n(GPLed) code so it may be used in proprietary projects just like prior\nPython distributions.  There are interfaces to some GNU code but these\nare entirely optional.\n\nAll trademarks referenced herein are property of their respective\nholders.\n\n\nWhat's new in this release?\n---------------------------\n\nSee the file \"Misc/NEWS\".\n\nIf you don't read instructions\n------------------------------\n\nCongratulations on getting this far. :-)\n\nTo start building right away (on UNIX): type \"./configure\" in the\ncurrent directory and when it finishes, type \"make\".  The section\n`Build Instructions' below is still recommended reading, especially\nthe part on customizing Modules/Setup.\n\n\nWhat is Python anyway?\n----------------------\n\nPython is an interpreted object-oriented programming language suitable\n(amongst other uses) for distributed application development,\nscripting, numeric computing and system testing.  Python is often\ncompared to Tcl, Perl, Java, JavaScript, Visual Basic or Scheme.  To\nfind out more about what Python can do for you, point your browser to\nhttp://www.python.org/.\n\n\nHow do I learn Python?\n----------------------\n\nThe official tutorial is still a good place to start; see\nhttp://www.python.org/doc/ for online and downloadable versions, as\nwell as a list of other introductions, and reference documentation.\n\nThere's a quickly growing set of books on Python.  See\nhttp://www.python.org/psa/bookstore/ for a list.\n\n\nDocumentation\n-------------\n\nAll documentation is provided online in a variety of formats.  In\norder of importance for new users: Tutorial, Library Reference,\nLanguage Reference, Extending \u0026 Embedding, and the Python/C API.  The\nLibrary Reference is especially of immense value since much of\nPython's power is described there, including the built-in data types\nand functions!\n\nAll documentation is also available online at the Python web site\n(http://www.python.org/doc/, see below).  It is available online for\noccasional reference, or can be downloaded in many formats for faster\naccess.  The documentation is available in HTML, PostScript, PDF, and\nLaTeX formats; the LaTeX version is primarily for documentation\nauthors, translators, and people with special formatting requirements.\n\n\nWeb sites\n---------\n\nNew Python releases and related technologies are published at\nhttp://www.python.org/.  Come visit us!\n\nThere's also a Python community web site at http://starship.python.net/.\n\n\nNewsgroups and Mailing Lists\n----------------------------\n\nRead comp.lang.python, a high-volume discussion newsgroup about\nPython, or comp.lang.python.announce, a low-volume moderated newsgroup\nfor Python-related announcements.  These are also accessible as\nmailing lists: see http://www.python.org/psa/MailingLists.html for an\noverview of the many Python-related mailing lists.\n\nArchives are accessible via Deja.com Usenet News: see\nhttp://www.deja.com/usenet.  The mailing lists are also archived, see\nhttp://www.python.org/psa/MailingLists.html for details.\n\n\nBug reports\n-----------\n\nTo report or search for bugs, please use the Python Bug\nTracker at http://sourceforge.net/bugs/?group_id=5470.\n\n\nPatches and contributions\n-------------------------\n\nTo submit a patch or other contribution, please use the Python Patch\nManager at http://sourceforge.net/patch/?group_id=5470.  Guidelines\nfor patch submission may be found at http://www.python.org/patches/.\n\nIf you have a proposal to change Python, it's best to submit a Python\nEnhancement Proposal (PEP) first.  All current PEPs, as well as\nguidelines for submitting a new PEP, are list at\nhttp://python.sourceforge.net/peps/.\n\n\nQuestions\n---------\n\nFor help, if you can't find it in the manuals or on the web site, it's\nbest to post to the comp.lang.python or the Python mailing list (see\nabove).  If you specifically don't want to involve the newsgroup or\nmailing list, send questions to help@python.org (a group of volunteers\nwho answer questions as they can).  The newsgroup is the most\nefficient way to ask public questions.\n\n\nBuild instructions\n==================\n\nBefore you can build Python, you must first configure it.  Fortunately,\nthe configuration and build process has been streamlined for most Unix\ninstallations, so all you have to do is type a few commands,\noptionally edit one file, and sit back.  There are some platforms\nwhere things are not quite as smooth; see the platform specific notes\nbelow.  If you want to build for multiple platforms sharing the same\nsource tree, see the section on VPATH below.\n\nStart by running the script \"./configure\", which determines your system\nconfiguration and creates the Makefile.  (It takes a minute or two --\nplease be patient!)  You may want to pass options to the configure\nscript or edit the Modules/Setup file after running configure -- see the\nsection below on configuration options and variables.  When it's done,\nyou are ready to run make.\n\nTo build Python, you normally type \"make\" in the toplevel directory.  If\nyou have changed the configuration or have modified Modules/Setup, the\nMakefile may have to be rebuilt.  In this case you may have to run make\nagain to correctly build your desired target.  The interpreter\nexecutable is built in the top level directory.\n\nOnce you have built a Python interpreter, see the subsections below on\ntesting, configuring additional modules, and installation.  If you run\ninto trouble, see the next section.  Editing the Modules/Setup file\nafter running make is supported; just run \"make\" again after making\nthe desired changes.\n\n\nTroubleshooting\n---------------\n\nSee also the platform specific notes in the next section.\n\nIf you run into other trouble, see section 3 of the FAQ\n(http://www.python.org/cgi-bin/faqw.py or\nhttp://www.python.org/doc/FAQ.html) for hints on what can go wrong,\nand how to fix it.\n\nIf you rerun the configure script with different options, remove all\nobject files by running \"make clean\" before rebuilding.  Believe it or\nnot, \"make clean\" sometimes helps to clean up other inexplicable\nproblems as well.  Try it before sending in a bug report!\n\nIf the configure script fails or doesn't seem to find things that\nshould be there, inspect the config.log file.  When you fix a\nconfigure problem, be sure to remove config.cache!\n\nIf you get a warning for every file about the -Olimit option being no\nlonger supported, you can ignore it.  There's no foolproof way to know\nwhether this option is needed; all we can do is test whether it is\naccepted without error.  On some systems, e.g. older SGI compilers, it\nis essential for performance (specifically when compiling ceval.c,\nwhich has more basic blocks than the default limit of 1000).  If the\nwarning bothers you, edit the Makefile to remove \"-Olimit 1500\" from\nthe OPT variable.\n\nIf you get failures in test_long, or sys.maxint gets set to -1, you\nare probably experiencing compiler bugs, usually related to\noptimization.  This is a common problem with some versions of gcc and\negcs, and some vendor-supplied compilers, which can sometimes be\nworked around by turning off optimization.  Consider switching to\nstable versions (gcc 2.7.2.3, egcs 1.1.2, or contact your vendor.)\n\nFrom Python 2.0 onward, all Python C code is ANSI C.  Compiling using\nold K\u0026R-C-only compilers is no longer possible.  ANSI C compilers are\navailable for all modern systems, either in the form of updated\ncompilers from the vendor, or one of the free compilers (gcc, egcs).\n\nPlatform specific notes\n-----------------------\n\n(Some of these may no longer apply.  If you find you can build Python\non these platforms without the special directions mentioned here,\nsubmit a documentation bug report to SourceForge (see Bug Reports\nabove) so we can remove them!)\n\n64-bit platforms: The modules audioop, imageop and rgbimg don't work.\n\tDon't try to enable them in the Modules/Setup file.  They\n\tcontain code that is quite wordsize sensitive.  (If you have a\n\tfix, let us know!)\n\nSolaris: When using Sun's C compiler, it's necessary to compile in\n        strict ANSI mode with multithreading enabled. This can be done\n        by setting the 'CC' environment variable to 'cc -Xc -mt'\n        before running the configure script. ANSI-compatibility mode\n        ('-Xa') has been seen to compile the code without problems,\n        but generate faulty code.\n\nLinux:  A problem with threads and fork() was tracked down to a bug in\n\tthe pthreads code in glibc version 2.0.5; glibc version 2.0.7\n\tsolves the problem.  This causes the popen2 test to fail;\n\tproblem and solution reported by Pablo Bleyer.\n\n\tUnder Linux systems using GNU libc 2 (aka libc6), the crypt\n\tmodule now needs the -lcrypt option.  Uncomment this flag in\n\tModules/Setup, or comment out the crypt module in the same\n\tfile. Most modern Linux systems use glibc2.\n\nFreeBSD 3.x and probably platforms with NCurses that use libmytinfo or\n\tsimilar: When using cursesmodule, the linking is not done in\n\tthe correct order with the defaults.  Remove \"-ltermcap\" from\n\tthe readline entry in Setup, and use as curses entry: \"curses\n\tcursesmodule.c -lmytinfo -lncurses -ltermcap\" - \"mytinfo\" (so\n\tcalled on FreeBSD) should be the name of the auxiliary library\n\trequired on your platform.  Normally, it would be linked\n\tautomatically, but not necessarily in the correct order.\n\nBSDI:\tBSDI versions before 4.1 have known problems with threads,\n\twhich can cause strange errors in a number of modules (for\n\tinstance, the 'test_signal' test script will hang forever.)\n\tTurning off threads (with --with-threads=no) or upgrading to\n\tBSDI 4.1 solves this problem.\n\nDEC Unix: Run configure with --with-dec-threads, or with\n\t--with-threads=no if no threads are desired (threads are on by\n\tdefault).  When using GCC, it is possible to get an internal\n\tcompiler error if optimization is used.  This was reported for\n\tGCC 2.7.2.3 on selectmodule.c.  Manually compile the affected\n\tfile without optimization to solve the problem.\n\nDEC Ultrix: compile with GCC to avoid bugs in the native compiler,\n\tand pass SHELL=/bin/sh5 to Make when installing.\n\nAIX:\tA complete overhaul of the shared library support is now in\n\tplace.  See Misc/AIX-NOTES for some notes on how it's done.\n\t(The optimizer bug reported at this place in previous releases\n\thas been worked around by a minimal code change.) If you get\n\terrors about ptread_* functions, during compile or during\n\ttesting, try setting CC to a thread-safe (reentrant) compiler,\n\tlike \"cc_r\".  For full C++ module support, set CC=\"xlC_r\" (or\n\tCC=\"xlC\" without thread support).\n\nHP-UX:\tPlease read the file Misc/HPUX-NOTES for shared libraries.\n\tWhen using threading, you may have to add -D_REENTRANT to the\n\tOPT variable in the top-level Makefile; reported by Pat Knight,\n\tthis seems to make a difference (at least for HP-UX 10.20)\n\teven though config.h defines it.\n\nMinix:  When using ack, use \"CC=cc AR=aal RANLIB=: ./configure\"!\n\nSCO:\tThe following apply to SCO 3 only; Python builds out of the box\n\ton SCO 5 (or so we've heard).\n\n\t1) Everything works much better if you add -U__STDC__ to the\n\tdefs.  This is because all the SCO header files are broken.\n\tAnything that isn't mentioned in the C standard is\n\tconditionally excluded when __STDC__ is defined.\n\n\t2) Due to the U.S. export restrictions, SCO broke the crypt\n\tstuff out into a separate library, libcrypt_i.a so the LIBS\n\tneeded be set to:\n\n\t\tLIBS=' -lsocket -lcrypt_i'\n\nSunOS 4.x: When using the SunPro C compiler, you may want to use the\n\t'-Xa' option instead of '-Xc', to enable some needed non-ANSI\n\tSunisms.\n\nNeXT:   To build fat binaries, use the --with-next-archs switch\n\tdescribed below.\n\nQNX:\tChris Herborth (chrish@qnx.com) writes:\n\tconfigure works best if you use GNU bash; a port is available on\n\tftp.qnx.com in /usr/free.  I used the following process to build,\n\ttest and install Python 1.5.x under QNX:\n\n\t1) CONFIG_SHELL=/usr/local/bin/bash CC=cc RANLIB=: \\\n\t    ./configure --verbose --without-gcc --with-libm=\"\"\n\n\t2) edit Modules/Setup to activate everything that makes sense for\n\t   your system... tested here at QNX with the following modules:\n\n\t\tarray, audioop, binascii, cPickle, cStringIO, cmath,\n\t\tcrypt, curses, errno, fcntl, gdbm, grp, imageop,\n\t\t_locale, math, md5, new, operator, parser, pcre,\n\t\tposix, pwd, readline, regex, reop, rgbimg, rotor,\n\t\tselect, signal, socket, soundex, strop, struct,\n\t\tsyslog, termios, time, timing, zlib, audioop, imageop, rgbimg\n\n\t3) make SHELL=/usr/local/bin/bash\n\n\t   or, if you feel the need for speed:\n\n\t   make SHELL=/usr/local/bin/bash OPT=\"-5 -Oil+nrt\"\n\n\t4) make SHELL=/usr/local/bin/bash test\n\n\t   Using GNU readline 2.2 seems to behave strangely, but I\n\t   think that's a problem with my readline 2.2 port.  :-\\\n\n\t5) make SHELL=/usr/local/bin/bash install\n\n\tIf you get SIGSEGVs while running Python (I haven't yet, but\n\tI've only run small programs and the test cases), you're\n\tprobably running out of stack; the default 32k could be a\n\tlittle tight.  To increase the stack size, edit the Makefile\n\tto read: LDFLAGS = -N 48k\n\nBeOS:\tChris Herborth (chrish@qnx.com) writes:\n\tSee BeOS/README for notes about compiling/installing Python on\n\tBeOS R3 or later.  Note that only the PowerPC platform is\n\tsupported for R3; both PowerPC and x86 are supported for R4.\n\nCray T3E: Konrad Hinsen writes:\n\t1) Don't use gcc. It compiles Python/graminit.c into something\n\t   that the Cray assembler doesn't like. Cray's cc seems to work\n\t   fine.\n\t2) Comment out modules md5 (won't compile) and audioop (will\n\t   crash the interpreter during the test suite).\n\tIf you run the test suite, two tests will fail (rotate and\n\tbinascii), but these are not the modules you'd expect to need\n\ton a Cray.\n\nSGI:\tSGI's standard \"make\" utility (/bin/make or /usr/bin/make)\n\tdoes not check whether a command actually changed the file it\n\tis supposed to build.  This means that whenever you say \"make\"\n\tit will redo the link step.  The remedy is to use SGI's much\n\tsmarter \"smake\" utility (/usr/sbin/smake), or GNU make.  If\n\tyou set the first line of the Makefile to #!/usr/sbin/smake\n\tsmake will be invoked by make (likewise for GNU make).\n\n\tWARNING: There are bugs in the optimizer of some versions of\n\tSGI's compilers that can cause bus errors or other strange\n\tbehavior, especially on numerical operations.  To avoid this,\n\ttry building with \"make OPT=\".\n\nOS/2:   If you are running Warp3 or Warp4 and have IBM's VisualAge C/C++\n        compiler installed, just change into the pc\\os2vacpp directory\n        and type NMAKE.  Threading and sockets are supported by default\n        in the resulting binaries of PYTHON15.DLL and PYTHON.EXE.\n\nMonterey (64-bit AIX): The current Monterey C compiler (Visual Age)\n        uses the OBJECT_MODE={32|64} environment variable to set the\n        compilation mode to either 32-bit or 64-bit (32-bit mode is\n        the default).  Presumably you want 64-bit compilation mode for\n        this 64-bit OS.  As a result you must first set OBJECT_MODE=64\n        in your environment before configuring (./configure) or\n        building (make) Python on Monterey.\n\nReliant UNIX: The thread support does not compile on Reliant UNIX, and\n        there is a (minor) problem in the configure script for that\n        platform as well.  This should be resolved in time for a\n        future release.\n\nMac OS X 10.0: Run configure with \"OPT='-no-cpp-precomp' ./configure\n        --with-suffix=.exe --with-dyld\".  This generates executable\n        file: 'python.exe' (it cannot be named 'python' on an HFS or\n        HFS+ disk as the file name clashes with directory 'Python').\n        The '-no-cpp-precomp' option prevents a large number of\n        compilation warnings.  One of the regular expression tests\n        fails with a SEGV due to the small stack size used by default\n        (how to change this?), and the test_largefile test is only\n        expected to work on a Unix UFS filesystem (how to check for\n        this on Mac OS X?).\n\nMac OS X 10.1: Run configure with \n        \"./configure --with-suffix=.x --with-dyld\". \n        This generates executable file: 'python.x' \n        (it cannot be named 'python' on an HFS or HFS+ \n        disk as the file name clashes with directory 'Python').\n\n        The makefile is set up to correctly handle two-\n        level namespaces for Mac OS X v10.1 and 10.0.x\n        systems. However, running the prebinding tool on\n        Mac OS X 10.0.x again will cause the tool to break\n        as it cannot handle two level namespaces.\n\n        The default Mac OS X has a default stacksize\n        of 512K which causes the regular expression\n        tests (RE and SRE) to SEGV. To temporarily\n        increase the stacksize, type 'limit stacksize 2M' in\n        the terminal window before running 'make test'.\n\n        The test_largefile test will work on HFS+ and\n        UFS filesystem, providing you have enough space\n        and time.\n\n        After sudo 'make installation', do the following\n        commands:\n        cd /usr/local/bin/\n        sudo mv python.x python\n        sudo mv python2.1.x python2.1\n\nCygwin: Cygwin Python builds OOTB when configured as follows:\n\n            configure --with-threads=no\n\n        assuming Cygwin 1.1.8-2 and gcc 2.95.3-1 or later.  At the time\n        of this writing, Cygwin pthread support is being significantly\n        enhanced.  Hopefully, there will be a Cygwin Python with thread\n        support soon.\n\n        Cygwin Python supports the building of shared extensions via the\n        traditional Misc/Makefile.pre.in and the newer distutils methods.\n\n        On NT/2000, the following regression tests fail:\n\n            test_poll (hang)\n            test_strftime\n\n        Due to the test_poll hang on NT/2000, one should run the\n        regression test using the following:\n\n            PYTHONPATH= ./python.exe -tt ./Lib/test/regrtest.py -l -x test_poll\n\n        On 9X/Me, in addition the above NT/2000 failures, it has been\n        reported that the following regression tests also fail:\n\n            test_pwd\n            test_select (hang)\n            test_socket\n\n        Due to the test_poll and test_select hang on 9X/Me, one should\n        run the regression test using the following:\n\n            PYTHONPATH= ./python.exe -tt ./Lib/test/regrtest.py -l -x test_poll -x test_select\n\n        Help trying to track down the root causes for these known problems\n        will be greatly appreciated.\n\n\nConfiguring threads\n-------------------\n\nAs of Python 2.0, threads are enabled by default.  If you wish to\ncompile without threads, or if your thread support is broken, pass the\n--with-threads=no switch to configure.  Unfortunately, on some\nplatforms, additional compiler and/or linker options are required for\nthreads to work properly.  Below is a table of those options,\ncollected by Bill Janssen.  We would love to automate this process\nmore, but the information below is not enough to write a patch for the\nconfigure.in file, so manual intervention is required.  If you patch\nthe configure.in file and are confident that the patch works, please\nsend in the patch.  (Don't bother patching the configure script itself\n-- it is regenerated each the configure.in file changes.)\n\nCompiler switches for threads\n.............................\n\nThe definition of _REENTRANT should be configured automatically, if\nthat does not work on your system, or if _REENTRANT is defined\nincorrectly, please report that as a bug.\n\n    OS/Compiler/threads                     Switches for use with threads\n    (POSIX is draft 10, DCE is draft 4)     compile \u0026 link\n\n    SunOS 5.{1-5}/{gcc,SunPro cc}/solaris   -mt\n    SunOS 5.5/{gcc,SunPro cc}/POSIX         (nothing)\n    DEC OSF/1 3.x/cc/DCE                    -threads\n\t    (butenhof@zko.dec.com)\n    Digital UNIX 4.x/cc/DCE                 -threads\n\t    (butenhof@zko.dec.com)\n    Digital UNIX 4.x/cc/POSIX               -pthread\n\t    (butenhof@zko.dec.com)\n    AIX 4.1.4/cc_r/d7                       (nothing)\n\t    (buhrt@iquest.net)\n    AIX 4.1.4/cc_r4/DCE                     (nothing)\n\t    (buhrt@iquest.net)\n    IRIX 6.2/cc/POSIX                       (nothing)\n\t    (robertl@cwi.nl)\n\n\nLinker (ld) libraries and flags for threads\n...........................................\n\n    OS/threads                          Libraries/switches for use with threads\n\n    SunOS 5.{1-5}/solaris               -lthread\n    SunOS 5.5/POSIX                     -lpthread\n    DEC OSF/1 3.x/DCE                   -lpthreads -lmach -lc_r -lc\n\t    (butenhof@zko.dec.com)\n    Digital UNIX 4.x/DCE                -lpthreads -lpthread -lmach -lexc -lc\n\t    (butenhof@zko.dec.com)\n    Digital UNIX 4.x/POSIX              -lpthread -lmach -lexc -lc\n\t    (butenhof@zko.dec.com)\n    AIX 4.1.4/{draft7,DCE}              (nothing)\n\t    (buhrt@iquest.net)\n    IRIX 6.2/POSIX                      -lpthread\n\t    (jph@emilia.engr.sgi.com)\n\n\nConfiguring additional built-in modules\n---------------------------------------\n\nStarting with Python 2.1, the setup.py script at the top of the source\ndistribution attempts to detect which modules can be built and\nautomatically compiles them.  Autodetection doesn't always work, so\nyou can customize the configuration by editing the Modules/Setup file.\nThis file is initially copied from Setup.dist by the configure script;\nif it does not exist yet, create it by copying Modules/Setup.dist\nyourself (configure will never overwrite it).  Never edit Setup.dist\n-- always edit Setup or Setup.local (see below).  Read the comments in\nthe file for information on what kind of edits are allowed.  When you\nhave edited Setup in the Modules directory, the interpreter will\nautomatically be rebuilt the next time you run make in the toplevel\ndirectory.  (When working inside the Modules directory, use \"make\nMakefile; make\".)\n\nMany useful modules can be built on any Unix system, but some optional\nmodules can't be reliably autodetected.  Often the quickest way to\ndetermine whether a particular module works or not is to see if it\nwill build: enable it in Setup, then if you get compilation or link\nerrors, disable it -- you're either missing support or need to adjust\nthe compilation and linking parameters for that module.\n\nOn SGI IRIX, there are modules that interface to many SGI specific\nsystem libraries, e.g. the GL library and the audio hardware.  These\nmodules will not be built by the setup.py script.\n\nIn addition to the file Setup, you can also edit the file Setup.local.\n(the makesetup script processes both).  You may find it more\nconvenient to edit Setup.local and leave Setup alone.  Then, when\ninstalling a new Python version, you can copy your old Setup.local\nfile.\n\n\nSetting the optimization/debugging options\n------------------------------------------\n\nIf you want or need to change the optimization/debugging options for\nthe C compiler, assign to the OPT variable on the toplevel make\ncommand; e.g. \"make OPT=-g\" will build a debugging version of Python\non most platforms.  The default is OPT=-O; a value for OPT in the\nenvironment when the configure script is run overrides this default\n(likewise for CC; and the initial value for LIBS is used as the base\nset of libraries to link with).\n\nWhen compiling with GCC, the default value of OPT will also include\nthe -Wall and -Wstrict-prototypes options.\n\nAdditional debugging code to help debug memory management problems can\nbe enabled by using the --with-pydebug option to the configure script.\n\n\nTesting\n-------\n\nTo test the interpreter, type \"make test\" in the top-level directory.\nThis runs the test set twice (once with no compiled files, once with\nthe compiled files left by the previous test run).  The test set\nproduces some output.  You can generally ignore the messages about\nskipped tests due to optional features which can't be imported.  (If\nyou want to test those modules, edit Modules/Setup to configure them.)\nIf a message is printed about a failed test or a traceback or core\ndump is produced, something is wrong.  On some Linux systems (those\nthat are not yet using glibc 6), test_strftime fails due to a\nnon-standard implementation of strftime() in the C library. Please\nignore this, or upgrade to glibc version 6.\n\nIMPORTANT: If the tests fail and you decide to mail a bug report,\n*don't* include the output of \"make test\".  It is useless.  Run the\nfailing test manually, as follows:\n\n\tpython ../Lib/test/test_whatever.py\n\n(substituting the top of the source tree for .. if you built in a\ndifferent directory).  This runs the test in verbose mode.\n\n\nInstalling\n----------\n\nTo install the Python binary, library modules, shared library modules\n(see below), include files, configuration files, and the manual page,\njust type\n\n\tmake install\n\nThis will install all platform-independent files in subdirectories of\nthe directory given with the --prefix option to configure or to the\n`prefix' Make variable (default /usr/local).  All binary and other\nplatform-specific files will be installed in subdirectories if the\ndirectory given by --exec-prefix or the `exec_prefix' Make variable\n(defaults to the --prefix directory) is given.\n\nAll subdirectories created will have Python's version number in their\nname, e.g. the library modules are installed in\n\"/usr/local/lib/python\u003cversion\u003e/\" by default, where \u003cversion\u003e is the\n\u003cmajor\u003e.\u003cminor\u003e release number (e.g. \"2.1\").  The Python binary is\ninstalled as \"python\u003cversion\u003e\" and a hard link named \"python\" is\ncreated.  The only file not installed with a version number in its\nname is the manual page, installed as \"/usr/local/man/man1/python.1\"\nby default.\n\nIf you have a previous installation of Python that you don't\nwant to replace yet, use\n\n\tmake altinstall\n\nThis installs the same set of files as \"make install\" except it\ndoesn't create the hard link to \"python\u003cversion\u003e\" named \"python\" and\nit doesn't install the manual page at all.\n\nAlpha/beta revision levels are stripped from the executable and\nlibrary filenames during installation. For example, Python2.1a2 will\ninstall as python2.1, overwriting the previous python2.1. To avoid\nthis, you could set the Makefile VERSION variable manually\n(e.g. VERSION=2.1a2) before running \"make install\" or \"make altinstall\".\n\nThe only thing you may have to install manually is the Python mode for\nEmacs found in Misc/python-mode.el.  (But then again, more recent\nversions of Emacs may already have it.)  Follow the instructions that\ncame with Emacs for installation of site-specific files.\n\n\nConfiguration options and variables\n-----------------------------------\n\nSome special cases are handled by passing options to the configure\nscript.\n\nWARNING: if you rerun the configure script with different options, you\nmust run \"make clean\" before rebuilding.  Exceptions to this rule:\nafter changing --prefix or --exec-prefix, all you need to do is remove\nModules/getpath.o.\n\n--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if\n\tit finds it.  If you don't want this, or if this compiler is\n\tinstalled but broken on your platform, pass the option\n\t--without-gcc.  You can also pass \"CC=cc\" (or whatever the\n\tname of the proper C compiler is) in the environment, but the\n\tadvantage of using --without-gcc is that this option is\n\tremembered by the config.status script for its --recheck\n\toption.\n\n--prefix, --exec-prefix: If you want to install the binaries and the\n\tPython library somewhere else than in /usr/local/{bin,lib},\n\tyou can pass the option --prefix=DIRECTORY; the interpreter\n\tbinary will be installed as DIRECTORY/bin/python and the\n\tlibrary files as DIRECTORY/lib/python/*.  If you pass\n\t--exec-prefix=DIRECTORY (as well) this overrides the\n\tinstallation prefix for architecture-dependent files (like the\n\tinterpreter binary).  Note that --prefix=DIRECTORY also\n\taffects the default module search path (sys.path), when\n\tModules/config.c is compiled.  Passing make the option\n\tprefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the\n\tprefix set at configuration time; this may be more convenient\n\tthan re-running the configure script if you change your mind\n\tabout the install prefix.\n\n--with-readline: This option is no longer supported.  To use GNU\n\treadline, enable module \"readline\" in the Modules/Setup file.\n\n--with-threads: On most Unix systems, you can now use multiple\n\tthreads, and support for this is enabled by default.  To\n\tdisable this, pass --with-threads=no.  If the library required\n\tfor threads lives in a peculiar place, you can use\n\t--with-thread=DIRECTORY.  IMPORTANT: run \"make clean\" after\n\tchanging (either enabling or disabling) this option, or you\n\twill get link errors!  Note: for DEC Unix use\n\t--with-dec-threads instead.\n\n--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is\n\tsupported by the \"dl\" library by Jack Jansen, which is\n\tftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.\n\tThis is enabled (after you've ftp'ed and compiled the dl\n\tlibrary) by passing --with-sgi-dl=DIRECTORY where DIRECTORY\n\tis the absolute pathname of the dl library.  (Don't bother on\n\tIRIX 5, it already has dynamic linking using SunOS style\n\tshared libraries.)  Support for this feature is deprecated.\n\n--with-dl-dld: Dynamic loading of modules is rumored to be supported\n\ton some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent\n\tSymmetry (Dynix), and Atari ST.  This is done using a\n\tcombination of the GNU dynamic loading package\n\t(ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an\n\temulation of the SGI dl library mentioned above (the emulation\n\tcan be found at\n\tftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z).  To\n\tenable this, ftp and compile both libraries, then call\n\tconfigure, passing it the option\n\t--with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is\n\tthe absolute pathname of the dl emulation library and\n\tDLD_DIRECTORY is the absolute pathname of the GNU dld library.\n\t(Don't bother on SunOS 4 or 5, they already have dynamic\n\tlinking using shared libraries.)  Support for this feature is\n\tdeprecated.\n\n--with-libm, --with-libc: It is possible to specify alternative\n\tversions for the Math library (default -lm) and the C library\n\t(default the empty string) using the options\n\t--with-libm=STRING and --with-libc=STRING, respectively.  For\n\texample, if your system requires that you pass -lc_s to the C\n\tcompiler to use the shared C library, you can pass\n\t--with-libc=-lc_s. These libraries are passed after all other\n\tlibraries, the C library last.\n\n--with-next-archs='arch1 arch2': Under NEXTSTEP, this will build\n\tall compiled binaries with the architectures listed.  This will\n\talso correctly set the target architecture-specific resource\n\tdirectory.  (This option is not supported on other platforms.)\n\n--with-libs='libs': Add 'libs' to the LIBS that the python interpreter\n\tis linked against.\n\n--with-cxx=\u003ccompiler\u003e: Some C++ compilers require that main() is\n        compiled with the C++ if there is any C++ code in the application.\n        Specifically, g++ on a.out systems may require that to support\n        construction of global objects. With this option, the main() function\n        of Python will be compiled with \u003ccompiler\u003e; use that only if you\n        plan to use C++ extension modules, and if your compiler requires\n        compilation of main() as a C++ program.\n\n\n--with-pydebug:  Enable additional debugging code to help track down\n\tmemory management problems.  This allows printing a list of all\n\tlive objects when the interpreter terminates.\n\n\nBuilding for multiple architectures (using the VPATH feature)\n-------------------------------------------------------------\n\nIf your file system is shared between multiple architectures, it\nusually is not necessary to make copies of the sources for each\narchitecture you want to support.  If the make program supports the\nVPATH feature, you can create an empty build directory for each\narchitecture, and in each directory run the configure script (on the\nappropriate machine with the appropriate options).  This creates the\nnecessary subdirectories and the Makefiles therein.  The Makefiles\ncontain a line VPATH=... which points to a directory containing the\nactual sources.  (On SGI systems, use \"smake -J1\" instead of \"make\" if\nyou use VPATH -- don't try gnumake.)\n\nFor example, the following is all you need to build a minimal Python\nin /usr/tmp/python (assuming ~guido/src/python is the toplevel\ndirectory and you want to build in /usr/tmp/python):\n\n\t$ mkdir /usr/tmp/python\n\t$ cd /usr/tmp/python\n\t$ ~guido/src/python/configure\n\t[...]\n\t$ make\n\t[...]\n\t$\n\nNote that configure copies the original Setup file to the build\ndirectory if it finds no Setup file there.  This means that you can\nedit the Setup file for each architecture independently.  For this\nreason, subsequent changes to the original Setup file are not tracked\nautomatically, as they might overwrite local changes.  To force a copy\nof a changed original Setup file, delete the target Setup file.  (The\nmakesetup script supports multiple input files, so if you want to be\nfancy you can change the rules to create an empty Setup.local if it\ndoesn't exist and run it with arguments $(srcdir)/Setup Setup.local;\nhowever this assumes that you only need to add modules.)\n\n\nBuilding on non-UNIX systems\n----------------------------\n\nFor Windows (2000/NT/ME/98/95), assuming you have MS VC++ 6.0, the\nproject files are in PCbuild, the workspace is pcbuild.dsw.  See\nPCbuild\\readme.txt for detailed instructions.\n\nFor other non-Unix Windows compilers, in particular Windows 3.1 and\nfor OS/2, enter the directory \"PC\" and read the file \"readme.txt\".\n\nFor the Mac, a separate source distribution will be made available,\nfor use with the CodeWarrior compiler.  If you are interested in Mac\ndevelopment, join the PythonMac Special Interest Group\n(http://www.python.org/sigs/pythonmac-sig/, or send email to\npythonmac-sig-request@python.org).\n\nOf course, there are also binary distributions available for these\nplatforms -- see http://www.python.org/.\n\nTo port Python to a new non-UNIX system, you will have to fake the\neffect of running the configure script manually (for Mac and PC, this\nhas already been done for you).  A good start is to copy the file\nconfig.h.in to config.h and edit the latter to reflect the actual\nconfiguration of your system.  Most symbols must simply be defined as\n1 only if the corresponding feature is present and can be left alone\notherwise; however the *_t type symbols must be defined as some variant\nof int if they need to be defined at all.\n\n\n\nMiscellaneous issues\n====================\n\nEmacs mode\n----------\n\nThere's an excellent Emacs editing mode for Python code; see the file\nMisc/python-mode.el.  Originally written by the famous Tim Peters, it\nis now maintained by the equally famous Barry Warsaw (it's no\ncoincidence that they now both work on the same team).  The latest\nversion, along with various other contributed Python-related Emacs\ngoodies, is online at http://www.python.org/emacs/python-mode.  And\nif you are planning to edit the Python C code, please pick up the\nlatest version of CC Mode http://www.python.org/emacs/cc-mode; it\ncontains a \"python\" style used throughout most of the Python C source\nfiles.  (Newer versions of Emacs or XEmacs may already come with the\nlatest version of python-mode.)\n\n\nThe Tk interface\n----------------\n\nTk (the user interface component of John Ousterhout's Tcl language) is\nalso usable from Python.  Since this requires that you first build and\ninstall Tcl/Tk, the Tk interface is not enabled by default when\nbuilding Python from source.  Python supports Tcl/Tk version 8.0 and\nhigher.\n\nSee http://dev.ajubasolutions.com/ for more info on Tcl/Tk, including\nthe on-line manual pages.\n\n\nTo enable the Python/Tk interface, once you've built and installed\nTcl/Tk, load the file Modules/Setup into your favorite text editor and\nsearch for the string \"_tkinter\".  Then follow the instructions found\nthere.  If you have installed Tcl/Tk or X11 in unusual places, you\nwill have to edit the first line to fix or add the -I and -L options.\n(Also see the general instructions at the top of that file.)\n\nFor more Tkinter information, see the Tkinter Resource page:\nhttp://www.python.org/topics/tkinter/\n\nThere are demos in the Demo/tkinter directory, in the subdirectories\nguido, matt and www (the matt and guido subdirectories have been\noverhauled to use more recent Tkinter coding conventions).\n\nNote that there's a Python module called \"Tkinter\" (capital T) which\nlives in Lib/lib-tk/Tkinter.py, and a C module called \"_tkinter\"\n(lower case t and leading underscore) which lives in\nModules/_tkinter.c.  Demos and normal Tk applications import only the\nPython Tkinter module -- the latter uses the C _tkinter module\ndirectly.  In order to find the C _tkinter module, it must be compiled\nand linked into the Python interpreter -- the _tkinter line in the\nSetup file does this.  In order to find the Python Tkinter module,\nsys.path must be set correctly -- the TKPATH assignment in the Setup\nfile takes care of this, but only if you install Python properly\n(\"make install libinstall\").  (You can also use dynamic loading for\nthe C _tkinter module, in which case you must manually fix up sys.path\nor set $PYTHONPATH for the Python Tkinter module.)\n\n\nDistribution structure\n----------------------\n\nMost subdirectories have their own README files.  Most files have\ncomments.\n\n.cvsignore\tAdditional filename matching patterns for CVS to ignore\nBeOS/\t\tFiles specific to the BeOS port\nDemo/           Demonstration scripts, modules and programs\nDoc/\t\tDocumentation sources (LaTeX)\nGrammar/        Input for the parser generator\nInclude/        Public header files\nLICENSE\t\tLicensing information\nLib/            Python library modules\nMakefile.pre.in Source from which config.status creates the Makefile.pre\nMisc/           Miscellaneous useful files\nModules/        Implementation of most built-in modules\nObjects/        Implementation of most built-in object types\nPC/             Files specific to PC ports (DOS, Windows, OS/2)\nPCbuild/\tBuild directory for Microsoft Visual C++\nParser/         The parser and tokenizer and their input handling\nPython/         The byte-compiler and interpreter\nREADME          The file you're reading now\nTools/          Some useful programs written in Python\nacconfig.h      Additional input for the GNU autoheader program\nconfig.h.in     Source from which config.h is created (GNU autoheader output)\nconfigure       Configuration shell script (GNU autoconf output)\nconfigure.in    Configuration specification (input for GNU autoconf)\ninstall-sh      Shell script used to install files\n\nThe following files will (may) be created in the toplevel directory by\nthe configuration and build processes:\n\nMakefile        Build rules\nMakefile.pre    Build rules before running Modules/makesetup\nbuildno\t\tKeeps track of the build number\nconfig.cache    Cache of configuration variables\nconfig.h        Configuration header\nconfig.log      Log from last configure run\nconfig.status   Status from last run of the configure script\ngetbuildinfo.o\tObject file from Modules/getbuildinfo.c\nlibpython\u003cversion\u003e.a\tThe library archive\npython          The executable interpreter\ntags, TAGS      Tags files for vi and Emacs\n\n\nThat's all, folks!\n------------------\n\n\n--Guido van Rossum (home page: http://www.python.org/~guido/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadbazaz%2Fchinesepython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaadbazaz%2Fchinesepython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaadbazaz%2Fchinesepython/lists"}