Galaxie Shell 0.5.3 documentation


Navigation:   | Index   | Search   | Top   | Up   |
Table of Content: |

© Copyright 2020-2024, Galaxie Viewer Team.

Top » Module code » glxviewer.term

Source code for glxviewer.term

# Inspired from: https://github.com/gravmatt/py-term/blob/master/term.py
# Original source from: https://github.com/gravmatt/py-term
# That a frozen implementation of the py-term module with only functions needed by glxviewer.

import sys

OFF = '\033[0m\033[27m'
BOLD = '\033[1m'
DIM = '\033[2m'

BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
MAGENTA = '\033[35m'
CYAN = '\033[36m'
WHITE = '\033[37m'

BG_WHITE = '\033[47m'


[docs] def send(cmd): sys.stdout.write(cmd) sys.stdout.flush()
[docs] def pos(line, column): send('\033[%s;%sf' % (line, column))
[docs] def writeString(*style, text=''): send(format(text, *style))
[docs] def writeLine(*style, text=''): writeString(*style, text=str(text) + '\n')
[docs] def clearLineFromPos(): send('\033[K')

Top » Module code » glxviewer.term

© Copyright 2020-2024, Galaxie Viewer Team.
This page is licensed under the GNU General Public License v3 or later (GPLv3+).
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

Last updated on None.
Created using Sphinx 7.2.6.