Is there something similar to `set -v` of bash in python
Steve D'Aprano
steve+python at pearwood.info
Sat Sep 17 02:37:28 EDT 2016
On Sat, 17 Sep 2016 12:31 pm, Peng Yu wrote:
> Hi, `set -v` in bash allows the print of the command before print the
> output of the command.
>
> I want to do the similar thing --- print a python command and then
> print the output of the command. Is it possible with python?
There is no built-in command for this, but it would be an interesting
project for an advanced user to write a pre-processor that inserts calls to
print after every line.
--
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
More information about the Python-list
mailing list