How to print python commands automatically?

Peng Yu pengyu.ut at
Fri Nov 9 00:12:58 CET 2012


In bash, set -v will print the command executed. For example, the
following screen output shows that the "echo" command is printed
automatically. Is there a similar thing in python?

~/linux/test/bash/man/builtin/set/-v$ cat
#!/usr/bin/env bash

set -v
echo "Hello World!"
~/linux/test/bash/man/builtin/set/-v$ ./
echo "Hello World!"
Hello World!


More information about the Python-list mailing list