code: def make_files(self):
          
  
          # get the files from the template
          files = []
          try:
              files = self.files()
          except AttributeError:
              self.term.print_info(u"No file in the template. Weird, but why not?")
  
          # get the substitutes intersecting the template and the cli
          try:
              for key in self.substitutes().keys():
                  if key not in self.substitutes_dict:
                      self.substitutes_dict[key] = self.substitutes()[key]
  
          except AttributeError:
              self.term.print_info(u"No substitute in the template.")
  
          working_dir = os.getcwd()
          # iteratively create the files
          for directory, name, template_file in files:
              if directory:
                  filepath = working_dir + '/' + directory + '/' + name
                  filename = directory + '/' + name
              else:
                  filepath = working_dir + '/' + name
                  filename = name
  
              # open the file to write into
              try:
                  output = open(filepath, 'w')
              except IOError:
                  self.term.print_error_and_exit(u"Can't create destination"\
                                                  " file: {0}".format(filepath))
  
              # open the template to read from
              if template_file:
                  input_file = join(dirname(__file__), template_file + '.txt')
  
                  # write each line of input file into output file,
                  # templatized with substitutes
                  try:
                      with open(input_file, 'r') as line:
                          template_line = Template(line.read())
                          try:
                              output.write(template_line.
                                  safe_substitute(self.substitutes_dict).encode('utf-8'))
                          except TypeError:
                              output.write(template_line.
                                  safe_substitute(self.substitutes_dict))
                      output.close()
                  except IOError:
                      self.term.print_error_and_exit(u"Can't create template file"\
                                                     ": {0}".format(input_file))
              else:
                  output.close() # the file is empty, but still created
  
              self.term.print_info(u"Creating file '{0}'"
                               .format(self.term.text_in_color(filename, TERM_YELLOW)))
docs: Create the files of the template.