Hello guys, i have managed to take some values from a text file and import them to a DB
now i need to close the file and delete it, it would be ok if just close it.
that way can overwrite the same file,
what Im getting is that the file is been use by java, i have tried to file.close but it says list object has no attribute close
Have a clue of what can i do?
adir = 'C:\\Control\\'
rFile = open(adir + 'kappa240.txt', 'r').readlines()
job = rFile.replace("job=", "")
product = rFile.replace("circuit=", "")
quantity = rFile.replace("quantity=", "")
print job, product, quantity
system.db.runUpdateQuery("INSERT INTO wokappa240 (job, circuit, qty) values (%s,%s,%s)" %(job, product, quantity))