base.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. """
  2. Basic post processor
  3. """
  4. #-----------------------------------------------------------------------------
  5. #Copyright (c) 2013, the IPython Development Team.
  6. #
  7. #Distributed under the terms of the Modified BSD License.
  8. #
  9. #The full license is in the file COPYING.txt, distributed with this software.
  10. #-----------------------------------------------------------------------------
  11. #-----------------------------------------------------------------------------
  12. # Imports
  13. #-----------------------------------------------------------------------------
  14. from ..utils.base import NbConvertBase
  15. #-----------------------------------------------------------------------------
  16. # Classes
  17. #-----------------------------------------------------------------------------
  18. class PostProcessorBase(NbConvertBase):
  19. def __call__(self, input):
  20. """
  21. See def postprocess() ...
  22. """
  23. self.postprocess(input)
  24. def postprocess(self, input):
  25. """
  26. Post-process output from a writer.
  27. """
  28. raise NotImplementedError('postprocess')