New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDLE: revise zzdummy.py #76812
Comments
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. |
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. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: