// -*- html -*-
// $Id$
require_once("docutil.php");
page_head("Python Framework");
?>
See the section on Python in the Software
Prerequisites.
Structure
The directory boinc/py/Boinc
contains the Boinc
module. This means if you have boinc/py/
in your python path you can
write for example:
from Boinc.setup_project import *
To ensure boinc/py/
is in your python path:
import boinc_path_config
This is a special kludge module that configure
places in relevant
directories which then modifies sys.path
appropriately.
Project-specific settings
The module boinc_project_path
is imported to get the paths
for config.xml
and run_state.xml
. The default
paths for these are the parent directory of the invocation script. You can
override these defaults
- modify this file directly (if you have only one project on your server
or have separate copies for each)
- create a new boinc_project_path.py and place it earlier in PYTHONPATH
than the default one
- define environment variables
Example boinc_project_path.py
config_xml_filename = '/etc/boinc/yetiathome/config.xml'
run_state_xml_filename = '/var/lib/boinc/yetiathome/run_state.xml'
See the source of file boinc/py/Boinc/boinc_project_path.py
for
details.
Directories containing python scripts
boinc/py/ | Boinc/*.py |
Main BOINC python modules
|
boinc/sched/ | start |
BOINC start / Super Cron program
|
boinc/tools/ | add |
Adds objects to the database.
TODO: document
|
boinc/tools/ | make_project |
Creates a project
|
boinc/tools/ | update_versions |
Adds all relevant core client and application executables to download
directory and database
|
boinc/test/ | test*.py cgiserver.py |
Test scripts: see the testing framework.
|
Python modules in boinc/py/Boinc/
boinc_path_config.py.in |
Configure puts boinc_path_config.py in all
directories that need it; see above
|
boinc_project_path.py |
sets where config.xml et al can be found; see above.
|
configxml.py |
reads and writes config.xml and run_state.xml
- see its pydoc for more information
|
boinc_db.py |
auto-generated file that contains database constant definitions,
e.g. RESULT_OUTCOME_SUCCESS = 1
|
setup_project.py |
module fore creating a project. Use
|
database.py |
defines database backend functions and database operations.
|
db_mid.py |
"middle-end": optional mix-in to ease debugging by allowing printing of
database objects directly
|
page_tail();
?>