Lines Matching refs:config
252 self.config = config = ConfigParser.ConfigParser()
258 config.read(self.config_file)
264 config = self.config
265 for section in config.sections():
267 for option, value in config.items(section):
273 config = self.config
274 if config.has_option(OUTPUT_SECTION, OUTPUT_FILENAME):
275 config.filename = config.get(OUTPUT_SECTION, OUTPUT_FILENAME)
278 if config.filename == '' or config.filename == None:
279 config.filename = FileJustRoot(self.config_file) + ".JET"
280 config.chase_controllers = True
281 if config.has_option(OUTPUT_SECTION, OUTPUT_CHASE_CONTROLLERS):
283 … config.chase_controllers = config.getboolean(OUTPUT_SECTION, OUTPUT_CHASE_CONTROLLERS)
287 config.delete_empty_tracks = False
288 if config.has_option(OUTPUT_SECTION, OUTPUT_OMIT_EMPTY_TRACKS):
290 … config.delete_empty_tracks = config.getboolean(OUTPUT_SECTION, OUTPUT_OMIT_EMPTY_TRACKS)
294 config.copyright = None
295 if config.has_option(OUTPUT_SECTION, OUTPUT_COPYRIGHT):
296 config.copyright = config.get(OUTPUT_SECTION, OUTPUT_COPYRIGHT)
298 config.app_data = None
299 if config.has_option(OUTPUT_SECTION, OUTPUT_APP_DATA):
300 config.app_data = config.get(OUTPUT_SECTION, OUTPUT_APP_DATA)
309 if not config.has_section(segment_name):
318 segname = config.get(segment_name, SEGMENT_NAME)
319 filename = config.get(segment_name, SEGMENT_FILENAME)
320 if config.has_option(segment_name, SEGMENT_DLSFILE):
321 dlsfile = config.get(segment_name, SEGMENT_DLSFILE)
322 if config.has_option(segment_name, SEGMENT_START):
323 start = config.get(segment_name, SEGMENT_START)
324 if config.has_option(segment_name, SEGMENT_END):
325 end = config.get(segment_name, SEGMENT_END)
326 if config.has_option(segment_name, SEGMENT_LENGTH):
327 length = config.get(segment_name, SEGMENT_LENGTH)
328 if config.has_option(segment_name, SEGMENT_OUTPUT):
329 output = config.get(segment_name, SEGMENT_OUTPUT)
330 if config.has_option(segment_name, SEGMENT_QUANTIZE):
331 quantize = config.get(segment_name, SEGMENT_QUANTIZE)
332 if config.has_option(segment_name, SEGMENT_DUMP_FILE):
333 dump_file = config.get(segment_name, SEGMENT_DUMP_FILE)
335 if config.has_option(segment_name, SEGMENT_TRANSPOSE):
336 transpose = config.get(segment_name, SEGMENT_TRANSPOSE)
337 if config.has_option(segment_name, SEGMENT_REPEAT):
338 repeat = config.get(segment_name, SEGMENT_REPEAT)
339 if config.has_option(segment_name, SEGMENT_MUTE_FLAGS):
340 mute_flags = config.get(segment_name, SEGMENT_MUTE_FLAGS)
342 if config.has_option(segment_name, SEGMENT_END_MARKER):
343 end_marker = config.get(segment_name, SEGMENT_END_MARKER)
349 for jetevent, location in config.items(segment_name):
355 for jetevent, location in config.items(segment_name):
374 if not config.has_option(LIBRARY_SECTION, library_name):
376 libraries.append(config.get(LIBRARY_SECTION, library_name))
384 output_file = open(self.config.filename, 'wb')
397 if self.config.copyright is not None:
398 size = len(self.config.copyright) + 1
406 output_file.write(self.config.copyright)
412 if self.config.app_data is not None:
413 size = os.path.getsize(self.config.app_data)
421 with open(self.config.app_data, 'rb') as f:
439 …Events(segment.start, segment.end, segment.length, segment.quantize, self.config.chase_controllers)
442 if self.config.chase_controllers:
446 if self.config.delete_empty_tracks:
659 if self.config.filename == '' or self.config.filename == None:
660 self.config.filename = FileJustRoot(configFile) + ".JET"
661 config = ConfigParser.ConfigParser()
662 config.add_section(OUTPUT_SECTION)
663 config.set(OUTPUT_SECTION, OUTPUT_FILENAME, self.config.filename)
664 config.set(OUTPUT_SECTION, OUTPUT_CHASE_CONTROLLERS, self.config.chase_controllers)
665 config.set(OUTPUT_SECTION, OUTPUT_OMIT_EMPTY_TRACKS, self.config.delete_empty_tracks)
666 if self.config.copyright is not None:
667 config.set(OUTPUT_SECTION, OUTPUT_COPYRIGHT, self.config.copyright)
668 if self.config.app_data is not None:
669 config.set(OUTPUT_SECTION, OUTPUT_APP_DATA, self.config.app_data)
675 config.add_section(segment_name)
676 config.set(segment_name, SEGMENT_NAME, segment.segname)
677 config.set(segment_name, SEGMENT_FILENAME, segment.filename)
679 config.set(segment_name, SEGMENT_DLSFILE, segment.dlsfile)
683 config.set(segment_name, SEGMENT_START, segment.start)
685 config.set(segment_name, SEGMENT_END, segment.end)
687 config.set(segment_name, SEGMENT_LENGTH, segment.length)
688 config.set(segment_name, SEGMENT_OUTPUT, segment.output)
689 config.set(segment_name, SEGMENT_QUANTIZE, segment.quantize)
691 config.set(segment_name, SEGMENT_DUMP_FILE, segment.dump_file)
692 config.set(segment_name, SEGMENT_TRANSPOSE, segment.transpose)
693 config.set(segment_name, SEGMENT_REPEAT, segment.repeat)
694 config.set(segment_name, SEGMENT_MUTE_FLAGS, segment.mute_flags)
702 config.set(segment_name, clip_name, s)
707 config.set(segment_name, app_name, s)
711 config.set(segment_name, SEGMENT_END_MARKER, s)
716 config.add_section(LIBRARY_SECTION)
719 config.set(LIBRARY_SECTION, library_name, library)
724 config.write(cfgfile)
729 self.config.filename = FileJustRoot(configFile) + ".JET"
730 self.config.chase_controllers = True
731 self.config.delete_empty_tracks = False
732 self.config.copyright = None
733 self.config.app_data = None