On Tue, 6 Feb 2007, Maxim Veksler wrote:
Oh dear list,
Seek I, the he who shall can understand the wisdom of the ages. I call
you getopt magicians to join me in the holy path of decryption this
piece of ****.
I was reading denyhosts:
"""
(opts, getopts) = getopt.getopt(args, 'f:c:dinuvps?hV',
["file=", "ignore", "verbose",
"debug",
"help", "noemail", "config=",
"version",
"migrate", "purge", "daemon", "sync",
"upgrade099"])
"""
Python docs doesn't give much help either[1]. man getopt - nada useful.
Am I supposed to guess what 'f:c:dinuvps?hV' means or is it that
intuitive that I should be considering a career switch ASAP?
'f:c:dinuvps?hV': short options, colon means 'takes argument':
-f arg
-c arg
-d
-i
-n
-u
-v
-p
-s
-?
-h
-V
The vector has the long options. '=' means take argument. The order is
the same:
--file=arg
--ignore
--verbose
--debug
--help
--noemail
--config=arg
--version
--migrate
--purge
--daemon
--sync
--upgrade099
These are the valid command line arguments for the program you are
picking apart. To find out what they do refer to the docuentation of
that program or read the source. Options that do not take an arg return
a boolean in the relevant arg.
Plug: I am selling a Pythn book (Programming Python), see
http://p226.dyndns.org/books item 21
If you are in TA it could be yours tonight.
Peter
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]