blob: 7e35b017bab27c803c9ee3811b1089294e64508f [file] [log] [blame]
Guido van Rossum478f4871996-10-25 14:35:24 +00001(I had no time to update and test this directory. It is provided
2for your information only.)
3
Guido van Rossumebd87061996-09-06 21:45:27 +00004Python 1.4beta3 for Windows NT 3.5 and Windows 95
5=================================================
Guido van Rossumf71f6131996-09-03 15:08:36 +00006
7The zip file pyth14b3.zip contains a preliminary binary release of
Guido van Rossum03dea6d1996-09-03 18:19:12 +00008Python 1.4beta3 for Windows NT 3.5 and Windows '95, with Tcl/Tk
9support. The installation has not been tested on Windows 3.1 with
10Win32s. For general information on Python, see
11http://www.python.org/.
Guido van Rossumf71f6131996-09-03 15:08:36 +000012
Guido van Rossum2b880611996-09-03 21:20:52 +000013
14To install
15----------
Guido van Rossumf71f6131996-09-03 15:08:36 +000016
Guido van Rossumd8b4dd61996-10-21 14:54:59 +000017Unzip the archive on a file system with enough space. It will create
18a directory Python1.4b3 containing subdirectories Bin and Lib and some
19files, including setup.bat, setup.py, uninstall.bat, and uninstall.py.
20(If you don't have a zip program that supports long filenames, get the
21file winzip95.exe and install it -- this is WinZip 6.1 for 32-bit
22Windows systems.)
Guido van Rossumf71f6131996-09-03 15:08:36 +000023
24Run the SETUP.BAT file found in directory just created. When it is
25done, press Enter.
26
Guido van Rossum2b880611996-09-03 21:20:52 +000027Tcl/Tk support requires additional installation steps, see below.
28
29
30To use
31------
Guido van Rossumf71f6131996-09-03 15:08:36 +000032
33Python runs in a console (DOS) window. From the File Manager, run the
34file python.exe found in the Bin subdirectory. You can also drag it
35to a program group of your choice for easier access. Opening any file
36ending in .py from the file manager should run it.
37
Guido van Rossumf71f6131996-09-03 15:08:36 +000038
Guido van Rossum2b880611996-09-03 21:20:52 +000039To use with Tkinter
40-------------------
41
42Get the file win41p1.exe from /pub/python/nt/ on ftp.python.org or
43from ftp site ftp.sunlabs.com, directory /pub/tcl/. This is a
44self-extracting archive containing the Tcl/Tk distribution for Windows
45NT. Don't use an older version.
Guido van Rossumf71f6131996-09-03 15:08:36 +000046
47Using the control panel, set the TCL_LIBRARY and TK_LIBRARY
48environment variables. E.g. if you installed Tcl/Tk in C:\TCL (the
49default suggested by the installer), set TCL_LIBRARY to
Guido van Rossumd8b4dd61996-10-21 14:54:59 +000050"C:\TCL\lib\tcl7.5" and set TK_LIBRARY to "C:\TCL\lib\tk4.1". Also
51add the directory "C:\TCL\bin" (or whereever the Tcl bin directory
52ended up) to the PATH environment variable.
Guido van Rossumf71f6131996-09-03 15:08:36 +000053
Guido van Rossum2b880611996-09-03 21:20:52 +000054On Windows '95, you need to edit AUTOEXEC.BAT for this, e.g. by adding
55the lines
56
57 SET TCL_LIBRARY=C:\Program Files\TCL\lib\tcl7.5
58 SET TK_LIBRARY=C:\Program Files\TCL\lib\tk4.1
Guido van Rossum2b880611996-09-03 21:20:52 +000059 SET PATH="%PATH%";"C:\Program Files\TCL\bin"
60
61(substituting the actual location of the TCL installation directory).
Guido van Rossum03dea6d1996-09-03 18:19:12 +000062
Guido van Rossumf71f6131996-09-03 15:08:36 +000063Once Tcl/Tk is installed, you should be able to type the following
64commands in Python:
65
66 >>> import Tkinter
67 >>> Tkinter._test()
68
69This creates a simple test dialog box (you may have to move the Python
70window a bit to see it). Click on OK to get the Python prompt back.
71
Guido van Rossum2b880611996-09-03 21:20:52 +000072
73Troubleshooting
74---------------
75
76The following procedure will test successive components required for
77successful use of Python and Tkinter. The steps before "import
78_tkinter" can be used to verify the proper installation of the Python
79core.
80
81- First, run the Python interpreter (python.exe). This should give
82you a ">>>" prompt in a "MS-DOS console" window. This may fail with a
83complaint about being unable to find the file MSVC40RT.DLL. This file
84(along with several other files) is included in the MSOFTDLL.EXE
85self-extracting archive available in the /pub/python/wpy directory on
86ftp.python.org. After extraction, move MSVCRT40.NT to
87\Windows\System\MSVCRT40.DLL (note the change of extension).
88
89- If you can't get a ">>>" prompt, your core Python installation may
90be botched. Reinstall from the ZIP file (see above) and run
91SETUP.BAT.
92
93- At the ">>>" prompt, type a few commands. Each command should
94succeed without complaints. Remember that Python is a case sensitive
95language, so type the commands exactly as shown ("tkinter" and
96"Tkinter" are two very different things).
97
98>>> import sys
99
100 If this fails, you can't type :-) (Explanation: this is a
101 built-in module that is pre-initialized before the first ">>>"
102 prompt is printed. There is no way that this import can fail
103 except by a typo.)
104
105>>> import string
106
107 If this fails, the Python library cannot be found. Reinstall
108 Python. (Explanation: the registry entry for PythonPath is
109 botched. Inspect sys.path to see what it is. If it is
110 something like ['.', '.\\lib', '.\\lib\\win'], the setup.py
111 script has not run successfully and you may get away with
112 rerunning the SETUP.BAT file.)
113
114>>> import _tkinter
115
116 This can fail in a number of ways:
117
118 ImportError: No module named _tkinter
119 The Python module file _tkinter.dll can't be found.
120 Since it is installed by default, the installation is
121 probably botched. Reinstall Python.
122
123 ImportError: DLL load failed: The specified module could not
124 be found. (Possibly with a dialog box explaining that
125 TCL75.DLL or TK41.DLL could not be found.)
126 Probably a Tcl/Tk installation error. Reinstall Tcl/Tk.
127 Note that on Windows '95, you may need to add the Tcl
128 bin directory to the PATH environment variable.
129
130 Other failures:
131 It may be possible that you have an early prerelease
132 TCL75.DLL or TK41.DLL, which is incompatible with the
133 _tkinter module in the Python distribution. This will
134 most likely result in error messages that don't make a
135 lot of sense. Try installing Tcl/Tk from the
136 win41p1.exe self-extracting archive found in
137 /pub/python/nt on ftp.python.org.
138
139>>> import Tkinter
140
141 If this fails, your Python library or sys.path is botched.
142 Your best bet, again, is to reinstall Python.
143
144>>> Tkinter._test()
145
146 This should pop up a window with a label ("Proof-of-existence
147 test for TK") and two buttons ("Click me!" and "QUIT").
148 If you get nothing at all (not even a ">>>" prompt), the
149 window is probably hiding behind the Python console window.
150 Move the console window around to reveal the test window.
151
152 If you get an exception instead, it is most likely a verbose
153 complaint from Tcl/Tk about improper installation. This is
154 usually caused by bad or missing values for the environment
155 variables TK_LIBRARY or TCL_LIBRARY. See the installation
156 instructions above.
157
158
159To uninstall
160------------
Guido van Rossum03dea6d1996-09-03 18:19:12 +0000161
162Run the batch file UNINSTALL.BAT. This will run the Python script
163uninstall.py, which undoes the registry additions and removes most
164installed files. The batch file then proceed to remove some files
165that the Python script can't remove (because it's using them). The
166batch file ends with an error because it deletes itself. Hints on how
167to avoid this (and also on how to remove the installation directory
168itself) are gracefully accepted.
169
Guido van Rossum2b880611996-09-03 21:20:52 +0000170
Guido van Rossum03dea6d1996-09-03 18:19:12 +0000171September 3, 1996
Guido van Rossumf71f6131996-09-03 15:08:36 +0000172
173--Guido van Rossum (home page: http://www.python.org/~guido/)