def writeOutPutFile(dico, filename, st_add=''):
    st = ''
    for clas in list(dico.keys()):
        st += (dico[clas]['desc'] + '\n')
        Params = dico[clas]['parameters']
        for i in range(len(list(Params.keys()))):
            ok = 0
            for (j, param) in enumerate(Params.keys()):
                if (i == Params[param]['numero']):
                    ok = 1
                    break
            if (ok == 0):
                print('pb', clas, 'nmero', i, 'params', Params)
                (1 / 0)
            if (len(list(Params[param]['dict'].keys())) == 0):
                st += (('  attr ' + Params[param]['desc']) + '\n')
                pass
            str_dico = (('  attr ' + param) + ' chaine(into=[')
            for dic in list(Params[param]['dict'].keys()):
                str_dico += (('"' + dic) + '",')
                pass
            if (len(list(Params[param]['dict'].keys())) > 0):
                desc = Params[param]['desc'].split()[2:]
                st += (((str_dico + ']) ') + ' '.join(desc)) + '\n')
                pass
            pass
        for ref in dico[clas]['refs']:
            st += (((('  ref ' + ref[0]) + ' ') + ref[1]) + '\n')
            pass
        pass
    st = st.replace(' double ', ' floattant ')
    st = st.replace(' flag ', ' rien ')
    st = st.replace(' int ', ' entier ')
    st = st.replace("'", "\\'")
    st = st.replace("\\\\'", "\\'")
    fi = open(filename, 'w')
    fi.write(st_add)
    fi.write(st)
    fi.write('\n')
    fi.close()
    return
def writeOutPutFile(dico, filename, st_add=):
    st = 
    for clas in list(dico.keys()):
        st += (dico[clas]['desc'] + '\n')
        Params = dico[clas]['parameters']
        for i in range(len(list(Params.keys()))):
            ok = 0
            for (j, param) in enumerate(Params.keys()):
                if (i == Params[param]['numero']):
                    ok = 1
                    break
            if (ok == 0):
                print('pb', clas, 'nmero', i, 'params', Params)
                (1 / 0)
            if (len(list(Params[param]['dict'].keys())) == 0):
                st += (('  attr ' + Params[param]['desc']) + '\n')
                pass
            str_dico = (('  attr ' + param) + ' chaine(into=[')
            for dic in list(Params[param]['dict'].keys()):
                str_dico += (('"' + dic) + '",')
                pass
            if (len(list(Params[param]['dict'].keys())) > 0):
                desc = Params[param]['desc'].split()[2:]
                st += (((str_dico + ']) ') + ' '.join(desc)) + '\n')
                pass
            pass
        for ref in dico[clas]['refs']:
            st += (((('  ref ' + ref[0]) + ' ') + ref[1]) + '\n')
            pass
        pass
    st = st.replace(' double ', ' floattant ')
    st = st.replace(' flag ', ' rien ')
    st = st.replace(' int ', ' entier ')
    st = st.replace("'", "\\'")
    st = st.replace("\\\\'", "\\'")
    fi = open(filename, 'w')
    fi.write(st_add)
    fi.write(st)
    fi.write('\n')
    fi.close()
    return