def _IOC(cls, dir, op, structure=None):
        """ Encode an ioctl id. """
        control = cls(dir, op, structure)

        def do(dev, **args):
            return control(dev, **args)
        return do
def _IOC ( cls , dir , op , structure = None ) : control = cls ( dir , op , structure ) def do ( dev , ** args ) : return control ( dev , ** args ) return do
Encode an ioctl id.