how to save LineEdit's input text to *.txt in python

0

I use python i want to save LineEdit's input text to *.txt but i don't have clue and run result Process finished with exit code -1073740791 (0xC0000409)

my guess if I input 123 at LineEdit. self.lineEdit.text() = 123 then InputTrainNum = self.lineEdit.text() result also 123. So I don't know why it can't run

self.Refresh.clicked.connect(self.lineEditChanged)


InputTrainNum = self.lineEdit.text()
DepotTrain = open('C:/log/monitorlog/DepotTrain.txt', 'r')
DepotTrain.write(InputTrainNum)
DepotTrain.close()

please show me your tips & guide i'm a rookie thank you

python
text
save
asked on Stack Overflow Feb 12, 2020 by Young • edited Feb 12, 2020 by Young

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0