mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
Fixed all broken references, refactored some stuff here and there,
standardized nomenclature. Ready to test...
This commit is contained in:
parent
09099ce3c5
commit
c51fd06b4e
@ -15,20 +15,26 @@
|
||||
|
||||
# local import
|
||||
import exporter
|
||||
from IPython.utils.traitlets import Unicode
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Classes
|
||||
#-----------------------------------------------------------------------------
|
||||
class PythonExporter(exporter.Exporter):
|
||||
|
||||
file_extension = Unicode(
|
||||
'py', config=True,
|
||||
help="Extension of the file that should be written to disk")
|
||||
|
||||
template_file = Unicode(
|
||||
'python', config=True,
|
||||
help="Name of the template file to use")
|
||||
|
||||
def __init__(self, preprocessors=None, jinja_filters=None, config=None, armor=False, **kw):
|
||||
|
||||
#Call base class constructor.
|
||||
super(exporter.Exporter, self).__init__(preprocessors, jinja_filters, config, **kw)
|
||||
|
||||
#Set defaults
|
||||
self.file_extension = "py"
|
||||
if armor:
|
||||
self.template_file = "python-armor"
|
||||
else:
|
||||
self.template_file = "python"
|
||||
self.extract_figure_transformer.enabled = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user