classification
Title: IDLE: revise zzdummy.py
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: terry.reedy
Priority: normal Keywords: patch

Created on 2018-01-23 06:57 by terry.reedy, last changed 2021-01-05 09:18 by terry.reedy. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14491 merged cheryl.sabella, 2019-07-01 00:45
PR 24114 merged terry.reedy, 2021-01-05 07:46
PR 24115 merged terry.reedy, 2021-01-05 08:36
Messages (5)
msg310473 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-01-23 06:57
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 #31480, will likely need more changes.
msg384372 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-05 07:26
New changeset e40e2a2cc94c554e7e245a8ca5a7432d31a95766 by Cheryl Sabella in branch 'master':
bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
https://github.com/python/cpython/commit/e40e2a2cc94c554e7e245a8ca5a7432d31a95766
msg384376 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-05 08:26
New changeset d82392facefe0564dd55aa2adf04bf21c704858d by Terry Jan Reedy in branch '3.9':
[3.9] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
https://github.com/python/cpython/commit/d82392facefe0564dd55aa2adf04bf21c704858d
msg384377 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-05 08:42
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.
msg384378 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-05 09:18
New changeset a087a97438e922fcace357ff4c29806ff65838d8 by Terry Jan Reedy in branch '3.8':
[3.8] bpo-32631: IDLE: Enable zzdummy example extension module (GH-14491)
https://github.com/python/cpython/commit/a087a97438e922fcace357ff4c29806ff65838d8
History
Date User Action Args
2021-01-05 09:18:33terry.reedysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-01-05 09:18:11terry.reedysetmessages: + msg384378
2021-01-05 08:42:02terry.reedysetmessages: + msg384377
versions: + Python 3.8
2021-01-05 08:36:43terry.reedysetpull_requests: + pull_request22945
2021-01-05 08:26:05terry.reedysetmessages: + msg384376
2021-01-05 07:46:21terry.reedysetpull_requests: + pull_request22944
2021-01-05 07:26:50terry.reedysetmessages: + msg384372
2020-06-13 16:22:39cheryl.sabellasetversions: + Python 3.9, Python 3.10, - Python 3.6, Python 3.7
2019-07-01 00:45:28cheryl.sabellasetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request14308
2018-01-23 06:57:24terry.reedycreate