def indicate_error(root, alternative, callback, force=False):
    "Prepare to shake the application's root window."
    if force:
        tkinter._tkinter.setbusywaitinterval(20)
    elif tkinter._tkinter.getbusywaitinterval() != 20:
        # Show error message if not running at 50 FPS.
        alternative.show()
        return callback()
    root.after_idle(_shake, root, callback)
Prepare to shake the application's root window.
recipes/Python/577633_Directory_Pruner_2/recipe-577633.py