Python可以生成类似于bash的set -x的跟踪吗?

Python可以生成类似于bash的set -x的跟踪吗?

在 Python中是否有类似的机制,-b对bash有效果? 以下是此模式下bash的一些示例输出: + for src in cpfs.c log.c popcnt.c ssse3_popcount.c blkcache.c context.c types.c device.c++ my_mktemp blkcache.c.o+++ mktemp -t blkcache.c.o.2160.X