The read me says:
Copy IDLE2HTML.py to your the idlelib folder of your python installation. Append the contents of 'config-extensions.txt' to your 'config-extensions.def' file (also in the idlelib folder) and restart IDLE.
For more information on extending IDLE read 'config-main.def', 'config-extensions.def' and 'extend.txt'
Here is the code I am supposed to append from the txt file to the def file:
[IDLE2HTML]
enable=1
[IDLE2HTML_bindings]
idle2html=
My attempts to search for an answer led me to this post that had this code:
with open("test.txt", "a") as myfile:
myfile.write("appended text")
but I had a few questions:
- Would that code work on a .def file or would only work for a .txt file
- The text I need to append is 4 lines, would I just have to run it 4 times using each of the four times as an input?
- Is there a way to append the .txt file directly on to the .def file?
Thanks in advance to any help I can get, I realize this is probably a very noob-y question but I am learning Python by following an online class and I have yet to learn how to work w/ reading and writing files.