本文整理汇总了Python中IPython.config.Config类的典型用法代码示例。如果您正苦于以下问题:Python Config类的具体用法?Python Config怎么用?Python Config使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Config类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: activate
def activate(profile,mixed=False):
dname = os.path.dirname(__file__)
pdir = locate_profile(profile)
jc = JSONFileConfigLoader('ipython_notebook_config.json',pdir)
try:
config = jc.load_config();
except (ConfigFileNotFound,ValueError) as e:
config = Config()
if 'NotebookApp' in config:
if ('tornado_settings' in config['NotebookApp']) or ('contents_manager_class' in config['NotebookApp']):
# TODO, manually merge tornado settin if exist
# but cannot do anythin automatically if contents_manager_calss is set
raise ValueError('You already got some configuration that will conflict with google drive. Bailin out')
if mixed :
drive_config = JSONFileConfigLoader('mixed_contents.json', dname).load_config()
else :
drive_config = JSONFileConfigLoader('ipython_notebook_config.json', dname).load_config()
config.merge(drive_config)
print('Activating Google Drive integration for profile "%s"' % profile)
config['nbformat'] = 1
with io.open(os.path.join(pdir,'ipython_notebook_config.json'),'w', encoding='utf-8') as f:
f.write(cast_unicode_py2(json.dumps(config, indent=2)))
示例2: default_config
def default_config(self):
c = Config({
'RevealHelpPreprocessor': {
'enabled': True,
},
})
c.merge(super(SlidesExporter,self).default_config)
return c
示例3: default_config
def default_config(self):
c = Config({
'CSSHTMLHeaderPreprocessor':{
'enabled':True
}
})
c.merge(super(HTMLExporter,self).default_config)
return c
示例4: default_config
def default_config(self):
c = Config(
{
"GlobalConfigurable": {"display_data_priority": ["latex", "svg", "png", "jpg", "jpeg", "text"]},
"ExtractFigureTransformer": {"enabled": True, "extra_ext_map": {"svg": "pdf"}},
}
)
c.merge(super(LatexExporter, self).default_config)
return c
示例5: default_config
def default_config(self):
c = Config({
'CSSHTMLHeaderTransformer':{
'enabled':True
},
'RevealHelpTransformer':{
'enabled':True,
},
})
c.merge(super(RevealExporter,self).default_config)
return c
示例6: default_config
def default_config(self):
c = Config({
'GlobalConfigurable': {
'display_data_priority' : ['latex', 'svg', 'png', 'jpg', 'jpeg' , 'text']
},
'ExtractFigureTransformer': {
'enabled':True,
'extra_ext_map':{'svg':'pdf'},
}
})
c.merge(super(LatexExporter,self).default_config)
return c
示例7: default_config
def default_config(self):
c = Config({
'CSSHTMLHeaderPreprocessor':{
'enabled':True
},
'RevealHelpPreprocessor':{
'enabled':True,
},
'HighlightMagicsPreprocessor': {
'enabled':True
}
})
c.merge(super(SlidesExporter,self).default_config)
return c
示例8: default_config
def default_config(self):
c = Config({
'NbConvertBase': {
'display_data_priority' : ['text/javascript', 'text/html', 'application/pdf', 'image/svg+xml', 'text/latex', 'image/png', 'image/jpeg', 'text/plain']
},
'CSSHTMLHeaderPreprocessor':{
'enabled':True
},
'HighlightMagicsPreprocessor': {
'enabled':True
}
})
c.merge(super(HTMLExporter,self).default_config)
return c
示例9: default_config
def default_config(self):
c = Config({
'NbConvertBase': {
'display_data_priority' : ['latex', 'png', 'jpg', 'svg', 'jpeg', 'text']
},
'ExtractFigureTransformer': {
'enabled':True
},
'SVG2PDFTransformer': {
'enabled':True
},
'LatexTransformer': {
'enabled':True
}
})
c.merge(super(LatexExporter,self).default_config)
return c
示例10: default_config
def default_config(self):
c = Config({
'NbConvertBase': {
'display_data_priority' : ['latex', 'pdf', 'png', 'jpg', 'svg', 'jpeg', 'text']
},
'ExtractOutputPreprocessor': {
'enabled':True
},
'SVG2PDFPreprocessor': {
'enabled':True
},
'LatexPreprocessor': {
'enabled':True
},
'SphinxPreprocessor': {
'enabled':True
}
})
c.merge(super(LatexExporter,self).default_config)
return c
示例11: default_config
def default_config(self):
c = Config({
'NbConvertBase': {
'display_data_priority' : ['text/latex', 'application/pdf', 'image/png', 'image/jpeg', 'image/svg+xml', 'text/plain']
},
'ExtractOutputPreprocessor': {
'enabled':True
},
'SVG2PDFPreprocessor': {
'enabled':True
},
'LatexPreprocessor': {
'enabled':True
},
'SphinxPreprocessor': {
'enabled':True
},
'HighlightMagicsPreprocessor': {
'enabled':True
}
})
c.merge(super(LatexExporter,self).default_config)
return c
示例12: default_config
def default_config(self):
c = Config({"CSSHTMLHeaderPreprocessor": {"enabled": True}, "HighlightMagicsPreprocessor": {"enabled": True}})
c.merge(super(HTMLExporter, self).default_config)
return c
示例13: default_config
def default_config(self):
c = Config({'ExtractOutputPreprocessor':{'enabled':True}})
c.merge(super(RSTExporter,self).default_config)
return c
示例14: default_config
def default_config(self):
c = Config({'ExtractFigureTransformer':{'enabled':True}})
c.merge(super(RstExporter,self).default_config)
return c
示例15: default_config
def default_config(self):
c = Config({"CSSHTMLHeaderTransformer": {"enabled": True}})
c.merge(super(RevealExporter, self).default_config)
return c