Is there something similar to `set -v` of bash in python

Thorsten Kampe thorsten at thorstenkampe.de
Sat Sep 17 06:30:24 EDT 2016


* Thorsten Kampe (Sat, 17 Sep 2016 12:25:05 +0200)
> 
> * Peng Yu (Fri, 16 Sep 2016 21:31:37 -0500)
> > 
> > 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?
> 
> Rather easily. I've implemented it some time ago like this:

Oops, I mixed it up with `set -x`, sorry.

Thorsten




More information about the Python-list mailing list