home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tkibin04.zip / README < prev    next >
Text File  |  1998-09-09  |  6KB  |  127 lines

  1.  
  2. Tkinter for OS/2 V0.3
  3. ---------------------
  4.  
  5. This is cheap, badly hacked combination of Tcl/Tk and Tkinter intended to
  6. solve a particular problem: getting a version of Tkinter up and running
  7. under OS/2.
  8.  
  9. All of the credit goes to Illya Vaes, who ported Tcl/Tk to OS/2 under EMX,
  10. Steen Lumholt, author of Tkinter, and SUN Microsystems for creating and
  11. publishing the source for Tcl/Tk.  All I've done is hack up their fine work.
  12.  
  13. In my own defense, I did this because I really needed a version of Tkinter
  14. for OS/2 and had very limited time in which to produce it.
  15.  
  16. _tkinter.c would have worked verbatim if I had been content with limited
  17. support for multithreading under OS/2.  I had to do evil things to it to
  18. keep the various message queue wait conditions from blocking all of the
  19. background threads.  Anyhow, you may run background threads to your hearts
  20. content as long as you limit your Tk GUI calls to the primary thread.
  21. Attempts to do otherwise should result in an error.
  22.  
  23. To communicate to the Tk thread, you may use Tcl global variables.  The
  24. global variable access functions are not semaphore protected, so they can
  25. be accessed from any thread.  I'm not sure that this is entirely safe, but
  26. I believe that it has a extremely low probability of error: in other words,
  27. don't use this to control any life support equipment.
  28.  
  29. pycmd and pmpycmd
  30. -----------------
  31.  
  32. These are two utility programs that attempt to deal with a flaw in the
  33. OS/2 extproc command.  They basically run both run the Python interpreter,
  34. but look for the file specified on the command line in the path.  "pmpycmd"
  35. is just the PM-capable version of "pycmd".  See the "pycmd" directory or
  36. README.pycmd for details.
  37.  
  38. Installing the Binaries
  39. -----------------------
  40.  
  41. IMPORTANT:  You'll need the Visual Age compiled Python OS/2 1.5.1 port,
  42. not the EMX 1.4 version.  This is not on Hobbes as of the last time I
  43. looked.  The binaries are available from Jeff Rush's Python OS/2 page at:
  44.     
  45.     http://warped.cswnet.com/~jrush/python_os2/index.html
  46.  
  47. Please see the MEMERROR file for information on a bug in this release that is
  48. particularly relevant to Tkinter.
  49.  
  50. If you just want to run Tkinter programs, do the following:
  51.  
  52. 1) Copy tcl75va.dll and tk41va.dll to somewhere in your LIBPATH
  53. 2) Copy _tkinter.dll to your PYTHONHOME directory (if you have not set
  54.     PYTHONHOME, now would be a good time to do so, since OS/2 Python seems
  55.     to want to load its binary modules from this directory).
  56. 3) Copy pmpython.exe to somewhere on your path (you probably want to put it
  57.     in the same place where you have python.exe).
  58. 4)    Copy the contents of the "lib" directory somewhere.  Set the environment
  59.     variable "TCL_LIBRARY" to the location of the "tcl" subdirectory, and
  60.     set the environment variable "TK_LIBRARY" to the location of the "tk"
  61.     subdirectory.
  62. 5) If you plan on using pycmd and pmpycmd, copy pycmd.exe and pmpycmd.exe
  63.     to somewhere in your path (again, probably the same place as python.exe).
  64.  
  65. You'll need to use "pmpython" instead of just plain "python" to run your
  66. Tkinter Python programs, since they need to be run from a PM application.
  67.  
  68. Compiling the Source
  69. --------------------
  70.  
  71. First of all, you'll need an HPFS file system (Tcl and Tk use long file
  72. names).  If you have a version of "makedepend" installed (I got mine from
  73. Hobbes, the executable was called "mdep"), you may want to set its name in
  74. the root makefile and then run "nmake deps" to make the dependencies.  Be
  75. warned: makedepend will not find many of the UNIX specific files and it
  76. will take a really long time spitting out warnings.
  77.  
  78. Run an "nmake" with no arguments in the root directory to build everything,
  79. "nmake NODEBUG=1" will build binaries without debug information.  "nmake
  80. DYNAMIC=1" will build binaries dynamically linked to the Visual Age C
  81. libraries (you may use this in conjunction with NODEBUG=1).  "nmake
  82. clean" will delete all of the generated files, and "nmake clean_targets"
  83. will delete all of the target DLLs.
  84.  
  85. I seriously bastardized the Tcl and Tk source trees in the course of setting
  86. all of this stuff up, so don't expect things to be where they're supposed to
  87. be.
  88.  
  89. The makefiles generate versions of "tclsh" and "wish".  These exist mainly
  90. for testing purposes, and are seriously flawed in some respects.  In
  91. particular, I encourage you not to try to use the "exec" command from either
  92. of them, as this will completely lock up your system.  Again, my motive for
  93. doing this was to get Tkinter up under OS/2.  If you want to write Tcl/Tk
  94. code, use Illya Vaes' original EMX port.
  95.  
  96. Support
  97. -------
  98.  
  99. As this is very much a "spare time" effort for me, and "spare time" is not
  100. something I have a lot of these days, I can't really provide this package
  101. with the kind of support it deserves.  If there's anybody out there who
  102. cares about it enough to take ownership of it, let me know.
  103.  
  104. If you experience any sort of problems, I suggest that you try to track them
  105. down yourself.  If they turn out to be problems associated with any of the 
  106. underlying systems, you may wish to contact the owners of those systems.
  107.  
  108. You may also contact me directly regarding bugs or improvements, but I can't
  109. guarantee that I will do anything about them.  If it's something simple,
  110. I'll see what I can do.
  111.  
  112. Michael Muller
  113. proteus@cloud9.net
  114.  
  115. Version History
  116. ---------------
  117.  
  118. 0.2
  119.     Initial public release
  120.  
  121. 0.3
  122.     Fixed library initialization code: made _DLL_InitTerm "_System", 
  123.     changed makefiles so that the libraries can be linked either statically
  124.     or dynamically with the Visual Age C libraries.
  125.     
  126.     Added Tcl & Tk library files to lib subdirectory.
  127.