-
Notifications
You must be signed in to change notification settings - Fork 0
Other Functions
Homer Haddock edited this page Oct 1, 2024
·
1 revision
The pause
functions force Python to wait until a user resumes.
This can be used to show valuable information before and/or after the pause.
This allows values to be displayed while paused
import inputapi as inp
inp.otherFunc.pause.showValue()
Parameter | data type | default | purpose |
---|---|---|---|
*values | Any | No default | The values to be displayed on pause |
clearOnLoad | boolean | False |
Clears terminal before pausing |
clearWhenDone | boolean | False |
Clears terminal when resuming |
This just pauses, it does not take values.
import inputapi as inp
# Method 1
inp.pause()
# Method 2
inp.otherFunc.pause.standard()
Parameter | data type | default | purpose |
---|---|---|---|
clearOnLoad | boolean | False |
Clears terminal before pausing |
clearWhenDone | boolean | False |
Clears terminal when resuming |
Clearing the screen works because of os.system()
being able to call the clear
and cls
commands.
The clear
command works for MacOS and GNU/Linux but cls
only works for Windows.
Will clear the terminal regardless on operating system by figuring out what OS is currently running.
import inputapt as inp
# Method 1
inp.clearScreen()
# Method 2
inp.otherFunc.clearScreen.auto()
This allows you to pick what operating system command to be used. This doesn't provide much use in the wild.
import inputapi as inp
inp.otherFunc.clearScreen.manual()
Parameter | data type | default | Valid Values | purpose |
---|---|---|---|---|
OS | string | required |
windows , macos , or linux (Case insensitive) |
What OS command you want to be used |