Package omero :: Module cli :: Class Arguments
[hide private]
[frames] | no frames]

Class Arguments

source code

Wrapper for arguments in all controls. All non-"_" control methods are assumed to take some representation of the command line. This can either be:

To simplify usage, this class can be used at the beginning of every method so:

   def method(self, args):
       args = Arguments(args)

and it will handle the above cases as well as wrapping other Argument instances. If the method takes varargs and it is desired to test for single argument of the above type, then use:

   args = Arguments(*args)
Instance Methods [hide private]
 
__init__(self, args=[]) source code
 
make_argmap(self) source code
 
firstOther(self) source code
 
popFirst(self) source code
 
shlex(self, input)
Used to split a string argument via shlex.split().
source code
 
__iter__(self) source code
 
__len__(self) source code
 
__str__(self) source code
 
join(self, text) source code
 
__getitem__(self, idx)
For every argument without an "=" we return True.
source code
Method Details [hide private]

shlex(self, input)

source code 

Used to split a string argument via shlex.split(). If the argument is not a string, then it is returned unchnaged. This is useful since the arg argument to all plugins can be either a list or a string.

__getitem__(self, idx)
(Indexing operator)

source code 

For every argument without an "=" we return True. Otherwise, the value following the first "=" is returned.