本文整理汇总了Python中IPython.core.magic.Magics类的典型用法代码示例。如果您正苦于以下问题:Python Magics类的具体用法?Python Magics怎么用?Python Magics使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Magics类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, shell=None):
Configurable.__init__(self, config=shell.config)
self._generate_script_magics()
Magics.__init__(self, shell=shell)
self.job_manager = BackgroundJobManager()
self.bg_processes = []
atexit.register(self.kill_bg_processes)
示例2: __init__
def __init__(self, shell):
Configurable.__init__(self, config=shell.config)
Magics.__init__(self, shell=shell)
# Add ourself to the list of module configurable via %config
self.shell.configurables.append(self)
self.rewriter = Rewriter()
示例3: __init__
def __init__(self, shell):
Magics.__init__(self, shell)
ip = get_ipython()
self.csd = {}
ip.user_ns["__csd"] = self.csd
self.orc = {}
ip.user_ns["__orc"] = self.orc
self.sco = {}
ip.user_ns["__sco"] = self.sco
示例4: __init__
def __init__(self, shell):
"""Initialize sql_magic as a magic function; and add shell to configurables
Create connection object."""
self.shell = shell
self.caller = None
self.shell.configurables.append(self)
Configurable.__init__(self, config=shell.config)
Magics.__init__(self, shell=shell)
self.conn = Connection(shell, available_connection_types, no_return_result_exceptions)
示例5: __init__
def __init__(self, shell):
Configurable.__init__(self, config=shell.config)
Magics.__init__(self, shell=shell)
MyriaRelation.DefaultConnection = MyriaConnection(
rest_url=self.rest_url,
execution_url=self.execution_url,
timeout=self.timeout)
self.shell.configurables.append(self)
示例6: __init__
def __init__(self, shell):
Configurable.__init__(self, config=shell.config)
Magics.__init__(self, shell=shell)
self.shell.configurables.append(self)
if self.autorestore:
restore_data(self.shell)
示例7: __init__
def __init__(self, *a, **k):
Magics.__init__(self, *a, **k)
self.modules = {}
示例8: __init__
def __init__(self, robot_shell):
Magics.__init__(self, robot_shell.shell)
self.robot_shell = robot_shell
示例9: __init__
def __init__(self, shell=None):
Magics.__init__(self, shell)
Configurable.__init__(self, config=shell.config)
示例10: __init__
def __init__(self, shell):
Configurable.__init__(self, config=shell.config)
Magics.__init__(self, shell=shell)
# Add ourself to the list of module configurable via %config
self.shell.configurables.append(self)
self._legal_cypher_identifier = re.compile(r'^[A-Za-z0-9#_$]+')
示例11: __init__
def __init__(self, shell):
Magics.__init__(self, shell)
self.process = None
self.entities = {}
示例12: __init__
def __init__(self, shell):
Magics.__init__(self, shell)
self.J_sessions = dict()
示例13: __init__
def __init__(self, shell=None):
Configurable.__init__(self, config=shell.config)
self._generate_script_magics()
Magics.__init__(self, shell=shell)
self.job_manager = BackgroundJobManager()
示例14: __init__
def __init__(self, shell):
Configurable.__init__(self, parent=shell)
Magics.__init__(self, shell)
# this adds me to the `%config` list:
shell.configurables.append(self)
示例15: __init__
def __init__(self, shell):
Configurable.__init__(self, config=shell.config)
Magics.__init__(self, shell=shell)
self.shell.configurables.append(self)