本文整理汇总了Python中IPython.core.debugger.Pdb.runcall方法的典型用法代码示例。如果您正苦于以下问题:Python Pdb.runcall方法的具体用法?Python Pdb.runcall怎么用?Python Pdb.runcall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPython.core.debugger.Pdb
的用法示例。
在下文中一共展示了Pdb.runcall方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: debug
# 需要导入模块: from IPython.core.debugger import Pdb [as 别名]
# 或者: from IPython.core.debugger.Pdb import runcall [as 别名]
def debug(f, *args, **kwargs):
"""
Allows the user to launch pdb in any function.
Parameters
----------
f: function
The function you wish to debug
args:
The arguments that need to be passed to f
kwargs:
Named arguments that must be passed to f
Returns
-------
None
Notes
-----
Taken from Wes McKinney's book Python for Data Analysis
"""
from IPython.core.debugger import Pdb
pdb = Pdb(color_scheme='Linux')
return pdb.runcall(f, *args, **kwargs)
示例2: debug
# 需要导入模块: from IPython.core.debugger import Pdb [as 别名]
# 或者: from IPython.core.debugger.Pdb import runcall [as 别名]
def debug(f, *args, **kwargs):
from pdb import Pdb as OldPdb
try:
from IPython.core.debugger import Pdb
kw = dict(color_scheme='Linux')
except ImportError:
Pdb = OldPdb
kw = {}
pdb = Pdb(**kw)
return pdb.runcall(f, *args, **kwargs)
示例3: debug
# 需要导入模块: from IPython.core.debugger import Pdb [as 别名]
# 或者: from IPython.core.debugger.Pdb import runcall [as 别名]
def debug(f, *args, **kwargs):
pdb = Pdb(color_scheme='Linux')
return pdb.runcall(f, *args, **kwargs)
示例4: debug
# 需要导入模块: from IPython.core.debugger import Pdb [as 别名]
# 或者: from IPython.core.debugger.Pdb import runcall [as 别名]
def debug( f, *args, ** kwargs):
from IPython.core.debugger import Pdb
pdb = Pdb( color_scheme='Linux')
return pdb.runcall(f, *args, **kwargs)
示例5: DataFrame
# 需要导入模块: from IPython.core.debugger import Pdb [as 别名]
# 或者: from IPython.core.debugger.Pdb import runcall [as 别名]
etd_plza_df = DataFrame(etd2('PLZA'))
etd_plza_df
# <codecell>
%%html
<iframe src="http://www.bart.gov/schedules/eta?stn=PLZA"/ width=800 height=600>
# <markdowncell>
# How to match the real time estimate with the schedule?
#
# Let's focus just on the next arrival.
#
# Might need
# Possible that a train is late
#
# In order to compare to schedule for a given station, need to know what route we're considering.
# <codecell>
from IPython.core.debugger import Pdb
pdb = Pdb()
pdb.runcall(bart.get_station_schedule, 'PLZA')
# <codecell>
stations_df.abbr
示例6: Pdb
# 需要导入模块: from IPython.core.debugger import Pdb [as 别名]
# 或者: from IPython.core.debugger.Pdb import runcall [as 别名]
# IPython Step by step debugging of the imported module
from IPython.core.debugger import Pdb
ipdb = Pdb()
ipdb.runcall(my_imported_function, args...)
示例7: debug
# 需要导入模块: from IPython.core.debugger import Pdb [as 别名]
# 或者: from IPython.core.debugger.Pdb import runcall [as 别名]
def debug(f,*args, **kwargs):
# allows arbitrarily calling debugger for a function. Press "c" to resume
# the function; press "s" to step through each line of the function
from IPython.core.debugger import Pdb
pdb = Pdb(color_scheme='Linux')
return pdb.runcall(f,*args, **kwargs)