Package AccessGrid :: Module Config :: Class SystemConfig
[show private | hide private]
[frames | no frames]

Class SystemConfig

Known Subclasses:
SystemConfig

The SystemConfig object encapsulates all system dependent configuration data, it should be extended to retrieve and store additional information as necessary.
Method Summary
  __init__(self)
  __str__(self)
  _repr_(self)
  AppFirewallConfig(self, path, enableFlag)
This call enables or disables an applications access via a firewall.
  CheckClock(self, limit)
Retrieve the SNTP time and compare this clock against it.
  EnumerateInterfaces(self)
Enumerate network interfaces
  GetFileSystemFreeSpace(self, path)
Retrieve the amount of free space on the file system the path is housed on.
  GetHostname(self)
Retrieve the local hostname.
  GetLocalIPAddress(self)
  GetProxySettings(self)
Retrieve local HTTP proxy settings.
  GetTempDir(self)
Get the path to the system temp directory.
  GetUsername(self)
Get the name of the user
  _GetSNTPTime(self, server, timeout)
Retrieve the time from the given time server, with a timeout.

Instance Variable Summary
string tempDir: the system temp directory.

Method Details

AppFirewallConfig(self, path, enableFlag)

This call enables or disables an applications access via a firewall.

CheckClock(self, limit=10)

Retrieve the SNTP time and compare this clock against it.

EnumerateInterfaces(self)

Enumerate network interfaces

GetFileSystemFreeSpace(self, path)

Retrieve the amount of free space on the file system the path is housed on.

GetHostname(self)

Retrieve the local hostname.

GetProxySettings(self)

Retrieve local HTTP proxy settings.

GetTempDir(self)

Get the path to the system temp directory.

GetUsername(self)

Get the name of the user

_GetSNTPTime(self, server, timeout=0.29999999999999999)

Retrieve the time from the given time server, with a timeout.
Parameters:
server - Hostname or IP address of the time server.
timeout - Timeout for the request, in seconds (fractions allowed).
Returns:

Time from that server, in seconds-since-1970, or None if the request failed for any reason.

Thanks the ASPN python recipes folks for this. (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/117211)

Instance Variable Details

tempDir

the system temp directory.
Type:
string

Generated by Epydoc 2.1 on Thu Apr 14 16:39:28 2005 http://epydoc.sf.net