Guido van Rossum | 478f487 | 1996-10-25 14:35:24 +0000 | [diff] [blame] | 1 | (I had no time to update and test this directory. It is provided |
| 2 | for your information only.) |
| 3 | |
Guido van Rossum | ebd8706 | 1996-09-06 21:45:27 +0000 | [diff] [blame] | 4 | Python 1.4beta3 for Windows NT 3.5 and Windows 95 |
| 5 | ================================================= |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 6 | |
| 7 | The zip file pyth14b3.zip contains a preliminary binary release of |
Guido van Rossum | 03dea6d | 1996-09-03 18:19:12 +0000 | [diff] [blame] | 8 | Python 1.4beta3 for Windows NT 3.5 and Windows '95, with Tcl/Tk |
| 9 | support. The installation has not been tested on Windows 3.1 with |
| 10 | Win32s. For general information on Python, see |
| 11 | http://www.python.org/. |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 12 | |
Guido van Rossum | 2b88061 | 1996-09-03 21:20:52 +0000 | [diff] [blame] | 13 | |
| 14 | To install |
| 15 | ---------- |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | d8b4dd6 | 1996-10-21 14:54:59 +0000 | [diff] [blame] | 17 | Unzip the archive on a file system with enough space. It will create |
| 18 | a directory Python1.4b3 containing subdirectories Bin and Lib and some |
| 19 | files, 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 |
| 21 | file winzip95.exe and install it -- this is WinZip 6.1 for 32-bit |
| 22 | Windows systems.) |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 23 | |
| 24 | Run the SETUP.BAT file found in directory just created. When it is |
| 25 | done, press Enter. |
| 26 | |
Guido van Rossum | 2b88061 | 1996-09-03 21:20:52 +0000 | [diff] [blame] | 27 | Tcl/Tk support requires additional installation steps, see below. |
| 28 | |
| 29 | |
| 30 | To use |
| 31 | ------ |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 32 | |
| 33 | Python runs in a console (DOS) window. From the File Manager, run the |
| 34 | file python.exe found in the Bin subdirectory. You can also drag it |
| 35 | to a program group of your choice for easier access. Opening any file |
| 36 | ending in .py from the file manager should run it. |
| 37 | |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 38 | |
Guido van Rossum | 2b88061 | 1996-09-03 21:20:52 +0000 | [diff] [blame] | 39 | To use with Tkinter |
| 40 | ------------------- |
| 41 | |
| 42 | Get the file win41p1.exe from /pub/python/nt/ on ftp.python.org or |
| 43 | from ftp site ftp.sunlabs.com, directory /pub/tcl/. This is a |
| 44 | self-extracting archive containing the Tcl/Tk distribution for Windows |
| 45 | NT. Don't use an older version. |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 46 | |
| 47 | Using the control panel, set the TCL_LIBRARY and TK_LIBRARY |
| 48 | environment variables. E.g. if you installed Tcl/Tk in C:\TCL (the |
| 49 | default suggested by the installer), set TCL_LIBRARY to |
Guido van Rossum | d8b4dd6 | 1996-10-21 14:54:59 +0000 | [diff] [blame] | 50 | "C:\TCL\lib\tcl7.5" and set TK_LIBRARY to "C:\TCL\lib\tk4.1". Also |
| 51 | add the directory "C:\TCL\bin" (or whereever the Tcl bin directory |
| 52 | ended up) to the PATH environment variable. |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 53 | |
Guido van Rossum | 2b88061 | 1996-09-03 21:20:52 +0000 | [diff] [blame] | 54 | On Windows '95, you need to edit AUTOEXEC.BAT for this, e.g. by adding |
| 55 | the 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 Rossum | 2b88061 | 1996-09-03 21:20:52 +0000 | [diff] [blame] | 59 | SET PATH="%PATH%";"C:\Program Files\TCL\bin" |
| 60 | |
| 61 | (substituting the actual location of the TCL installation directory). |
Guido van Rossum | 03dea6d | 1996-09-03 18:19:12 +0000 | [diff] [blame] | 62 | |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 63 | Once Tcl/Tk is installed, you should be able to type the following |
| 64 | commands in Python: |
| 65 | |
| 66 | >>> import Tkinter |
| 67 | >>> Tkinter._test() |
| 68 | |
| 69 | This creates a simple test dialog box (you may have to move the Python |
| 70 | window a bit to see it). Click on OK to get the Python prompt back. |
| 71 | |
Guido van Rossum | 2b88061 | 1996-09-03 21:20:52 +0000 | [diff] [blame] | 72 | |
| 73 | Troubleshooting |
| 74 | --------------- |
| 75 | |
| 76 | The following procedure will test successive components required for |
| 77 | successful use of Python and Tkinter. The steps before "import |
| 78 | _tkinter" can be used to verify the proper installation of the Python |
| 79 | core. |
| 80 | |
| 81 | - First, run the Python interpreter (python.exe). This should give |
| 82 | you a ">>>" prompt in a "MS-DOS console" window. This may fail with a |
| 83 | complaint about being unable to find the file MSVC40RT.DLL. This file |
| 84 | (along with several other files) is included in the MSOFTDLL.EXE |
| 85 | self-extracting archive available in the /pub/python/wpy directory on |
| 86 | ftp.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 |
| 90 | be botched. Reinstall from the ZIP file (see above) and run |
| 91 | SETUP.BAT. |
| 92 | |
| 93 | - At the ">>>" prompt, type a few commands. Each command should |
| 94 | succeed without complaints. Remember that Python is a case sensitive |
| 95 | language, 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 | |
| 159 | To uninstall |
| 160 | ------------ |
Guido van Rossum | 03dea6d | 1996-09-03 18:19:12 +0000 | [diff] [blame] | 161 | |
| 162 | Run the batch file UNINSTALL.BAT. This will run the Python script |
| 163 | uninstall.py, which undoes the registry additions and removes most |
| 164 | installed files. The batch file then proceed to remove some files |
| 165 | that the Python script can't remove (because it's using them). The |
| 166 | batch file ends with an error because it deletes itself. Hints on how |
| 167 | to avoid this (and also on how to remove the installation directory |
| 168 | itself) are gracefully accepted. |
| 169 | |
Guido van Rossum | 2b88061 | 1996-09-03 21:20:52 +0000 | [diff] [blame] | 170 | |
Guido van Rossum | 03dea6d | 1996-09-03 18:19:12 +0000 | [diff] [blame] | 171 | September 3, 1996 |
Guido van Rossum | f71f613 | 1996-09-03 15:08:36 +0000 | [diff] [blame] | 172 | |
| 173 | --Guido van Rossum (home page: http://www.python.org/~guido/) |