Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 1 | This is a port of Python 2.3 to OS/2 using the EMX development tools |
| 2 | ========================================================================= |
| 3 | |
| 4 | What's new since the previous release |
| 5 | ------------------------------------- |
| 6 | |
| 7 | This release of the port incorporates the following changes from the |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 8 | April 14, 2002 release of the Python 2.2.1 port: |
Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 9 | |
| 10 | - based on the Python v2.3 final release source. |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 11 | - now setting higher number of file handles (250). |
| 12 | - defaults to building with PyMalloc enabled (Python 2.3 default). |
| 13 | - the port is now maintained in the Python CVS repository. |
| 14 | |
| 15 | Python 2.3 incorporates several changes which have resolved the |
| 16 | longstanding problems the EMX port has had with test_longexp (used |
| 17 | to be "YOU HAVE BEEN WARNED" item 1). |
Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 18 | |
| 19 | |
| 20 | Licenses and info about Python and EMX |
| 21 | -------------------------------------- |
| 22 | |
| 23 | Please read the file README.Python-2.3 included in this package for |
| 24 | information about Python 2.3. This file is the README file from the |
| 25 | Python 2.3 source distribution available via http://www.python.org/ |
| 26 | and its mirrors. The file LICENCE.Python-2.3 is the text of the Licence |
| 27 | from the Python 2.3 source distribution. |
| 28 | |
| 29 | Note that the EMX package that this package depends on is released under |
| 30 | the GNU General Public Licence. Please refer to the documentation |
| 31 | accompanying the EMX Runtime libraries for more information about the |
| 32 | implications of this. A copy of version 2 of the GPL is included as the |
| 33 | file COPYING.gpl2. |
| 34 | |
| 35 | Readline and GDBM are covered by the GNU General Public Licence. I think |
| 36 | Eberhard Mattes' porting changes to BSD DB v1.85 are also GPL'ed (BSD DB |
| 37 | itself is BSD Licenced). ncurses and expat appear to be covered by MIT |
| 38 | style licences - please refer to the source distributions for more detail. |
| 39 | zlib is distributable under a very free license. GNU MP and GNU UFC are |
| 40 | under the GNU LGPL (see file COPYING.lib). |
| 41 | |
| 42 | My patches to the Python-2.x source distributions, and any other packages |
| 43 | used in this port, are placed in the public domain. |
| 44 | |
| 45 | This software is provided 'as-is', without any express or implied warranty. |
| 46 | In no event will the author be held liable for any damages arising from the |
| 47 | use of the software. |
| 48 | |
| 49 | I do hope however that it proves useful to someone. |
| 50 | |
| 51 | |
| 52 | Other ports |
| 53 | ----------- |
| 54 | |
| 55 | There have been ports of previous versions of Python to OS/2. |
| 56 | |
| 57 | The best known would be that by Jeff Rush, most recently of version |
| 58 | 1.5.2. Jeff used IBM's Visual Age C++ (v3) for his ports, and his |
| 59 | patches have been included in the Python 2.3 source distribution. |
| 60 | |
| 61 | Andrew Zabolotny implemented a port of Python v1.5.2 using the EMX |
| 62 | development tools. His patches against the Python v1.5.2 source |
| 63 | distribution have become the core of this port, and without his efforts |
| 64 | this port wouldn't exist. Andrew's port also appears to have been |
| 65 | compiled with his port of gcc 2.95.2 to EMX, which I have but have |
| 66 | chosen not to use for the binary distribution of this port (see item 21 |
| 67 | of the "YOU HAVE BEEN WARNED" section below). |
| 68 | |
| 69 | Previous Python port releases by me:- |
| 70 | - v2.0 on March 31, 2001; |
| 71 | - v2.0 on April 25, 2001 (cleanup release + Stackless variant); |
| 72 | - v2.1 on June 17, 2001; |
| 73 | - v2.0 (Stackless re-release) on June 18, 2001. |
| 74 | - v2.1.1 on August 5, 2001; |
| 75 | - v2.1.1 on August 12, 2001 (cleanup release); |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 76 | - v2.1.1 (updated DLL) on August 14, 2001; |
| 77 | - v2.2b2 on December 8, 2001 (not uploaded to archive sites); |
| 78 | - v2.2c1 on December 16, 2001 (not uploaded to archive sites); |
| 79 | - v2.2 on December 24, 2001; |
| 80 | - v2.2.1c2 on March 31, 2002 (not uploaded to archive sites); |
| 81 | - v2.2.1 on April 14, 2002. |
Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 82 | |
| 83 | It is possible to have these earlier ports still usable after installing |
| 84 | this port - see the README.os2emx.multiple_versions file, contributed by |
| 85 | Dr David Mertz, for a suggested approach to achieving this. |
| 86 | |
| 87 | |
| 88 | Software requirements |
| 89 | --------------------- |
| 90 | |
| 91 | This package requires the EMX Runtime package, available from the |
| 92 | Hobbes (http://hobbes.nmsu.edu/) and LEO (http://archiv.leo.org/) |
| 93 | archives of OS/2 software. I have used EMX version 0.9d fix04 in |
| 94 | developing this port. |
| 95 | |
| 96 | My development system is running OS/2 v4 with fixpack 12. |
| 97 | |
| 98 | 3rd party software which has been linked into dynamically loaded modules: |
| 99 | - ncurses (see http://dickey.his.com/ for more info, v5.2) |
| 100 | - GNU Readline (Kai Uwe Rommel's port available from Hobbes or LEO, v2.1) |
| 101 | - GNU GDBM (Kai Uwe Rommel's port available from Hobbes or LEO, v1.7.3) |
| 102 | - zlib (Hung-Chi Chu's port available from Hobbes or LEO, v1.1.3) |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 103 | - expat (distributed with Python, v1.95.2) |
Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 104 | - GNU MP (Peter Meerwald's port available from LEO, v2.0.2) |
| 105 | - GNU UFC (Kai Uwe Rommel's port available from LEO, v2.0.4) |
| 106 | |
| 107 | The zlib module requires the Z.DLL to be installed - see the Installation |
| 108 | section and item 12 of the "YOU HAVE BEEN WARNED" section for more |
| 109 | information. |
| 110 | |
| 111 | About this port |
| 112 | --------------- |
| 113 | |
| 114 | I have attempted to make this port as complete and functional as I can, |
| 115 | notwithstanding the issues in the "YOU HAVE BEEN WARNED" section below. |
| 116 | |
| 117 | Core components: |
| 118 | |
| 119 | Python.exe is linked as an a.out executable, ie using EMX method E1 |
| 120 | to compile & link the executable. This is so that fork() works (see |
| 121 | "YOU HAVE BEEN WARNED" item 2). |
| 122 | |
| 123 | Python23.dll is created as a normal OMF DLL, with an OMF import |
| 124 | library and module definition file. There is also an a.out (.a) import |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 125 | library to support linking the DLL to a.out executables. The DLL |
| 126 | requires the EMX runtime DLLs. |
Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 127 | |
| 128 | This port has been built with complete support for multithreading. |
| 129 | |
| 130 | Modules: |
| 131 | |
| 132 | As far as possible, extension modules have been made dynamically loadable |
| 133 | when the module is intended to be built this way. I haven't yet changed |
| 134 | the building of Python's standard modules over to using the DistUtils. |
| 135 | |
| 136 | See "YOU HAVE BEEN WARNED" item 5 for notes about the fcntl module, and |
| 137 | "YOU HAVE BEEN WARNED" item 14 for notes about the pwd and grp modules. |
| 138 | |
| 139 | Support for case sensitive module import semantics has been added to match |
| 140 | the Windows release. This can be deactivated by setting the PYTHONCASEOK |
| 141 | environment variable (the value doesn't matter) - see "YOU HAVE BEEN WARNED" |
| 142 | item 16. |
| 143 | |
| 144 | Optional modules: |
| 145 | |
| 146 | Where I've been able to locate the required 3rd party packages already |
| 147 | ported to OS/2, I've built and included them. |
| 148 | |
| 149 | These include ncurses (_curses, _curses_panel), BSD DB (bsddb), |
| 150 | GNU GDBM (gdbm, dbm), zlib (zlib), GNU Readline (readline), expat |
| 151 | (pyexpat), GNU MP (mpz) and GNU UFC (crypt). |
| 152 | |
| 153 | I have built these modules statically linked against the 3rd party |
| 154 | libraries, with the exception of zlib. Unfortunately my attempts to use |
| 155 | the dll version of GNU readline have been a dismal failure, in that when |
| 156 | the dynamically linked readline module is active other modules |
| 157 | immediately provoke a core dump when imported. |
| 158 | |
| 159 | Only the BSD DB package (part of the BSD package distributed with EMX) |
| 160 | needed source modifications to be used for this port, pertaining to use |
| 161 | of errno with multithreading. |
| 162 | |
| 163 | The other packages, except for ncurses and zlib, needed Makefile changes |
| 164 | for multithreading support but no source changes. |
| 165 | |
| 166 | The _curses_panel module is a potential problem - see "YOU HAVE BEEN |
| 167 | WARNED" item 17. |
| 168 | |
| 169 | Upstream source patches: |
| 170 | |
| 171 | No updates to the Python 2.3 release have become available. |
| 172 | |
| 173 | Eberhard Mattes' EMXFIX04 update to his EMX 0.9d tools suite includes |
| 174 | bug fixes for the BSD DB library. The bsddb module included in this |
| 175 | port incorporates these fixes. |
| 176 | |
| 177 | Library and other distributed Python code: |
| 178 | |
| 179 | The Python standard library lives in the Lib directory. All the standard |
| 180 | library code included with the Python 2.3 source distribution is included |
| 181 | in the binary archive, with the exception of the dos-8x3 and tkinter |
| 182 | subdirectories which have been omitted to reduce the size of the binary |
| 183 | archive - the dos-8x3 components are unnecessary duplicates and Tkinter |
| 184 | is not supported by this port (yet). All the plat-* subdirectories in the |
| 185 | source distribution have also been omitted, and a plat-os2emx directory |
| 186 | included. |
| 187 | |
| 188 | The Tools and Demo directories contain a collection of Python scripts. |
| 189 | To reduce the size of the binary archive, the Demo/sgi, Demo/Tix, |
| 190 | Demo/tkinter, Tools/audiopy and Tools/IDLE subdirectories have been |
| 191 | omitted as not being supported by this port. The Misc directory has |
| 192 | also been omitted. |
| 193 | |
| 194 | All subdirectories omitted from the binary archive can be reconstituted |
| 195 | from the Python 2.3 source distribution, if desired. |
| 196 | |
| 197 | Support for building Python extensions: |
| 198 | |
| 199 | The Config subdirectory contains the files describing the configuration |
| 200 | of the interpreter and the Makefile, import libraries for the Python DLL, |
| 201 | and the module definition file used to create the Python DLL. The |
| 202 | Include subdirectory contains all the standard Python header files |
| 203 | needed for building extensions. |
| 204 | |
| 205 | As I don't have the Visual Age C++ compiler, I've made no attempt to |
| 206 | have this port support extensions built with that compiler. |
| 207 | |
| 208 | |
| 209 | Packaging |
| 210 | --------- |
| 211 | |
| 212 | This port is packaged into several archives: |
| 213 | - python-2.3-os2emx-bin-02????.zip (binaries, library modules) |
| 214 | - python-2.3-os2emx-src-03????.zip (source patches and makefiles) |
| 215 | |
| 216 | Documentation for the Python language, as well as the Python 2.3 |
| 217 | source distibution, can be obtained from the Python website |
| 218 | (http://www.python.org/) or the Python project pages at Sourceforge |
| 219 | (http://sf.net/projects/python/). |
| 220 | |
| 221 | |
| 222 | Installation |
| 223 | ------------ |
| 224 | |
| 225 | Obtain and install, as per the included instructions, the EMX runtime |
| 226 | package. |
| 227 | |
| 228 | If you wish to use the zlib module, you will need to obtain and install |
| 229 | the Z.DLL from Hung-Chi Chu's port of zlib v1.1.3 (zlib113.zip). See also |
| 230 | "YOU HAVE BEEN WARNED" item 12 below. |
| 231 | |
| 232 | Unpack this archive, preserving the subdirectories, in the root directory |
| 233 | of the drive where you want Python to live. |
| 234 | |
| 235 | Add the Python directory (eg C:\Python23) to the PATH and LIBPATH |
| 236 | variables in CONFIG.SYS. |
| 237 | |
| 238 | You should then set the PYTHONHOME and PYTHONPATH environment variables |
| 239 | in CONFIG.SYS. |
| 240 | |
| 241 | PYTHONHOME should be set to Python's top level directory. PYTHONPATH |
| 242 | should be set to the semicolon separated list of principal Python library |
| 243 | directories. |
| 244 | I use: |
| 245 | SET PYTHONHOME=F:/Python23 |
| 246 | SET PYTHONPATH=F:/Python23/Lib;F:/Python23/Lib/plat-os2emx; |
| 247 | F:/Python23/Lib/lib-dynload;F:/Python23/Lib/site-packages |
| 248 | |
| 249 | NOTE!: the PYTHONPATH setting above is linewrapped for this document - it |
| 250 | should all be on one line in CONFIG.SYS! |
| 251 | |
| 252 | If you wish to use the curses module, you should set the TERM and TERMINFO |
| 253 | environment variables appropriately. |
| 254 | |
| 255 | If you don't already have ncurses installed, I have included a copy of the |
| 256 | EMX subset of the Terminfo database included with the ncurses-5.2 source |
| 257 | distribution. This can be used by setting the TERMINFO environment variable |
| 258 | to the path of the Terminfo subdirectory below the Python home directory. |
| 259 | On my system this looks like: |
| 260 | SET TERMINFO=F:/Python23/Terminfo |
| 261 | |
| 262 | For the TERM environment variable, I would try one of the following: |
| 263 | SET TERM=ansi |
| 264 | SET TERM=os2 |
| 265 | SET TERM=window |
| 266 | |
| 267 | You will have to reboot your system for these changes to CONFIG.SYS to take |
| 268 | effect. |
| 269 | |
| 270 | If you wish to compile all the included Python library modules to bytecode, |
| 271 | you can change into the Python home directory and run the COMPILEALL.CMD |
| 272 | batch file. |
| 273 | |
| 274 | You can execute the regression tests included with the Python 2.3 source |
| 275 | distribution by changing to the Python 2.3 home directory and executing the |
| 276 | REGRTEST.CMD batch file. The following tests are known to fail at this |
| 277 | time: |
| 278 | - test_longexp (see "YOU HAVE BEEN WARNED" item 1); |
| 279 | - test_mhlib (I don't know of any port of MH to OS/2); |
| 280 | - test_pwd (see "YOU HAVE BEEN WARNED" item 14, probably a bug in my code); |
| 281 | - test_grp (as per test_pwd); |
| 282 | - test_strftime (see "YOU HAVE BEEN WARNED" item 20); |
| 283 | - test_socketserver (fork() related, see "YOU HAVE BEEN WARNED" item 2). |
| 284 | |
| 285 | |
| 286 | YOU HAVE BEEN WARNED!! |
| 287 | ---------------------- |
| 288 | |
| 289 | I know about a number of nasties in this port. |
| 290 | |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 291 | {1. Issue resolved...} |
Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 292 | |
| 293 | 2. Eberhard Mattes, author of EMX, writes in his documentation that fork() |
| 294 | is very inefficient in the OS/2 environment. It also requires that the |
| 295 | executable be linked in a.out format rather than OMF. Use the os.exec |
| 296 | and/or the os.spawn family of functions where possible. |
| 297 | |
| 298 | {3. Issue resolved...} |
| 299 | |
| 300 | 4. In the absence of GNU Readline, terminating the interpreter requires a |
| 301 | control-Z (^Z) followed by a carriage return. Jeff Rush documented this |
| 302 | problem in his Python 1.5.2 port. With Readline, a control-D (^D) works |
| 303 | as per the standard Unix environment. |
| 304 | |
| 305 | 5. EMX only has a partial implementation of fcntl(). The fcntl module |
| 306 | in this port supports what EMX supports. If fcntl is important to you, |
| 307 | please review the EMX C Library Reference (included in .INF format in the |
| 308 | EMXVIEW.ZIP archive as part of the complete EMX development tools suite). |
| 309 | Because of other side-effects I have modified the test_fcntl.py test |
| 310 | script to deactivate the exercising of the missing functionality. |
| 311 | |
| 312 | 6. The BSD DB module is linked against DB v1.85. This version is widely |
| 313 | known to have bugs, although some patches have become available (and are |
| 314 | incorporated into the included bsddb module). Unless you have problems |
| 315 | with software licenses which would rule out GDBM (and the dbm module |
| 316 | because it is linked against the GDBM library) or need it for file format |
| 317 | compatibility, you may be better off deleting it and relying on GDBM. I |
| 318 | haven't looked at porting the version of the module supporting the later |
| 319 | SleepyCat releases of BSD DB, which would also require a port of the |
| 320 | SleepyCat DB package. |
| 321 | |
| 322 | 7. The readline module has been linked against ncurses rather than the |
| 323 | termcap library supplied with EMX. |
| 324 | |
| 325 | {8. Workaround implemented} |
| 326 | |
| 327 | 9. I have configured this port to use "/" as the preferred path separator |
| 328 | character, rather than "\" ('\\'), in line with the convention supported |
| 329 | by EMX. Backslashes are still supported of course, and still appear in |
| 330 | unexpected places due to outside sources that don't get normalised. |
| 331 | |
| 332 | 10. While the DistUtils components are now functional, other |
| 333 | packaging/binary handling tools and utilities such as those included in |
| 334 | the Demo and Tools directories - freeze in particular - are unlikely to |
| 335 | work. If you do get them going, I'd like to know about your success. |
| 336 | |
| 337 | 11. I haven't set out to support the [BEGIN|END]LIBPATH functionality |
| 338 | supported by one of the earlier ports (Rush's??). If it works let me know. |
| 339 | |
| 340 | 12. There appear to be several versions of Z.DLL floating around - the one |
| 341 | I have is 45061 bytes and dated January 22, 1999. I have a report that |
| 342 | another version causes SYS3175s when the zlib module is imported. |
| 343 | |
| 344 | 14. As a result of the limitations imposed by EMX's library routines, the |
| 345 | standard extension module pwd only synthesises a simple passwd database, |
| 346 | and the grp module cannot be supported at all. |
| 347 | |
| 348 | I have written substitutes, in Python naturally, which can process real |
| 349 | passwd and group files for those applications (such as MailMan) that |
| 350 | require more than EMX emulates. I have placed pwd.py and grp.py in |
| 351 | Lib/plat-os2emx, which is usually before Lib/lib-dynload (which contains |
| 352 | pwd.pyd) in the PYTHONPATH. If you have become attached to what pwd.pyd |
| 353 | supports, you can put Lib/lib-dynload before Lib/plat-os2emx in PYTHONPATH |
| 354 | or delete/rename pwd.py & grp.py. |
| 355 | |
| 356 | pwd.py & grp.py support locating their data files by looking in the |
| 357 | environment for them in the following sequence: |
| 358 | pwd.py: $ETC_PASSWD (%ETC_PASSWD%) |
| 359 | $ETC/passwd (%ETC%/passwd) |
| 360 | $PYTHONHOME/Etc/passwd (%PYTHONHOME%/Etc/passwd) |
| 361 | grp.py: $ETC_GROUP (%ETC_GROUP%) |
| 362 | $ETC/group (%ETC%/group) |
| 363 | $PYTHONHOME/Etc/group (%PYTHONHOME%/Etc/group) |
| 364 | |
| 365 | Both modules support using either the ":" character (Unix standard) or |
| 366 | ";" (OS/2, DOS, Windows standard) field separator character, and pwd.py |
| 367 | implements the following drive letter conversions for the home_directory and |
| 368 | shell fields (for the ":" separator only): |
| 369 | $x -> x: |
| 370 | x; -> x: |
| 371 | |
| 372 | Example versions of passwd and group are in the Etc subdirectory. Note |
| 373 | that as of this release, this code fails the regression test. I'm looking |
| 374 | into why, and hope to have this fixed. |
| 375 | |
| 376 | 15. As of Python 2.1, termios support has mutated. There is no longer a |
| 377 | platform specific TERMIOS.py containing the symbolic constants - these |
| 378 | now live in the termios module. EMX's termios routines don't support all |
| 379 | of the functionality now exposed by the termios module - refer to the EMX |
| 380 | documentation to find out what is supported. |
| 381 | |
| 382 | 16. The case sensitive import semantics introduced in Python 2.1 for other |
| 383 | case insensitive but case preserving file/operating systems (Windows etc), |
| 384 | have been incorporated into this port, and are active by default. Setting |
| 385 | the PYTHONCASEOK environment variable (to any value) reverts to the |
| 386 | previous (case insensitive) semantics. |
| 387 | |
| 388 | 17. Because I am statically linking ncurses, the _curses_panel |
| 389 | module has potential problems arising from separate library data areas. |
| 390 | To avoid this, I have configured the _curses_.pyd (imported as |
| 391 | "_curses_panel") to import the ncurses symbols it needs from _curses.pyd. |
| 392 | As a result the _curses module must be imported before the _curses_panel |
| 393 | module. As far as I can tell, the modules in the curses package do this. |
| 394 | If you have problems attempting to use the _curses_panel support please |
| 395 | let me know, and I'll look into an alternative solution. |
| 396 | |
| 397 | 18. I tried enabling the Python Object Allocator (PYMALLOC) code. While |
| 398 | the port built this way passes the regression test, the Numpy extension |
| 399 | (I tested v19.0.0) as built with with the port's DistUtils code doesn't |
| 400 | work. Specifically, attempting to "import Numeric" provokes a core dump. |
| 401 | Supposedly Numpy v20.1.0 contains a fix for this, but for reason outlined |
| 402 | in item 1 above, PYMALLOC is not enabled in this release. |
| 403 | |
| 404 | 19. sys.platform now reports "os2emx" instead of "os2". os.name still |
| 405 | reports "os2". This change was to make it easier to distinguish between |
| 406 | the VAC++ build (being maintained by Michael Muller) and the EMX build |
| 407 | (this port), principally for DistUtils. |
| 408 | |
| 409 | 20. it appears that the %W substitution in the EMX strftime() routine has |
| 410 | an off-by-one bug. strftime was listed as passing the regression tests |
| 411 | in previous releases, but this fact appears to have been an oversight in |
| 412 | the regression test suite. To fix this really requires a portable |
| 413 | strftime routine - I'm looking into using one from FreeBSD, but its not |
| 414 | ready yet. |
| 415 | |
| 416 | 21. previous releases of my Python ports have used the GCC optimisations |
| 417 | "-O2 -fomit-frame-pointer". After experimenting with various optimisation |
| 418 | settings, including deactivating assert()ions, I have concluded that "-O2" |
| 419 | appears the best compromise for GCC 2.8.1 on my hardware. Curiously, |
| 420 | deactivating assert() (via defining NDEBUG) _negatively_ impacts |
| 421 | performance, allbeit only slightly, so I've chosen to leave the assert()s |
| 422 | active. |
| 423 | |
| 424 | I did try using Andrew Zabolotny's (p)gcc 2.95.2 compiler, and in |
| 425 | general concluded that it produced larger objects that ran slower |
| 426 | than Mattes' gcc 2.8.1 compiler. |
| 427 | |
| 428 | Pystone ratings varied from just over 2000/s (no optimisation at all) |
| 429 | to just under 3300/s (gcc 2.8.1, -O2) on my K6/2-300 system, for |
| 430 | 100,000 iterations per run (rather than the default 10000). |
| 431 | |
| 432 | As a result of the optimisation change, the Python DLL is about 10% |
| 433 | smaller than in the 2.1 release, and many of the dynamically loadable |
| 434 | modules are smaller too. |
| 435 | |
| 436 | [2001/08/12] |
| 437 | |
| 438 | 22. As of this release, os.spawnv() and os.spawnve() now expose EMX's |
| 439 | library routines rather than use the emulation in os.py. |
| 440 | |
| 441 | In order to make use of some of the features this makes available in |
| 442 | the OS/2 environment, you should peruse the relevant EMX documentation |
| 443 | (EMXLIB.INF in the EMXVIEW.ZIP archive accompanying the EMX archives |
| 444 | on Hobbes or LEO). Be aware that I have exposed all the "mode" options |
| 445 | supported by EMX, but there are combinations that either cannot be |
| 446 | practically used by/in Python or have the potential to compromise your |
| 447 | system's stability. |
| 448 | |
| 449 | 23. pythonpm.exe in previous releases was just python.exe with the |
| 450 | WINDOWAPI linker option set in the pythonpm.def file. In practice, |
| 451 | this turns out to do nothing useful. |
| 452 | |
| 453 | I have written a replacement which wraps the Python DLL in a genuine |
| 454 | Presentation Manager application. This version actually runs the |
| 455 | Python interpreter in a separate thread from the PM shell, in order |
| 456 | that PythonPM has a functioning message queue as good PM apps should. |
| 457 | In its current state, PythonPM's window is hidden. It can be displayed, |
| 458 | although it will have no content as nothing is ever written to the |
| 459 | window. Only the "hide" button is available. Although the code |
| 460 | has support for shutting PythonPM down when the Python interpreter is |
| 461 | still busy (via the "control" menu), this is not well tested and given |
| 462 | comments I've come across in EMX documentation suggesting that the |
| 463 | thread killing operation has problems I would suggest caution in |
| 464 | relying on this capability. |
| 465 | |
| 466 | PythonPM processes commandline parameters normally. The standard input, |
| 467 | output and error streams are only useful if redirected, as PythonPM's |
| 468 | window is not a console in any form and so cannot accept or display |
| 469 | anything. This means that the -i option is ineffective. |
| 470 | |
| 471 | Because the Python thread doesn't create its own message queue, creating |
| 472 | PM Windows and performing most PM operations is not possible from within |
| 473 | this thread. How this will affect supporting PM extensions (such as |
| 474 | Tkinter using a PM port of Tcl/Tk, or wxPython using the PM port of |
| 475 | WxWindows) is still being researched. |
| 476 | |
| 477 | Note that os.fork() _DOES_NOT_WORK_ in PythonPM - SYS3175s are the result |
| 478 | of trying. os.spawnv() _does_ work. PythonPM passes all regression tests |
| 479 | that the standard Python interpreter (python.exe) passes, with the exception |
| 480 | of test_fork1 and test_socket which both attempt to use os.fork(). |
| 481 | |
| 482 | I very much want feedback on the performance, behaviour and utility of |
| 483 | PythonPM. I would like to add a PM console capability to it, but that |
| 484 | will be a non-trivial effort. I may be able to leverage the code in |
| 485 | Illya Vaes' Tcl/Tk port, which would make it easier. |
| 486 | |
| 487 | [2001/08/14] |
| 488 | |
| 489 | 24. os.chdir() now uses EMX's _chdir2(), which supports changing |
| 490 | both drive and directory at once. Similarly, os.getcwd() now uses |
| 491 | EMX's _getcwd() which returns drive as well as path. |
| 492 | |
| 493 | [2001/12/08] - 2.2 Beta 2 |
| 494 | |
| 495 | 25. pyconfig.h (previously known as config.h) is now located in the |
| 496 | Include subdirectory with all other include files. |
| 497 | |
| 498 | [2001/12/16] - 2.2 Release Candidate 1 |
| 499 | |
| 500 | [2001/12/08] - 2.2 Final |
| 501 | |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 502 | [2002/03/31] - 2.2.1 Release Candidate 2 |
| 503 | |
| 504 | [2002/04/14] - 2.2.1 Final |
| 505 | |
| 506 | [2002/8/18] |
| 507 | |
| 508 | 26. now explicitly set the number of file handles available to a |
| 509 | Python process to 250. EMX default is 40, which is insufficient for the |
| 510 | recently checked in security improvments to the tempfile regression |
| 511 | test (test_tempfile) which tries to create 100 temporary files. |
| 512 | |
| 513 | This setting can be overridden via the EMXOPT environment variable: |
| 514 | set EMXOPT=-h250 |
| 515 | is equivalent to the setting currently used. The emxbind utility (if you |
| 516 | have it installed) can also be used to permanently change the setting in |
| 517 | python.exe - please refer to the EMX documentation for more information. |
| 518 | |
Andrew MacIntyre | 41d97d6 | 2002-02-17 05:23:30 +0000 | [diff] [blame] | 519 | ... probably other issues that I've not encountered, or don't remember :-( |
| 520 | |
| 521 | If you encounter other difficulties with this port, which can be |
| 522 | characterised as peculiar to this port rather than to the Python release, |
| 523 | I would like to hear about them. However I cannot promise to be able to do |
| 524 | anything to resolve such problems. See the Contact section below... |
| 525 | |
| 526 | |
| 527 | To do... |
| 528 | -------- |
| 529 | |
| 530 | In no particular order of apparent importance or likelihood... |
| 531 | |
| 532 | - support Tkinter and/or alternative GUI (wxWindows??) |
| 533 | |
| 534 | |
| 535 | Credits |
| 536 | ------- |
| 537 | |
| 538 | In addition to people identified above, I'd like to thank: |
| 539 | - the BDFL, Guido van Rossum, and crew for Python; |
| 540 | - Dr David Mertz, for trying out a pre-release of this port; |
| 541 | - the Python-list/comp.lang.python community; |
| 542 | - John Poltorak, for input about pwd/grp. |
| 543 | |
| 544 | Contact |
| 545 | ------- |
| 546 | |
| 547 | Constructive feedback, negative or positive, about this port is welcome |
| 548 | and should be addressed to me at the e-mail addresses below. |
| 549 | |
| 550 | I intend creating a private mailing list for announcements of fixes & |
| 551 | updates to this port. If you wish to receive such e-mail announcments, |
| 552 | please send me an e-mail requesting that you be added to this list. |
| 553 | |
| 554 | Andrew MacIntyre |
| 555 | E-mail: andymac@bullseye.apana.org.au, or andymac@pcug.org.au |
| 556 | Web: http://www.andymac.org/ |
| 557 | |
Andrew MacIntyre | ffcf899 | 2002-08-18 06:28:21 +0000 | [diff] [blame] | 558 | 18 August, 2001. |