parameters: (bin_name='windmill')
docstring: Print windmill command line help.
docstring_summary: Print windmill command line help.
docstring_tokens: Print windmill command line help .
function: def help(bin_name='windmill'):
      """Print windmill command line help."""
      bin_name = 'windmill'
      module = sys.modules[__name__]
      from windmill.conf import global_settings
      all_option_names = []
      options_string = []
      for option in [getattr(module, x) for x in dir(module) if (
                     hasattr(getattr(module, x), 'option_names')) and (
                     getattr(module, x).__doc__ is not None ) ]:
          all_option_names.append(option.option_names)
          if hasattr(option, 'setting'):
              if getattr(global_settings, option.setting, None) is not None:
                  default = ' Defaults to %s' % str(getattr(global_settings, option.setting, None))
              else:
                  default = ''
          else:
              default = ''
          if option.option_names[0] is None:
              if not issubclass(option, GeneralBool):
                  options_string.append('    '+''.join([str(option.option_names[1])+'='+' :: ', 
                                        option.__doc__]) + default)
              else:
                  options_string.append('    '+''.join([str(option.option_names[1])+' :: ', 
                                        option.__doc__]) + default)
          else:
              if not issubclass(option, GeneralBool):
                  options_string.append('    '+''.join([
                                        '-'+str(option.option_names[0])+', '
                                        +str(option.option_names[1])+'='+' :: ',
                                        option.__doc__]) + default)
              else:
                  options_string.append('    '+''.join([
                                        '-'+str(option.option_names[0])+', '
                                        +str(option.option_names[1])+' :: ',
                                        option.__doc__]) + default)
  
      preamble = """windmill web test automation system.
      %s [-%s] action [option=value] [firefox|ie|safari] [http://www.example.com]
      
  Available Actions:
      shell         Enter the windmilll shell environment (modified python shell). 
                    Uses ipython if installed. Exit using ^d
      run_service   Run the windmill service in foreground. Kill using ^c.
      
  Available Options:""" % ( bin_name,
                           ''.join([ o[0] for o in all_option_names if o[0] is not None ]) 
                          )
      print preamble
      print '\n'.join(options_string)
function_tokens: def help ( bin_name = 'windmill' ) : bin_name = 'windmill' module = sys . modules [ __name__ ] from windmill . conf import global_settings all_option_names = [ ] options_string = [ ] for option in [ getattr ( module , x ) for x in dir ( module ) if ( hasattr ( getattr ( module , x ) , 'option_names' ) ) and ( getattr ( module , x ) . __doc__ is not None ) ] : all_option_names . append ( option . option_names ) if hasattr ( option , 'setting' ) : if getattr ( global_settings , option . setting , None ) is not None : default = ' Defaults to %s' % str ( getattr ( global_settings , option . setting , None ) ) else : default = '' else : default = '' if option . option_names [ 0 ] is None : if not issubclass ( option , GeneralBool ) : options_string . append ( '    ' + '' . join ( [ str ( option . option_names [ 1 ] ) + '=' + ' :: ' , option . __doc__ ] ) + default ) else : options_string . append ( '    ' + '' . join ( [ str ( option . option_names [ 1 ] ) + ' :: ' , option . __doc__ ] ) + default ) else : if not issubclass ( option , GeneralBool ) : options_string . append ( '    ' + '' . join ( [ '-' + str ( option . option_names [ 0 ] ) + ', ' + str ( option . option_names [ 1 ] ) + '=' + ' :: ' , option . __doc__ ] ) + default ) else : options_string . append ( '    ' + '' . join ( [ '-' + str ( option . option_names [ 0 ] ) + ', ' + str ( option . option_names [ 1 ] ) + ' :: ' , option . __doc__ ] ) + default ) preamble = """windmill web test automation system.
      %s [-%s] action [option=value] [firefox|ie|safari] [http://www.example.com]
      
  Available Actions:
      shell         Enter the windmilll shell environment (modified python shell). 
                    Uses ipython if installed. Exit using ^d
      run_service   Run the windmill service in foreground. Kill using ^c.
      
  Available Options:""" % ( bin_name , '' . join ( [ o [ 0 ] for o in all_option_names if o [ 0 ] is not None ] ) ) print preamble print '\n' . join ( options_string )