# Path: glitter/utils/dtypes.py
# class Datatype(object):
#     def __init__(self, integer, signed, nptype, _gltype=None, charcode=None):
#     def from_numpy(cls, nptype):
#     def _from_gl(cls, _gltype):
#     def as_numpy(self):
#     def _as_gl(self):
#     def as_signed(self):
#     def as_unsigned(self):
#     def as_nbytes(self, nbytes):
#     def is_signed(self):
#     def is_unsigned(self):
#     def is_integer(self):
#     def is_float(self):
#     def is_boolean(self):
#     def charcode(self):
#     def nbytes(self):
#     def __str__(self):
#     def __repr__(self):
#     def coerced(self, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# def coerce_array(data, dtype=None, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# 
# Path: glitter/utils/objects.py
# def with_obj(obj, f):
#     """Create a wrapper that executes C{f} in a C{with obj:} block."""
#     @_wraps(f)
#     def wrapper(*args, **kwargs):
#         with obj:
#             return f(*args, **kwargs)
#     return wrapper


from inspect import getmembers as _getmembers
from glitter.utils.dtypes import coerce_array, int32
from glitter.utils.objects import with_obj
import types as _types
import numpy as _np
import glitter.raw as _gl
import collections
        return getattr(self._obj, self._name)

    def __set__(self, obj, value):
        setattr(self._obj, self._name, value)

    def __delete__(self, obj):
        delattr(self._obj, self._name)

class ItemProxy(object):
    def __init__(self, obj, idx):
        self._obj = obj
        self._idx = idx

    def __get__(self, obj, cls):
        return self._obj[self._idx]

    def __set__(self, obj, value):
        self._obj[self._idx] = value

    def __delete__(self, obj):
        del self._obj[self._idx]

def add_proxies(parent, obj):
    """Add proxies for methods and properties of C{obj} to C{parent}."""

    # add functions and methods
    for key, value in _getmembers(obj):
        if key.startswith("_"):
            continue
        if isinstance(value, (_types.FunctionType, _types.MethodType)):

# Path: glitter/utils/dtypes.py
# class Datatype(object):
#     def __init__(self, integer, signed, nptype, _gltype=None, charcode=None):
#     def from_numpy(cls, nptype):
#     def _from_gl(cls, _gltype):
#     def as_numpy(self):
#     def _as_gl(self):
#     def as_signed(self):
#     def as_unsigned(self):
#     def as_nbytes(self, nbytes):
#     def is_signed(self):
#     def is_unsigned(self):
#     def is_integer(self):
#     def is_float(self):
#     def is_boolean(self):
#     def charcode(self):
#     def nbytes(self):
#     def __str__(self):
#     def __repr__(self):
#     def coerced(self, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# def coerce_array(data, dtype=None, force_integer=False, force_unsigned=False, force_float=False, force_gl=True):
# 
# Path: glitter/utils/objects.py
# def with_obj(obj, f):
#     """Create a wrapper that executes C{f} in a C{with obj:} block."""
#     @_wraps(f)
#     def wrapper(*args, **kwargs):
#         with obj:
#             return f(*args, **kwargs)
#     return wrapper


# Path: glitter/utils/proxy.py
from inspect import getmembers as _getmembers
from glitter.utils.dtypes import coerce_array, int32
from glitter.utils.objects import with_obj
import types as _types
import numpy as _np
import glitter.raw as _gl
import collections

        return getattr(self._obj, self._name)

    def __set__(self, obj, value):
        setattr(self._obj, self._name, value)

    def __delete__(self, obj):
        delattr(self._obj, self._name)

class ItemProxy(object):
    def __init__(self, obj, idx):
        self._obj = obj
        self._idx = idx

    def __get__(self, obj, cls):
        return self._obj[self._idx]

    def __set__(self, obj, value):
        self._obj[self._idx] = value

    def __delete__(self, obj):
        del self._obj[self._idx]

def add_proxies(parent, obj):
    """Add proxies for methods and properties of C{obj} to C{parent}."""

    # add functions and methods
    for key, value in _getmembers(obj):
        if key.startswith("_"):
            continue
        if isinstance(value, (_types.FunctionType, _types.MethodType)):

            setattr(parent, key, with_obj(parent, value))