Show More
@@ -85,8 +85,6 b' __all__ = [' | |||||
85 | class ExporterNameError(NameError): |
|
85 | class ExporterNameError(NameError): | |
86 | pass |
|
86 | pass | |
87 |
|
87 | |||
88 | _exporters = {} |
|
|||
89 |
|
||||
90 | @DocDecorator |
|
88 | @DocDecorator | |
91 | def export(exporter, nb, **kw): |
|
89 | def export(exporter, nb, **kw): | |
92 | """ |
|
90 | """ | |
@@ -112,13 +110,8 b' def export(exporter, nb, **kw):' | |||||
112 | if isinstance(exporter, Exporter): |
|
110 | if isinstance(exporter, Exporter): | |
113 | exporter_instance = exporter |
|
111 | exporter_instance = exporter | |
114 | else: |
|
112 | else: | |
115 |
|
|
113 | exporter_instance = exporter(**kw) | |
116 | exporter_instance = _exporters[exporter] = exporter(**kw) |
|
114 | ||
117 | else: |
|
|||
118 | exporter_instance = _exporters[exporter] |
|
|||
119 | for attr, value in kw.items(): |
|
|||
120 | setattr(exporter_instance, attr, value) |
|
|||
121 |
|
||||
122 | #Try to convert the notebook using the appropriate conversion function. |
|
115 | #Try to convert the notebook using the appropriate conversion function. | |
123 | if isinstance(nb, NotebookNode): |
|
116 | if isinstance(nb, NotebookNode): | |
124 | output, resources = exporter_instance.from_notebook_node(nb, resources) |
|
117 | output, resources = exporter_instance.from_notebook_node(nb, resources) |
General Comments 0
You need to be logged in to leave comments.
Login now