blob: bf1f9ac6fcbeef02223f4bf7c2e0302b1c58ca37 [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
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +00004It's a beta release. Use this only if you want to help me iron the
Guido van Rossumfaf681a1996-06-20 14:32:08 +00005last 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 Rossum8d7d4ed1996-07-30 21:41:07 +000012What's new in this release?
13---------------------------
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000014
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +000015A list of things that changed since 1.4 beta 1 can be found in
16Misc/NEWS. This file will eventually be updated to also list what's
17new since to 1.3.
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000018
19
Guido van Rossum91cb9d21995-04-10 11:47:38 +000020What is Python anyway?
21----------------------
22
23Python is an interpreted object-oriented programming language, and is
24often compared to Tcl, Perl or Scheme. For a quick summary of what
Guido van Rossumfaf681a1996-06-20 14:32:08 +000025Python can mean for a UNIX/C programmer, read Misc/BLURB.LUTZ. If you
26have web access, point your browser to <URL:http://www.python.org>.
Guido van Rossum91cb9d21995-04-10 11:47:38 +000027
28
29If you don't read instructions
30------------------------------
31
32Congratulations on getting this far. :-)
33
34To start building right away (on UNIX): type "./configure" in the
35current directory and when it finishes, type "make". The section
36Build Instructions below is still recommended reading. :-)
37
38
39Copyright issues
40----------------
41
42Python is COPYRIGHTED but free to use for all. See the full copyright
43notice at the end of this file.
44
45The Python distribution is *not* affected by the GNU Public Licence
46(GPL). There are interfaces to some GNU code but these are entirely
47optional and no GNU code is distributed with Python. For all these
48packages, GPL-free public domain versions also exist.
49
Guido van Rossum627b2d71993-12-24 10:39:16 +000050
Guido van Rossumff840491995-09-18 22:02:47 +000051A modest plug
52=============
53
54
Guido van Rossum0447a321995-10-08 01:22:33 +000055*************************************************************************
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000056* *
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +000057* If you use Python, please consider joining the Python Software *
58* Activity (PSA). See http://www.python.org/psa/. *
59* *
60* Organizations making heavy use of Python are especially invited *
61* to become corporate members! *
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000062* *
Guido van Rossum0447a321995-10-08 01:22:33 +000063*************************************************************************
Guido van Rossumff840491995-09-18 22:02:47 +000064
Guido van Rossum627b2d71993-12-24 10:39:16 +000065
Guido van Rossum433c8ad1994-08-01 12:07:07 +000066Build instructions
Guido van Rossum91cb9d21995-04-10 11:47:38 +000067==================
Guido van Rossum627b2d71993-12-24 10:39:16 +000068
Guido van Rossum433c8ad1994-08-01 12:07:07 +000069Before you start building Python, you must first configure it. This
70entails (at least) running the script "./configure", which figures out
Guido van Rossum91cb9d21995-04-10 11:47:38 +000071your system configuration and creates several Makefiles. (It takes a
72minute or two -- please be patient!) When it's done, you are ready to
73run make. Typing "make" in the toplevel directory will recursively
74run make in each of the subdirectories Parser, Objects, Python and
75Modules, creating a library file in each one. The executable of the
76interpreter is built in the Modules subdirectory and moved up here
77when it is built. If you want or need to, you can also chdir into
78each subdirectory in turn and run make there manually (do the Modules
79subdirectory last!).
Guido van Rossum627b2d71993-12-24 10:39:16 +000080
Guido van Rossum91cb9d21995-04-10 11:47:38 +000081NOTE: if you rerun the configure script with different options, remove
82all object files by running "make clean" before rebuilding. Believe
83it or not, "make clean" sometimes helps to clean up other inexplicable
84problems as well. Try it before sending in a bug report!
Guido van Rossum627b2d71993-12-24 10:39:16 +000085
Guido van Rossum0a516c91994-09-12 10:58:40 +000086
Guido van Rossum91cb9d21995-04-10 11:47:38 +000087Troubleshooting
88---------------
Guido van Rossum627b2d71993-12-24 10:39:16 +000089
Guido van Rossumfaf681a1996-06-20 14:32:08 +000090If recursive makes fail, try invoking make as "make MAKE=make".
91
92If you run into other trouble, see section 3 of the FAQ (file
93Misc/FAQ) for hints on what can go wrong, and how to fix it.
Guido van Rossum91cb9d21995-04-10 11:47:38 +000094
95
96Platform specific notes
97-----------------------
98
Guido van Rossum0447a321995-10-08 01:22:33 +000099(Some of these may no longer apply. If you find you can build Python
100on these platforms without the special directions mentioned here, let
101me know so I can remove them!)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000102
Guido van Rossum8eca2c21996-02-14 18:37:46 +0000103Linux: Once you've built Python, use it to run the regen.py script in
104 the Lib/linux1 directory. Apparently the files as distributed
105 don't match the system headers on some Linux versions.
106
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000107AIX: Read the files Misc/AIX-NOTES* before trying to build.
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000108 WARNING! In some versions of AIX, you get errors about
109 Invalid Indent when running the Python test set. This appears
110 to be a bug in the AIX compiler. Rebuild Parser/tokenizer.c
111 using OPT="" or OPT=-g, or use gcc.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000112
113HP-UX: Read the file Misc/HPUX-NOTES if you want to be able to
114 use shared libraries for dynamically loaded modules.
115
116Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"!
117
118SCO: 1) Everything works much better if you add -U__STDC__ to the
119 defs. This is because all the SCO header files are broken.
120 Anything that isn't mentioned in the C standard it's
121 conditionally excluded when __STDC__ is defined.
122
123 2) Due to the U.S. export restrictions, SCO broke the crypt
124 stuff out into a separate library, libcrypt_i.a so the LIBS
125 needed be set to:
126
127 LIBS=' -lsocket -lcrypt_i'
128
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000129 3) According to at least one report, the above apply only to
130 SCO 3 -- Python builds out of the box on SCO 5.
131
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000132
133Configuring the set of built-in modules
134---------------------------------------
Guido van Rossum19e0c261995-01-17 16:36:34 +0000135
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000136You can configure the interpreter to contain fewer or more built-in
137modules by editing the file Modules/Setup. This file is initially
138copied (when the toplevel Makefile makes Modules/Makefile for the
139first time) from Setup.in; if it does not exist yet, make a copy
140yourself. Never edit Setup.in -- always edit Setup. Read the
141comments in the file for information on what kind of edits you can
142make. When you have edited Setup, Makefile and config.c in Modules
143will automatically be rebuilt the next time you run make in the
Guido van Rossum9444ce01994-10-20 22:10:23 +0000144toplevel directory.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000145
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000146Especially on SGI IRIX, there are modules that interface to many SGI
147specific system libraries, e.g. the GL library and the audio hardware.
148
149
150Setting the optimization/debugging options
151------------------------------------------
152
153If you want to change the optimization/debugging options for the C
154compiler, assign to the OPT variable on the toplevel make command;
155e.g. "make OPT=-g" will build a debugging version of Python on most
156platforms. The default is OPT=-O; a value for OPT in the environment
157when the configure script is run overrides this default (likewise for
158CC; and the initial value for LIBS is used as the base set of
159libraries to link with).
160
161
162Testing
163-------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000164
165To test the interpreter that you have just built, type "make test".
166This runs the test set silently, twice (once with no compiled files,
167once with the compiled files left by the previous test run). Each
168test run should print "All tests OK." and nothing more. (The test set
169does not test the built-in modules, but will find most other problems
170with the interpreter.)
171
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000172IMPORTANT: If the tests fail and you decide to mail a bug report,
173*don't* include the output of "make test". It is useless. Run the
174following command instead:
175
176 PYTHONPATH=../Lib:../Lib/test:./Modules ./python -c 'import testall'
177
178(substituting the top of the source tree for .. if you built in a
179different directory). This gives the output of the tests and shows
180which test failed.
181
182
183Installing
184----------
185
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000186XXX TO be rewritten for new install procedure.
187
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000188To install the interpreter as /usr/local/bin/python, type "make
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000189bininstall". To install the library as /usr/local/lib/python, type
190"make libinstall". To install the manual page as
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000191/usr/local/man/man1/python.1, type "make maninstall". To install the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000192Emacs editing mode for Python, manually copy the file
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000193Misc/python-mode.el to your local Emacs lisp directory. The directory
194/usr/local can be overridden at configuration time by passing
195--prefix=DIRECTORY to the configure script, or at make time by passing
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000196"prefix=DIRECTORY" to make. See below for more information on
197--prefix.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000198
199If you plan to do development of extension modules or to embed Python
200in another application and don't want to reference the original source
201tree, you can type "make inclinstall" and "make libainstall" to
202install the include files and lib*.a files, respectively, as
203/usr/local/include/Py/*.h and /usr/local/lib/python/lib/lib*.a. The
204make libainstall target also installs copies of several other files
205used or produced during the build process which are needed to build
206extensions or to generate their Makefiles.
207
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000208
209Configuration options and variables
210-----------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000211
212Some special cases are handled by passing environment variables or
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000213options to the configure script.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000214
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000215NOTE: if you rerun the configure script with different options, remove
216all object files by running "make clean" before rebuilding.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000217
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000218--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
219 it finds it. If you don't want this, or if this compiler is
220 installed but broken on your platform, pass the option
221 --without-gcc. You can also pass "CC=cc" (or whatever the
222 name of the proper C compiler is) in the environment, but the
223 advantage of using --without-gcc is that this option is
224 remembered by the config.status script for its --recheck
225 option.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000226
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000227--prefix, --exec-prefix: If you want to install the binaries and the
228 Python library somewhere else than in /usr/local/{bin,lib},
229 you can pass the option --prefix=DIRECTORY; the interpreter
230 binary will be installed as DIRECTORY/bin/python and the
231 library files as DIRECTORY/lib/python/*. If you pass
232 --exec-prefix=DIRECTORY (as well) this overrides the
233 installation prefix for architecture-dependent files (like the
234 interpreter binary). Note that --prefix=DIRECTORY also
235 affects the default module search path (sys.path), when
236 Modules/config.c is compiled. Passing make the option
237 prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
238 prefix set at configuration time; this may be more convenient
239 than re-running the configure script if you change your mind
240 about the install prefix...
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000241
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000242--with-readline: You can use the GNU readline library to improve the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000243 interactive user interface. This gives you line editing and
244 command history when calling Python interactively. Unless GNU
245 readline is a standard part of your system (it is on Linux),
246 you need to configure build the GNU readline library before
247 running the configure script. Its sources are not distributed
248 with Python; you can ftp them from any GNU mirror site, or
249 from its home site:
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000250 <URL:ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz> (or
251 a higher version number -- using version 1.x is not
252 recommended).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000253
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000254 A GPL-free version was posted to comp.sources.misc in volume
255 31 and is widely available from FTP archive sites, e.g.
256 <URL:ftp://gatekeeper.dec.com/.b/usenet/comp.sources.misc/
257 volume31/editline/part01.Z>
258
259 Pass the Python configure script the option
260 --with-readline=DIRECTORY where DIRECTORY is the absolute
261 pathname of the directory where you've built the readline
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000262 library. If GNU readline is a standard part of your system,
263 don't pass '=DIRECTORY'. Some hints on building and using the
264 readline library are in the FAQ (file Misc/FAQ).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000265
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000266--with-thread: On most Unix systems, you can now use multiple threads.
267 To enable this, pass --with-thread. If the library required
268 for threads lives in a peculiar place, you can use
269 --with-thread=DIRECTORY. In the Modules/Setup file, enable
270 the thread module. (Threads aren't enabled automatically
271 because there are run-time penalties when support for them is
272 compiled in even if you don't use them.)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000273
274--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
275 supported by the "dl" library by Jack Jansen, which is
276 ftp'able from <URL:ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z>.
277 This is enabled (after you've ftp'ed and compiled the dl
278 library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
279 is the absolute pathname of the dl library. (Don't bother on
280 IRIX 5, it already has dynamic linking using SunOS style
281 shared libraries.) Support for this feature is deprecated.
282
283--with-dl-dld: Dynamic loading of modules is rumoured to be supported
284 on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
285 Symmetry (Dynix), and Atari ST. This is done using a
286 combination of the GNU dynamic loading package
287 (<URL:ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z>) and an
288 emulation of the SGI dl library mentioned above (the emulation
289 can be found at
290 <URL:ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z>). To
291 enable this, ftp and compile both libraries, then call the
292 configure passing it the option
293 --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
294 the absolute pathname of the dl emulation library and
295 DLD_DIRECTORY is the absolute pathname of the GNU dld library.
296 (Don't bother on SunOS 4 or 5, they already have dynamic
297 linking using shared libraries.) Support for this feature is
298 deprecated.
299
300--with-libm, --with-libc: It is possible to specify alternative
301 versions for the Math library (default -lm) and the C library
302 (default the empty string) using the options
303 --with-libm=STRING and --with-libc=STRING, respectively. E.g.
304 if your system requires that you pass -lc_s to the C compiler
305 to use the shared C library, you can pass --with-libc=-lc_s.
306 These libraries are passed after all other libraries, the C
307 library last.
Guido van Rossum3ff96dd1996-07-30 18:05:04 +0000308
309--with-next-archs='arch1 arch2': Under NEXTSTEP, this will build
310 all compiled binaries with the architectures listed. Includes
311 correctly setting the target architecture specific resource
312 directory.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000313
Guido van Rossumd02ba451996-07-31 17:36:01 +0000314--with-libs='libs': Add 'libs' to the LIBS that the python
315 linked against.
316
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000317
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000318Building for multiple architectures (using the VPATH feature)
319-------------------------------------------------------------
320
321If your file system is shared between multiple architectures, it
322usually is not necessary to make copies of the sources for each
323architecture you want to support. If the make program supports the
324VPATH feature, you can create an empty build directory for each
325architecture, and in each directory run the configure script (on the
326appropriate machine with the appropriate options). This creates the
327necessary subdirectories and the Makefiles therein. The Makefiles
328contain a line VPATH=... which points to directory containing the
Guido van Rossum6b111b01994-10-11 15:03:34 +0000329actual sources. (On SGI systems, use "smake" instead of "make" if you
330use VPATH -- don't try gnumake.)
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000331
332For example, the following is all you need to build a minimal Python
333in /usr/tmp/python (assuming ~guido/src/python is the toplevel
334directory and you want to build in /usr/tmp/python):
335
336 $ mkdir /usr/tmp/python
337 $ cd /usr/tmp/python
338 $ ~guido/src/python/configure
339 [...]
340 $ make
341 [...]
342 $
343
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000344Note that Modules/Makefile copies the original Setup file to the build
345directory if it finds no Setup file there. This means that you can
346edit the Setup file for each architecture independently. For this
347reason, subsequent changes to the original Setup file are not tracked
348automatically, as they might overwrite local changes. To force a copy
349of a changed original Setup file, delete the target Setup file. (The
350makesetup script supports multiple input files, so if you want to be
351fancy you can change the rules to create an empty Setup.local if it
352doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
353however this assumes that you only need to add modules.)
354
355
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000356Building on non-UNIX systems
357----------------------------
358
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000359XXX Rewrite -- nothing in this chapter is true any more.
360
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000361On non-UNIX systems, you will have to fake the effect of running the
362configure script manually. A good start is to copy the file
363config.h.in to config.h and edit the latter to reflect the actual
364configuration of your system. Most symbols must simply be defined as
3651 only if the corresponding feature is present and can be left alone
366otherwise; however RETSIGTYPE must always be defined, either as int or
367as void, and the *_t type symbols must be defined as some variant of
368int if they need to be defined at all. Then arrange that the symbol
369HAVE_CONFIG_H is defined during compilation (usually by passing an
370argument of the form `-DHAVE_CONFIG_H' to the compiler, but this is
371necessarily system-dependent).
372
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000373I have tried to collect instructions, Makefiles and additional sources
374for various platforms in this release. The following directories
375exist:
376
377Mac/ Apple Macintosh, using THINK C 6.0 or MPW 3.2.
378Dos/ MS-DOS and Windows 3.1, using Microsoft C.
379Nt/ Windows NT, using Microsoft Visual C/C++.
380Os2/ OS/2.
381
382Most of these instructions were last tested with a previous Python
383release, so you may still experience occasional problems. If you have
384fixes or suggestions, please let me know and I'll try to incorporate
385them in the next release.
386
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000387
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000388
389Miscellaneous issues
390====================
391
392
393Documentation
394-------------
395
396All documentation is provided in the subdirectory Doc in the form of
397LaTeX files. In order of importance for new users: Tutorial (tut),
398Library Reference (lib), Language Reference (ref), Extending (ext).
399Especially the Library Reference is of immense value since much of
400Python's power (including the built-in data types and functions!) is
401described here.
402
403To print the documentation from the LaTeX files, chdir into the Doc
404subdirectory, type "make" (let's hope you have LaTeX installed!), and
405send the four resulting PostScript files (tut.ps, lib.ps, ref.ps, and
406ext.ps) to the printer. See the README file there.
407
408All documentation is also available on-line via the World-Wide Web
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000409(WWW): <URL:http://www.python.org>. It can also be downloaded
410separately from the ftp archives (see below) in Emacs INFO, HTML or
411PostScript form -- see the FAQ (file Misc/FAQ) for more info.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000412
413
414Emacs mode
415----------
416
417There's an excellent Emacs editing mode for Python code; see the file
418Misc/python-mode.el. Originally written by Tim Peters, who's no
419longer on the net, it is now maintained by Barry Warsaw
420<bwarsaw@cnri.reston.va.com>.
421
Guido van Rossum3c294ca1995-06-14 18:17:22 +0000422BTW, if you want to use font-lock for Python sources, here's something
423to put in your .emacs file:
424
425 (defun my-python-mode-hook ()
426 (setq font-lock-keywords python-font-lock-keywords)
427 (font-lock-mode 1))
428 (add-hook 'python-mode-hook 'my-python-mode-hook)
429
430
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000431
432Bug reports
433-----------
434
435Bugs are best reported to the comp.lang.python newsgroup or the Python
436mailing list -- see the section "Newsgroup and mailing list" below.
437Before posting, read the FAQ (file Misc/FAQ) first to see if your
438problem has already been answered!
439
440
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000441Web site
442--------
443
444Python's own web site has URL http://www.python.org/. Come visit us!
445
446
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000447Ftp access
448----------
449
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000450Python's own ftp site is ftp.python.org, directory /pub/python. See
451the FAQ (file Misc/FAQ) for a list of other ftp sites carrying the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000452Python distribution.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000453
454
455Newsgroup and mailing list
456--------------------------
457
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000458There are a newsgroup and a mailing list devoted to Python. The
459newsgroup, comp.lang.python, contains exactly the same messages as the
460mailing list (though not always in the same order, due to the
461mysterious nature of Usenet news' flooding algorithms). To subscribe
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000462to the mailing list, send mail containing your real name and e-mail
463address to "python-list-request@cwi.nl" (a real person reads these
464messages, so no LISTPROC or Majordomo commands, please).
465
466
467The Tk interface
468----------------
469
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000470XXX To be rewritten in the light of _tkinter and Tk 4.1.
471
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000472Tk (the user interface component of John Ousterhout's Tcl language) is
473also usable from Python. Since this requires that you first build and
474install Tcl/Tk, the Tk interface is not enabled by default. It
Guido van Rossum84c8c7f1995-08-28 02:44:24 +0000475requires Tcl 7.4 and Tk 4.0. (Support for Tk 3.6 and Tcl 7.3 can be
476found in Lib/tk3inter/.)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000477
478To enable the Python/Tk interface, once you've built and installed
479Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000480for the string "_tkinter". Un-comment one (normally the first) of the
481lines beginning with "#_tkinter" and un-comment the line beginning with
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000482"#TKPATH". (If you have installed Tcl/Tk in unusual places you will
483have to edit the first line as well to fix the -I and -L options.)
484See the Build Instructions above for more details.
485
486There is little documentation. Begin with fetching the "Tk Lifesaver"
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000487document,
488e.g. <URL:ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz> (a
489gzipped tar file containing a PostScript file). There are demos in
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000490the Demo/tkinter directory, in the subdirectories guido, matt and www.
491
492Note that there's a Python module called "Tkinter" (capital T) which
493lives in Lib/tkinter/Tkinter.py, and a C module called "tkinter"
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000494(lower case t) which lives in Modules/_tkinter.c. Demos and
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000495normal Tk applications only import the Python Tkinter module -- only
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000496the latter uses the C _tkinter module directly. In order to find the C
497_tkinter module, it must be compiled and linked into the Python
498interpreter -- the _tkinter line in the Setup file does this. In order
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000499to find the Python Tkinter module, sys.path must be set correctly --
500the TKPATH assignment in the Setup file takes care of this, but only
501if you install Python properly ("make install libinstall"). (You can
Jack Jansen10d0f8f1995-10-23 14:36:05 +0000502also use dynamic loading for the C _tkinter module, in which case you
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000503must manually fix up sys.path or set $PYTHONPATH for the Python
504Tkinter module.)
505
Guido van Rossum0447a321995-10-08 01:22:33 +0000506See <URL:http://www.smli.com/research/tcl/> for more info on where
Guido van Rossum84c8c7f1995-08-28 02:44:24 +0000507to get Tcl/Tk.
508
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000509
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000510Distribution structure
511----------------------
512
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000513XXX To be redone!
514
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000515Most subdirectories have their own README file. Most files have
516comments.
517
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000518Demo/ Demonstration scripts, modules and programs
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000519Doc/ Documentation (LaTeX sources)
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000520Grammar/ Input for the parser generator
521Include/ Public header files
522Lib/ Python library modules
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000523Makefile.in Source from which config.status creates Makefile
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000524Misc/ Miscellaneous files
525Modules/ Implementation of most built-in modules
526Objects/ Implementation of most built-in object types
527Parser/ The parser and tokenizer and their input handling
528Python/ The "compiler" and interpreter
529README The file you're reading now
Guido van Rossume109aa71995-03-09 14:12:10 +0000530Tools/ Some useful programs written in Python
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000531acconfig.h Additional input for the autoheader program
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000532config.h.in Source from which config.status creates config.h
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000533configure Configuration shell script (GNU autoconf output)
534configure.in Configuration specification (GNU autoconf input)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000535
536The following files will (may) be created in the toplevel directory by
537the configuration and build processes:
538
539Makefile Build rules
540config.cache cache of configuration variables
541config.h Configuration header
542config.log log from last configure run
543config.status status from last run of configure script
544python The executable interpreter
545tags, TAGS Tags files for vi and Emacs
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000546
547
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000548Author's address
549----------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000550
551Guido van Rossum
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000552CNRI
5531895 Preston White Drive
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000554Reston, VA 20191
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000555USA
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000556
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000557E-mail: guido@cnri.reston.va.or or guido@python.org
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000558
559
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000560
561Copyright notice
562================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000563
564The Python source is copyrighted, but you can freely use and copy it
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000565as long as you don't change or remove the copyright notice:
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000566
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000567----------------------------------------------------------------------
Guido van Rossumaf5b83e1995-01-04 19:02:35 +0000568Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
569The Netherlands.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000570
571 All Rights Reserved
572
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000573Permission to use, copy, modify, and distribute this software and its
574documentation for any purpose and without fee is hereby granted,
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000575provided that the above copyright notice appear in all copies and that
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000576both that copyright notice and this permission notice appear in
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000577supporting documentation, and that the names of Stichting Mathematisch
578Centrum or CWI not be used in advertising or publicity pertaining to
579distribution of the software without specific, written prior permission.
580
581STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
582THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
583FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
584FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
585WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
586ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
587OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000588----------------------------------------------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000589
590
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000591--Guido van Rossum (home page: http://www.python.org/~guido/)