You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zzdummy.py is needed for properly testing the extension mechanism. It is intended to provide an example extension for users to follow. When completed, enabled, and invoked, it will prefix every line of a window with some text, or remove the prefix from every line. It would be even better to make it respect selections, as other format options do.
Needed: more comments, including what it does when enabled; docstring for z_in_event; uncomment z_in_event; code for z_out_event.
Should the extension have a different name? ZzTestExample? ZzIgnoreThis? Changing an extension name would normally be a bad idea, as it would disable any customizations. But I think we could do it for this one if desired.
The default insertion text could be more informative: for instance, 'ignore this' or 'see-doc' or #ignore#. The last would make it a configurable comment/uncomment. Normally, changing a default is a no-no, as it can mess up user configurations. But since the current text is inoperative, this should not matter here.
The menu defs are commented out because enabling the extension currently has no effect, so the menu entries would be useless.
***There should be help text for the extension tab explaining the presence and operation of the extension. (This should have been done already.)
Extension tests, last revised in bpo-31480, will likely need more changes.
My intention was that in the absence of a selection, all lines should be prefixed, not just the current one. My impression is that some other formatters do this, but maybe not. In any case, it does not matter exactly what this dummy example does, as long as it works as documented.
Activity
terryjreedy commentedon Jan 23, 2018
zzdummy.py is needed for properly testing the extension mechanism. It is intended to provide an example extension for users to follow. When completed, enabled, and invoked, it will prefix every line of a window with some text, or remove the prefix from every line. It would be even better to make it respect selections, as other format options do.
Needed: more comments, including what it does when enabled; docstring for z_in_event; uncomment z_in_event; code for z_out_event.
Should the extension have a different name? ZzTestExample? ZzIgnoreThis? Changing an extension name would normally be a bad idea, as it would disable any customizations. But I think we could do it for this one if desired.
The default insertion text could be more informative: for instance, 'ignore this' or 'see-doc' or #ignore#. The last would make it a configurable comment/uncomment. Normally, changing a default is a no-no, as it can mess up user configurations. But since the current text is inoperative, this should not matter here.
The menu defs are commented out because enabling the extension currently has no effect, so the menu entries would be useless.
***There should be help text for the extension tab explaining the presence and operation of the extension. (This should have been done already.)
Extension tests, last revised in bpo-31480, will likely need more changes.
terryjreedy commentedon Jan 5, 2021
New changeset e40e2a2 by Cheryl Sabella in branch 'master':
bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
e40e2a2
terryjreedy commentedon Jan 5, 2021
New changeset d82392f by Terry Jan Reedy in branch '3.9':
[3.9] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
d82392f
terryjreedy commentedon Jan 5, 2021
https://stackoverflow.com/questions/65567057/how-can-i-get-started-developing-extensions-for-python-idle prompted me to finish this enough to merge it.
My intention was that in the absence of a selection, all lines should be prefixed, not just the current one. My impression is that some other formatters do this, but maybe not. In any case, it does not matter exactly what this dummy example does, as long as it works as documented.
terryjreedy commentedon Jan 5, 2021
New changeset a087a97 by Terry Jan Reedy in branch '3.8':
[3.8] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
a087a97