当前位置: 首页>>代码示例>>Python>>正文


Python Config.merge方法代码示例

本文整理汇总了Python中IPython.config.Config.merge方法的典型用法代码示例。如果您正苦于以下问题:Python Config.merge方法的具体用法?Python Config.merge怎么用?Python Config.merge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPython.config.Config的用法示例。


在下文中一共展示了Config.merge方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: activate

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
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)))
开发者ID:nagyistoce,项目名称:jupyter-drive,代码行数:28,代码来源:__init__.py

示例2: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({
         'RevealHelpPreprocessor': {
             'enabled': True,
             },
         })
     c.merge(super(SlidesExporter,self).default_config)
     return c
开发者ID:Gwillink,项目名称:ipython,代码行数:10,代码来源:slides.py

示例3: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({
         'CSSHTMLHeaderPreprocessor':{
             'enabled':True
             }          
         })
     c.merge(super(HTMLExporter,self).default_config)
     return c
开发者ID:AJRenold,项目名称:ipython,代码行数:10,代码来源:html.py

示例4: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 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
开发者ID:ntezak,项目名称:ipython,代码行数:11,代码来源:latex.py

示例5: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({
         'CSSHTMLHeaderTransformer':{
             'enabled':True
             },
         'RevealHelpTransformer':{
             'enabled':True,
             },                
         })
     c.merge(super(RevealExporter,self).default_config)
     return c
开发者ID:dcafferty,项目名称:ipython,代码行数:13,代码来源:reveal.py

示例6: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 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
开发者ID:praveer13,项目名称:ipython,代码行数:14,代码来源:latex.py

示例7: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({
         'CSSHTMLHeaderPreprocessor':{
             'enabled':True
             },
         'RevealHelpPreprocessor':{
             'enabled':True,
             },                
         'HighlightMagicsPreprocessor': {
             'enabled':True
             }
         })
     c.merge(super(SlidesExporter,self).default_config)
     return c
开发者ID:ANB2,项目名称:ipython,代码行数:16,代码来源:slides.py

示例8: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 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
开发者ID:Deca-Technologies,项目名称:ipython,代码行数:16,代码来源:html.py

示例9: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 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
开发者ID:kinverarity1,项目名称:ipython,代码行数:19,代码来源:latex.py

示例10: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 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
开发者ID:AJRenold,项目名称:ipython,代码行数:22,代码来源:latex.py

示例11: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 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
开发者ID:AnneTheAgile,项目名称:ipython,代码行数:25,代码来源:latex.py

示例12: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({"CSSHTMLHeaderPreprocessor": {"enabled": True}, "HighlightMagicsPreprocessor": {"enabled": True}})
     c.merge(super(HTMLExporter, self).default_config)
     return c
开发者ID:kmike,项目名称:ipython,代码行数:6,代码来源:html.py

示例13: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({'ExtractOutputPreprocessor':{'enabled':True}})
     c.merge(super(RSTExporter,self).default_config)
     return c
开发者ID:2t7,项目名称:ipython,代码行数:6,代码来源:rst.py

示例14: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({'ExtractFigureTransformer':{'enabled':True}})
     c.merge(super(RstExporter,self).default_config)
     return c
开发者ID:breisfeld,项目名称:ipython,代码行数:6,代码来源:rst.py

示例15: default_config

# 需要导入模块: from IPython.config import Config [as 别名]
# 或者: from IPython.config.Config import merge [as 别名]
 def default_config(self):
     c = Config({"CSSHTMLHeaderTransformer": {"enabled": True}})
     c.merge(super(RevealExporter, self).default_config)
     return c
开发者ID:praveer13,项目名称:ipython,代码行数:6,代码来源:reveal.py


注:本文中的IPython.config.Config.merge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。