core – Core objects

Introduction

The core module is not intended to be used by user code but establishes base objects for all other WinSys modules.

Exceptions

exception x_winsys

Base of all exceptions in the package

exception x_access_denied

Common exception corresponding to an access denied error

exception x_not_found

Common exception corresponding to a file or path not found error

exception x_invalid_handle

Common exception corresponding to a handle not found error

Classes

class _WinSysObject

Not intended to be used by instantiated by itself, this class forms the basis for most of the classes in the WinSys package. It provides useful defaults for common functionality, including filling in comparison functions (__ne__(), __le__() and so on) so that total ordering can be assumed for all derived classes.

as_string()

By default, the name of the class; usually overriden in derived classes to be some meaningful name. Forms the basis for the __str__() and __unicode__() methods.

dumped()

By default, simply dump the result of as_string() to give a usable if unhelpful default. Intended to be overriden by subclasses, generally to stack attribute values into a list of strings which is then passed to utils.dumped() to fill in the curly brackets.

dump()

Calls the underlying dumped() implementation to provide a convenient representation of the object’s data.

Logging Functions

The core module establishes a simple logger under the name “winsys”, logging to filename winsys.log. The logger’s debug, log, info, warn and error methods are imported directly into the module’s namespace.

Table Of Contents

Previous topic

Modules

Next topic

constants

This Page