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
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
conanim-0.1.0.tar.gz
(1.7 kB
view hashes)