create.py creates a number of files for your project. This section describes them in detail.
Since some of the directory names depend on your vendor and extension names, we will assume that the vendor name is My Name and the extension name is My Extension.
This is the most important directory for the development, because it contains the source code of the extension. The files here are:
This file includes all the core technology for your extension, most importantly its base class ComponentBase, the init function that takes care of registering the derived class with OpenOffice.org and the debugging framework.
This file is created by the pack.py script. It tells the extension whether it is in development or release mode, and in development mode also contains the path to the development source tree.
It is recommended not to put this file under version control.
This directory includes an optional, but hopefully useful library of utility modules. See The Utility Library.
The Utility Library is quite small at the moment, but once it expands, you may wish to remove it or trim it to only include the parts needed by your extension. This is possible, because the extensioncore module does not depend on it.
These directories are included in the module search path when the OpenOffice.org installation uses Python 2.3. Python 2.3 does not include ctypes, so that is contained in this directory. You can also add here any other binary modules that your extension needs.
Similar directories can also be created for Python 2.5. It makes sense when you want to include a module like PIL with your extension or if you have created your own Python extension (though using ctypes is often a simpler option).
This directory contains platform independent Python modules that depend on the version of Python. By default the compiler and ctypes modules are placed here, because they are not included in the Python 2.3 in OpenOffice.org.
If a similar directory is created for Python 2.5 it will be appropriately handled.
This is the file that is actually registered with OpenOffice.org. The code inside is responsible for setting up the appropriate module paths and setting up the connection between OpenOffice.org and the actual extension class in myextension.py.
Normally extension developers do not need to deal with this file, but there may be some special cases. If something goes wrong during the installation of the extension, the DEBUG option may be turned on in this file to learn more about the error. If additional Python versions (besides 2.3 and 2.5) are to be supported, this file also needs to be modified.
This directory contains the dialog library of the extension.
The localization file for the English language. It is a Java property resource bundle file, so tools like The Translate Toolkit can be used to handle it. (It can also be edited manually, but this is error prone.)
This file contains the whole of the localization for the extension – not just the part concerning the dialogs. The localize() method also works with this file.
When an extension is installed, every file in the archive is copied to the extension directory. In addition manifest.xml tells OpenOffice.org which of these files need special attention.
Unless new .xcu configuration files are used (such as when a new toolbar is defined) or new UNO types are registered, this file probably does not need to be modified. New Python modules, images, dialogs, help pages, etc. do not need to be added here.
This Python source file is used as a configuration file that stores the information that was used to create the extension with create.py (such as the URL of the extension website and the name of the extension vendor). It is used by update.py.
To prevent a file from ever getting updated a dontupdate variable can be added to eoec.config. This variable should be a list of file names to skip during an update. (File names without paths should be listed. The Barcode example demonstrates this feature.)
A number of default image files are included. Replacing them is an easy way of customizing an extension.