Animating fish (and birds) for progress bars
Project description
Ever wanted to have animating fishes for progress bars in your command-line script?
Ever thought about doing it but then realizing you have better things to do with your time than to write meaningless ASCII animation programs?
Now you can have the best of both worlds: introducing fish, the module that makes any program look awesome and display useful data while churning away on some good ‘ole data.
Usage? Simple enough:
>>> import fish >>> while churning: ... churn_churn() ... fish.animate()
As a boy, I often dreamed of birds going back and forth as progress bars, so I decided to implement just that:
>>> import fish >>> bird = fish.Bird() >>> while churning: ... churn_churn() ... bird.animate()
Want to show the current record number?:
>>> from fish import ProgressFish >>> fish = ProgressFish() >>> for i, x in enumerate(churning): ... churn_churn() ... fish.animate(amount=i)
Want to show numeric progress when you know the total number?:
>>> from fish import ProgressFish >>> fish = ProgressFish(total=len(data)) >>> for i, datum in enumerate(data): ... churn_churn() ... fish.animate(amount=i)
The default fish is a simple bass at a pretty good velocity for an ASCII fish.
Possibilities are endless here, gentlemen:
The only limit is yourself.
—zombo.com
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
File details
Details for the file fish-1.0.tar.gz
.
File metadata
- Download URL: fish-1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57db43098be1e8e19011a37478f143990cf188ff207eb2d7ed04c4e7a8f01786 |
|
MD5 | 5cafb0d39132626c41e93ad8cb352ee1 |
|
BLAKE2b-256 | 65d85377c59fc07b669827412c842fc04b82c69602a9bbf39ac4862c2e4bc696 |