is that pdb raises BdbQuit on exit, which is then caught by --pdb, showing an unwanted pdb prompt. Fix it by making --pdb to ignore BdbQuit --HG-- branch : trunk