I want to replace a String in a file, so I made this method in a class
class Utils:
def replaceJS(self, archive):
myfile = open(archive, "r+")
for line in myfile:
line.replace('https://kozea.github.io/pygal.js/2.0.x/pygal-tooltips.min.js', "pygal-tooltips.min.js")
myfile.close()
What I expect is to open the archive, read every line and replace https://kozea.github.io/pygal.js/2.0.x/pygal-tooltips.min.js for pygal-tooltips.min.js
When I call the function I dont get any error but the line stills there without changes