'Setup shell hook definition
:param name: name of hook for error messages
:param path: absolute path to executable file
:param numparam: number of requirements parameters
:param pre_exec_callback: closure for setup before execution
Defaults to None. Takes in the variable argument list from the
execute functions and returns a modified argument list for the
shell hook.
:param post_exec_callback: closure for cleanup after execution
Defaults to None. Takes in a boolean for hook success and the
modified argument list and returns the final hook return value
if applicable'

def __init__(self, name, path, numparam, pre_exec_callback=None, post_exec_callback=None):

    self.name = name
    self.filepath = path
    self.numparam = numparam
    self.pre_exec_callback = pre_exec_callback
    self.post_exec_callback = post_exec_callback
    if ((sys.version_info[0] == 2) and (sys.platform == 'win32')):
        self.filepath = self.filepath.encode(sys.getfilesystemencoding())
