def CronInfo(self, now=None, output=sys.stdout):
    if len(self.args) != 1:
      self.parser.error('Expected a single <directory> argument.')
    if now is None:
      now = datetime.datetime.now()

    basepath = self.args[0]
    cron_entries = self._ParseCronYaml(basepath)
    if cron_entries and cron_entries.cron:
      for entry in cron_entries.cron:
        description = entry.description
        if not description:
          description = '<no description>'
        print >>output, '\n%s:\nURL: %s\nSchedule: %s' % (description,
                                                          entry.url,
                                                          entry.schedule)
        schedule = groctimespecification.GrocTimeSpecification(entry.schedule)
        matches = schedule.GetMatches(now, self.options.num_runs)
        for match in matches:
          print >>output, '%s, %s from now' % (
              match.strftime('%Y-%m-%d %H:%M:%S'), match - now)
Returns a field function to return an attribute of the item.
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/tools/appcfg.py/AppCfgApp.CronInfo--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_GetItemAttr