如何使Perl和Python打印正在执行的程序的每一行? [英] How can I make Perl and Python print each line of the program being executed?

查看:180
本文介绍了如何使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的类比,追踪模块是Python的。

Devel::Trace is the Perl analogue, the trace module is Python's.

这篇关于如何使Perl和Python打印正在执行的程序的每一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆