'SecurityOptions.isModuleAllowed(moduleName) -> boolean
returns 1 if a module by that name is allowed, 0 otherwise'

def isModuleAllowed(self, moduleName):

    if (not isinstance(moduleName, bytes)):
        moduleName = moduleName.encode('utf-8')
    return (moduleName in self.allowedModules)
