コード例 #1
0
def load_config(tricks_file_pathname):
  """
  Loads the YAML configuration from the specified file.

  :param tricks_file_path:
      The path to the tricks configuration file.
  :returns:
      A dictionary of configuration information.
  """
  content = read_text_file(tricks_file_pathname)
  config = yaml.load(content)
  return config
コード例 #2
0
 def handler(e):
     path = e.src_path
     if path.endswith('.txt'):
         self.callback(path, read_text_file(path))
コード例 #3
0
 def process_all_schedules(self):
     for filename in glob.glob(self.schedule_dir + '/*.txt'):
         filename = os.path.abspath(filename)
         self.process_schedule(filename, read_text_file(filename))