如何让 Perl 和 Python 打印正在执行的程序的每一行? [英] How can I make Perl and Python print each line of the program being executed?
本文介绍了如何让 Perl 和 Python 打印正在执行的程序的每一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道 bash -x script.sh
会在实际执行之前执行打印每一行的脚本.如何让 Perl 和 Python 解释器做同样的事情?
I know that bash -x script.sh
will execute script printing each line before actual execution.
How to make Perl and Python interpreters do the same?
推荐答案
Devel::Trace 是 Perl 的类似物,trace 模块是 Python 的.
Devel::Trace is the Perl analogue, the trace module is Python's.
这篇关于如何让 Perl 和 Python 打印正在执行的程序的每一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文