Sitemap

McMillan Enterprises, Inc.
Python Pages
  Sockets HOWTO
  Distributing Python Programs
    Download
    Python Archives
    Standalone Executables
    Installer Release 5
    Installer Release 4
      Getting Started
      Installer - Creating Distributions
      The MEInc.Dist package
      Installer FAQ
      Extensions
      Installer Utilities
  A Python C++ API
  Embedding Python
  Stackless Python
  MkSQL
  Import Hooks
Java Samples
Sponsoring ME Inc.
About ME Inc.

Pmw

Pmw comes with a script named bundlepmw in the bin directory. If you follow the instructions in that script, you'll end up with a module named Pmw.py. Ensure that Builder finds that module and not the development package.

Christian Robottom passes on these tips: Use the bundlepmw.py script that comes inside Pmw/Pmw_VERSION/bin/ to generate a standalone Pmw.py. If you're not using BLT or Pmw's color support, pass on -noblt and -nocolor (otherwise, you'll need to include the Blt and Color support files as well). Please note that bundlepmw doesn't bundle _all_ Pmw widgets by default: MainMenuBar is an example of a bar that isn't. Edit bundlepmw.py's file = [] list and add the widgets you need.

Place the bundled Pmw.py file in the same directory as your script and check builder.log to see if builder's using the right one.

Win32pipe

On Win9x, win32pipe needs special help. Again, from Christian Robottom: win32pipe uses a helper executable that lives in PYTHON_ROOT/win32/, called win32popenWin9x.exe (for win98; this could possibly be different for WinNT [WinNT / Win2k don't need this helper app - Gordon]). This must be distributed and placed in the same directory as your standalone script. Without this file your application will fail your popen() call.

Apart from that, win32pipe needs PyWinTypesXX and win32api; they are by default excluded in your .cfg file. Remove them from the excludes line, rebuild, and all will be spiffy.

cPickle

cPickle uses PyImport_ImportModule to import a couple Python modules from C. This circumvents imputil (although in Python 2.1 this is fixed). The easy answer is just to import string and copy_reg yourself, before importing cPickle. That way, cPickle will find them already in sys.modules.

shelve

Shelve finds a compatible dbm by using anydbm, which uses __import__. Modulefinder doesn't follow __import__. The easy answer is to import dbhash (or whichever implementation module you want) before the import of shelve. You could also use the include directive in the config file (in the PYZ section).

Numeric

According to Gary Herron: The 'import Numeric' statment imports _numpy.pyd, but this is not caught by builder.py. Add misc= C:\Program Files\Python\Numeric\_numpy.pyd in the appropriate target of the cfg file.

PIL (Python Imaging Library)

To get the entire PIL package, put a "directories="+path_to_PIL in the APPZLIB section. Or, to be more selective, follow Jeff Kunce's instructions:

In my top level script, I added:

              import ImageFile, JpegImagePlugin
          
These are the files that _imaging.dll needs, and importing them explicitly gets them bundled correctly into the installer.

If I needed other image types, I would need to import their respective plugin modules as well.

Gadfly

Make sure that the marshalled sql grammar file is included (as a binary resource, in the outermost package).

PyXML aka _xmlplus

Add _xmlplus (or _xmlplus, encodings if you're using Unicode) to the packages line of the PYZ section (usually entitled [APPZLIB]). If you're using the marshal stuff, you might also need dbhash on the includes line of the same section.

urllib and mimetypes

Note: in 4a3 and later, posixpath is no longer automatically excluded.

mimetypes uses posixpath for some path parsing. By default, posixpath is excluded on Windows. Remove the exclusion if you're using mimetypes or a module that uses it (like urllib or some of the other internet related modules).

copyright 1999-2002
McMillan Enterprises, Inc.