blob: 0fefe57bde9c4ec0b1fcb0658754345f50c223ed [file] [log] [blame]
Guido van Rossum3ff96dd1996-07-30 18:05:04 +00001This is Python release 1.4 beta 2
Guido van Rossumfaf681a1996-06-20 14:32:08 +00002=================================
3
4It's a beta release. Only use this if you want to help me iron the
5last wrinkles out of the distribution before I release the real 1.4
6release. In particular, I'm interested in porting experiences to Unix
7boxes. It should build out of the box using "./configure; make".
8Also try running configue with the --with-thread and --with-readline
9options (described below).
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000012What's new since 1.4 beta 1?
13----------------------------
14
15- New modules: errno, operator
16
17- Changes for Numerical Python: slice and ellipses objects, and
18corresponding syntax:
19
20 - x[lo:hi:stride]
21 - x[a, ..., z]
Guido van Rossum627b2d71993-12-24 10:39:16 +000022
Guido van Rossumfaf681a1996-06-20 14:32:08 +000023XXX
Guido van Rossum627b2d71993-12-24 10:39:16 +000024
Guido van Rossum627b2d71993-12-24 10:39:16 +000025
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000026What's new since Python release 1.3?
27------------------------------------
28
29See the Misc/NEWS file.
30
31
Guido van Rossum91cb9d21995-04-10 11:47:38 +000032What is Python anyway?
33----------------------
34
35Python is an interpreted object-oriented programming language, and is
36often compared to Tcl, Perl or Scheme. For a quick summary of what
Guido van Rossumfaf681a1996-06-20 14:32:08 +000037Python can mean for a UNIX/C programmer, read Misc/BLURB.LUTZ. If you
38have web access, point your browser to <URL:http://www.python.org>.
Guido van Rossum91cb9d21995-04-10 11:47:38 +000039
40
41If you don't read instructions
42------------------------------
43
44Congratulations on getting this far. :-)
45
46To start building right away (on UNIX): type "./configure" in the
47current directory and when it finishes, type "make". The section
48Build Instructions below is still recommended reading. :-)
49
50
51Copyright issues
52----------------
53
54Python is COPYRIGHTED but free to use for all. See the full copyright
55notice at the end of this file.
56
57The Python distribution is *not* affected by the GNU Public Licence
58(GPL). There are interfaces to some GNU code but these are entirely
59optional and no GNU code is distributed with Python. For all these
60packages, GPL-free public domain versions also exist.
61
Guido van Rossum627b2d71993-12-24 10:39:16 +000062
Guido van Rossumff840491995-09-18 22:02:47 +000063A modest plug
64=============
65
66
Guido van Rossum0447a321995-10-08 01:22:33 +000067*************************************************************************
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000068* *
69* Python exists, and is free, thanks to the contributed efforts *
70* of many people. The PSA was created to maximize the results *
71* of those efforts, by helping to coordinate them. The PSA *
72* operates web, ftp and email servers, organizes Python *
73* workshops, and engages in other activities that benefit the *
74* Python user community. The PSA is seeking support for these *
75* activities. See this URL for information on how to join: *
76* http://www.python.org/psa/Joining.html *
77* *
Guido van Rossum0447a321995-10-08 01:22:33 +000078*************************************************************************
Guido van Rossumff840491995-09-18 22:02:47 +000079
Guido van Rossum627b2d71993-12-24 10:39:16 +000080
Guido van Rossum433c8ad1994-08-01 12:07:07 +000081Build instructions
Guido van Rossum91cb9d21995-04-10 11:47:38 +000082==================
Guido van Rossum627b2d71993-12-24 10:39:16 +000083
Guido van Rossum433c8ad1994-08-01 12:07:07 +000084Before you start building Python, you must first configure it. This
85entails (at least) running the script "./configure", which figures out
Guido van Rossum91cb9d21995-04-10 11:47:38 +000086your system configuration and creates several Makefiles. (It takes a
87minute or two -- please be patient!) When it's done, you are ready to
88run make. Typing "make" in the toplevel directory will recursively
89run make in each of the subdirectories Parser, Objects, Python and
90Modules, creating a library file in each one. The executable of the
91interpreter is built in the Modules subdirectory and moved up here
92when it is built. If you want or need to, you can also chdir into
93each subdirectory in turn and run make there manually (do the Modules
94subdirectory last!).
Guido van Rossum627b2d71993-12-24 10:39:16 +000095
Guido van Rossum91cb9d21995-04-10 11:47:38 +000096NOTE: if you rerun the configure script with different options, remove
97all object files by running "make clean" before rebuilding. Believe
98it or not, "make clean" sometimes helps to clean up other inexplicable
99problems as well. Try it before sending in a bug report!
Guido van Rossum627b2d71993-12-24 10:39:16 +0000100
Guido van Rossum0a516c91994-09-12 10:58:40 +0000101
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000102Troubleshooting
103---------------
Guido van Rossum627b2d71993-12-24 10:39:16 +0000104
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000105If recursive makes fail, try invoking make as "make MAKE=make".
106
107If you run into other trouble, see section 3 of the FAQ (file
108Misc/FAQ) for hints on what can go wrong, and how to fix it.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000109
110
111Platform specific notes
112-----------------------
113
Guido van Rossum0447a321995-10-08 01:22:33 +0000114(Some of these may no longer apply. If you find you can build Python
115on these platforms without the special directions mentioned here, let
116me know so I can remove them!)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000117
Guido van Rossum8eca2c21996-02-14 18:37:46 +0000118Linux: Once you've built Python, use it to run the regen.py script in
119 the Lib/linux1 directory. Apparently the files as distributed
120 don't match the system headers on some Linux versions.
121
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000122AIX: Read the files Misc/AIX-NOTES* before trying to build.
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000123 WARNING! In some versions of AIX, you get errors about
124 Invalid Indent when running the Python test set. This appears
125 to be a bug in the AIX compiler. Rebuild Parser/tokenizer.c
126 using OPT="" or OPT=-g, or use gcc.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000127
128HP-UX: Read the file Misc/HPUX-NOTES if you want to be able to
129 use shared libraries for dynamically loaded modules.
130
131Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"!
132
133SCO: 1) Everything works much better if you add -U__STDC__ to the
134 defs. This is because all the SCO header files are broken.
135 Anything that isn't mentioned in the C standard it's
136 conditionally excluded when __STDC__ is defined.
137
138 2) Due to the U.S. export restrictions, SCO broke the crypt
139 stuff out into a separate library, libcrypt_i.a so the LIBS
140 needed be set to:
141
142 LIBS=' -lsocket -lcrypt_i'
143
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000144 3) According to at least one report, the above apply only to
145 SCO 3 -- Python builds out of the box on SCO 5.
146
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000147
148Configuring the set of built-in modules
149---------------------------------------
Guido van Rossum19e0c261995-01-17 16:36:34 +0000150
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000151You can configure the interpreter to contain fewer or more built-in
152modules by editing the file Modules/Setup. This file is initially
153copied (when the toplevel Makefile makes Modules/Makefile for the
154first time) from Setup.in; if it does not exist yet, make a copy
155yourself. Never edit Setup.in -- always edit Setup. Read the
156comments in the file for information on what kind of edits you can
157make. When you have edited Setup, Makefile and config.c in Modules
158will automatically be rebuilt the next time you run make in the
Guido van Rossum9444ce01994-10-20 22:10:23 +0000159toplevel directory.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000160
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000161Especially on SGI IRIX, there are modules that interface to many SGI
162specific system libraries, e.g. the GL library and the audio hardware.
163
164
165Setting the optimization/debugging options
166------------------------------------------
167
168If you want to change the optimization/debugging options for the C
169compiler, assign to the OPT variable on the toplevel make command;
170e.g. "make OPT=-g" will build a debugging version of Python on most
171platforms. The default is OPT=-O; a value for OPT in the environment
172when the configure script is run overrides this default (likewise for
173CC; and the initial value for LIBS is used as the base set of
174libraries to link with).
175
176
177Testing
178-------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000179
180To test the interpreter that you have just built, type "make test".
181This runs the test set silently, twice (once with no compiled files,
182once with the compiled files left by the previous test run). Each
183test run should print "All tests OK." and nothing more. (The test set
184does not test the built-in modules, but will find most other problems
185with the interpreter.)
186
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000187IMPORTANT: If the tests fail and you decide to mail a bug report,
188*don't* include the output of "make test". It is useless. Run the
189following command instead:
190
191 PYTHONPATH=../Lib:../Lib/test:./Modules ./python -c 'import testall'
192
193(substituting the top of the source tree for .. if you built in a
194different directory). This gives the output of the tests and shows
195which test failed.
196
197
198Installing
199----------
200
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000201To install the interpreter as /usr/local/bin/python, type "make
202install". To install the library as /usr/local/lib/python, type "make
203libinstall". To install the manual page as
204/usr/local/man/man1/python.1, type "make maninstall". To install the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000205Emacs editing mode for Python, manually copy the file
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000206Misc/python-mode.el to your local Emacs lisp directory. The directory
207/usr/local can be overridden at configuration time by passing
208--prefix=DIRECTORY to the configure script, or at make time by passing
209"prefix=DIRECTORY" to make. See below for more information on --prefix.
210
211If you plan to do development of extension modules or to embed Python
212in another application and don't want to reference the original source
213tree, you can type "make inclinstall" and "make libainstall" to
214install the include files and lib*.a files, respectively, as
215/usr/local/include/Py/*.h and /usr/local/lib/python/lib/lib*.a. The
216make libainstall target also installs copies of several other files
217used or produced during the build process which are needed to build
218extensions or to generate their Makefiles.
219
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000220
221Configuration options and variables
222-----------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000223
224Some special cases are handled by passing environment variables or
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000225options to the configure script.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000226
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000227NOTE: if you rerun the configure script with different options, remove
228all object files by running "make clean" before rebuilding.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000229
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000230--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
231 it finds it. If you don't want this, or if this compiler is
232 installed but broken on your platform, pass the option
233 --without-gcc. You can also pass "CC=cc" (or whatever the
234 name of the proper C compiler is) in the environment, but the
235 advantage of using --without-gcc is that this option is
236 remembered by the config.status script for its --recheck
237 option.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000238
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000239--prefix, --exec-prefix: If you want to install the binaries and the
240 Python library somewhere else than in /usr/local/{bin,lib},
241 you can pass the option --prefix=DIRECTORY; the interpreter
242 binary will be installed as DIRECTORY/bin/python and the
243 library files as DIRECTORY/lib/python/*. If you pass
244 --exec-prefix=DIRECTORY (as well) this overrides the
245 installation prefix for architecture-dependent files (like the
246 interpreter binary). Note that --prefix=DIRECTORY also
247 affects the default module search path (sys.path), when
248 Modules/config.c is compiled. Passing make the option
249 prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
250 prefix set at configuration time; this may be more convenient
251 than re-running the configure script if you change your mind
252 about the install prefix...
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000253
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000254--with-readline: You can use the GNU readline library to improve the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000255 interactive user interface. This gives you line editing and
256 command history when calling Python interactively. Unless GNU
257 readline is a standard part of your system (it is on Linux),
258 you need to configure build the GNU readline library before
259 running the configure script. Its sources are not distributed
260 with Python; you can ftp them from any GNU mirror site, or
261 from its home site:
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000262 <URL:ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz> (or
263 a higher version number -- using version 1.x is not
264 recommended).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000265
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000266 A GPL-free version was posted to comp.sources.misc in volume
267 31 and is widely available from FTP archive sites, e.g.
268 <URL:ftp://gatekeeper.dec.com/.b/usenet/comp.sources.misc/
269 volume31/editline/part01.Z>
270
271 Pass the Python configure script the option
272 --with-readline=DIRECTORY where DIRECTORY is the absolute
273 pathname of the directory where you've built the readline
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000274 library. If GNU readline is a standard part of your system,
275 don't pass '=DIRECTORY'. Some hints on building and using the
276 readline library are in the FAQ (file Misc/FAQ).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000277
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000278--with-thread: On most Unix systems, you can now use multiple threads.
279 To enable this, pass --with-thread. If the library required
280 for threads lives in a peculiar place, you can use
281 --with-thread=DIRECTORY. In the Modules/Setup file, enable
282 the thread module. (Threads aren't enabled automatically
283 because there are run-time penalties when support for them is
284 compiled in even if you don't use them.)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000285
286--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
287 supported by the "dl" library by Jack Jansen, which is
288 ftp'able from <URL:ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z>.
289 This is enabled (after you've ftp'ed and compiled the dl
290 library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
291 is the absolute pathname of the dl library. (Don't bother on
292 IRIX 5, it already has dynamic linking using SunOS style
293 shared libraries.) Support for this feature is deprecated.
294
295--with-dl-dld: Dynamic loading of modules is rumoured to be supported
296 on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
297 Symmetry (Dynix), and Atari ST. This is done using a
298 combination of the GNU dynamic loading package
299 (<URL:ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z>) and an
300 emulation of the SGI dl library mentioned above (the emulation
301 can be found at
302 <URL:ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z>). To
303 enable this, ftp and compile both libraries, then call the
304 configure passing it the option
305 --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
306 the absolute pathname of the dl emulation library and
307 DLD_DIRECTORY is the absolute pathname of the GNU dld library.
308 (Don't bother on SunOS 4 or 5, they already have dynamic
309 linking using shared libraries.) Support for this feature is
310 deprecated.
311
312--with-libm, --with-libc: It is possible to specify alternative
313 versions for the Math library (default -lm) and the C library
314 (default the empty string) using the options
315 --with-libm=STRING and --with-libc=STRING, respectively. E.g.
316 if your system requires that you pass -lc_s to the C compiler
317 to use the shared C library, you can pass --with-libc=-lc_s.
318 These libraries are passed after all other libraries, the C
319 library last.
Guido van Rossum3ff96dd1996-07-30 18:05:04 +0000320
321--with-next-archs='arch1 arch2': Under NEXTSTEP, this will build
322 all compiled binaries with the architectures listed. Includes
323 correctly setting the target architecture specific resource
324 directory.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000325
326
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000327Extensions
328----------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000329
330You can also build an "extended" interpreter, using modules that are
Guido van Rossum3ff96dd1996-07-30 18:05:04 +0000331not contained in the Modules directory. See the manual titled
332"Extending and Embedding the Python Interpreter" (Doc/ext.tex) for
333more details on writing an extension or building an existing
334extension.
Guido van Rossumaf5b83e1995-01-04 19:02:35 +0000335
336
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000337Building for multiple architectures (using the VPATH feature)
338-------------------------------------------------------------
339
340If your file system is shared between multiple architectures, it
341usually is not necessary to make copies of the sources for each
342architecture you want to support. If the make program supports the
343VPATH feature, you can create an empty build directory for each
344architecture, and in each directory run the configure script (on the
345appropriate machine with the appropriate options). This creates the
346necessary subdirectories and the Makefiles therein. The Makefiles
347contain a line VPATH=... which points to directory containing the
Guido van Rossum6b111b01994-10-11 15:03:34 +0000348actual sources. (On SGI systems, use "smake" instead of "make" if you
349use VPATH -- don't try gnumake.)
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000350
351For example, the following is all you need to build a minimal Python
352in /usr/tmp/python (assuming ~guido/src/python is the toplevel
353directory and you want to build in /usr/tmp/python):
354
355 $ mkdir /usr/tmp/python
356 $ cd /usr/tmp/python
357 $ ~guido/src/python/configure
358 [...]
359 $ make
360 [...]
361 $
362
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000363Note that Modules/Makefile copies the original Setup file to the build
364directory if it finds no Setup file there. This means that you can
365edit the Setup file for each architecture independently. For this
366reason, subsequent changes to the original Setup file are not tracked
367automatically, as they might overwrite local changes. To force a copy
368of a changed original Setup file, delete the target Setup file. (The
369makesetup script supports multiple input files, so if you want to be
370fancy you can change the rules to create an empty Setup.local if it
371doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
372however this assumes that you only need to add modules.)
373
374
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000375Building on non-UNIX systems
376----------------------------
377
378On non-UNIX systems, you will have to fake the effect of running the
379configure script manually. A good start is to copy the file
380config.h.in to config.h and edit the latter to reflect the actual
381configuration of your system. Most symbols must simply be defined as
3821 only if the corresponding feature is present and can be left alone
383otherwise; however RETSIGTYPE must always be defined, either as int or
384as void, and the *_t type symbols must be defined as some variant of
385int if they need to be defined at all. Then arrange that the symbol
386HAVE_CONFIG_H is defined during compilation (usually by passing an
387argument of the form `-DHAVE_CONFIG_H' to the compiler, but this is
388necessarily system-dependent).
389
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000390I have tried to collect instructions, Makefiles and additional sources
391for various platforms in this release. The following directories
392exist:
393
394Mac/ Apple Macintosh, using THINK C 6.0 or MPW 3.2.
395Dos/ MS-DOS and Windows 3.1, using Microsoft C.
396Nt/ Windows NT, using Microsoft Visual C/C++.
397Os2/ OS/2.
398
399Most of these instructions were last tested with a previous Python
400release, so you may still experience occasional problems. If you have
401fixes or suggestions, please let me know and I'll try to incorporate
402them in the next release.
403
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000404
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000405
406Miscellaneous issues
407====================
408
409
410Documentation
411-------------
412
413All documentation is provided in the subdirectory Doc in the form of
414LaTeX files. In order of importance for new users: Tutorial (tut),
415Library Reference (lib), Language Reference (ref), Extending (ext).
416Especially the Library Reference is of immense value since much of
417Python's power (including the built-in data types and functions!) is
418described here.
419
420To print the documentation from the LaTeX files, chdir into the Doc
421subdirectory, type "make" (let's hope you have LaTeX installed!), and
422send the four resulting PostScript files (tut.ps, lib.ps, ref.ps, and
423ext.ps) to the printer. See the README file there.
424
425All documentation is also available on-line via the World-Wide Web
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000426(WWW): <URL:http://www.python.org>. It can also be downloaded
427separately from the ftp archives (see below) in Emacs INFO, HTML or
428PostScript form -- see the FAQ (file Misc/FAQ) for more info.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000429
430
431Emacs mode
432----------
433
434There's an excellent Emacs editing mode for Python code; see the file
435Misc/python-mode.el. Originally written by Tim Peters, who's no
436longer on the net, it is now maintained by Barry Warsaw
437<bwarsaw@cnri.reston.va.com>.
438
Guido van Rossum3c294ca1995-06-14 18:17:22 +0000439BTW, if you want to use font-lock for Python sources, here's something
440to put in your .emacs file:
441
442 (defun my-python-mode-hook ()
443 (setq font-lock-keywords python-font-lock-keywords)
444 (font-lock-mode 1))
445 (add-hook 'python-mode-hook 'my-python-mode-hook)
446
447
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000448
449Bug reports
450-----------
451
452Bugs are best reported to the comp.lang.python newsgroup or the Python
453mailing list -- see the section "Newsgroup and mailing list" below.
454Before posting, read the FAQ (file Misc/FAQ) first to see if your
455problem has already been answered!
456
457
458Ftp access
459----------
460
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000461Python's "home ftp site" is ftp.python.org, directory /pub/python.
462See the FAQ (file Misc/FAQ) for a list of other ftp sites carrying the
463Python distribution.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000464
465
466Newsgroup and mailing list
467--------------------------
468
469There are a newsgroup and a mailing list devoted to Python
470programming, design and bugs. The newsgroup, comp.lang.python,
471contains exactly the same messages as the mailing list. To subscribe
472to the mailing list, send mail containing your real name and e-mail
473address to "python-list-request@cwi.nl" (a real person reads these
474messages, so no LISTPROC or Majordomo commands, please).
475
476
477The Tk interface
478----------------
479
480Tk (the user interface component of John Ousterhout's Tcl language) is
481also usable from Python. Since this requires that you first build and
482install Tcl/Tk, the Tk interface is not enabled by default. It
Guido van Rossum84c8c7f1995-08-28 02:44:24 +0000483requires Tcl 7.4 and Tk 4.0. (Support for Tk 3.6 and Tcl 7.3 can be
484found in Lib/tk3inter/.)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000485
486To enable the Python/Tk interface, once you've built and installed
487Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000488for the string "_tkinter". Un-comment one (normally the first) of the
489lines beginning with "#_tkinter" and un-comment the line beginning with
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000490"#TKPATH". (If you have installed Tcl/Tk in unusual places you will
491have to edit the first line as well to fix the -I and -L options.)
492See the Build Instructions above for more details.
493
494There is little documentation. Begin with fetching the "Tk Lifesaver"
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000495document,
496e.g. <URL:ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz> (a
497gzipped tar file containing a PostScript file). There are demos in
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000498the Demo/tkinter directory, in the subdirectories guido, matt and www.
499
500Note that there's a Python module called "Tkinter" (capital T) which
501lives in Lib/tkinter/Tkinter.py, and a C module called "tkinter"
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000502(lower case t) which lives in Modules/_tkinter.c. Demos and
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000503normal Tk applications only import the Python Tkinter module -- only
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000504the latter uses the C _tkinter module directly. In order to find the C
505_tkinter module, it must be compiled and linked into the Python
506interpreter -- the _tkinter line in the Setup file does this. In order
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000507to find the Python Tkinter module, sys.path must be set correctly --
508the TKPATH assignment in the Setup file takes care of this, but only
509if you install Python properly ("make install libinstall"). (You can
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000510also use dynamic loading for the C _tkinter module, in which case you
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000511must manually fix up sys.path or set $PYTHONPATH for the Python
512Tkinter module.)
513
Guido van Rossum0447a321995-10-08 01:22:33 +0000514See <URL:http://www.smli.com/research/tcl/> for more info on where
Guido van Rossum84c8c7f1995-08-28 02:44:24 +0000515to get Tcl/Tk.
516
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000517
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000518Distribution structure
519----------------------
520
521Most subdirectories have their own README file. Most files have
522comments.
523
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000524Contrib/ Interesting or useful Python code contributed by others
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000525Demo/ Demonstration scripts, modules and programs
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000526Doc/ Documentation (LaTeX sources)
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000527Grammar/ Input for the parser generator
528Include/ Public header files
529Lib/ Python library modules
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000530Makefile.in Source from which config.status creates Makefile
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000531Misc/ Miscellaneous files
532Modules/ Implementation of most built-in modules
533Objects/ Implementation of most built-in object types
534Parser/ The parser and tokenizer and their input handling
535Python/ The "compiler" and interpreter
536README The file you're reading now
Guido van Rossume109aa71995-03-09 14:12:10 +0000537Tools/ Some useful programs written in Python
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000538acconfig.h Additional input for the autoheader program
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000539config.h.in Source from which config.status creates config.h
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000540configure Configuration shell script (GNU autoconf output)
541configure.in Configuration specification (GNU autoconf input)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000542
543The following files will (may) be created in the toplevel directory by
544the configuration and build processes:
545
546Makefile Build rules
547config.cache cache of configuration variables
548config.h Configuration header
549config.log log from last configure run
550config.status status from last run of configure script
551python The executable interpreter
552tags, TAGS Tags files for vi and Emacs
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000553
554
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000555Author's address
556----------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000557
558Guido van Rossum
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000559CNRI
5601895 Preston White Drive
561Reston, VA 22094
562USA
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000563
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000564E-mail: guido@python.org
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000565
566
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000567
568Copyright notice
569================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000570
571The Python source is copyrighted, but you can freely use and copy it
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000572as long as you don't change or remove the copyright notice:
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000573
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000574----------------------------------------------------------------------
Guido van Rossumaf5b83e1995-01-04 19:02:35 +0000575Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
576The Netherlands.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000577
578 All Rights Reserved
579
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000580Permission to use, copy, modify, and distribute this software and its
581documentation for any purpose and without fee is hereby granted,
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000582provided that the above copyright notice appear in all copies and that
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000583both that copyright notice and this permission notice appear in
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000584supporting documentation, and that the names of Stichting Mathematisch
585Centrum or CWI not be used in advertising or publicity pertaining to
586distribution of the software without specific, written prior permission.
587
588STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
589THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
590FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
591FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
592WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
593ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
594OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000595----------------------------------------------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000596
597
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000598--Guido van Rossum (home page: http://www.python.org/~guido/)