34.3 mlhub mlask

from mlhub import mlask

mlask()

mlask("Press Enter to display the graphic")

mlask(begin=True)

mlask(end=True)

mlask(begin="Finish reading the above.\n\n")

mlask(prompt="Once you have read the above text press Enter")

The mlask function displays a prompt to request the user to Press Enter to continue:. The program then waits for the user to press the Enter key. This is used to stop a demo to allow the user to read some text before continuing with the demo.

An optional prompt= can be provided to replace the default. It is the first parameter. The second and third parameters, begin= and end= control the spacing for the prompt. Both are effectively False by default. If begin=True then a blank line is emitted before the prompt. If end=True then a carriage return is emitted after the user’s input. Either or both can also be any string to print before or after the prompt.

Note that from Version 3.9.7 the order of the parameters for mlask was changed so that the default argument (first) became prompt= rather than the order of begin=, end=, and prompt=. The natural inclination in using mlask is to provide a prompt string, so that is the first parameter now. The other parameters are refinements on how the spacing around the prompt works.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0