Skip to main content

A simple wrapper for ANSI escape codes

Project description

simpleANSI

This is a simple wrapper library for ANSI escape codes.

GitHub: https://github.com/AwesomeCronk/simpleANSI

PyPI: https://pypi.org/project/simpleANSI/0.1.0/

Installation

pip install simpleANSI

Functionality

This is the directory of the package. Functions are denoted as function(args). Constants are denoted as constant = value. Anything with a listing under it is a module. All functions under submodules return a string containing the proper escape codes. This string must be printed with print(<function>(*args), end = '') to achieve the desired effect. The only function that does not behave like this is simpleANSI.conhostEnableANSI(). This function is required on windows to enable ANSI escapes in a conhost terminal (the default terminal).

simpleANSI
|-conhostEnableANSI()
|-clear
| |-screen()
| |-screenToEnd()
| |-screenToBeg()
| |-entireScree()
| |-line()
| |-lineToEnd()
| |-lineToBeg()
| `-entireLine()
|-cursor
| |-home()
| |-moveTo(line, column)
| |-moveUpBy(lines)
| |-moveDownBy(lines)
| |-moveRightBy(columns)
| |-moveLeftBy(columns)
| |-moveBegNext(lines)
| |-moveBegPrev(lines)
| |-moveToCol(column)
| |-savePos()
| `-restorePos()
`-graphics
  |-normal = 0
  |-bold = 1
  |-underline = 4
  |-blink = 5
  |-invert = 7
  |-invisible = 8
  |-fgBlack = 30
  |-fgRed = 31
  |-fgGreen = 32
  |-fgYellow = 33
  |-fgBlue = 34
  |-fgMagenta = 35
  |-fgCyan = 36
  |-fgWhite = 37
  |-fgColor = 38
  |-bgBlack = 40
  |-bgRed = 41
  |-bgGreen = 42
  |-bgYellow = 43
  |-bgBlue = 44
  |-bgMagenta = 45
  |-bgCyan = 46
  |-bgWhite = 47
  |-bgColor = 48
  |-mode8Bit = 5
  |-mode16Bit = 2
  `-setGraphicsMode(*args)

Resources:

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

simpleANSI-1.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simpleANSI-1.0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file simpleANSI-1.0.2.tar.gz.

File metadata

  • Download URL: simpleANSI-1.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for simpleANSI-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a6e845bc25df92b5cffe2c3910cb3872ebd6f81f975ed0b04115d750ca62f822
MD5 ec466ea05efbb3b6dbfd7ce46320e722
BLAKE2b-256 d38945c1d181c699281320930807ca61e29bc04d0db28584df289d9e1ee7ab44

See more details on using hashes here.

File details

Details for the file simpleANSI-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: simpleANSI-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for simpleANSI-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 104f32d2b490bbfa4f5b9b756875a3a9c2c4ed917847e8088bbea0c055581dbf
MD5 b972f31593a8ae43dbb3d697a79026b2
BLAKE2b-256 123156a4b8480f9a8e26cca2df7641292ba8805323e904b6cbfff935de04371a

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