I have created a GUI using PyQt and now I want to direct the input in QlineEdit into the text file. I have created get_values() method which prints the values from the text fields. How can I redirect those printed strings into the .txt file.
Here's the method:
def get_values(self) :
print self.lineEdit.text()
print self.lineEdit_2.text()
print self.lineEdit_3.text()
self.radio_button_clicked()
print self.lineEdit_5.text()
print self.lineEdit_6.text()