我怎么能在ipython笔记本中读取配置?

时间:2015-05-13 14:20:37

标签: configuration ipython-notebook

我正在使用anaconda 2.1分配。 我创建了自己的配置部分

from IPython.config.configurable import Configurable
from IPython.utils.traitlets import Int, Float, Unicode, Bool

class Myconfig(Configurable):
    token = ""

然后初始化

c = get_config()
load_subconfig('Myconfig.py')
c.Myconfig.token='Somethingusefull'

我怎么能在笔记本中阅读Myconfig.token?

谢谢!

0 个答案:

没有答案