Indentation on .write() problem
I am currently writing a file that edits a python script but the main problem i am having is that when i input a line it wont have the right indentation. for example, lets say i have a for loop that is tabbed, when i call .write() on the file it won't take that indentation into account. I also cant read the indentation from the file then append to the text because when it reads the line from the file it doesn't return indentation. Any idea on how to indent when calling .write() on a file?
heres the code: http://pastebin.com/herGM3Yi
Posted May 29, 2016, 7:17 PM UTC · edited
45