MCPcopy Index your code
hub / github.com/RustPython/RustPython / doit

Function doit

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected