Код: Выделить всё
interact ← puts pdb into interactive Python mode
import sys
def myaudit(event, args):
print(f'audit: {event} with args={args}')
sys.addaudithook(myaudit)
ctrl-D ← exits pdb’s interactive Python mode
Код: Выделить всё
... sys.addaudithook(myaudit)
File "", line 3
sys.addaudithook(myaudit)
^^^
SyntaxError: invalid syntax
Подробнее здесь: https://stackoverflow.com/questions/788 ... own-sys-au