Introduction to Access Grid Development

This document provides an introduction to programming using the Access Grid software. It will introduce new developers to the basic concepts needed for writing small scripts to interact with various Access Grid services, and to understand concepts that will arise when building collaborative applications and services.

This guide assumes a basic knowledge of programming in general, and programming in Python in particular.

Application Initialization

Applications that use specific facilities of the Access Grid Toolkit should create an Access Grid application and initialize it. This is needed if, for example, a developer will rely on argument processing, logging, the various configuration classes, or the certificate infrastructure. The two application classes are CmdlineApplication and WXGUIApplication; an example of initializing a CmdlineApplication is as follows.

from AccessGrid.Toolkit import CmdlineApplication
app = CmdlineApplication.instance()

Standard Arguments

Standard arguments accepted by all applications are given below.

-d, --debug

Set the debug level of this program

-l, --logfile

Specify a log file to output logging to


Specify the number of log files to retain


Specify the size of log files to retain

-c, --configure

Specify a configuration file for the program


Print out what version of the toolkit this is


Additional command line arguments can be added as follows.




Many of the Access Grid application classes log their activity. When initialized, this logging facility writes information to a logfile in the user's home directory, with the name of the file derived from the application name given when the application was initialized. In the case of the initialization example above, then, there should exist a MyApp.log file in the Logs directory:

Linux, OSX



C:\Documents and Settings\%USERNAME%\Application Data\AccessGrid3\Logs


The AG logging support relies on the Python logging module. Applications can use the logging facilities as follows.


Configuration classes

The three configuration classes include SystemConfig, AGTkConfig, and UserConfig. These classes encompass information about the system, the Access Grid toolkit configuration, and the user configuration, respectively (obviously).


Examples of SystemConfig methods include the following. Alternatively, view the full list of SystemConfig methods

Retrieve the amount of free space on the system.

Retrieve the name of the user running the software.


Examples of AGTKConfig methods include the following. Alternatively, view the full list of AGTkConfig methods

Retrieve the software installation directory

Retrieve the documentation directory


Examples of UserConfig methods include the following. Alternatively, view the full list of UserConfig methods

Return path to user profile

Return path to preferences file

Relevant Types

Many of the data types that a developer will encounter are included in a single file, Some of the types defined in this file include:

Description of a venue data file

Description of a multicast or unicast address (i.e., stream)

Description of an Access Grid Venue

Description of the contents of an Access Grid Venue

Supporting documentation


View the code in Subversion, complete with revision history.

API Documentation

Documentation is generated from the code for each released version.

If you discover any problems with this or other documentation, please file a bug report in Bugzilla under the product 'Documentation'. In particular, the generated documentation is relatively new (as of May 2008), so there may well be problems in this documentation and they should be reported liberally.


login or register to post comments