##// END OF EJS Templates
Warn about .py/.json collisions in config...
Warn about .py/.json collisions in config when two versions of the config file set the same value, warn about clobbering, with a message, such as: ``` [TerminalIPythonApp] WARNING | Collisions detected in ipython_config.py and ipython_config.json config files. ipython_config.json has higher priority: { "Klass": { "trait": "'python' ignored, using 'json'" } } ``` In anticipation of more machine-written .json config

File last commit:

r19027:034353ef
r19160:f22c8070
Show More
script.py
14 lines | 551 B | text/x-python | PythonLexer
"""Generic script exporter class for any kernel language"""
from .templateexporter import TemplateExporter
class ScriptExporter(TemplateExporter):
def _template_file_default(self):
return 'script'
def from_notebook_node(self, nb, resources=None, **kw):
langinfo = nb.metadata.get('language_info', {})
self.file_extension = langinfo.get('file_extension', '.txt')
self.output_mimetype = langinfo.get('mimetype', 'text/plain')
return super(ScriptExporter, self).from_notebook_node(nb, resources, **kw)