Pls. help me recreate shell trick
fperez528 at yahoo.com
Thu Nov 22 18:06:04 CET 2001
Daniel Dittmar wrote:
>> This was achieved as follows:
>> $ECHO rm -r /
>> where ECHO was either set to "echo" or nothing according to a command
"""Execute a system command, but optionally print it.
With debug=1, only prints."""
stat = 0
if verbose or debug: print head+cmd
if not debug: stat = os.system(cmd)
More information about the Python-list