def _getDebugger(self):
dbg = pdb.Pdb()
try:
import readline
except ImportError:
print "readline module not available"
hasattr(sys, 'exc_clear') and sys.exc_clear()
for path in ('.pdbrc', 'pdbrc'):
if os.path.exists(path):
try:
rcFile = file(path, 'r')
except IOError:
hasattr(sys, 'exc_clear') and sys.exc_clear()
else:
dbg.rcLines.extend(rcFile.readlines())
return dbg
评论列表
文章目录