def configure(self):
<EOL>path = os.getcwd() + '<STR_LIT:/>' + self.lazy_folder<EOL>if not os.path.exists(path):<EOL><INDENT>os.makedirs(path)<EOL><DEDENT>schema_file = self.schema_file<EOL>data_file = self.data_file<EOL>schema, data = Schema(), Schema()<EOL>try:<EOL><INDENT>schema.load(schema_file)<EOL><DEDENT>except IOError as e:<EOL><INDENT>self.prompt.error("<STR_LIT>" + schema_file + "<STR_LIT>")<EOL>schema = self.choose_schema(schema_file)<EOL><DEDENT>except (Exception, ValueError) as e:<EOL><INDENT>self.prompt.error("<STR_LIT>" + str(e) + "<STR_LIT>")<EOL>return False<EOL><DEDENT>else:<EOL><INDENT>sp, sf = os.path.split(schema_file)<EOL>self.prompt.success('<STR_LIT>' + self.lazy_folder + sf)<EOL><DEDENT>try:<EOL><INDENT>data.load(data_file)<EOL><DEDENT>except (Exception, IOError, ValueError) as e:<EOL><INDENT>self.prompt.error('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>sp, sf = os.path.split(data_file)<EOL>self.prompt.success('<STR_LIT>' + self.lazy_folder + sf)<EOL><DEDENT>data.internal = schema.internal<EOL>if data.data:<EOL><INDENT>m = Merge(schema.data, data.data)<EOL>mods = m.merge()<EOL>for a in mods['<STR_LIT>']:<EOL><INDENT>self.prompt.success('<STR_LIT>' + a + '<STR_LIT>')<EOL><DEDENT>for r in mods['<STR_LIT>']:<EOL><INDENT>self.prompt.error('<STR_LIT>' + r + '<STR_LIT>')<EOL><DEDENT>for k,m in mods['<STR_LIT>']:<EOL><INDENT>self.prompt.notice('<STR_LIT>' + k + '<STR_LIT>' + m[<NUM_LIT:0>] + '<STR_LIT>' + m[<NUM_LIT:1>] + '<STR_LIT:.>' )<EOL><DEDENT><DEDENT>else:<EOL><INDENT>data.data = schema.data<EOL><DEDENT>self.data = data<EOL>self.configure_data(data.data)<EOL>self.data.save(self.data_file)<EOL>self.add_ignore()<EOL>sp, sf = os.path.split(self.data_file)<EOL>self.prompt.success('<STR_LIT>' + self.lazy_folder + sf + '<STR_LIT:.>')<EOL>
The main configure function. Uses a schema file and an optional data file,
            and combines them with user prompts to write a new data file.