Pls. help me recreate shell trick

Nicola Musatti objectway at
Fri Nov 23 14:09:36 CET 2001

In my shell programs I used to find it useful to provide a test option
which only printed non recoverable commands, instead of executing them.

This was achieved as follows:

$ECHO rm -r /

where ECHO was either set to "echo" or nothing according to a command
line switch. Have you any suggestion on how can I achieve something
similar in Python?

Nicola Musatti

More information about the Python-list mailing list