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