Skip to main content

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


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 details)

Uploaded Source

Built Distribution

leza_typewriter-1.0.0-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file leza_typewriter-1.0.0.tar.gz.

File metadata

  • Download URL: leza_typewriter-1.0.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for leza_typewriter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf4044e1c8dd143f720a2c38d4e2662b8c8cb599a44ed337fa900afa21eac95c
MD5 efb583d3c933421e0e936f658c18644c
BLAKE2b-256 e9957a2a6db60a6cd7238a2e3bb6f9ba0f9d55c830b3d6c78c9fdd200e7f78fe

See more details on using hashes here.

File details

Details for the file leza_typewriter-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: leza_typewriter-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for leza_typewriter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8250690fa50afdd4b6fbc9f2f20e00f6ed533668527fb3a886c6373b784e4ce
MD5 22548d5f5569028f33b380805ba61c63
BLAKE2b-256 164e91a8fad2b58049fc1e1be24f510b8f90084a15e4293c64a968bc4e5de0d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page