Cleanup and refactor of API, almost complete.

Still need to target exporter.py and convert.py
Then one last run-trough.
This commit is contained in:
Jonathan Frederic 2013-05-17 13:46:54 -07:00
parent a406334f0f
commit bb35a0ad21

View File

@ -1,6 +1,6 @@
"""TODO: Docstring
"""
Python exporter which exports Notebook code into a PY file.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
@ -13,14 +13,19 @@
# Imports
#-----------------------------------------------------------------------------
from IPython.utils.traitlets import Unicode
# local import
import exporter
from IPython.utils.traitlets import Unicode
#-----------------------------------------------------------------------------
# Classes
#-----------------------------------------------------------------------------
class PythonExporter(exporter.Exporter):
"""
Exports a Python code file.
"""
file_extension = Unicode(
'py', config=True,
@ -30,10 +35,10 @@ class PythonExporter(exporter.Exporter):
'python', config=True,
help="Name of the template file to use")
def __init__(self, preprocessors=None, jinja_filters=None, config=None, armor=False, **kw):
def __init__(self, transformers=None, filters=None, config=None, armor=False, **kw):
#Call base class constructor.
super(PythonExporter, self).__init__(preprocessors, jinja_filters, config, **kw)
super(PythonExporter, self).__init__(transformers, filters, config, **kw)
#Set defaults
self.extract_figure_transformer.enabled = False