(self, fname)
Write constants.
Write constants.
Write constants .
def write_consts(self, fname):
    """Write constants."""
    imports = [
        "# pylint: disable=invalid-name",
    ]
    with open(fname, "w") as f:
      f.write(self.make_header(imports))
      f.write(codegen_util.comment_line("Constants") + "\n")
      for name, value in self.consts_dict.items():
        f.write("{0} = {1}\n".format(name, value))
      f.write("\n" + codegen_util.comment_line("End of generated code"))
def write_consts ( self , fname ) : imports = [ "# pylint: disable=invalid-name" , ] with open ( fname , "w" ) as f : f . write ( self . make_header ( imports ) ) f . write ( codegen_util . comment_line ( "Constants" ) + "\n" ) for name , value in self . consts_dict . items ( ) : f . write ( "{0} = {1}\n" . format ( name , value ) ) f . write ( "\n" + codegen_util . comment_line ( "End of generated code" ) )