i trying copy text mobilebuildsettings , use replace text abproject . getting following error , don't understand it. attributeerror: 'str' object has no attribute 'readlines' below code: with open("c:/abproject.build", "r+") script, open ("c:/tempfile.build","w+") newscript: abproject = ("c:/abproject.build") line in abproject.readlines(): if line == "@appidentifier@" : newabproject.write('"' + "appidentifier : " + '"' + appidentifier.get() + '"' + "\n") else: newabproject.write(line) abproject.close() newabproject.close() os.remove("abproject.txt") os.remove("tempfile.buil","abproject.txt") in order give answer jill1993's question , take moseskoledoye's answer : abproject = ("c:/abproject.build") abproject string object. furthermore, write : with open...
Comments
Post a Comment