Skip to main content

A Python library for creating animation in console.

Project description

conanim Library

This python library is used for creating simple animations in console.

How to use

To create an animation you need use frame_animattion()function. Example:

import conanim as ca

# define frames for animation
frames = [
    "|",
    "/",
    "-",
    "\\",
]

while True:
    ca.frame_animation(frames, 0.1) # create an animation

In this example frame_animation() needs 2 arguments: frames and delay in seconds between frames

frame_animation(frames, delay)

This is cool, but if we create program like this:

import conanim as ca

# define frames for animation
frames = [
    "|",
    "/",
    "-",
    "\\",
]

while True:
    print("loading ", end="")
    ca.frame_animation(frames, 0.1) # create an animation

it wil doesn't work, so this library have print_with_animation() function:

import conanim as ca

# define frames for animation
frames = [
    "|",
    "/",
    "-",
    "\\",
]

while True:
    ca.print_with_animation("Loading ", frames, 0.1) # create an animation

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

conanim-0.1.0.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

conanim-0.1.0-py3-none-any.whl (1.8 kB view hashes)

Uploaded Python 3

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