Package peggy :: Module base :: Class PeggyBase
[hide private]
[frames] | no frames]

Class PeggyBase

source code

object --+
         |
        PeggyBase
Known Subclasses:

Base class for Peggy
Instance Methods [hide private]
 
__init__(self, package)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_init_locale_variables(self, domain, dir)
Used by setup_locales().
source code
 
exists(self, name)
Does the ressource name exist?
source code
 
get_filename(self, name)
get a true filesystem filename for ressource name
source code
 
get_locale_dir(self, dir=None)
get ressource dir for use as a locale's directory
source code
 
get_stream(self, name)
get ressource name as a file-like object
source code
 
get_string(self, name)
get ressource name as a string
source code
 
is_dir(self, name)
Is the ressource name a directory?
source code
 
list_dir(self, name)
list list the content of ressource name, like os.listdir
source code
 
setup_locales(self, domain=None, dir=None, use_unicode=1)
setup everything to use locales.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, package)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • package - the name of the module/package you want to get ressources from
Overrides: object.__init__

_init_locale_variables(self, domain, dir)

source code 
Used by setup_locales(). Don't use it directly.

exists(self, name)

source code 
Does the ressource name exist?
Parameters:
  • name - resource name

get_filename(self, name)

source code 
get a true filesystem filename for ressource name
Parameters:
  • name - resource name

get_locale_dir(self, dir=None)

source code 
get ressource dir for use as a locale's directory
Parameters:
  • dir - ressource name

    if None or not given locale is used

get_stream(self, name)

source code 
get ressource name as a file-like object
Parameters:
  • name - resource name

get_string(self, name)

source code 
get ressource name as a string
Parameters:
  • name - resource name

is_dir(self, name)

source code 
Is the ressource name a directory?
Parameters:
  • name - resource name

list_dir(self, name)

source code 
list list the content of ressource name, like os.listdir
Parameters:
  • name - resource name

setup_locales(self, domain=None, dir=None, use_unicode=1)

source code 
setup everything to use locales.
Parameters: