Trees | Indices | Help |
---|
|
1 #!/usr/bin/python 2 # -*- coding: utf-8 -*- 3 4 # This program is free software: you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation, either version 3 of the License, or 7 # (at your option) any later version. 8 # 9 # This program is distributed in the hope that it will be useful, 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # GNU General Public License for more details. 13 import gtk 14 import os 1517 18 file=open(ruta,"w") 19 print "-------------------" 20 print "tamaño obj datos",len(fondo.tipo_obj_datos) 21 print "datos",fondo.objetos_datos 22 23 print "tamaño obj",len(fondo.tipo_obj) 24 print "obj",fondo.objetos 25 print "-------------------" 26 file.writelines("<fondo>") 27 file.write("\n") 28 file.writelines(str(fondo.FONDO)) 29 file.write("\n") 30 file.writelines(str(fondo.band)) 31 file.write("\n") 32 file.writelines(str(fondo.img)) 33 file.write("\n") 34 file.writelines("</fondo>") 35 file.write("\n") 36 file.writelines("<objeto_inicial>") 37 file.write("\n") 38 file.writelines(str(fondo.objetos[0].posicion)) 39 file.write("\n") 40 41 file.writelines("</objeto_inicial>") 42 file.write("\n") 43 44 for i in range(len(fondo.tipo_obj_datos)): 45 print fondo.tipo_obj_datos 46 if fondo.tipo_obj_datos[i]==7: 47 file.writelines("<objeto_dato>") 48 file.write("\n") 49 file.writelines(str(fondo.objetos_datos[i].ide)) 50 file.write("\n") 51 52 file.writelines(str(fondo.objetos_datos[i].posicion)) 53 file.write("\n") 54 55 file.writelines(str(fondo.objetos_datos[i].texto)) 56 file.write("\n") 57 58 file.writelines(str(fondo.objetos_datos[i].color)) 59 file.write("\n") 60 61 file.writelines(str(fondo.objetos_datos[i].modificable)) 62 file.write("\n") 63 64 file.writelines(str(fondo.objetos_datos[i].valor_cadena_no_mod)) 65 file.write("\n") 66 67 file.writelines(str(fondo.objetos_datos[i].cadena_intermedia)) 68 file.write("\n") 69 70 file.writelines(str(fondo.objetos_datos[i].cadena_final)) 71 file.write("\n") 72 73 file.writelines("</objeto_dato>") 74 file.write("\n") 75 76 if fondo.tipo_obj_datos[i]==6: 77 file.writelines("<objeto_dato_img>") 78 file.write("\n") 79 80 file.writelines(str(fondo.objetos_datos[i].imagenintermedia)) 81 file.write("\n") 82 83 file.writelines(str(fondo.objetos_datos[i].ide)) 84 file.write("\n") 85 86 file.writelines(str(fondo.objetos_datos[i].posicion)) 87 file.write("\n") 88 89 file.writelines(str(fondo.objetos_datos[i].texto)) 90 file.write("\n") 91 92 file.writelines(str(fondo.objetos_datos[i].color)) 93 file.write("\n") 94 95 file.writelines(str(fondo.objetos_datos[i].modificable)) 96 file.write("\n") 97 98 file.writelines(str(fondo.objetos_datos[i].valor_cadena_no_mod)) 99 file.write("\n") 100 101 file.writelines(str(fondo.objetos_datos[i].cadena_intermedia)) 102 file.write("\n") 103 104 file.writelines(str(fondo.objetos_datos[i].cadena_final)) 105 file.write("\n") 106 107 file.writelines("</objeto_dato_img>") 108 file.write("\n") 109 for i in range(len(fondo.tipo_obj)): 110 print fondo.tipo_obj 111 print i 112 113 if fondo.tipo_obj[i]==4: 114 file.writelines("<objeto_cero>") 115 file.write("\n") 116 117 118 file.writelines(str(fondo.objetos[i].ide)) 119 file.write("\n") 120 121 file.writelines(str(fondo.objetos[i].posicion)) 122 file.write("\n") 123 file.writelines(str(fondo.objetos[i].posicion2)) 124 file.write("\n") 125 file.writelines(str(fondo.objetos[i].color)) 126 file.write("\n") 127 128 file.writelines(str(fondo.objetos[i].texto)) 129 file.write("\n") 130 131 file.writelines("</objeto_cero>") 132 file.write("\n") 133 134 if fondo.tipo_obj[i]==5: 135 file.writelines("<objeto_bloque>") 136 file.write("\n") 137 138 139 file.writelines(str(fondo.objetos[i].ide)) 140 file.write("\n") 141 142 file.writelines(str(fondo.objetos[i].posicion)) 143 file.write("\n") 144 145 file.writelines(str(fondo.objetos[i].color)) 146 file.write("\n") 147 file.writelines(str(fondo.objetos[i].texto)) 148 file.write("\n") 149 file.writelines(str(fondo.objetos[i+1].posicion)) 150 file.write("\n") 151 file.writelines("</objeto_bloque>") 152 file.write("\n") 153 if fondo.tipo_obj[i]==1: 154 print " error:" , i 155 file.writelines("<objeto_componente>") 156 file.write("\n") 157 158 file.writelines(str(fondo.objetos[i].imagenintermedia)) 159 file.write("\n") 160 161 file.writelines(str(fondo.objetos[i].arg)) 162 file.write("\n") 163 164 file.writelines(str(fondo.objetos[i].ide)) 165 file.write("\n") 166 167 file.writelines(str(fondo.objetos[i].posicion)) 168 file.write("\n") 169 170 file.writelines(str(fondo.objetos[i].color)) 171 file.write("\n") 172 173 file.writelines(str(fondo.objetos[i].texto)) 174 file.write("\n") 175 176 file.writelines("</objeto_componente>") 177 file.write("\n") 178 179 file.close()180
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Sep 16 23:29:31 2012 | http://epydoc.sourceforge.net |