| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 1 | This is Python release 1.5 alpha 3 | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 2 | ================================== | 
| Guido van Rossum | faf681a | 1996-06-20 14:32:08 +0000 | [diff] [blame] | 3 |  | 
| Guido van Rossum | 33fde57 | 1997-05-09 02:40:09 +0000 | [diff] [blame] | 4 | ****************************************** | 
 | 5 | *** RELEASE RESTRICTED TO PSA MEMBERS! *** | 
 | 6 | ****************************************** | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7 |  | 
| Guido van Rossum | 8d7d4ed | 1996-07-30 21:41:07 +0000 | [diff] [blame] | 8 | What's new in this release? | 
 | 9 | --------------------------- | 
| Guido van Rossum | 3ff96dd | 1996-07-30 18:05:04 +0000 | [diff] [blame] | 10 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 11 | Too much has changed to list it all here.  There's a long list of | 
 | 12 | changes in Misc/NEWS.  That's still not complete, but it's getting | 
 | 13 | there...  I'm working my way through a year of change logs to extract | 
 | 14 | meaningful descriptions of all but the most insignificant changes. | 
| Guido van Rossum | 33fde57 | 1997-05-09 02:40:09 +0000 | [diff] [blame] | 15 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 16 | Here are the most importand changes since 1.5a2: | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 17 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 18 |   - The new "re" module is here (still very experimental).  This is a | 
 | 19 |   new regular expression package that uses Perl syntax and solves some | 
 | 20 |   thread-safeness problems with the matching interface. | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 21 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 22 |   - In support of the re module, a new form of string literals is | 
 | 23 |   introduced, "raw strings": e.g. r"\n" is equal to "\\n". | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 24 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 25 |   - Many previously undocumented modules are now documented; some are | 
 | 26 |   now officially obsolete or deprecated.  (Thanks Andrew Kuchling!) | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 27 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 28 |   - The build process now builds a single library (libpython1.5.a) | 
 | 29 |   which contains everything except for the main() entry point.  This | 
 | 30 |   makes life much easier for applications that embed Python. | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 31 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 32 |   - GNU readline is now configured as an extension module. | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 33 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 34 |   - There is much better support for embedding Python in applications | 
 | 35 |   that use threads.  Such applications can now create multiple | 
 | 36 |   interpreter instances if they like to.  Embedding applications can | 
 | 37 |   also uninitialize or reinitialize Python, and explicitly manipulate | 
 | 38 |   the global lock. | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 39 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 40 |   - Tk 8.0b2 is supported.  Support for Tk 4.0 is dropped (4.1 and | 
 | 41 |   higher are still supported). | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 42 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 43 |   - New Tk dialog modules by Fredrik Lundh: tkColorChooser.py, | 
 | 44 |   tkCommonDialog.py, tkMessageBox.py, tkFileDialog.py, | 
 | 45 |   tkSimpleDialog.py. | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 46 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 47 |   - I've redone many aspects of the Windows version -- e.g. sys.path | 
 | 48 |   is set more like it is done on Unix, there's a new module msvcrt | 
 | 49 |   which exports a bunch of MS VC runtime functions like setmode() and | 
 | 50 |   kbhit(), and there are new project files for DevStudio VC++ 5.0. | 
 | 51 |  | 
 | 52 |   - Some new speedups, e.g. inlined some opcodes for int arguments | 
 | 53 |   (i+i, i-i, L[i]; Fredrik Lundh). | 
 | 54 |  | 
 | 55 |   - All known leaks have been plugged. | 
 | 56 |  | 
 | 57 |   - New dictionary d.update(e): for k, v in e.items(): d[k] = v. | 
 | 58 |  | 
 | 59 |   - New strategy for clearing modules: globals whose name starts with | 
 | 60 |   a single underscore are deleted first. | 
 | 61 |  | 
 | 62 |   - Comparisons can now raise exceptions. | 
 | 63 |  | 
 | 64 |   - Metaclasses can now be programmed in Python (see Misc/NEWS, search | 
 | 65 |   for "corollary"). | 
 | 66 |  | 
 | 67 |   - New tools faqwiz and webchecker included. | 
 | 68 |  | 
| Guido van Rossum | e7fe864 | 1997-08-15 18:51:38 +0000 | [diff] [blame^] | 69 | Other important changes, if this is the first release you see since | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 70 | 1.4: | 
 | 71 |  | 
 | 72 |   - It's much faster (almost twice for pystone.py -- see | 
 | 73 |   Tools/scripts.) | 
 | 74 |  | 
 | 75 |   - There's an assert statement. | 
 | 76 |  | 
 | 77 |   - There's a -O option that removes SET_LINENO instructions, assert | 
 | 78 |   statements and code prefixed with ``if __debug__: ...''. | 
 | 79 |  | 
 | 80 |   - It's much smarter about the initial value for sys.path; you can | 
 | 81 |   control it easier using $PYTHONHOME (see the usage message, e.g. try | 
 | 82 |   ``python -h'').  In most situations, the interpreter can be | 
 | 83 |   installed at an arbitrary location without having to recompile. | 
 | 84 |  | 
 | 85 |   - The Grand Renaming is completed: all linker-visible symbols | 
 | 86 |   defined by Python now have a "Py" or "_Py" prefix, and the same is | 
 | 87 |   true for most macros and typedefs. | 
 | 88 |  | 
 | 89 |   - New regression test. | 
| Guido van Rossum | 3ff96dd | 1996-07-30 18:05:04 +0000 | [diff] [blame] | 90 |  | 
 | 91 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 92 | What is Python anyway? | 
 | 93 | ---------------------- | 
 | 94 |  | 
 | 95 | Python is an interpreted object-oriented programming language, and is | 
| Guido van Rossum | 8d90f9d | 1997-05-22 20:13:25 +0000 | [diff] [blame] | 96 | often compared to Tcl, Perl, Java or Scheme.  For a quick summary of | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 97 | what Python can mean for a UNIX/C programmer, read Misc/BLURB.LUTZ. | 
| Guido van Rossum | dfcf35d | 1996-08-26 17:52:09 +0000 | [diff] [blame] | 98 | If you have web access, point your browser to http://www.python.org. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 99 |  | 
 | 100 |  | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 101 | How do I learn Python? | 
 | 102 | ---------------------- | 
 | 103 |  | 
 | 104 | The official tutorial is still a good place to start (in the Doc | 
 | 105 | directory as tut.tex; and http://www.python.org/doc/tut/tut.html). | 
 | 106 | Aaron Watters wrote a second tutorial, that may be more accessible for | 
 | 107 | some: http://www.wcmh.com/uworld/archives/95/tutorial/005.html. | 
 | 108 |  | 
| Guido van Rossum | 8d90f9d | 1997-05-22 20:13:25 +0000 | [diff] [blame] | 109 | There are now also several books on Python.  While these are still | 
 | 110 | based on Python 1.3 or 1.4, the language is so stable now that you'd | 
 | 111 | be hard pressed to find places where the books are out of date.  The | 
 | 112 | first two books, both first published in October 1996 and both | 
 | 113 | including a CD-ROM, form excellent companions to each other: | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 114 |  | 
 | 115 | 	Internet Programming with Python | 
 | 116 | 	by Aaron Watters, Guido van Rossum, and James Ahlstrom | 
 | 117 | 	MIS Press/Henry Holt publishers | 
 | 118 | 	ISBN: 1-55851-484-8 | 
 | 119 |  | 
 | 120 | 	Programming Python | 
 | 121 | 	by Mark Lutz | 
 | 122 | 	O'Reilly & Associates | 
 | 123 | 	ISBN: 1-56592-197-6 | 
 | 124 |  | 
| Guido van Rossum | 8d90f9d | 1997-05-22 20:13:25 +0000 | [diff] [blame] | 125 | If you prefer to read German, try: | 
 | 126 |  | 
 | 127 | 	Das Python-Buch | 
 | 128 | 	by Martin von Loewis and Nils Fischbeck | 
 | 129 | 	Addison-Wesley-Longman, 1997 | 
 | 130 | 	ISBN: 3-8273-1110-1 | 
 | 131 |  | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 132 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 133 | If you don't read instructions | 
 | 134 | ------------------------------ | 
 | 135 |  | 
 | 136 | Congratulations on getting this far. :-) | 
 | 137 |  | 
 | 138 | To start building right away (on UNIX): type "./configure" in the | 
 | 139 | current directory and when it finishes, type "make".  The section | 
 | 140 | Build Instructions below is still recommended reading. :-) | 
 | 141 |  | 
 | 142 |  | 
 | 143 | Copyright issues | 
 | 144 | ---------------- | 
 | 145 |  | 
 | 146 | Python is COPYRIGHTED but free to use for all.  See the full copyright | 
 | 147 | notice at the end of this file. | 
 | 148 |  | 
 | 149 | The Python distribution is *not* affected by the GNU Public Licence | 
 | 150 | (GPL).  There are interfaces to some GNU code but these are entirely | 
 | 151 | optional and no GNU code is distributed with Python.  For all these | 
 | 152 | packages, GPL-free public domain versions also exist. | 
 | 153 |  | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 154 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 155 |  | 
| Guido van Rossum | ff84049 | 1995-09-18 22:02:47 +0000 | [diff] [blame] | 156 | A modest plug | 
 | 157 | ============= | 
 | 158 |  | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 159 | ********************************************************************* | 
 | 160 | * Without your help, I won't be able to continue to support Python! * | 
 | 161 | ********************************************************************* | 
| Guido van Rossum | ff84049 | 1995-09-18 22:02:47 +0000 | [diff] [blame] | 162 |  | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 163 | If you use Python, please consider joining the Python Software | 
 | 164 | Activity (PSA).  See http://www.python.org/psa/. | 
 | 165 |  | 
 | 166 | Organizations that make heavy use of Python are especially encouraged | 
 | 167 | to become corporate members! | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 168 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 169 |  | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 170 | Build instructions | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 171 | ================== | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 172 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 173 | Before you can build Python, you must first configure it. | 
 | 174 | Fortunately, the configuration and build process has been streamlined | 
 | 175 | for most Unix installations, so all you have to do is type a few | 
 | 176 | commands, optionally edit one file, and sit back.  There are some | 
 | 177 | platforms where things are not quite as smooth; see the platform | 
 | 178 | specific notes below.  If you want to build for multiple platforms | 
 | 179 | sharing the same source tree, see the section on VPATH below. | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 180 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 181 | You start by running the script "./configure", which figures out your | 
 | 182 | system configuration and creates several Makefiles.  (It takes a | 
 | 183 | minute or two -- please be patient!)  When it's done, you are ready to | 
 | 184 | run make.  You may want to pass options to the configure script -- see | 
 | 185 | the section below on configuration options and variables. | 
 | 186 |  | 
 | 187 | To build Python, you normally type "make" in the toplevel directory. | 
 | 188 | This will recursively run make in each of the subdirectories Parser, | 
 | 189 | Objects, Python and Modules, creating a library file in each one.  The | 
 | 190 | executable of the interpreter is built in the Modules subdirectory and | 
 | 191 | moved up here when it is built.  If you want or need to, you can also | 
 | 192 | chdir into each subdirectory in turn and run make there manually (do | 
 | 193 | the Modules subdirectory last!). | 
 | 194 |  | 
 | 195 | Once you have built an interpreter, see the subsections below on | 
 | 196 | testing, configuring additional modules, and installation.  If you run | 
 | 197 | in trouble, see the next section. | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 198 |  | 
| Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 199 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 200 | Troubleshooting | 
 | 201 | --------------- | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 202 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 203 | See also the platform specific notes in the next section. | 
 | 204 |  | 
| Guido van Rossum | faf681a | 1996-06-20 14:32:08 +0000 | [diff] [blame] | 205 | If recursive makes fail, try invoking make as "make MAKE=make". | 
 | 206 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 207 | If you run into other trouble, see section 3 of the FAQ | 
 | 208 | (http://grail.cnri.reston.va.us/cgi-bin/faqw.py or | 
 | 209 | http://www.python.org/doc/FAQ.html) for hints on what can go wrong, | 
 | 210 | and how to fix it. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 211 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 212 | If you rerun the configure script with different options, remove all | 
 | 213 | object files by running "make clean" before rebuilding.  Believe it or | 
 | 214 | not, "make clean" sometimes helps to clean up other inexplicable | 
 | 215 | problems as well.  Try it before sending in a bug report! | 
 | 216 |  | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 217 | If the configure script fails or doesn't seem to find things that | 
 | 218 | should be there, inspect the config.log file. | 
 | 219 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 220 |  | 
 | 221 | Platform specific notes | 
 | 222 | ----------------------- | 
 | 223 |  | 
| Guido van Rossum | 0447a32 | 1995-10-08 01:22:33 +0000 | [diff] [blame] | 224 | (Some of these may no longer apply.  If you find you can build Python | 
 | 225 | on these platforms without the special directions mentioned here, let | 
 | 226 | me know so I can remove them!) | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 227 |  | 
| Guido van Rossum | 4462e93 | 1997-01-22 21:00:32 +0000 | [diff] [blame] | 228 | Solaris: When using Sun's C compiler with threads, at least on Solaris | 
 | 229 | 	2.5.1, you need to add the "-mt" compiler option (the simplest | 
 | 230 | 	way is probably to specify the compiler with this option as | 
 | 231 | 	the "CC" environment variable when running the configure | 
 | 232 | 	script). | 
 | 233 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 234 | Linux:  On Linux version 1.x, once you've built Python, use it to run | 
 | 235 | 	the regen script in the Lib/linux1 directory.  Apparently | 
 | 236 | 	the files as distributed don't match the system headers on | 
 | 237 | 	some Linux versions.  (The "h2py" command refers to | 
 | 238 | 	Tools/scripts/h2py.py.)  The modules distributed for Linux 2.x | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 239 | 	should be okay.  Shared library support now works by default | 
| Guido van Rossum | 4462e93 | 1997-01-22 21:00:32 +0000 | [diff] [blame] | 240 | 	on ELF-based x86 Linux systems.  (Note: when you change the | 
 | 241 | 	status of a module from static to shared, you must remove its | 
 | 242 | 	.o file or do a "make clean".) | 
 | 243 |  | 
| Guido van Rossum | 6ae5d3d | 1997-05-14 21:39:05 +0000 | [diff] [blame] | 244 | DEC Unix: When enabling threads, use --with-dec-threads, not | 
| Guido van Rossum | 4462e93 | 1997-01-22 21:00:32 +0000 | [diff] [blame] | 245 | 	--with-thread. | 
| Guido van Rossum | 8eca2c2 | 1996-02-14 18:37:46 +0000 | [diff] [blame] | 246 |  | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 247 | AIX:	A complete overhaul of the shared library support is now in | 
 | 248 | 	place.  To enable it, uncomment the LINKCC line in the Setup | 
 | 249 | 	file.  See Misc/AIX-NOTES for some notes on how it's done. | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 250 |  | 
| Guido van Rossum | 6ae5d3d | 1997-05-14 21:39:05 +0000 | [diff] [blame] | 251 | 	WARNING!  In some versions of AIX, you get errors about | 
| Guido van Rossum | a3b4b61 | 1996-07-21 02:48:16 +0000 | [diff] [blame] | 252 | 	Invalid Indent when running the Python test set.  This appears | 
 | 253 | 	to be a bug in the AIX compiler.  Rebuild Parser/tokenizer.c | 
| Guido van Rossum | 6ae5d3d | 1997-05-14 21:39:05 +0000 | [diff] [blame] | 254 | 	using OPT="" or OPT=-g, or use gcc.  According to the latest | 
 | 255 | 	reports, it seems this compiler bug is still present in 4.2.1. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 256 |  | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 257 | HP-UX:	Shared library support now works by default (at least on HP-UX | 
 | 258 | 	9.x).  One other problem remains: the HP ANSI C compiler (cc | 
 | 259 | 	-Aa) is too pedantic to use, but in K&R mode, it barfs on a | 
 | 260 | 	few files (complexobject.c, getargs.c and operator.c).  Until | 
 | 261 | 	this is fixed, the following seems to work: | 
 | 262 |  | 
 | 263 | 		make -k		# this compiles all but a few files | 
 | 264 | 		make OPT=-Aa	# compile the remaining files | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 265 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 266 | Minix:  When using ack, use "CC=cc AR=aal RANLIB=: ./configure"! | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 267 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 268 | SCO:    1) Everything works much better if you add -U__STDC__ to the | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 269 | 	defs.  This is because all the SCO header files are broken. | 
 | 270 | 	Anything that isn't mentioned in the C standard it's | 
 | 271 | 	conditionally excluded when __STDC__ is defined. | 
 | 272 |  | 
 | 273 | 	2) Due to the U.S. export restrictions, SCO broke the crypt | 
 | 274 | 	stuff out into a separate library, libcrypt_i.a so the LIBS | 
 | 275 | 	needed be set to: | 
 | 276 |  | 
 | 277 | 		LIBS=' -lsocket -lcrypt_i' | 
 | 278 |  | 
| Guido van Rossum | a3b4b61 | 1996-07-21 02:48:16 +0000 | [diff] [blame] | 279 | 	3) According to at least one report, the above apply only to | 
 | 280 | 	SCO 3 -- Python builds out of the box on SCO 5. | 
 | 281 |  | 
| Guido van Rossum | 4462e93 | 1997-01-22 21:00:32 +0000 | [diff] [blame] | 282 | SunOS:	On SunOS 4.1.x, when using the SunPro C compiler, you may want | 
 | 283 | 	to use the '-Xa' option instead of '-Xc', to enable some | 
 | 284 | 	needed non-ANSI Sunisms. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 285 |  | 
| Guido van Rossum | cc55c2d | 1996-10-21 15:14:27 +0000 | [diff] [blame] | 286 | NeXT:   To build fat binaries, use the --with-next-archs switch | 
 | 287 | 	described below. | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 288 |  | 
| Guido van Rossum | 40d6358 | 1997-08-14 19:45:30 +0000 | [diff] [blame] | 289 | QNX:	Edit the top level Makefile to use the following compile options: | 
 | 290 | 	OPT = -Ox -Q -U_M_IX86 -U__WATCOMC__ | 
 | 291 | 	Edit the Makefile in the Modules directory to read: | 
 | 292 | 	LDFLAGS = -N 48k | 
 | 293 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 294 |  | 
 | 295 | Configuring additional built-in modules | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 296 | --------------------------------------- | 
| Guido van Rossum | 19e0c26 | 1995-01-17 16:36:34 +0000 | [diff] [blame] | 297 |  | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 298 | You can configure the interpreter to contain fewer or more built-in | 
 | 299 | modules by editing the file Modules/Setup.  This file is initially | 
 | 300 | copied (when the toplevel Makefile makes Modules/Makefile for the | 
 | 301 | first time) from Setup.in; if it does not exist yet, make a copy | 
 | 302 | yourself.  Never edit Setup.in -- always edit Setup.  Read the | 
 | 303 | comments in the file for information on what kind of edits you can | 
 | 304 | make.  When you have edited Setup, Makefile and config.c in Modules | 
 | 305 | will automatically be rebuilt the next time you run make in the | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 306 | toplevel directory.  (When working inside the Modules directory, use | 
 | 307 | "make Makefile; make".) | 
| Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 308 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 309 | The default collection of modules should build on any Unix system, but | 
 | 310 | many optional modules should work on all modern Unices (e.g. try dbm, | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 311 | nis, termios, timing, syslog, curses, new, soundex, parser).  Often | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 312 | the quickest way to determine whether a particular module works or not | 
 | 313 | is to see if it will build: enable it in Setup, then if you get | 
 | 314 | compilation or link errors, disable it -- you're missing support. | 
 | 315 |  | 
 | 316 | On SGI IRIX, there are modules that interface to many SGI specific | 
 | 317 | system libraries, e.g. the GL library and the audio hardware. | 
 | 318 |  | 
 | 319 | For SunOS and Solaris, enable module "sunaudiodev" to support the | 
 | 320 | audio device. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 321 |  | 
| Guido van Rossum | 4462e93 | 1997-01-22 21:00:32 +0000 | [diff] [blame] | 322 | In addition to the file Setup, you can also edit the file Setup.local. | 
 | 323 | (the makesetup script processes both).  You may find it more | 
 | 324 | convenient to edit Setup.local and leave Setup alone.  Then, when | 
 | 325 | installing a new Python version, you can copy your old Setup.local | 
 | 326 | file. | 
 | 327 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 328 |  | 
 | 329 | Setting the optimization/debugging options | 
 | 330 | ------------------------------------------ | 
 | 331 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 332 | If you want or need to change the optimization/debugging options for | 
 | 333 | the C compiler, assign to the OPT variable on the toplevel make | 
 | 334 | command; e.g. "make OPT=-g" will build a debugging version of Python | 
 | 335 | on most platforms.  The default is OPT=-O; a value for OPT in the | 
 | 336 | environment when the configure script is run overrides this default | 
 | 337 | (likewise for CC; and the initial value for LIBS is used as the base | 
 | 338 | set of libraries to link with). | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 339 |  | 
 | 340 |  | 
 | 341 | Testing | 
 | 342 | ------- | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 343 |  | 
 | 344 | To test the interpreter that you have just built, type "make test". | 
| Guido van Rossum | 6ae5d3d | 1997-05-14 21:39:05 +0000 | [diff] [blame] | 345 | This runs the test set twice (once with no compiled files, once with | 
 | 346 | the compiled files left by the previous test run).  The test set | 
 | 347 | produces some output.  You can generally ignore the messages about | 
 | 348 | skipped tests due to an optional feature that can't be imported (if | 
 | 349 | you want to test those modules, edit Modules/Setup to configure them). | 
 | 350 | If a messages is printed about a failed test or a traceback or core | 
 | 351 | dump is produced, something's wrong.  On some systems, test_strftime | 
 | 352 | fails due to a non-standard implementation of strftime() in the C | 
 | 353 | library.  This can be ignored (or you can complain to your vendor). | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 354 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 355 | IMPORTANT: If the tests fail and you decide to mail a bug report, | 
 | 356 | *don't* include the output of "make test".  It is useless.  Run the | 
| Guido van Rossum | 6ae5d3d | 1997-05-14 21:39:05 +0000 | [diff] [blame] | 357 | test that fails manually, as follows: | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 358 |  | 
| Guido van Rossum | 6ae5d3d | 1997-05-14 21:39:05 +0000 | [diff] [blame] | 359 | 	python ../Lib/test/test_whatever.py | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 360 |  | 
 | 361 | (substituting the top of the source tree for .. if you built in a | 
| Guido van Rossum | 6ae5d3d | 1997-05-14 21:39:05 +0000 | [diff] [blame] | 362 | different directory).  This runs the test in verbose mode. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 363 |  | 
 | 364 |  | 
 | 365 | Installing | 
 | 366 | ---------- | 
 | 367 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 368 | Installing Python was never this easy! | 
| Guido van Rossum | 8d7d4ed | 1996-07-30 21:41:07 +0000 | [diff] [blame] | 369 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 370 | To install the Python binary, library modules, shared library modules | 
 | 371 | (see below), include files, configuration files, and the manual page, | 
 | 372 | just type "make install".  This will install all platform-independent | 
 | 373 | files in subdirectories the directory given with the --prefix option | 
 | 374 | to configure or the 'prefix' Make variable (default /usr/local), and | 
 | 375 | all binary and other platform-specific files in subdirectories if the | 
 | 376 | directory given by --exec-prefix or the 'exec_prefix' Make variable | 
 | 377 | (defaults to the --prefix directory).  All subdirectories created will | 
 | 378 | have Python's version number in their name, e.g. the library modules | 
| Guido van Rossum | 33fde57 | 1997-05-09 02:40:09 +0000 | [diff] [blame] | 379 | are installed in "/usr/local/lib/python1.5/" by default.  The Python | 
 | 380 | binary is installed as "python1.5" and a hard link named "python" is | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 381 | created.  The only file not installed with a version number in its | 
 | 382 | name is the manual page, installed as "/usr/local/man/man1/python.1" | 
 | 383 | by default. | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 384 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 385 | If you have a previous installation of a pre-1.5 Python that you don't | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 386 | want to replace yet, use "make altinstall".  This installs the same | 
 | 387 | set of files as "make install" except it doesn't create the hard link | 
| Guido van Rossum | 33fde57 | 1997-05-09 02:40:09 +0000 | [diff] [blame] | 388 | to "python1.5" named "python" and it doesn't install the manual page | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 389 | at all. | 
 | 390 |  | 
 | 391 | The only thing you may have to install manually is the Python mode for | 
 | 392 | Emacs.  (But then again, more recent versions of Emacs may already | 
 | 393 | have it!)  This is the file Misc/python-mode.el; follow the | 
 | 394 | instructions that came with Emacs for installation of site specific | 
 | 395 | files. | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 396 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 397 |  | 
 | 398 | Configuration options and variables | 
 | 399 | ----------------------------------- | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 400 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 401 | Some special cases are handled by passing options to the configure | 
 | 402 | script. | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 403 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 404 | WARNING: if you rerun the configure script with different options, you | 
 | 405 | must run "make clean" before rebuilding.  Exceptions to this rule: | 
 | 406 | after changing --prefix or --exec-prefix, all you need to do is remove | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 407 | Modules/getpath.o. | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 408 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 409 | --with(out)-gcc: The configure script uses gcc (the GNU C compiler) if | 
 | 410 | 	it finds it.  If you don't want this, or if this compiler is | 
 | 411 | 	installed but broken on your platform, pass the option | 
 | 412 | 	--without-gcc.  You can also pass "CC=cc" (or whatever the | 
 | 413 | 	name of the proper C compiler is) in the environment, but the | 
 | 414 | 	advantage of using --without-gcc is that this option is | 
 | 415 | 	remembered by the config.status script for its --recheck | 
 | 416 | 	option. | 
| Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 417 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 418 | --prefix, --exec-prefix: If you want to install the binaries and the | 
 | 419 | 	Python library somewhere else than in /usr/local/{bin,lib}, | 
 | 420 | 	you can pass the option --prefix=DIRECTORY; the interpreter | 
 | 421 | 	binary will be installed as DIRECTORY/bin/python and the | 
 | 422 | 	library files as DIRECTORY/lib/python/*.  If you pass | 
 | 423 | 	--exec-prefix=DIRECTORY (as well) this overrides the | 
 | 424 | 	installation prefix for architecture-dependent files (like the | 
 | 425 | 	interpreter binary).  Note that --prefix=DIRECTORY also | 
 | 426 | 	affects the default module search path (sys.path), when | 
 | 427 | 	Modules/config.c is compiled.  Passing make the option | 
 | 428 | 	prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the | 
 | 429 | 	prefix set at configuration time; this may be more convenient | 
 | 430 | 	than re-running the configure script if you change your mind | 
 | 431 | 	about the install prefix... | 
| Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 432 |  | 
| Guido van Rossum | b06df27 | 1997-08-05 21:50:20 +0000 | [diff] [blame] | 433 | --with-readline: This option is no longer supported.  To use GNU | 
 | 434 | 	readline, enable module "readline" in the Modules/Setup file. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 435 |  | 
| Guido van Rossum | faf681a | 1996-06-20 14:32:08 +0000 | [diff] [blame] | 436 | --with-thread: On most Unix systems, you can now use multiple threads. | 
| Guido van Rossum | 4462e93 | 1997-01-22 21:00:32 +0000 | [diff] [blame] | 437 | 	To enable this, pass --with-thread.  (--with-threads is an | 
 | 438 | 	alias.)  If the library required for threads lives in a | 
| Guido van Rossum | 8d90f9d | 1997-05-22 20:13:25 +0000 | [diff] [blame] | 439 | 	peculiar place, you can use --with-thread=DIRECTORY.  NOTE: | 
 | 440 | 	you must also enable the thread module by uncommenting it in | 
 | 441 | 	the Modules/Setup file.  (Threads aren't enabled automatically | 
 | 442 | 	because there are run-time penalties when support for them is | 
 | 443 | 	compiled in even if you don't use them.)  IMPORTANT: run "make | 
 | 444 | 	clean" after changing (either enabling or disabling) this | 
 | 445 | 	option!  Note: for DEC Unix use --with-dec-threads instead. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 446 |  | 
 | 447 | --with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is | 
 | 448 | 	supported by the "dl" library by Jack Jansen, which is | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 449 | 	ftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 450 | 	This is enabled (after you've ftp'ed and compiled the dl | 
 | 451 | 	library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY | 
 | 452 | 	is the absolute pathname of the dl library.  (Don't bother on | 
 | 453 | 	IRIX 5, it already has dynamic linking using SunOS style | 
 | 454 | 	shared libraries.)  Support for this feature is deprecated. | 
 | 455 |  | 
 | 456 | --with-dl-dld: Dynamic loading of modules is rumoured to be supported | 
 | 457 | 	on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent | 
 | 458 | 	Symmetry (Dynix), and Atari ST.  This is done using a | 
 | 459 | 	combination of the GNU dynamic loading package | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 460 | 	(ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 461 | 	emulation of the SGI dl library mentioned above (the emulation | 
 | 462 | 	can be found at | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 463 | 	ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z).  To | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 464 | 	enable this, ftp and compile both libraries, then call the | 
 | 465 | 	configure passing it the option | 
 | 466 | 	--with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is | 
 | 467 | 	the absolute pathname of the dl emulation library and | 
 | 468 | 	DLD_DIRECTORY is the absolute pathname of the GNU dld library. | 
 | 469 | 	(Don't bother on SunOS 4 or 5, they already have dynamic | 
 | 470 | 	linking using shared libraries.)  Support for this feature is | 
 | 471 | 	deprecated. | 
 | 472 |  | 
 | 473 | --with-libm, --with-libc: It is possible to specify alternative | 
 | 474 | 	versions for the Math library (default -lm) and the C library | 
 | 475 | 	(default the empty string) using the options | 
 | 476 | 	--with-libm=STRING and --with-libc=STRING, respectively.  E.g. | 
 | 477 | 	if your system requires that you pass -lc_s to the C compiler | 
 | 478 | 	to use the shared C library, you can pass --with-libc=-lc_s. | 
 | 479 | 	These libraries are passed after all other libraries, the C | 
 | 480 | 	library last. | 
| Guido van Rossum | 3ff96dd | 1996-07-30 18:05:04 +0000 | [diff] [blame] | 481 | 	 | 
 | 482 | --with-next-archs='arch1 arch2': Under NEXTSTEP, this will build | 
 | 483 | 	all compiled binaries with the architectures listed.  Includes | 
 | 484 | 	correctly setting the target architecture specific resource | 
| Guido van Rossum | cc55c2d | 1996-10-21 15:14:27 +0000 | [diff] [blame] | 485 | 	directory.  (This option is not supported on other platforms.) | 
| Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 486 |  | 
| Guido van Rossum | d02ba45 | 1996-07-31 17:36:01 +0000 | [diff] [blame] | 487 | --with-libs='libs': Add 'libs' to the LIBS that the python | 
 | 488 | 	linked against. | 
 | 489 |  | 
| Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 490 |  | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 491 | Building for multiple architectures (using the VPATH feature) | 
 | 492 | ------------------------------------------------------------- | 
 | 493 |  | 
 | 494 | If your file system is shared between multiple architectures, it | 
 | 495 | usually is not necessary to make copies of the sources for each | 
 | 496 | architecture you want to support.  If the make program supports the | 
 | 497 | VPATH feature, you can create an empty build directory for each | 
 | 498 | architecture, and in each directory run the configure script (on the | 
 | 499 | appropriate machine with the appropriate options).  This creates the | 
 | 500 | necessary subdirectories and the Makefiles therein.  The Makefiles | 
 | 501 | contain a line VPATH=... which points to directory containing the | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 502 | actual sources.  (On SGI systems, use "smake -J1" instead of "make" if | 
 | 503 | you use VPATH -- don't try gnumake.) | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 504 |  | 
 | 505 | For example, the following is all you need to build a minimal Python | 
 | 506 | in /usr/tmp/python (assuming ~guido/src/python is the toplevel | 
 | 507 | directory and you want to build in /usr/tmp/python): | 
 | 508 |  | 
 | 509 | 	$ mkdir /usr/tmp/python | 
 | 510 | 	$ cd /usr/tmp/python | 
 | 511 | 	$ ~guido/src/python/configure | 
 | 512 | 	[...] | 
 | 513 | 	$ make | 
 | 514 | 	[...] | 
 | 515 | 	$ | 
 | 516 |  | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 517 | Note that Modules/Makefile copies the original Setup file to the build | 
 | 518 | directory if it finds no Setup file there.  This means that you can | 
 | 519 | edit the Setup file for each architecture independently.  For this | 
 | 520 | reason, subsequent changes to the original Setup file are not tracked | 
 | 521 | automatically, as they might overwrite local changes.  To force a copy | 
 | 522 | of a changed original Setup file, delete the target Setup file.  (The | 
 | 523 | makesetup script supports multiple input files, so if you want to be | 
 | 524 | fancy you can change the rules to create an empty Setup.local if it | 
 | 525 | doesn't exist and run it with arguments $(srcdir)/Setup Setup.local; | 
 | 526 | however this assumes that you only need to add modules.) | 
 | 527 |  | 
 | 528 |  | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 529 | Building on non-UNIX systems | 
 | 530 | ---------------------------- | 
 | 531 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 532 | Building Python for a PC is now a piece of cake! | 
| Guido van Rossum | 8d7d4ed | 1996-07-30 21:41:07 +0000 | [diff] [blame] | 533 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 534 | Enter the directory "PC" and read the file "readme.txt".  Most popular | 
 | 535 | non-Unix PC platforms and compilers are supported (Unix ports to the | 
 | 536 | PC such as Linux, FreeBSD or Solaris-x86 of course use the standard | 
 | 537 | Unix build instructions). | 
 | 538 |  | 
 | 539 | For the Mac, a separate source distribution will be made available, | 
 | 540 | for use with the CodeWarrior compiler.  If you are interested in Mac | 
 | 541 | development, join the PythonMac Special Interest Group | 
 | 542 | (http://www.python.org/sigs/pythonmac-sig/, or send email to | 
 | 543 | pythonmac-sig-request@python.org). | 
 | 544 |  | 
 | 545 | Of course, there are also binary distributions available for these | 
 | 546 | platforms -- see http://www.python.org/python/. | 
 | 547 |  | 
 | 548 | To port Python to a new non-UNIX system, you will have to fake the | 
 | 549 | effect of running the configure script manually (for Mac and PC, this | 
 | 550 | has already been done for you).  A good start is to copy the file | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 551 | config.h.in to config.h and edit the latter to reflect the actual | 
 | 552 | configuration of your system.  Most symbols must simply be defined as | 
 | 553 | 1 only if the corresponding feature is present and can be left alone | 
 | 554 | otherwise; however RETSIGTYPE must always be defined, either as int or | 
 | 555 | as void, and the *_t type symbols must be defined as some variant of | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 556 | int if they need to be defined at all. | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 557 |  | 
 | 558 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 559 |  | 
 | 560 | Miscellaneous issues | 
 | 561 | ==================== | 
 | 562 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 563 | Documentation | 
 | 564 | ------------- | 
 | 565 |  | 
 | 566 | All documentation is provided in the subdirectory Doc in the form of | 
 | 567 | LaTeX files.  In order of importance for new users: Tutorial (tut), | 
 | 568 | Library Reference (lib), Language Reference (ref), Extending (ext). | 
 | 569 | Especially the Library Reference is of immense value since much of | 
 | 570 | Python's power (including the built-in data types and functions!) is | 
 | 571 | described here. | 
 | 572 |  | 
| Guido van Rossum | dfcf35d | 1996-08-26 17:52:09 +0000 | [diff] [blame] | 573 | To print the documentation from the LaTeX files, chdir into the Doc | 
 | 574 | subdirectory, type "make" (let's hope you have LaTeX installed!), and | 
 | 575 | send the four resulting PostScript files (tut.ps, lib.ps, ref.ps, and | 
 | 576 | ext.ps) to the printer.  See the README file there.  If you don't have | 
 | 577 | LaTeX, you can ftp the PostScript files from the ftp archives (see | 
 | 578 | below). | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 579 |  | 
| Guido van Rossum | dfcf35d | 1996-08-26 17:52:09 +0000 | [diff] [blame] | 580 | All documentation is also available on-line via the Python web site | 
 | 581 | (http://www.python.org/, see below).  It can also be downloaded | 
 | 582 | separately from the ftp archives (see below) in Emacs INFO, HTML or | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 583 | PostScript form -- see the web site or the FAQ | 
 | 584 | (http://grail.cnri.reston.va.us/cgi-bin/faqw.py or | 
 | 585 | http://www.python.org/doc/FAQ.html) for more info. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 586 |  | 
 | 587 |  | 
 | 588 | Emacs mode | 
 | 589 | ---------- | 
 | 590 |  | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 591 | There's an excellent Emacs editing mode for Python code; see the file  | 
 | 592 | Misc/python-mode.el.  Originally written by Tim Peters, it is now  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 593 | maintained by Barry Warsaw <bwarsaw@cnri.reston.va.us>.  The latest | 
 | 594 | version is online at ftp://ftp.python.org/pub/emacs/python-mode.el. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 595 |  | 
 | 596 |  | 
| Guido van Rossum | 8d7d4ed | 1996-07-30 21:41:07 +0000 | [diff] [blame] | 597 | Web site | 
 | 598 | -------- | 
 | 599 |  | 
 | 600 | Python's own web site has URL http://www.python.org/.  Come visit us! | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 601 | There are a number of mirrors, listed on the home page -- try a mirror | 
 | 602 | that's close you you. | 
| Guido van Rossum | 8d7d4ed | 1996-07-30 21:41:07 +0000 | [diff] [blame] | 603 |  | 
 | 604 |  | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 605 | Ftp site | 
 | 606 | -------- | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 607 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 608 | Python's own ftp site is ftp://ftp.python.org/pub/python.  There are | 
 | 609 | numerous mirrors; see http://www.python.org/python/Mirrors.html for a | 
 | 610 | list of mirror sites. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 611 |  | 
 | 612 |  | 
 | 613 | Newsgroup and mailing list | 
 | 614 | -------------------------- | 
 | 615 |  | 
| Guido van Rossum | dfcf35d | 1996-08-26 17:52:09 +0000 | [diff] [blame] | 616 | There are a newsgroup and a mailing list devoted to Python.  The | 
 | 617 | newsgroup, comp.lang.python, contains exactly the same messages as the | 
 | 618 | mailing list (though not always in the same order, due to the | 
 | 619 | mysterious nature of the Usenet news distribution algorithm).  To | 
 | 620 | subscribe to the mailing list, send mail containing your real name and | 
 | 621 | e-mail address to "python-list-request@cwi.nl".  Use the same address | 
 | 622 | if you want to unsibscribed.  (A real person reads these messages, so | 
 | 623 | no LISTPROC or Majordomo commands, please, and please be patient -- | 
 | 624 | normal turn-around time is about one working day.) | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 625 |  | 
| Guido van Rossum | dfcf35d | 1996-08-26 17:52:09 +0000 | [diff] [blame] | 626 | The Python web site contains a search form that lets you search the | 
 | 627 | newsgroup archives (or the web site itself).  Click on the "search" | 
 | 628 | link in the banner menu on any page of http://www.python.org/. | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 629 |  | 
 | 630 |  | 
 | 631 | Bug reports | 
 | 632 | ----------- | 
 | 633 |  | 
| Guido van Rossum | dfcf35d | 1996-08-26 17:52:09 +0000 | [diff] [blame] | 634 | Bugs are best reported to the comp.lang.python newsgroup or the Python | 
| Guido van Rossum | cc55c2d | 1996-10-21 15:14:27 +0000 | [diff] [blame] | 635 | mailing list -- see the section "Newsgroup and mailing list" above. | 
| Guido van Rossum | dfcf35d | 1996-08-26 17:52:09 +0000 | [diff] [blame] | 636 | Before posting, check the newsgroup archives (see above) to see if | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 637 | your bug has already been reported! | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 638 |  | 
 | 639 |  | 
 | 640 | Questions | 
 | 641 | --------- | 
 | 642 |  | 
| Guido van Rossum | 4952369 | 1997-08-15 18:30:14 +0000 | [diff] [blame] | 643 | For help, if you can't find it in the manuals or on the web site, it's | 
 | 644 | best to post to the comp.lang.python or the Python mailing list (see | 
 | 645 | above).  If you specifically don't want to involve the newsgroup or | 
 | 646 | mailing list, send questions to python-help@python.org. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 647 |  | 
 | 648 |  | 
 | 649 | The Tk interface | 
 | 650 | ---------------- | 
 | 651 |  | 
 | 652 | Tk (the user interface component of John Ousterhout's Tcl language) is | 
 | 653 | also usable from Python.  Since this requires that you first build and | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 654 | install Tcl/Tk, the Tk interface is not enabled by default.  It works | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 655 | with Tcl 7.5 and Tk 4.1 as well as with Tcl 7.4 and Tk 4.0.  I didn't | 
 | 656 | have the time to test it with Tcl 7.6 and Tk 4.2 yet, but it might | 
 | 657 | well work. | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 658 |  | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 659 | See http://www.sunlabs.com/research/tcl/ for more info on where to get | 
| Guido van Rossum | 33fde57 | 1997-05-09 02:40:09 +0000 | [diff] [blame] | 660 | Tcl/Tk.  Also http://sunscript.sun.com/. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 661 |  | 
 | 662 | To enable the Python/Tk interface, once you've built and installed | 
 | 663 | Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 664 | for the string "_tkinter".  Uncomment one (normally the first) of the | 
 | 665 | lines beginning with "#_tkinter" and un-comment the line beginning | 
 | 666 | with "#TKPATH".  If you have installed Tcl/Tk or X11 in unusual | 
 | 667 | places, you will have to edit the first line to fix or add -I and -L | 
 | 668 | options.  See the Build Instructions above for more details. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 669 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 670 | There is little documentation on how to use Tkinter; however most of | 
 | 671 | the Tk manual pages apply quite straightforwardly.  Begin with | 
 | 672 | fetching the "Tk Lifesaver" document, | 
 | 673 | e.g. ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz (a gzipped | 
 | 674 | tar file containing a PostScript file) or the on-line version | 
 | 675 | http://www.python.org/doc/life-preserver/index.html.  Reading the | 
 | 676 | Tkinter.py source will reveal most details on how Tkinter calls are | 
 | 677 | translated into Tcl code. | 
 | 678 |  | 
 | 679 | There are demos in the Demo/tkinter directory, in the subdirectories | 
 | 680 | guido, matt and www (the matt and guido subdirectories have been | 
 | 681 | overhauled to use more recent Tkinter coding conventions). | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 682 |  | 
 | 683 | Note that there's a Python module called "Tkinter" (capital T) which | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 684 | lives in Lib/tkinter/Tkinter.py, and a C module called "_tkinter" | 
 | 685 | (lower case t and leading underscore) which lives in | 
 | 686 | Modules/_tkinter.c.  Demos and normal Tk applications only import the | 
 | 687 | Python Tkinter module -- only the latter uses the C _tkinter module | 
 | 688 | directly.  In order to find the C _tkinter module, it must be compiled | 
 | 689 | and linked into the Python interpreter -- the _tkinter line in the | 
 | 690 | Setup file does this.  In order to find the Python Tkinter module, | 
 | 691 | sys.path must be set correctly -- the TKPATH assignment in the Setup | 
 | 692 | file takes care of this, but only if you install Python properly | 
 | 693 | ("make install libinstall").  (You can also use dynamic loading for | 
 | 694 | the C _tkinter module, in which case you must manually fix up sys.path | 
 | 695 | or set $PYTHONPATH for the Python Tkinter module.) | 
| Guido van Rossum | 84c8c7f | 1995-08-28 02:44:24 +0000 | [diff] [blame] | 696 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 697 |  | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 698 | Distribution structure | 
 | 699 | ---------------------- | 
 | 700 |  | 
 | 701 | Most subdirectories have their own README file.  Most files have | 
 | 702 | comments. | 
 | 703 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 704 | BUGS            A list of known bugs (not completely up-to-date) | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 705 | Demo/           Demonstration scripts, modules and programs | 
 | 706 | Doc/            Documentation (LaTeX sources) | 
 | 707 | Grammar/        Input for the parser generator | 
 | 708 | Include/        Public header files | 
 | 709 | Lib/            Python library modules | 
 | 710 | Makefile.in     Source from which config.status creates Makefile | 
 | 711 | Misc/           Miscellaneous files | 
 | 712 | Modules/        Implementation of most built-in modules | 
 | 713 | Objects/        Implementation of most built-in object types | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 714 | PC/             PC porting files (DOS, Windows, NT, OS/2) | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 715 | Parser/         The parser and tokenizer and their input handling | 
 | 716 | Python/         The "compiler" and interpreter | 
 | 717 | README          The file you're reading now | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 718 | TODO            A list of things that could be done (not up-to-date) | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 719 | Tools/          Some useful programs written in Python | 
 | 720 | acconfig.h      Additional input for the autoheader program | 
 | 721 | config.h.in     Source from which config.status creates config.h | 
 | 722 | configure       Configuration shell script (GNU autoconf output) | 
 | 723 | configure.in    Configuration specification (GNU autoconf input) | 
 | 724 | install-sh      Shell script used to install files | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 725 |  | 
 | 726 | The following files will (may) be created in the toplevel directory by | 
 | 727 | the configuration and build processes: | 
 | 728 |  | 
| Guido van Rossum | 6d9cc80 | 1996-08-01 17:31:22 +0000 | [diff] [blame] | 729 | Makefile        Build rules | 
 | 730 | config.cache    cache of configuration variables | 
 | 731 | config.h        Configuration header | 
 | 732 | config.log      log from last configure run | 
 | 733 | config.status   status from last run of configure script | 
 | 734 | python          The executable interpreter | 
 | 735 | tags, TAGS      Tags files for vi and Emacs | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 736 |  | 
 | 737 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 738 | Author's address | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 739 | ================ | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 740 |  | 
 | 741 | Guido van Rossum | 
| Guido van Rossum | faf681a | 1996-06-20 14:32:08 +0000 | [diff] [blame] | 742 | CNRI | 
 | 743 | 1895 Preston White Drive | 
| Guido van Rossum | 8d7d4ed | 1996-07-30 21:41:07 +0000 | [diff] [blame] | 744 | Reston, VA 20191 | 
| Guido van Rossum | faf681a | 1996-06-20 14:32:08 +0000 | [diff] [blame] | 745 | USA | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 746 |  | 
| Guido van Rossum | d0fe845 | 1996-08-26 03:02:37 +0000 | [diff] [blame] | 747 | E-mail: guido@cnri.reston.va.us or guido@python.org | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 748 |  | 
 | 749 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 750 |  | 
 | 751 | Copyright notice | 
 | 752 | ================ | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 753 |  | 
 | 754 | The Python source is copyrighted, but you can freely use and copy it | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 755 | as long as you don't change or remove the copyright notice: | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 756 |  | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 757 | ---------------------------------------------------------------------- | 
| Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 758 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, | 
 | 759 | The Netherlands. | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 760 |  | 
 | 761 |                         All Rights Reserved | 
 | 762 |  | 
| Guido van Rossum | c561e5d | 1994-08-23 13:52:46 +0000 | [diff] [blame] | 763 | Permission to use, copy, modify, and distribute this software and its | 
 | 764 | documentation for any purpose and without fee is hereby granted, | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 765 | provided that the above copyright notice appear in all copies and that | 
| Guido van Rossum | c561e5d | 1994-08-23 13:52:46 +0000 | [diff] [blame] | 766 | both that copyright notice and this permission notice appear in | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 767 | supporting documentation, and that the names of Stichting Mathematisch | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 768 | Centrum or CWI or Corporation for National Research Initiatives or | 
 | 769 | CNRI not be used in advertising or publicity pertaining to | 
 | 770 | distribution of the software without specific, written prior | 
 | 771 | permission. | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 772 |  | 
| Guido van Rossum | f501b4e | 1996-10-25 14:32:48 +0000 | [diff] [blame] | 773 | While CWI is the initial source for this software, a modified version | 
 | 774 | is made available by the Corporation for National Research Initiatives | 
 | 775 | (CNRI) at the Internet address ftp://ftp.python.org. | 
 | 776 |  | 
 | 777 | STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH | 
 | 778 | REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF | 
 | 779 | MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH | 
 | 780 | CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL | 
 | 781 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR | 
 | 782 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | 
 | 783 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | 
 | 784 | PERFORMANCE OF THIS SOFTWARE. | 
| Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 785 | ---------------------------------------------------------------------- | 
| Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 786 |  | 
 | 787 |  | 
| Guido van Rossum | faf681a | 1996-06-20 14:32:08 +0000 | [diff] [blame] | 788 | --Guido van Rossum (home page: http://www.python.org/~guido/) |