3.1 Setting Preferences
The Boa Constructor tool provides a number of features which can be customised
by you. These are customised through files. The syntax of these files is
either completely or partially in the Python language. Be careful when
editing these files. If you put syntax errors into these files, Boa Constructor
will not load. The files are straight forward. The following are the files:
-
Explorer.msw.cfg (windows)
-
Explorer.gtk.cfg (unix)
-
Preferences.py
-
PrefsMSW.py (windows)
-
PrefsGTK.py (unix)
Explorer Configuration
The files 'Explorer.msw.cfg' and 'Explorer.gtk.cfg' are used to configure
the Editor Explorer window on Windows and Unix respectively. There are
a number of items which can be configured in this file.
The following is an example of an Explorer configuration file from a
windows installation.
[explorer]
filesystem : ['A:\\', 'C:\\', 'D:\\']
bookmarks : {'Root': 'C:\\', 'Development': 'D:\\dev'}
defaultbookmark : Root
zope : {'Localhost':
{'host': '127.0.0.1',
'httpport': 8080,
'ftpport': 8021,
'username': '',
'passwd': '',
'path': '/',
'name': '',
'localpath': ''} }
-
The Filesystems are stored in a sequence. Note the list is interpreted
by the python interpreter. The backslashes used for windows directories
must therefore the escaped (i.e. preceded by a backslash). You can set
up as many filesystems as you want. These appear in the Explorer screen
under filesystems.
-
The Bookmarks are stored as a python dictionary. Again there is
no limit to the number of directories which can be named. Each directory
is stored with a logical name. The defaultbookmark selects the default
bookmark. The named bookmark must be defined in the previous 'bookmarks'
line.
-
The Zope information defines how to connect to Zope. If this information
is correctly displayed, the Explorer will be able to located and display
files from your Zope development environment.
Preferences
The preferences.py file contains general preferences. This file is accessible
from the Palette toolbar with the following icon
.
The following are items which can be configured through this file.
-
Help File Paths
-
Whether to use the built in wxFileDialog or to use the Boa Constructor
one
-
Titles for Tabs on Inspector
-
Your Name and details which will be automatically put in modules when you
used the 'Module Info' Editor button.
Windowing System Preferences
The files PrefsMSW.py and PrefsGTK.py are the window system specific preference
files. These files are provided as a convenience. The values for some settings,
e.g. Paths, are significantly different between UNIX and Windows. These
files are imported by Preferences.py depending on the platform. The following
items are configured in these files:
-
Help File Paths
-
Enable Editor brace matching functionality
-
Fonts and Pixel positions which differ between the two systems