MCPcopy Index your code
hub / github.com/python/cpython / doit

Function doit

Lib/tkinter/simpledialog.py:422–437  ·  view source on GitHub ↗
(root=root)

Source from the content-addressed store, hash-verified

420 def test():
421 root = Tk()
422 def doit(root=root):
423 d = SimpleDialog(root,
424 text="This is a test dialog. "
425 "Would this have been an actual dialog, "
426 "the buttons below would have been glowing "
427 "in soft pink light.\n"
428 "Do you believe this?",
429 buttons=["Yes", "No", "Cancel"],
430 default=0,
431 cancel=2,
432 title="Test Dialog")
433 print(d.go())
434 print(askinteger("Spam", "Egg count", initialvalue=12*12))
435 print(askfloat("Spam", "Egg weight\n(in tons)", minvalue=1,
436 maxvalue=100))
437 print(askstring("Spam", "Egg label"))
438 t = Button(root, text='Test', command=doit)
439 t.pack()
440 q = Button(root, text='Quit', command=t.quit)

Callers 2

bindMethod · 0.50
unbindMethod · 0.50

Calls 5

goMethod · 0.95
SimpleDialogClass · 0.85
askintegerFunction · 0.85
askfloatFunction · 0.85
askstringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…