home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / python22.zip / pythsc22.zip / python22 / README.os2emx.multiple_versions < prev    next >
Text File  |  2001-06-11  |  2KB  |  58 lines

  1. This file contributed by Dr. David Mertz <mertz@gnosis.cx>
  2. ==========================================================
  3.  
  4. Using multiple versions of Python
  5.  
  6. Some users might want to use multiple Python versions on their OS/2
  7. systems (for example, to test compatibility of code).  By using the
  8. BEGINLIBPATH variable rather than adding Python to the LIBPATH in
  9. CONFIG.SYS, a command session can select a Python version.  For
  10. example, the below command file will allow a user to either run the
  11. default, or a variant Python version transparently:
  12.  
  13.   ---------- File: SETPYTHON.CMD ----------
  14.   @echo off
  15.   if '%PYTHONHOME%' == '' GOTO SETUP
  16.   GOTO END
  17.   :SETUP
  18.   if '%1' == '151' GOTO PY151
  19.   if '%1' == '152' GOTO PY152
  20.   if '%1' == '20'  GOTO PY20
  21.   if '%1' == '21'  GOTO PY21
  22.   :PY21
  23.   echo -- Using Python v2.1/emx --
  24.   SET BEGINLIBPATH=d:\py21
  25.   SET PATH=d:\py21;%path%
  26.   SET PYTHONHOME=d:/py21
  27.   SET PYTHONPATH=d:/Py21/Lib;d:/Py21/Lib/plat-os2emx;d:/Py21/Lib/lib-dynload;d:/Py21/Lib/site-packages
  28.   SET TERMINFO=d:/py21/Terminfo
  29.   SET TERM=os2
  30.   GOTO END
  31.   :PY20
  32.   echo -- Using Python v2.0/emx --
  33.   SET BEGINLIBPATH=d:\py20
  34.   SET PATH=d:\py20;%path%
  35.   SET PYTHONHOME=d:/py20
  36.   SET PYTHONPATH=d:/Py20/Lib;d:/Py20/Lib/plat-os2emx;d:/Py20/Lib/lib-dynload;d:/Py20/Lib/site-packages
  37.   SET TERMINFO=d:/py20/Terminfo
  38.   SET TERM=os2
  39.   GOTO END
  40.   :PY152
  41.   echo -- Using Python v1.52/VAC++ --
  42.   SET BEGINLIBPATH=d:\py152
  43.   SET PATH=d:\py152;%path%
  44.   SET PYTHONHOME=d:\py152
  45.   SET PYTHONPATH=d:\Py152\Lib;d:\Py152\Lib\plat-win
  46.   GOTO END
  47.   :PY151
  48.   echo -- Using Python v1.51 --
  49.   SET BEGINLIBPATH=d:\py151
  50.   SET PATH=d:\py151;%path%
  51.   SET PYTHONHOME=d:\py151
  52.   SET PYTHONPATH=d:\Py151\Lib;d:\Py151\Lib\plat-win
  53.   SET TCL_LIBRARY=d:/py151/lib/tcl
  54.   SET TK_LIBRARY=d:/py151/lib/tk
  55.   GOTO END
  56.   :END
  57.  
  58.