Check to see if the script has been previously used?

Chris Angelico rosuav at gmail.com
Tue May 27 07:08:44 EDT 2014


On Tue, May 27, 2014 at 9:05 PM, Dave Angel <davea at davea.name> wrote:
> Preferred approach is usually to respond to one of the
>  conventional argv switches.  And let the user decide.

Yes, this is a technique I've used when doing up important (and
dangerous) MUD commands. The command will be something like "unload
foo" and it gives its first-time spam, or "unload confirm foo" to
suppress it and go straight to the potentially-dangerous action. With
shell commands, a -f or --force parameter would be common for that.

ChrisA



More information about the Python-list mailing list