I have been trying to solve this issue. I have written:
file.write("pyautogui.write(" + "'" + textEntry + "'" + ")")
but in the file that is written to, the following is written:
pyautogui.write('test
')
I want it all to be on one line. Does anyone know the cause for this? I have tried fixing it, but to no avail.