Commit db067e56 by Juan Pablo dure

migro a subproceso

1 parent f4670ac4
from datetime import datetime
from time import sleep
import os
import os, subprocess
from configuracion import *
import pandas as pd
......@@ -69,12 +69,15 @@ class FosaDiaria():
def _BuscarExcelDescargado(self,tmp):
rta = False
cmd = f"""ls {self.CarpetaDescarga} -ls |grep {self.cabezaera}| grep xls | grep -v crdownload &>{tmp}"""
os.system(cmd)
cmd = f"""ls {self.CarpetaDescarga} -ls |grep {self.cabezaera}| grep xls | grep -v crdownload""".split(" ")
rte = subprocess.check_output(cmd)
#os.system(cmd)
print(cmd)
sleep(0.1)
file1 = open(tmp, 'r')
Lines = file1.readlines()
print(rte)
Lines = str(rte).split("\n")
#sleep(0.1)
#file1 = open(tmp, 'r')
#Lines = file1.readlines()
for line in Lines:
der = str(line).split(" ")
#print(1,type(line),type(der))
......@@ -83,7 +86,7 @@ class FosaDiaria():
#print(3,line,der,der[-1],archivo)
print(archivo)
rta = archivo
file1.close()
#file1.close()
os.system(f"""rm {tmp}""")
return rta
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!