I have written a code in python which uses / to make a particular file in a folder, if I want to use the code in windows it will not work, is there a way by which I can use
Use os.path.join(). Example: os.path.join(pathfile,"output","log.txt").
os.path.join()
os.path.join(pathfile,"output","log.txt")
In your code that would be: rootTree.write(os.path.join(pathfile,"output","log.txt"))
rootTree.write(os.path.join(pathfile,"output","log.txt"))