Is there a similar mechanism in Python, to the effect set -x has on bash?
Here’s some example output from bash in this mode:
+ 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.XXX ++ p=/tmp/blkcache.c.o.2160.IKA ++ test 0 -eq 0 ++ echo /tmp/blkcache.c.o.2160.IKA + obj=/tmp/blkcache.c.o.2160.IKA
I’m aware of the Python trace module, however its output seems to be extremely verbose, and not high level like that of bash.
Perhaps use sys.settrace:
Use
traceit()to turn on tracing, usetraceit(False)to turn off tracing.yields