Package SUEConstants :: Module Platform
[hide private]
[frames] | no frames]

Module Platform

source code

Platform specific constants.


Authors:
Peter Parente, Frank Zenker
Organizations: Copyright: License:
Functions [hide private]
boolean
initUserPath(pth)
Initializes a path in the user's home directory, but only if the uid of the current process matches that of the home directory.
source code
Variables [hide private]
string PROG_NAME = 'sue'
Name of this program
string PROG_VERSION = '0.3.0'
Version of this program
string PROG_DATE = 'Wed May 28 14:27:20 UTC 2008'
Date of this program's last install or packaging
string NAME = 'Screenreader Usability Extensions'
Human readable name of this program
string COPYRIGHT = 'Copyright (c) 2007 IT Science Center gGmbH Ruegen...
Copyright notice for this program
string LICENSE = 'http://www.opensource.org/licenses/bsd-license.php'
License summary for this program
string PREFIX = '/usr/local'
Install prefix for this program
string HOME_USER = os.path.join(os.environ ['HOME'], '.'+ PROG_NAME)
Configuration directory for the Unix user currently running this program
string HOME_DIR = os.path.normpath(os.path.join(os.path.dirname(__fil...
Home directory for this program install (e.g.
string DATA_DIR = os.path.join(PREFIX, 'share', PROG_NAME)
System data directory for this program install (e.g.
string TEMPLATE_DIR = os.path.join(DATA_DIR, 'templates')
Template data directory for this program install (e.g.
list of integer ICON_SIZES = [16, 24, 32, 36, 48, 64, 96]
Sizes for all installed program icons
Function Details [hide private]

initUserPath(pth)

source code 
Initializes a path in the user's home directory, but only if the uid of the current process matches that of the home directory. Use to avoid creating paths during install owned by the root user when using sudo.
Parameters:
  • pth (string) - Full path to initialize
Returns: boolean
Was the path created or not?

Variables Details [hide private]

COPYRIGHT

Copyright notice for this program
Type:
string
Value:
'Copyright (c) 2007 IT Science Center gGmbH Ruegen, Germany'

HOME_DIR

Home directory for this program install (e.g. /usr/lib/python2.4/site-packages/sue)
Type:
string
Value:
os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))

DATA_DIR

System data directory for this program install (e.g. /usr/share/sue)
Type:
string
Value:
os.path.join(PREFIX, 'share', PROG_NAME)

TEMPLATE_DIR

Template data directory for this program install (e.g. /usr/share/sue/templates)
Type:
string
Value:
os.path.join(DATA_DIR, 'templates')