The St James Software jLogbook and jBrowser applications use prefs files to specify the various configuration parameters. (jLogbook.prefs and jBrowser.prefs) Earlier versions used the config.py format which was a python program to specify these items. The advantage of the prefs file is that there will shortly be a GUI editor available to edit the (sometimes difficult) format of the file. This section shows how the older statements in the config.py file can be transferred into the newer format. The table below shows side by side equivalent examples for the two formats. Note that the indenting is important for both the config.py and the prefs file. (Note that spaces have been added to clarify some of the entries.)
|
config.py format
|
prefs file format
|
| from jLogbook.python import jlogbook | importmodules: jlogbook = 'jLogbook.python.jlogbook' |
| class
Demo(common): DBNAME = 'jLogbookDemo.mdb' DBHOST = None DBUSER = "admin" DBPASSWORD = "" DBPROVIDER = "Microsoft.Jet.OLEDB.4.0" DBTYPE = "access" attachmentsdir = "c:\\temp\\attachments" sessionkey='demo-change' gridrefreshinterval=30 formheight=40 gridheight=60 formlabelalignment = 'right' extrafilters='boolean' |
Demo =
Common: |
| class
common: serverclass = jlogbook.jLogbookServer errorfile = "C:\\Temp\\error.log" tracefile = "C:\\Temp\\trace.log" auditfile = "C:\\Temp\\audit.log" localedomains = ['jToolkit', 'jLogbook.python'] localedir = 'C:\\Program Files\\jSuite.py\\localize' |
Common: serverclass = jlogbook.jLogbookServer localedomains = 'jToolkit,jLogbook.python' localedir = 'Lib/site-packages/localize' errorfile = "jLogbook-error.log" tracefile = "jLogbook-trace.log" auditfile = "jLogbook-audit.log" |
|
from jLogbook.custom import custname logtableclass = custname.LogTable |
importmodules: logtableclass: |
|
from
jLogbook.custom import coname class
CONAME(common): |
importmodules: CONAME =
Common: |