Guido van Rossum | 0447a32 | 1995-10-08 01:22:33 +0000 | [diff] [blame] | 1 | This is Python release 1.3 |
| 2 | ========================== |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 5 | What's new in this release? |
| 6 | --------------------------- |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7 | |
Guido van Rossum | 84c8c7f | 1995-08-28 02:44:24 +0000 | [diff] [blame] | 8 | - Keyword parameters (see the last chapter of the tutorial). |
| 9 | - Third argument to raise (the stacktrace to provide). |
| 10 | - Faster function and method calls. |
| 11 | - Jim Fulton's abstract object interface (Include/abstract.h). |
| 12 | - Support for Tk 4.0 in Tkinter (Tkinter now supports keywords!). |
| 13 | - Rewritten htmllib.py (HTML parser), with new formatter.py. |
| 14 | - Rewritten rexec.py (restricted execution). |
| 15 | - New modules ni.py and ihooks.py (package support and more). |
Guido van Rossum | 0447a32 | 1995-10-08 01:22:33 +0000 | [diff] [blame] | 16 | - And lots more that you'll have to discover on your own (see chapter |
| 17 | 12 of the Tutorial). |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 18 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 19 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 20 | What is Python anyway? |
| 21 | ---------------------- |
| 22 | |
| 23 | Python is an interpreted object-oriented programming language, and is |
| 24 | often compared to Tcl, Perl or Scheme. For a quick summary of what |
| 25 | Python can mean for a UNIX/C programmer, read Misc/BLURB.LUTZ. |
| 26 | |
| 27 | |
| 28 | If you don't read instructions |
| 29 | ------------------------------ |
| 30 | |
| 31 | Congratulations on getting this far. :-) |
| 32 | |
| 33 | To start building right away (on UNIX): type "./configure" in the |
| 34 | current directory and when it finishes, type "make". The section |
| 35 | Build Instructions below is still recommended reading. :-) |
| 36 | |
| 37 | |
| 38 | Copyright issues |
| 39 | ---------------- |
| 40 | |
| 41 | Python is COPYRIGHTED but free to use for all. See the full copyright |
| 42 | notice at the end of this file. |
| 43 | |
| 44 | The Python distribution is *not* affected by the GNU Public Licence |
| 45 | (GPL). There are interfaces to some GNU code but these are entirely |
| 46 | optional and no GNU code is distributed with Python. For all these |
| 47 | packages, GPL-free public domain versions also exist. |
| 48 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 49 | |
Guido van Rossum | ff84049 | 1995-09-18 22:02:47 +0000 | [diff] [blame] | 50 | A modest plug |
| 51 | ============= |
| 52 | |
| 53 | |
Guido van Rossum | 0447a32 | 1995-10-08 01:22:33 +0000 | [diff] [blame] | 54 | ************************************************************************* |
| 55 | * * |
| 56 | * Python exists, and is free, thanks to the contributed efforts * |
| 57 | * of many people. The PSA was created to maximize the results * |
| 58 | * of those efforts, by helping to coordinate them. The PSA * |
| 59 | * operates web, ftp and email servers, organizes Python * |
| 60 | * workshops, and engages in other activities that benefit the * |
| 61 | * Python user community. The PSA is seeking support for these * |
| 62 | * activities. See this URL for information on how to join: * |
| 63 | * http://www.python.org/psa/Joining.html * |
| 64 | * * |
| 65 | ************************************************************************* |
Guido van Rossum | ff84049 | 1995-09-18 22:02:47 +0000 | [diff] [blame] | 66 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 67 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 68 | Build instructions |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 69 | ================== |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 70 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 71 | Before you start building Python, you must first configure it. This |
| 72 | entails (at least) running the script "./configure", which figures out |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 73 | your system configuration and creates several Makefiles. (It takes a |
| 74 | minute or two -- please be patient!) When it's done, you are ready to |
| 75 | run make. Typing "make" in the toplevel directory will recursively |
| 76 | run make in each of the subdirectories Parser, Objects, Python and |
| 77 | Modules, creating a library file in each one. The executable of the |
| 78 | interpreter is built in the Modules subdirectory and moved up here |
| 79 | when it is built. If you want or need to, you can also chdir into |
| 80 | each subdirectory in turn and run make there manually (do the Modules |
| 81 | subdirectory last!). |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 82 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 83 | NOTE: if you rerun the configure script with different options, remove |
| 84 | all object files by running "make clean" before rebuilding. Believe |
| 85 | it or not, "make clean" sometimes helps to clean up other inexplicable |
| 86 | problems as well. Try it before sending in a bug report! |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 87 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 88 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 89 | Troubleshooting |
| 90 | --------------- |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 91 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 92 | If you run into trouble, see section 3 of the FAQ (file Misc/FAQ) for |
| 93 | hints on what can go wrong, and how to fix it. |
| 94 | |
| 95 | |
| 96 | Platform specific notes |
| 97 | ----------------------- |
| 98 | |
Guido van Rossum | 0447a32 | 1995-10-08 01:22:33 +0000 | [diff] [blame] | 99 | (Some of these may no longer apply. If you find you can build Python |
| 100 | on these platforms without the special directions mentioned here, let |
| 101 | me know so I can remove them!) |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 102 | |
| 103 | AIX: Read the file Misc/AIX-NOTES before trying to build. |
| 104 | |
| 105 | HP-UX: Read the file Misc/HPUX-NOTES if you want to be able to |
| 106 | use shared libraries for dynamically loaded modules. |
| 107 | |
| 108 | Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"! |
| 109 | |
| 110 | SCO: 1) Everything works much better if you add -U__STDC__ to the |
| 111 | defs. This is because all the SCO header files are broken. |
| 112 | Anything that isn't mentioned in the C standard it's |
| 113 | conditionally excluded when __STDC__ is defined. |
| 114 | |
| 115 | 2) Due to the U.S. export restrictions, SCO broke the crypt |
| 116 | stuff out into a separate library, libcrypt_i.a so the LIBS |
| 117 | needed be set to: |
| 118 | |
| 119 | LIBS=' -lsocket -lcrypt_i' |
| 120 | |
| 121 | |
| 122 | Configuring the set of built-in modules |
| 123 | --------------------------------------- |
Guido van Rossum | 19e0c26 | 1995-01-17 16:36:34 +0000 | [diff] [blame] | 124 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 125 | You can configure the interpreter to contain fewer or more built-in |
| 126 | modules by editing the file Modules/Setup. This file is initially |
| 127 | copied (when the toplevel Makefile makes Modules/Makefile for the |
| 128 | first time) from Setup.in; if it does not exist yet, make a copy |
| 129 | yourself. Never edit Setup.in -- always edit Setup. Read the |
| 130 | comments in the file for information on what kind of edits you can |
| 131 | make. When you have edited Setup, Makefile and config.c in Modules |
| 132 | will automatically be rebuilt the next time you run make in the |
Guido van Rossum | 9444ce0 | 1994-10-20 22:10:23 +0000 | [diff] [blame] | 133 | toplevel directory. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 134 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 135 | Especially on SGI IRIX, there are modules that interface to many SGI |
| 136 | specific system libraries, e.g. the GL library and the audio hardware. |
| 137 | |
| 138 | |
| 139 | Setting the optimization/debugging options |
| 140 | ------------------------------------------ |
| 141 | |
| 142 | If you want to change the optimization/debugging options for the C |
| 143 | compiler, assign to the OPT variable on the toplevel make command; |
| 144 | e.g. "make OPT=-g" will build a debugging version of Python on most |
| 145 | platforms. The default is OPT=-O; a value for OPT in the environment |
| 146 | when the configure script is run overrides this default (likewise for |
| 147 | CC; and the initial value for LIBS is used as the base set of |
| 148 | libraries to link with). |
| 149 | |
| 150 | |
| 151 | Testing |
| 152 | ------- |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 153 | |
| 154 | To test the interpreter that you have just built, type "make test". |
| 155 | This runs the test set silently, twice (once with no compiled files, |
| 156 | once with the compiled files left by the previous test run). Each |
| 157 | test run should print "All tests OK." and nothing more. (The test set |
| 158 | does not test the built-in modules, but will find most other problems |
| 159 | with the interpreter.) |
| 160 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 161 | IMPORTANT: If the tests fail and you decide to mail a bug report, |
| 162 | *don't* include the output of "make test". It is useless. Run the |
| 163 | following command instead: |
| 164 | |
| 165 | PYTHONPATH=../Lib:../Lib/test:./Modules ./python -c 'import testall' |
| 166 | |
| 167 | (substituting the top of the source tree for .. if you built in a |
| 168 | different directory). This gives the output of the tests and shows |
| 169 | which test failed. |
| 170 | |
| 171 | |
| 172 | Installing |
| 173 | ---------- |
| 174 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 175 | To install the interpreter as /usr/local/bin/python, type "make |
| 176 | install". To install the library as /usr/local/lib/python, type "make |
| 177 | libinstall". To install the manual page as |
| 178 | /usr/local/man/man1/python.1, type "make maninstall". To install the |
| 179 | Emacs editing mode for python, manually copy the file |
| 180 | Misc/python-mode.el to your local Emacs lisp directory. The directory |
| 181 | /usr/local can be overridden at configuration time by passing |
| 182 | --prefix=DIRECTORY to the configure script, or at make time by passing |
| 183 | "prefix=DIRECTORY" to make. See below for more information on --prefix. |
| 184 | |
| 185 | If you plan to do development of extension modules or to embed Python |
| 186 | in another application and don't want to reference the original source |
| 187 | tree, you can type "make inclinstall" and "make libainstall" to |
| 188 | install the include files and lib*.a files, respectively, as |
| 189 | /usr/local/include/Py/*.h and /usr/local/lib/python/lib/lib*.a. The |
| 190 | make libainstall target also installs copies of several other files |
| 191 | used or produced during the build process which are needed to build |
| 192 | extensions or to generate their Makefiles. |
| 193 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 194 | |
| 195 | Configuration options and variables |
| 196 | ----------------------------------- |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 197 | |
| 198 | Some special cases are handled by passing environment variables or |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 199 | options to the configure script. |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 200 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 201 | NOTE: if you rerun the configure script with different options, remove |
| 202 | all object files by running "make clean" before rebuilding. |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 203 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 204 | --with(out)-gcc: The configure script uses gcc (the GNU C compiler) if |
| 205 | it finds it. If you don't want this, or if this compiler is |
| 206 | installed but broken on your platform, pass the option |
| 207 | --without-gcc. You can also pass "CC=cc" (or whatever the |
| 208 | name of the proper C compiler is) in the environment, but the |
| 209 | advantage of using --without-gcc is that this option is |
| 210 | remembered by the config.status script for its --recheck |
| 211 | option. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 212 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 213 | --prefix, --exec-prefix: If you want to install the binaries and the |
| 214 | Python library somewhere else than in /usr/local/{bin,lib}, |
| 215 | you can pass the option --prefix=DIRECTORY; the interpreter |
| 216 | binary will be installed as DIRECTORY/bin/python and the |
| 217 | library files as DIRECTORY/lib/python/*. If you pass |
| 218 | --exec-prefix=DIRECTORY (as well) this overrides the |
| 219 | installation prefix for architecture-dependent files (like the |
| 220 | interpreter binary). Note that --prefix=DIRECTORY also |
| 221 | affects the default module search path (sys.path), when |
| 222 | Modules/config.c is compiled. Passing make the option |
| 223 | prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the |
| 224 | prefix set at configuration time; this may be more convenient |
| 225 | than re-running the configure script if you change your mind |
| 226 | about the install prefix... |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 227 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 228 | --with-readline: You can use the GNU readline library to improve the |
| 229 | interactive user interface: this gives you line editing and |
| 230 | command history when calling python interactively. You need |
| 231 | to configure build the GNU readline library before running the |
| 232 | configure script. Its sources are not distributed with |
| 233 | Python; you can ftp them from any GNU mirror site, or from its |
| 234 | home site: |
| 235 | <URL:ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz> (or |
| 236 | a higher version number -- using version 1.x is not |
| 237 | recommended). |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 238 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 239 | A GPL-free version was posted to comp.sources.misc in volume |
| 240 | 31 and is widely available from FTP archive sites, e.g. |
| 241 | <URL:ftp://gatekeeper.dec.com/.b/usenet/comp.sources.misc/ |
| 242 | volume31/editline/part01.Z> |
| 243 | |
| 244 | Pass the Python configure script the option |
| 245 | --with-readline=DIRECTORY where DIRECTORY is the absolute |
| 246 | pathname of the directory where you've built the readline |
| 247 | library. Some hints on building and using the readline |
| 248 | library are in the FAQ (file Misc/FAQ). |
| 249 | |
| 250 | --with-thread: On SGI IRIX, and on Sun SOLARIS 2, you can use multiple |
| 251 | threads. To enable this, pass --with-thread. In the |
| 252 | Modules/Setup file, enable the thread module. (Threads aren't |
| 253 | enabled automatically because there are run-time penalties |
| 254 | when support for them is compiled in even if you don't use |
| 255 | them.) |
| 256 | |
| 257 | --with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is |
| 258 | supported by the "dl" library by Jack Jansen, which is |
| 259 | ftp'able from <URL:ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z>. |
| 260 | This is enabled (after you've ftp'ed and compiled the dl |
| 261 | library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY |
| 262 | is the absolute pathname of the dl library. (Don't bother on |
| 263 | IRIX 5, it already has dynamic linking using SunOS style |
| 264 | shared libraries.) Support for this feature is deprecated. |
| 265 | |
| 266 | --with-dl-dld: Dynamic loading of modules is rumoured to be supported |
| 267 | on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent |
| 268 | Symmetry (Dynix), and Atari ST. This is done using a |
| 269 | combination of the GNU dynamic loading package |
| 270 | (<URL:ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z>) and an |
| 271 | emulation of the SGI dl library mentioned above (the emulation |
| 272 | can be found at |
| 273 | <URL:ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z>). To |
| 274 | enable this, ftp and compile both libraries, then call the |
| 275 | configure passing it the option |
| 276 | --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is |
| 277 | the absolute pathname of the dl emulation library and |
| 278 | DLD_DIRECTORY is the absolute pathname of the GNU dld library. |
| 279 | (Don't bother on SunOS 4 or 5, they already have dynamic |
| 280 | linking using shared libraries.) Support for this feature is |
| 281 | deprecated. |
| 282 | |
| 283 | --with-libm, --with-libc: It is possible to specify alternative |
| 284 | versions for the Math library (default -lm) and the C library |
| 285 | (default the empty string) using the options |
| 286 | --with-libm=STRING and --with-libc=STRING, respectively. E.g. |
| 287 | if your system requires that you pass -lc_s to the C compiler |
| 288 | to use the shared C library, you can pass --with-libc=-lc_s. |
| 289 | These libraries are passed after all other libraries, the C |
| 290 | library last. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 291 | |
| 292 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 293 | Extensions |
| 294 | ---------- |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 295 | |
| 296 | You can also build an "extended" interpreter, using modules that are |
| 297 | not contained in the Modules directory. Extensions are distributed as |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 298 | a separate tar file (currently extensions.tar.gz). See the README |
| 299 | file there. |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 300 | |
| 301 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 302 | Building for multiple architectures (using the VPATH feature) |
| 303 | ------------------------------------------------------------- |
| 304 | |
| 305 | If your file system is shared between multiple architectures, it |
| 306 | usually is not necessary to make copies of the sources for each |
| 307 | architecture you want to support. If the make program supports the |
| 308 | VPATH feature, you can create an empty build directory for each |
| 309 | architecture, and in each directory run the configure script (on the |
| 310 | appropriate machine with the appropriate options). This creates the |
| 311 | necessary subdirectories and the Makefiles therein. The Makefiles |
| 312 | contain a line VPATH=... which points to directory containing the |
Guido van Rossum | 6b111b0 | 1994-10-11 15:03:34 +0000 | [diff] [blame] | 313 | actual sources. (On SGI systems, use "smake" instead of "make" if you |
| 314 | use VPATH -- don't try gnumake.) |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 315 | |
| 316 | For example, the following is all you need to build a minimal Python |
| 317 | in /usr/tmp/python (assuming ~guido/src/python is the toplevel |
| 318 | directory and you want to build in /usr/tmp/python): |
| 319 | |
| 320 | $ mkdir /usr/tmp/python |
| 321 | $ cd /usr/tmp/python |
| 322 | $ ~guido/src/python/configure |
| 323 | [...] |
| 324 | $ make |
| 325 | [...] |
| 326 | $ |
| 327 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 328 | Note that Modules/Makefile copies the original Setup file to the build |
| 329 | directory if it finds no Setup file there. This means that you can |
| 330 | edit the Setup file for each architecture independently. For this |
| 331 | reason, subsequent changes to the original Setup file are not tracked |
| 332 | automatically, as they might overwrite local changes. To force a copy |
| 333 | of a changed original Setup file, delete the target Setup file. (The |
| 334 | makesetup script supports multiple input files, so if you want to be |
| 335 | fancy you can change the rules to create an empty Setup.local if it |
| 336 | doesn't exist and run it with arguments $(srcdir)/Setup Setup.local; |
| 337 | however this assumes that you only need to add modules.) |
| 338 | |
| 339 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 340 | Building on non-UNIX systems |
| 341 | ---------------------------- |
| 342 | |
| 343 | On non-UNIX systems, you will have to fake the effect of running the |
| 344 | configure script manually. A good start is to copy the file |
| 345 | config.h.in to config.h and edit the latter to reflect the actual |
| 346 | configuration of your system. Most symbols must simply be defined as |
| 347 | 1 only if the corresponding feature is present and can be left alone |
| 348 | otherwise; however RETSIGTYPE must always be defined, either as int or |
| 349 | as void, and the *_t type symbols must be defined as some variant of |
| 350 | int if they need to be defined at all. Then arrange that the symbol |
| 351 | HAVE_CONFIG_H is defined during compilation (usually by passing an |
| 352 | argument of the form `-DHAVE_CONFIG_H' to the compiler, but this is |
| 353 | necessarily system-dependent). |
| 354 | |
Guido van Rossum | c561e5d | 1994-08-23 13:52:46 +0000 | [diff] [blame] | 355 | I have tried to collect instructions, Makefiles and additional sources |
| 356 | for various platforms in this release. The following directories |
| 357 | exist: |
| 358 | |
| 359 | Mac/ Apple Macintosh, using THINK C 6.0 or MPW 3.2. |
| 360 | Dos/ MS-DOS and Windows 3.1, using Microsoft C. |
| 361 | Nt/ Windows NT, using Microsoft Visual C/C++. |
| 362 | Os2/ OS/2. |
| 363 | |
| 364 | Most of these instructions were last tested with a previous Python |
| 365 | release, so you may still experience occasional problems. If you have |
| 366 | fixes or suggestions, please let me know and I'll try to incorporate |
| 367 | them in the next release. |
| 368 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 369 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 370 | |
| 371 | Miscellaneous issues |
| 372 | ==================== |
| 373 | |
| 374 | |
| 375 | Documentation |
| 376 | ------------- |
| 377 | |
| 378 | All documentation is provided in the subdirectory Doc in the form of |
| 379 | LaTeX files. In order of importance for new users: Tutorial (tut), |
| 380 | Library Reference (lib), Language Reference (ref), Extending (ext). |
| 381 | Especially the Library Reference is of immense value since much of |
| 382 | Python's power (including the built-in data types and functions!) is |
| 383 | described here. |
| 384 | |
| 385 | To print the documentation from the LaTeX files, chdir into the Doc |
| 386 | subdirectory, type "make" (let's hope you have LaTeX installed!), and |
| 387 | send the four resulting PostScript files (tut.ps, lib.ps, ref.ps, and |
| 388 | ext.ps) to the printer. See the README file there. |
| 389 | |
| 390 | All documentation is also available on-line via the World-Wide Web |
| 391 | (WWW): <URL:http://www.cwi.nl/~guido/Python.html>. It can also be |
| 392 | downloaded separately from the ftp archives (see below) in Emacs INFO, |
| 393 | HTML or PostScript form -- see the FAQ (file Misc/FAQ) for more info. |
| 394 | |
| 395 | |
| 396 | Emacs mode |
| 397 | ---------- |
| 398 | |
| 399 | There's an excellent Emacs editing mode for Python code; see the file |
| 400 | Misc/python-mode.el. Originally written by Tim Peters, who's no |
| 401 | longer on the net, it is now maintained by Barry Warsaw |
| 402 | <bwarsaw@cnri.reston.va.com>. |
| 403 | |
Guido van Rossum | 3c294ca | 1995-06-14 18:17:22 +0000 | [diff] [blame] | 404 | BTW, if you want to use font-lock for Python sources, here's something |
| 405 | to put in your .emacs file: |
| 406 | |
| 407 | (defun my-python-mode-hook () |
| 408 | (setq font-lock-keywords python-font-lock-keywords) |
| 409 | (font-lock-mode 1)) |
| 410 | (add-hook 'python-mode-hook 'my-python-mode-hook) |
| 411 | |
| 412 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 413 | |
| 414 | Bug reports |
| 415 | ----------- |
| 416 | |
| 417 | Bugs are best reported to the comp.lang.python newsgroup or the Python |
| 418 | mailing list -- see the section "Newsgroup and mailing list" below. |
| 419 | Before posting, read the FAQ (file Misc/FAQ) first to see if your |
| 420 | problem has already been answered! |
| 421 | |
| 422 | |
| 423 | Ftp access |
| 424 | ---------- |
| 425 | |
| 426 | Python's "home ftp site" is ftp.cwi.nl, directory pub/python. See the |
| 427 | FAQ (file Misc/FAQ) for a list of other ftp sites carrying the Python |
| 428 | distribution. |
| 429 | |
| 430 | |
| 431 | Newsgroup and mailing list |
| 432 | -------------------------- |
| 433 | |
| 434 | There are a newsgroup and a mailing list devoted to Python |
| 435 | programming, design and bugs. The newsgroup, comp.lang.python, |
| 436 | contains exactly the same messages as the mailing list. To subscribe |
| 437 | to the mailing list, send mail containing your real name and e-mail |
| 438 | address to "python-list-request@cwi.nl" (a real person reads these |
| 439 | messages, so no LISTPROC or Majordomo commands, please). |
| 440 | |
| 441 | |
| 442 | The Tk interface |
| 443 | ---------------- |
| 444 | |
| 445 | Tk (the user interface component of John Ousterhout's Tcl language) is |
| 446 | also usable from Python. Since this requires that you first build and |
| 447 | install Tcl/Tk, the Tk interface is not enabled by default. It |
Guido van Rossum | 84c8c7f | 1995-08-28 02:44:24 +0000 | [diff] [blame] | 448 | requires Tcl 7.4 and Tk 4.0. (Support for Tk 3.6 and Tcl 7.3 can be |
| 449 | found in Lib/tk3inter/.) |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 450 | |
| 451 | To enable the Python/Tk interface, once you've built and installed |
| 452 | Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search |
Jack Jansen | 10d0f8f | 1995-10-23 14:36:05 +0000 | [diff] [blame] | 453 | for the string "_tkinter". Un-comment one (normally the first) of the |
| 454 | lines beginning with "#_tkinter" and un-comment the line beginning with |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 455 | "#TKPATH". (If you have installed Tcl/Tk in unusual places you will |
| 456 | have to edit the first line as well to fix the -I and -L options.) |
| 457 | See the Build Instructions above for more details. |
| 458 | |
| 459 | There is little documentation. Begin with fetching the "Tk Lifesaver" |
Guido van Rossum | 3c294ca | 1995-06-14 18:17:22 +0000 | [diff] [blame] | 460 | document, e.g. <URL:ftp://ftp.cwi.nl/pub/python/doc/tkinter-doc.tar.gz> |
| 461 | (a gzipped tar file containing a PostScript file). There are demos in |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 462 | the Demo/tkinter directory, in the subdirectories guido, matt and www. |
| 463 | |
| 464 | Note that there's a Python module called "Tkinter" (capital T) which |
| 465 | lives in Lib/tkinter/Tkinter.py, and a C module called "tkinter" |
Jack Jansen | 10d0f8f | 1995-10-23 14:36:05 +0000 | [diff] [blame] | 466 | (lower case t) which lives in Modules/_tkinter.c. Demos and |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 467 | normal Tk applications only import the Python Tkinter module -- only |
Jack Jansen | 10d0f8f | 1995-10-23 14:36:05 +0000 | [diff] [blame] | 468 | the latter uses the C _tkinter module directly. In order to find the C |
| 469 | _tkinter module, it must be compiled and linked into the Python |
| 470 | interpreter -- the _tkinter line in the Setup file does this. In order |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 471 | to find the Python Tkinter module, sys.path must be set correctly -- |
| 472 | the TKPATH assignment in the Setup file takes care of this, but only |
| 473 | if you install Python properly ("make install libinstall"). (You can |
Jack Jansen | 10d0f8f | 1995-10-23 14:36:05 +0000 | [diff] [blame] | 474 | also use dynamic loading for the C _tkinter module, in which case you |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 475 | must manually fix up sys.path or set $PYTHONPATH for the Python |
| 476 | Tkinter module.) |
| 477 | |
Guido van Rossum | 0447a32 | 1995-10-08 01:22:33 +0000 | [diff] [blame] | 478 | See <URL:http://www.smli.com/research/tcl/> for more info on where |
Guido van Rossum | 84c8c7f | 1995-08-28 02:44:24 +0000 | [diff] [blame] | 479 | to get Tcl/Tk. |
| 480 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 481 | |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 482 | Distribution structure |
| 483 | ---------------------- |
| 484 | |
| 485 | Most subdirectories have their own README file. Most files have |
| 486 | comments. |
| 487 | |
| 488 | ChangeLog A raw list of changes since the first 1.0.0 BETA release |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 489 | Contrib/ Interesting or useful Python code contributed by others |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 490 | Demo/ Demonstration scripts, modules and programs |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 491 | Doc/ Documentation (LaTeX sources) |
Guido van Rossum | c561e5d | 1994-08-23 13:52:46 +0000 | [diff] [blame] | 492 | Extensions/ Extension modules (distributed separately) |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 493 | Grammar/ Input for the parser generator |
| 494 | Include/ Public header files |
| 495 | Lib/ Python library modules |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 496 | Makefile.in Source from which config.status creates Makefile |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 497 | Misc/ Miscellaneous files |
| 498 | Modules/ Implementation of most built-in modules |
| 499 | Objects/ Implementation of most built-in object types |
| 500 | Parser/ The parser and tokenizer and their input handling |
| 501 | Python/ The "compiler" and interpreter |
| 502 | README The file you're reading now |
Guido van Rossum | e109aa7 | 1995-03-09 14:12:10 +0000 | [diff] [blame] | 503 | Tools/ Some useful programs written in Python |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 504 | acconfig.h Additional input for the autoheader program |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 505 | config.h.in Source from which config.status creates config.h |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 506 | configure Configuration shell script (GNU autoconf output) |
| 507 | configure.in Configuration specification (GNU autoconf input) |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 508 | |
| 509 | The following files will (may) be created in the toplevel directory by |
| 510 | the configuration and build processes: |
| 511 | |
| 512 | Makefile Build rules |
| 513 | config.cache cache of configuration variables |
| 514 | config.h Configuration header |
| 515 | config.log log from last configure run |
| 516 | config.status status from last run of configure script |
| 517 | python The executable interpreter |
| 518 | tags, TAGS Tags files for vi and Emacs |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 519 | |
| 520 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 521 | Author's address |
| 522 | ---------------- |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 523 | |
| 524 | Guido van Rossum |
| 525 | CWI, dept. CST |
| 526 | P.O. Box 94079 |
| 527 | 1090 GB Amsterdam |
| 528 | The Netherlands |
| 529 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 530 | E-mail: guido@cwi.nl |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 531 | |
| 532 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 533 | |
| 534 | Copyright notice |
| 535 | ================ |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 536 | |
| 537 | 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] | 538 | 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] | 539 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 540 | ---------------------------------------------------------------------- |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 541 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 542 | The Netherlands. |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 543 | |
| 544 | All Rights Reserved |
| 545 | |
Guido van Rossum | c561e5d | 1994-08-23 13:52:46 +0000 | [diff] [blame] | 546 | Permission to use, copy, modify, and distribute this software and its |
| 547 | documentation for any purpose and without fee is hereby granted, |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 548 | 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] | 549 | both that copyright notice and this permission notice appear in |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 550 | supporting documentation, and that the names of Stichting Mathematisch |
| 551 | Centrum or CWI not be used in advertising or publicity pertaining to |
| 552 | distribution of the software without specific, written prior permission. |
| 553 | |
| 554 | STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
| 555 | THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 556 | FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
| 557 | FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 558 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 559 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 560 | OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 561 | ---------------------------------------------------------------------- |
Guido van Rossum | 433c8ad | 1994-08-01 12:07:07 +0000 | [diff] [blame] | 562 | |
| 563 | |
Guido van Rossum | 91cb9d2 | 1995-04-10 11:47:38 +0000 | [diff] [blame] | 564 | --Guido van Rossum, CWI, Amsterdam <mailto:guido@cwi.nl> |
| 565 | <http://www.cwi.nl/~guido/> |