Skip to main content

No project description provided

Project description

python-frict

Clear the previous output and print a new one.

Install

pip install frict

Usage

This example shows spinner.

import frict

def main_4(args: argparse.Namespace) -> None:
    signs = ['|', '/', '-', '\\']
    with frict.frict() as frict_:
        for inx in range(30):
            frict_(signs[inx % len(signs)])
            time.sleep(0.1)

More funcy one.

def main_5(args: argparse.Namespace) -> None:
    signs = ['|', '/', '-', '\\']
    total_frames = 50
    with frict.frict() as frict_:
        counter = 12532
        for inx in range(total_frames):
            sign = signs[inx % len(signs)]
            angle = (inx / total_frames) * 4 * math.pi
            pos1 = int(math.sin(angle) * 15) + 15
            pos2 = int(math.sin(angle + 90) * 15) + 15
            if random.random() < 0.7:
                counter += int(random.random() * 500)
            target = f'''\
      {'*':>{pos1}}
   {sign} Welcome my homepage! {sign}
      {sign} You are visitor number: {counter} {sign}
      {'*':>{pos2}}'''
            frict_(target)
            time.sleep(0.1)

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

frict-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

frict-0.1.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file frict-0.1.1.tar.gz.

File metadata

  • Download URL: frict-0.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.2 Linux/5.10.189-1-MANJARO

File hashes

Hashes for frict-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cdee1b663d7e53d8c8b009550901618aacb99c0e6be06f34fc08c87fef9350ef
MD5 da9b168c6783b0541654284779f05a26
BLAKE2b-256 b41b8de0e75eaef10a1c03334238d150f7127d59a3a2700365522367f5ee1cb2

See more details on using hashes here.

File details

Details for the file frict-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: frict-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.2 Linux/5.10.189-1-MANJARO

File hashes

Hashes for frict-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9632cb8a601ea19ea170737da6291815056233ea491f1fdd5fc7b8f105729c4a
MD5 8795f7a234951e43d1b09a58cee0495a
BLAKE2b-256 c38442d4e255ee4375659cc69a355c107ebfaa762d20c995df460f6a1cc08b50

See more details on using hashes here.

Supported by

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