

def open(self, window=None, exclusive=False):
    'Open the device to begin receiving input from it.\n\n        :Parameters:\n            `window` : Window\n                Optional window to associate with the device.  The behaviour\n                of this parameter is device and operating system dependant.\n                It can usually be omitted for most devices.\n            `exclusive` : bool\n                If ``True`` the device will be opened exclusively so that no\n                other application can use it.  The method will raise\n                `DeviceExclusiveException` if the device cannot be opened this\n                way (for example, because another application has already\n                opened it).\n\n        '
    if self.is_open:
        raise DeviceOpenException('Device is already open.')
    self.is_open = True

dataset/ETHPy150Open ardekantur/pyglet/pyglet/input/base.py Device.open/original