Programming, Science, Python, Mathematics, Towards Data Science.
os.chdir(cwdir) def WriteToFile(space,iteration,interval): if(iteration%interval==0): dir_path=os.path.join(os.getcwd(),"Result") filename="PUV{0}.txt".format(iteration) path=os.path.join(dir_path,filename) with open(path,"w") as f: for i in range(space.rowpts): for j in range(space.colpts):