No project description provided
Project description
python-frict
Clear the previous output and print a new one.
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
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
frict-0.1.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
frict-0.1.0-py3-none-any.whl
(6.1 kB
view hashes)