Package AccessGrid :: Module Utilities
[show private | hide private]
[frames | no frames]

Module AccessGrid.Utilities

Classes
ServerLock Class to be used for locking entry and exit to the venue server.

Function Summary
  AllocateEncryptionKey()
This function returns a key that can be used to encrypt/decrypt media streams.
  formatExceptionInfo(maxTBlevel)
  GetLogText(maxSize, logFileName)
Reads log records, based on todays date, from log file.
  GetRandInt(r)
  IsExecFileAvailable(file, path)
Used to check if a command is available to be executed.
  LoadConfig(fileName, config, separator)
Returns a dictionary with keys of the form <section>.<option> and the corresponding values.
  removeall(path)
  SaveConfig(fileName, config, separator)
This method saves the current configuration out to the specified file.
  split_quoted(s)
Split a string up according to Unix shell-like rules for quotes and backslashes.
  SubmitBug(comment, profile, email, logFile)
Submits a bug to bugzilla.

Variable Summary
str __revision__ = '$Id: Utilities.py,v 1.79 2004/09/09 22:5...
Logger log = <logging.Logger instance at 0x01265670>
int NO_LOG = 3                                                                     
int NODE_SETUP_WIZARD_LOG = 2                                                                     
int VENUE_CLIENT_LOG = 0                                                                     
int VENUE_MANAGEMENT_LOG = 1                                                                     

Function Details

AllocateEncryptionKey()

This function returns a key that can be used to encrypt/decrypt media streams.

Return: string

GetLogText(maxSize, logFileName)

Reads log records, based on todays date, from log file.

**Arguments:**

*logFileName* Name of log file to read from. *maxSize* The maximum number of bytes we want to read from the log file.

**Returns:**

*test* a string including log records from todays date. If the log file is missing, GetLogText will return the error message received when trying to read the file. If the log file does not include any records from today, the last "maxSize" bytes of the file will be included in the string.

IsExecFileAvailable(file, path=None)

Used to check if a command is available to be executed. Checks directories in the PATH variable are included. On windows, the current directory is included automatically. Note that the exact filename is required -- i.e. "python.exe" will be found on windows, but "python" won't.

LoadConfig(fileName, config={}, separator='.')

Returns a dictionary with keys of the form <section>.<option> and the corresponding values. This is from the python cookbook credit: Dirk Holtwick.

SaveConfig(fileName, config, separator='.')

This method saves the current configuration out to the specified file.

split_quoted(s)

Split a string up according to Unix shell-like rules for quotes and backslashes. In short: words are delimited by spaces, as long as those spaces are not escaped by a backslash, or inside a quoted string. Single and double quotes are equivalent, and the quote characters can be backslash-escaped. The backslash is stripped from any two-character escape sequence, leaving only the escaped character. The quote characters are stripped from any quoted string. Returns a list of words.

SubmitBug(comment, profile, email, logFile=0)

Submits a bug to bugzilla. 

**Parameters**
  *comment* = Bug description from reporter
  *profile* = Client Profile describing reporter
  *email* = Entered email address for support information. If the email
            is blank, the reporter does not want to be contacted.

Variable Details

__revision__

Type:
str
Value:
'$Id: Utilities.py,v 1.79 2004/09/09 22:52:24 judson Exp $'            

log

Type:
Logger
Value:
<logging.Logger instance at 0x01265670>                                

NO_LOG

Type:
int
Value:
3                                                                     

NODE_SETUP_WIZARD_LOG

Type:
int
Value:
2                                                                     

VENUE_CLIENT_LOG

Type:
int
Value:
0                                                                     

VENUE_MANAGEMENT_LOG

Type:
int
Value:
1                                                                     

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