My intention is to add a vertical bar to IDLE to indicate preferred line length at column 80.
I have tried to find a configuration option for the Text tkinter widget that would allow this but have found nothing.
I was hoping it would be a simple configuration option so I could just add a another item the text_options dictionary within EditorWindow.py found within Python\Lib\idlelib.
I am not sure how styles/themes work but do they have the capability to change the background colour of only 1 column in a Text widget?
Outline of possible solution:
.place()
to position the Frame at an appropriate horizontal coordinate.Possible issues:
Text.bbox("1.80")
looks promising, but doesn't work unless there actually are 80 characters in the line already. You may have to insert a dummy 80-character line at first, call update_idletasks
to get the Text to calculate positions, call bbox
to get the coordinates, then delete the dummy text. Repeat whenever the display font is changed.