function for printing text in a type writer manner
Project description
Module: typewriter
This module provides a function that prints out text in a typewriter manner
def typing(txt, text_speed=0.05):
for char in txt:
sys.stdout.write(char)
sys.stdout.flush()
if char != "\n":
time.sleep(text_speed)
else:
time.sleep(text_speed + 0.3)
else:
sys.stdout.write("\n")
- text: Argument that will be printing to the terminal
- text_speed: Specifies the time taken to pause after printing each character
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
leza_typewriter-1.0.0.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for leza_typewriter-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8250690fa50afdd4b6fbc9f2f20e00f6ed533668527fb3a886c6373b784e4ce |
|
MD5 | 22548d5f5569028f33b380805ba61c63 |
|
BLAKE2b-256 | 164e91a8fad2b58049fc1e1be24f510b8f90084a15e4293c64a968bc4e5de0d7 |