This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients python-dev, serhiy.storchaka, terry.reedy
Date 2016-06-28.00:19:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467073176.05.0.962025454908.issue27380@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks, I will switch to True and False.

I am aware of the possibility of separately importing the constants, but like some others, I prefer the strings.  Compile-time checking is a good point, especially with no run tests.  In this case, test_query has 100% coverage of query.py.

Minor question: While trying to  use the new widget (instead of tkSimpledialog) in (editor.EditorWindow).open_module I had problems which I am trying to pin down by taking smaller steps.  As part of this, I tried this minimal code that uses Query.

from idlelib import query
from tkinter import Tk
root = Tk()
name = query.Query(root, "Open Module",
         "Enter the name of a Python module\n"
         "to search on sys.path and open:",).result
print(name)

It works fine except that entry.focus_set() is not working for me with this call (or else it is not staying set) even though it works fine when configdialog calls the SectionName subclass.  I know Windows is more troublesome than *nix about focus, but do you have any idea why calling Query this way, instead of as in the committed patch, would make a difference?
History
Date User Action Args
2016-06-28 00:19:36terry.reedysetrecipients: + terry.reedy, python-dev, serhiy.storchaka
2016-06-28 00:19:36terry.reedysetmessageid: <1467073176.05.0.962025454908.issue27380@psf.upfronthosting.co.za>
2016-06-28 00:19:35terry.reedylinkissue27380 messages
2016-06-28 00:19:32terry.reedycreate