Ejemplo n.º 1
0
def traer_pres_desde_archivo2(archi_texto):
    f = open(archi_texto, "r")
    res = []
    t = f.readlines()
    f.close()
    for el in t:
        r = ap1.textoEnmedio(el, "<INICIO>", "<FINAL>")
        a = r.split('?')
        res.append(a)
    return res
Ejemplo n.º 2
0
def traer_pres_desde_archivo(archi_texto):
    f = open(archi_texto, "r")
    res=[] 	
    t = f.read()
    f.close()
    while True:
	    r=ap1.textoEnmedio(t, "<INICIO>", "<FINAL>")	
	    if (r==''):
		break
	    res.append(r) 
	    i=t.find("<FINAL>")	
	    t=t[i+7:]

    return res	
Ejemplo n.º 3
0
def traer_pres_desde_archivo2(archi_texto):
    f = open(archi_texto, "r")
    rest=[]
    res=[] 	
    t = f.readlines()
    f.close()
    #print t
    #sys.exit(0)	
    for el in t:
	    #print 'linea',el
	    r=ap1.textoEnmedio(el, "<INICIO>", "<FINAL>")
	    res.append(r)
	    #print el.split('?')[1][:-1]
	    kk=el.split('?')[1][:-1]
	    res.append(kk)
	    rest.append(res)	
	    res=[]
    return rest