Search Results

Search found 2 results on 1 pages for 'kpatelpro'.

Page 1/1 | 1 

  • Python (pdb) - Queueing up commands to execute

    - by kpatelPro
    I am implementing a "breakpoint" system for use in my Python development that will allow me to call a function that, in essence, calls pdb.set_trace(); Some of the functionality that I would like to implement requires me to control pdb from code while I am within a set_trace context. Example: disableList = [] def breakpoint(name=None): def d(): disableList.append(name) #**** #issue 'run' command to pdb so user #does not have to type 'c' #**** if name in disableList: return print "Use d() to disable breakpoint, 'c' to continue" pdb.set_trace(); In the above example, how do I implement the comments demarked by the #**** ? In other parts of this system, I would like to issue an 'up' command, or two sequential 'up' commands without leaving the pdb session (so the user ends up at a pdb prompt but up two levels on the call stack. Thanks!

    Read the article

1