"Fossies" - the Fresh Open Source Software Archive

Member "ansifilter-2.18-x64/src/ci_test_input.py" (30 Jan 2021, 799 Bytes) of package /windows/misc/ansifilter-2.18-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/python
    2 #-*- coding: utf-8 -*-
    3 
    4 import sys
    5 
    6 # Generate a one line input file for Github CI tests
    7 sys.stdout.write ( "BEGIN \033[1;4mBold\033[0m ")
    8 sys.stdout.write ( "\033[4mUnderline\033[0m ")
    9 sys.stdout.write ( "\033[3mItalic\033[0m ")
   10 sys.stdout.write ( "\033[5mBlink\033[0m ")
   11 sys.stdout.write ( "\033[8mHide\033[0m ")
   12 sys.stdout.write ( "\033[30mBlack\033[0m ")
   13 sys.stdout.write ( "\033[31mRed\033[0m ")
   14 sys.stdout.write ( "\033[32mGreen\033[0m ")
   15 sys.stdout.write ( "\033[33mYellow\033[0m ")
   16 sys.stdout.write ( "\033[34mBlue\033[0m ")
   17 sys.stdout.write ( "\033[35mMagenta\033[0m ")
   18 sys.stdout.write ( "\033[36mCyan\033[0m ")
   19 sys.stdout.write ( "\033[37mWhite\033[0m END")
   20 
   21 # should result in "BEGIN Bold Underline Italic Blink Hide Black Red Green Yellow Blue Magenta Cyan White END"