Giter Club home page Giter Club logo

python-module-jk-terminal-essentials's Introduction

jk_terminal_essentials

Introduction

This module provides essential constants and information about the terminal. This module is intended for implementing CLI tools and other applications running in a terminal.

Information about this module can be found here:

How to use this module

Import this module

Please include this module into your application using the following code:

import jk_terminal_essentials as te

Colors

This module provides a variety of color constants. For example:

print(te.FGCOLOR_RED + "Error!" + te.STYLE_RESET)

The following colors are supported:

FGCOLOR_BLACK = "\x1b[30m"
FGCOLOR_RED = "\x1b[31m"
FGCOLOR_GREEN = "\x1b[32m"
FGCOLOR_YELLOW = "\x1b[33m"
FGCOLOR_BLUE = "\x1b[34m"
FGCOLOR_MAGENTA = "\x1b[35m"
FGCOLOR_CYAN = "\x1b[36m"
FGCOLOR_LIGHT_GRAY = "\x1b[37m"

FGCOLOR_DARK_GRAY = "\x1b[90m"
FGCOLOR_LIGHT_RED = "\x1b[91m"
FGCOLOR_LIGHT_GREEN = "\x1b[92m"
FGCOLOR_LIGHT_YELLOW = "\x1b[93m"
FGCOLOR_LIGHT_BLUE = "\x1b[94m"
FGCOLOR_LIGHT_MAGENTA = "\x1b[95m"
FGCOLOR_LIGHT_CYAN = "\x1b[96m"
FGCOLOR_WHITE = "\x1b[97m"

BGCOLOR_BLACK = "\x1b[40m"
BGCOLOR_RED = "\x1b[41m"
BGCOLOR_GREEN = "\x1b[42m"
BGCOLOR_YELLOW = "\x1b[43m"
BGCOLOR_BLUE = "\x1b[44m"
BGCOLOR_MAGENTA = "\x1b[45m"
BGCOLOR_CYAN = "\x1b[46m"
BGCOLOR_LIGHT_GRAY = "\x1b[47m"

BGCOLOR_DARK_GRAY = "\x1b[100m"
BGCOLOR_LIGHT_RED = "\x1b[101m"
BGCOLOR_LIGHT_GREEN = "\x1b[102m"
BGCOLOR_LIGHT_YELLOW = "\x1b[103m"
BGCOLOR_LIGHT_BLUE = "\x1b[104m"
BGCOLOR_LIGHT_MAGENTA = "\x1b[105m"
BGCOLOR_LIGHT_CYAN = "\x1b[106m"
BGCOLOR_WHITE = "\x1b[107m"

Check for Color Support

To check if the current terminal supports colors:

print(te.checkTerminalSupportsColors())

Author(s)

License

This software is provided under the following license:

  • Apache Software License 2.0

python-module-jk-terminal-essentials's People

Contributors

jkpubsrc avatar

Watchers

 avatar  avatar

Forkers

sunarch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.