def presence(self, args):
    "\n        #**\n        #* presence\n        #*\n        #* This is BLOCKING.\n        #* Listen for presence events on a channel.\n        #*\n        #* @param array args with channel and callback.\n        #* @return false on fail, array on success.\n        #**\n\n        ## Presence Example\n        def pres_event(message) :\n            print(message)\n            return True\n\n        pubnub.presence({\n            'channel'  : 'hello_world',\n            'callback' : receive \n        })\n        "
    if (not ('channel' in args)):
        raise Exception('Missing Channel.')
        return False
    if (not ('callback' in args)):
        raise Exception('Missing Callback.')
        return False
    channel = str(args['channel'])
    callback = args['callback']
    subscribe_key = (args.get('subscribe_key') or self.subscribe_key)
    return self.subscribe({'channel': (channel + '-pnpres'), 'subscribe_key': subscribe_key, 'callback': callback})
#**
#* presence
#*
#* This is BLOCKING.
#* Listen for presence events on a channel.
#*
#* @param array args with channel and callback.
#* @return false on fail, array on success.
#**

## Presence Example
def pres_event(message) :
    print(message)
    return True

pubnub.presence({
    'channel'  : 'hello_world',
    'callback' : receive 
})
def presence(self, args):
    "\n        #**\n        #* presence\n        #*\n        #* This is BLOCKING.\n        #* Listen for presence events on a channel.\n        #*\n        #* @param array args with channel and callback.\n        #* @return false on fail, array on success.\n        #**\n\n        ## Presence Example\n        def pres_event(message) :\n            print(message)\n            return True\n\n        pubnub.presence({\n            'channel'  : 'hello_world',\n            'callback' : receive \n        })\n        "
    if (not ('channel' in args)):
        raise Exception('Missing Channel.')
        return False
    if (not ('callback' in args)):
        raise Exception('Missing Callback.')
        return False
    channel = str(args['channel'])
    callback = args['callback']
    subscribe_key = (args.get('subscribe_key') or self.subscribe_key)
    return self.subscribe({'channel': (channel + '-pnpres'), 'subscribe_key': subscribe_key, 'callback': callback})