parameters: (hooks_file=None)
docstring: Loads a custom python module which modifies zap scripts behaviour
      hooks_file - a python file which defines custom hooks
docstring_summary: Loads a custom python module which modifies zap scripts behaviour
      hooks_file - a python file which defines custom hooks
docstring_tokens: Loads a custom python module which modifies zap scripts behaviour hooks_file - a python file which defines custom hooks
function: def load_custom_hooks(hooks_file=None):
      """ Loads a custom python module which modifies zap scripts behaviour
      hooks_file - a python file which defines custom hooks
      """
      global zap_hooks
      hooks_file = hooks_file if hooks_file else os.environ.get('ZAP_HOOKS', '~/.zap_hooks.py')
      hooks_file = os.path.expanduser(hooks_file)
  
      if not os.path.exists(hooks_file):
          logging.debug('Could not find custom hooks file at %s ' % hooks_file)
          return
  
      zap_hooks = imp.load_source("zap_hooks", hooks_file)
function_tokens: def load_custom_hooks ( hooks_file = None ) : global zap_hooks hooks_file = hooks_file if hooks_file else os . environ . get ( 'ZAP_HOOKS' , '~/.zap_hooks.py' ) hooks_file = os . path . expanduser ( hooks_file ) if not os . path . exists ( hooks_file ) : logging . debug ( 'Could not find custom hooks file at %s ' % hooks_file ) return zap_hooks = imp . load_source ( "zap_hooks" , hooks_file )