def create_files(self): """Copy the files needed by the project into their directories""" for filepath in self.FILES: sourcefile = project_structure.source_file(filepath) destfilepath = os.path.join(self.project_dir, filepath) if not os.path.exists(filepath): open(destfilepath, 'w').write(sourcefile.read()) else: print >> sys.stderr, "File already exists: %s" % filepath
def create_files(self): """Create the directory structure for the project""" contemp = project_structure.source_file(self.contract_template_filepath) testtemp = project_structure.source_file(self.test_template_filepath) self.create_file(contemp, self.contract_filepath) self.create_file(testtemp, self.test_filepath)