def do_clear(self, arg): """cl(ear) filename:lineno\ncl(ear) [bpnumber [bpnumber...]] With a space separated list of breakpoint numbers, clear those breakpoints. Without argument, clear all breaks (but first ask confirmation). With a filename:lineno argument, clear all breaks at that line in that file. """ # The method is overridden for systems where cwd is at different place # than the main script, e.g. Kodi mediacenter built-in Python. orig_cwd = os.getcwd() try: os.chdir( os.path.dirname( os.path.abspath(self.curframe.f_code.co_filename))) Pdb.do_clear(self, arg) finally: os.chdir(orig_cwd)