commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r7540 - trunk/gnue-common/src/apps


From: reinhard
Subject: [gnue] r7540 - trunk/gnue-common/src/apps
Date: Wed, 11 May 2005 09:29:34 -0500 (CDT)

Author: reinhard
Date: 2005-05-11 09:29:33 -0500 (Wed, 11 May 2005)
New Revision: 7540

Modified:
   trunk/gnue-common/src/apps/CommandOption.py
Log:
Added comments. Thanks to Niklas Rydberg.


Modified: trunk/gnue-common/src/apps/CommandOption.py
===================================================================
--- trunk/gnue-common/src/apps/CommandOption.py 2005-05-09 11:31:23 UTC (rev 
7539)
+++ trunk/gnue-common/src/apps/CommandOption.py 2005-05-11 14:29:33 UTC (rev 
7540)
@@ -23,13 +23,35 @@
 #
 # DESCRIPTION:
 """
+Command option available to GBaseApp and descendants. Usualy asigned with 
+the function addCommandOption.
 """
 
-
 class CommandOption:
   def __init__(self, name, shortOption=None, longOption=None,
                acceptsArgument=False, default=None, argumentName=None,
                help="", category="general", action=None, argument=None):
+    """
+    @param name: The key name that will be avaliable  in the self.OPTION 
+        dictionary when the application is executing.
+    @param shortOption: Single letter to be assignd to this option.
+    @param longOption: The long option name that is prepended with -- on the 
+        command line.
+    @param acceptsArgument: True if the option requires a value to be 
+        assigned from the command line.
+    @param default: Default value if the option is not passed in via the 
+        command line.
+    @param argumentName: Same as argument, overridden by argument.
+    @param help: Description of the option as displayed in help text.
+    @param category: Used to create groups of command options, where groups 
+        "base", "dev", "connections" and "general" are predefined. There is 
+        an option --help-dev, --help-connections to give a special help-text 
+        for these groups of options.
+    @param action: Function-pointer; if supplied this function will be called
+        automatically if the option is given on command line.
+    @param argument: Option argument as shown in help text. Same as 
+        argumentName.
+   """
 
     self.name = name
     self.shortOption = shortOption





reply via email to

[Prev in Thread] Current Thread [Next in Thread]