Yet Another BLT/TkInter Install Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Noelle QUEMENER

    #1

    Yet Another BLT/TkInter Install Question

    I have just installed BLT: I effectively had some problems - the same you had.
    I found this:

    Python GUI Setup

    Here is the procedure I used to get "Fourier" working on Windows and Linux.

    I wanted to use BLT for xy-plotting, partly because we used it with tcl in the sss project, and partly because I couldn't understand how to position the plots in wxPython (the
    main alternative).

    The only interface to BLT from Python seemed to be through Pmw (now it is claimed that you can get to BLT directly, but I haven't figured out how). So, I

    * Downloaded the most recent version of Python (2.2) into C:\Python22 (Windows)
    * Downloaded the required packages (Numeric, FFT, etc.) and noticed that they installed into C:\Python22\Lib \site-packages
    * Downloaded the corresponding release of Pmw into C:\Python22\Lib \site-packages

    On the Debian Linux Windows system in B3 set up by Dan Freedman, this sufficed. On the CCMR RedHat system I've yet to get it to work. On Windows, I had to install the current
    version of BLT. Following instructions from http://www.ifi.uio.no/~hpl/Pmw.Blt/doc/links.html, as suggested by Peter Brown at phbrown@acm.org, I

    * installed BLT into C:/Python22 using its installer: this made bin, include, and lib subdirectories of C:/Python22/tcl
    * copied the directory C:/Python22/tcl/lib/blt2.4 into C:/Python22/tcl/tcl8.3
    * copied the BLT DLL's into my PATH, specifically C:\Program Files\Tcl\bin.

    Now my scripts worked on Windows. I now wished to roll them into a binary form that I could distribute. Chris Myers advised me to try the more advanced "Freeze" methods
    developed at http://www.mcmillan-inc.com/install1.html. This took some time, until I read the documentation: on the first page of the Pmw documentation, it says that freezing
    is tricky, and gives a link to doc/dynamicloader.h tml.

    * Downloaded the installer and installed it in the Fourier directory (Linux) or into C:\Python22\Lib \site-packages (Windows)
    * Make directory FourierFreeze in that same directory
    * Make Pmw.py in that directory: python ..\Pmw\Pmw_0_8_ 5\bin\bundlepmw .py ..\Pmw\Pmw_0_8_ 5\lib
    * copy Fourier.py, PmwBlt.py and PmwColor.py into FourierFreeze (instructions from dynamicloader?)
    * MAKE SURE for Linux that you remove all ^M's from the file. Also, the freeze program doesn't like tabs mixed with spaces, I think. The error message is inscrutable
    * python ../Installer/Makespec.py --onefile --tk --debug --noconsole Fourier.py
    * python ../Installer/Build.py Fourier.spec


    AND IT WORKS!!!
    adapt Python22 to your version (I personnally have Python 2.3.5 and blt24z-for-tcl84.exe)


Working...