Hi,
I've done a set of operations on some text files using a someexecutuble.jar file, which is internally calling some python scripts. Post that, in same location, my jar created some log files.
However, i'm not able to re-direct the log files to some other location in my windows directory. I tried the below code
def printValReport(fileName, errorList, warningList):
logPath = 'C:\Users\arjun_arippa\Desktop\log\'
if errorList:
fp = open(fileName + "_reviewErrors.log","a+")
for err in errorList:
print >> fp , err
os.rename(fileName + "_reviewErrors.log", logPath)
However the same is not working. I tried with:
shutil.move(fileName + "_reviewErrors.log", logPath + fileName + "_reviewErrors.log")
Still not working.. can someone please help me how to do the same in python code itself rather than making any changes in the java code calling my python scirpts.
Thanks,
Arjun