-2

recently I'm learning Python standard library and reading the source code

help for understanding I copy code segment and paste to python interpreter

but I feel it's inefficient and unwise ('cause import module won't got the _)

I wanna to find a efficient way to test a module, include the _var and _func()

thanks for any good idea -- a green man

Rancho
  • 1,988
  • 2
  • 12
  • 12

1 Answers1

0

The module pdb is an interactive source code debugger for Python programs.

import pdb
pdb.set_trace() #  insert this line at the location you want to break

Documentation is provided here : pdb

Chr
  • 875
  • 1
  • 10
  • 27