Customizing Movable Python
Changing Your Distribution
There are lots of ways you can customize your Movable Python distribution. You might want to do any of the following things :
Items 3 and 4 can be done through editing customize.py and syspaths.pth, a couple of the Special Files.
This page discusses how you can do items 1 and 2.
As you customize your distribution, don't change the executable names.
Movable Python relies on the executable being called movpy.exe or movpyw.exe.
It is likely that you will want to add extension modules to your Movable Python distribution.
These should be added to the movpy/lib/ folder, which acts as the equivalent of the site-packages folder in a normal Python distribution.
If the modules you want to add are pure Python modules, you can just copy them straight into this folder.
If the module is a compiled extension module (.pyd or .dll) then it must be compiled for the version of Python your Movable Python distribution uses.
The easiest way of doing this is to copy the files from a normal Python installation. If this isn't possible (you don't have that version of Python installed anywhere), then contact me. So long as the extension is freely available for that version of Python I can probably help.
Some Python extension modules are distributed as .exe files. These use a zip compatible form. You can use a program like Winrar to extract the files from the exectuable.
Some extension modules create .pth files in site-packages when they are installed. This adds paths to sys.path, which Python uses to find modules.
If you don't do this then code will fail to find modules when it needs them.
A lot of space is taken up by the extension modules provided with Movable python. If you want to reduce the space taken up by the distribution, a lot of these files can be safely deleted.
In the Distribution Contents section it tells you what packages are included, and gives you some information about dependencies. For example, ctypes and readline are used by IPython and enchant is used for spell checking by Firedrop2.
By far the biggest extension is wxPython. The wx-2.7.1-msw-unicode directory is over twenty megabytes.
If you don't need wxPython, then you can also remove wax and firedrop2 as they won't work without wxPython anyway.
enchant is nearly seven megabytes, and is used by the Spell Checker plugin for firedrop2.
tcl is used by the GUI, which is written with Tkinter. If you delete this, the GUI will fail to run.
Other than tcl, none of the sub-directories of the lib directory are required to run Movable Python.
A minimal distribution can be creatd by removing all the extension modules. If you remove all the docs as well, the final uncompressed size is about 16 megabytes (depending on which version of Python your distirbution is for).
You can further reduce that by using UPX to compress the dlls and pyds.
The win32 extensions take up around five megabytes. If you don't use them it's fine to delete them, although they're popular extensions and lots of other software does use them.
pywintypes24.dll and pythoncom24.dll are both part of the win32 extensions and can be deleted if you aren't going to use them.
The following directories are all part of the win32 extensions :
The win32api extension is needed under Windows 98.
If your distribution will never run on a windows 98 computer, or never uses unicode, you can get rid of unicows.dll.
On some computers you might not need the two other Microsoft dlls  - but a clean install of XP will need them, they're not part of the OS.
The copy of docs_html in the movpy folder is the one launched by the About button on the GUI. If you delete this folder, the online version should be launched instead.