Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
pdb Namespace Reference

Data Structures

class  Pdb
 

Functions

def find_function
 
def run
 
def runeval
 
def runctx
 
def runcall
 
def set_trace
 
def post_mortem
 
def pm
 
def test
 
def help
 

Variables

list __all__
 
string line_prefix = '\n-> '
 
string TESTCMD = 'import x; x.main()'
 
string mainmodule = ''
 
string mainpyfile = ''
 

Function Documentation

def pdb.find_function (   funcname,
  filename 
)

Definition at line 18 of file pdb.py.

References aifc.open().

18 
19 def find_function(funcname, filename):
20  cre = re.compile(r'def\s+%s\s*[(]' % funcname)
21  try:
22  fp = open(filename)
23  except IOError:
24  return None
25  # consumer of this info expects the first line to be 1
26  lineno = 1
27  answer = None
28  while 1:
29  line = fp.readline()
30  if line == '':
31  break
32  if cre.match(line):
33  answer = funcname, filename, lineno
34  break
35  lineno = lineno + 1
36  fp.close()
37  return answer
38 
39 
40 # Interaction prompt line will separate file and call info from code
41 # text using value of line_prefix string. A newline and arrow may
42 # be to your liking. You can set it once pdb is imported using the
43 # command "pdb.line_prefix = '\n% '".
# line_prefix = ': ' # Use this to get the old situation back
def pdb.help ( )

Definition at line 918 of file pdb.py.

919 def help():
920  for dirname in sys.path:
921  fullname = os.path.join(dirname, 'pdb.doc')
922  if os.path.exists(fullname):
923  sts = os.system('${PAGER-more} '+fullname)
924  if sts: print '*** Pager exit status:', sts
925  break
926  else:
927  print 'Sorry, can\'t find the help file "pdb.doc"',
928  print 'along the Python search path'
def pdb.pm ( )

Definition at line 906 of file pdb.py.

References post_mortem().

907 def pm():
908  post_mortem(sys.last_traceback)
909 
910 
911 # Main program for testing
def pdb.post_mortem (   t)

Definition at line 899 of file pdb.py.

900 def post_mortem(t):
901  p = Pdb()
902  p.reset()
903  while t.tb_next is not None:
904  t = t.tb_next
905  p.interaction(t.tb_frame, t)
def pdb.run (   statement,
  globals = None,
  locals = None 
)

Definition at line 881 of file pdb.py.

882 def run(statement, globals=None, locals=None):
883  Pdb().run(statement, globals, locals)
def pdb.runcall (   args)

Definition at line 891 of file pdb.py.

892 def runcall(*args):
893  return apply(Pdb().runcall, args)
def pdb.runctx (   statement,
  globals,
  locals 
)

Definition at line 887 of file pdb.py.

References run().

888 def runctx(statement, globals, locals):
889  # B/W compatibility
890  run(statement, globals, locals)
def pdb.runeval (   expression,
  globals = None,
  locals = None 
)

Definition at line 884 of file pdb.py.

885 def runeval(expression, globals=None, locals=None):
886  return Pdb().runeval(expression, globals, locals)
def pdb.set_trace ( )

Definition at line 894 of file pdb.py.

895 def set_trace():
896  Pdb().set_trace()
897 
898 # Post-Mortem interface
def pdb.test ( )

Definition at line 914 of file pdb.py.

References run().

915 def test():
916  run(TESTCMD)
917 
# print help

Variable Documentation

list __all__
Initial value:
1 = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace",
2  "post_mortem", "help"]

Definition at line 15 of file pdb.py.

string line_prefix = '\n-> '

Definition at line 44 of file pdb.py.

tuple mainmodule = ''

Definition at line 929 of file pdb.py.

list mainpyfile = ''

Definition at line 930 of file pdb.py.

string TESTCMD = 'import x; x.main()'

Definition at line 912 of file pdb.py.