human
Complete this python program:
def GenerateFrozenResource(rc_name, output_name, h_name=None):
assistant
#Here is the Python code you requested.

    """Converts an .rc windows resource source file into a python source file
    with the same basic public interface as the rest of this module.
    Particularly useful for py2exe or other \freeze\ type solutions,
    where a frozen .py file can be used inplace of a real .rc file.
    """
    rcp = Parse(rc_name, h_name)
    in_stat = os.stat(rc_name)
    out = open(output_name, 'wt')
    out.write(('#%s\n' % output_name))
    out.write(('#This    is    a    generated    file.    Please    edit    %s    instead.\n' % rc_name))
    out.write(('__version__=%r\n' % __version__))
    out.write(('_rc_size_=%d\n_rc_mtime_=%d\n' % (in_stat[stat.ST_SIZE], in_stat[stat.ST_MTIME])))
    out.write('class    StringDef:\n')
    out.write(' DCTB def    __init__(self,    id,    idNum,    value):\n')
    out.write(' DCTB  DCTB self.id    =    id\n')
    out.write(' DCTB  DCTB self.idNum    =    idNum\n')
    out.write(' DCTB  DCTB self.value    =    value\n')
    out.write(' DCTB def    __repr__(self):\n')
    out.write(' DCTB  DCTB return    "StringDef(%r,    %r,    %r)"    %    (self.id,    self.idNum,    self.value)\n')
    out.write('class    FakeParser:\n')
    for name in ('dialogs', 'ids', 'names', 'bitmaps', 'icons', 'stringTable'):
        out.write((' DCTB %s    =    \\\n' % (name,)))
        pprint.pprint(getattr(rcp, name), out)
        out.write('\n')
    out.write('def    Parse(s):\n')
    out.write(' DCTB return    FakeParser()\n')
    out.close()