Author terry.reedy
Recipients Al.Sweigart, kbk, markroseman, ncoghlan, ned.deily, python-dev, roger.serwy, serhiy.storchaka, terry.reedy
Date 2016-05-28.20:30:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have a new idea for public interfaces: keep most of idlelib private and add a new 'interface' module containing public interfaces.  It could be backported to 3.5 and even 2.7.

This was prompted by working with turtledemo.  It currently imports textview, percolator, and colorizer to create a colorized code viewer.  At the moment, changing the names in the three imports worked, but that could change if any of the files are refactored.  (And what about people who have trouble hooking the three components together correctly?)

Instead, lets create, say, class ColorCodeview (or maybe a function) in interface and have turtledemo do one import, say 'from idlelib.interface import ColorCodeview'.  The internal code code would be slilghtly different in each of 2.7, 3.5, and 3.6 (and maybe different again sometime after the initial commit).  But the import and basic use should be the same.

The only thing I might put in the main idlelib doc would be something like 'See the interface module for currently supported external uses of idlelib components."
Date User Action Args
2016-05-28 20:30:50terry.reedysetrecipients: + terry.reedy, kbk, ncoghlan, ned.deily, roger.serwy, markroseman, python-dev, Al.Sweigart, serhiy.storchaka
2016-05-28 20:30:50terry.reedysetmessageid: <>
2016-05-28 20:30:50terry.reedylinkissue24225 messages
2016-05-28 20:30:50terry.reedycreate