Skip to main content

Tremshape is a minimalistic Python packgage, that only prints basic shapes on terminal.

Project description

termshape

Termshape is a minimalistic Python package, that only prints basic shapes on terminal. It does not have any dependencies.

You're welcome to add any shapes!

Installation

pip install termshape

Explain:

The get_* functions has (x,y) ranges, and some equations and print the lines.

Example:

from termshape import get_square
print(get_square(5,5))

so: x-range is between 0 and 4 y-range is between 0 and 4 and the equations are: x=0, y=0, x=5 and y=5.

See below the output.

Usage

  • Print a square:
from termshape import get_square
print(get_square(5))
* * * * *
*       *
*       *
*       *
* * * * *
  • Print a rectangle:
from termshape import get_rectangle 
print(get_rectangle(10,5))
* * * * * * * * * *
*                 *
*                 *
*                 *
* * * * * * * * * *
  • Print a circle:
from termshape import get_circle
print(get_circle(10))
                  * * * * *                
              *               *            
          *                       *        
        *                           *      
      *                               *    
                                           
    *                                   *  
                                           
  *                                       *
  *                                       *
  *                                       *
  *                                       *
  *                                       *
                                           
    *                                   *  
                                           
      *                               *    
        *                           *      
          *                       *        
              *               *            
                  * * * * *                
  • Print a triangle:
from termshape import get_triangular
print(get_triangular(10))
*                  
* *                
*   *              
*     *            
*       *          
*         *        
*           *      
*             *    
*               *  
* * * * * * * * * *

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

termshape-0.0.2.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file termshape-0.0.2.tar.gz.

File metadata

  • Download URL: termshape-0.0.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.9

File hashes

Hashes for termshape-0.0.2.tar.gz
Algorithm Hash digest
SHA256 32b48b170637f9d150347633bc92e10711b144cd0c3b3fac4a830ea232d59a6a
MD5 6a52af9beb2130af3715cb3b822f40dd
BLAKE2b-256 550098bc93aa36f06fc0d0a387e955cfce89855bdeb985c327d0bce71b5a5f36

See more details on using hashes here.

Supported by

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