DeaD_EyE icon

Static TV ASCII Art Animation with Python & Bext

DeaD_EyE | PRO | 06/30/22 12:10:54 PM UTC | 0 ⭐ | 1489 👁️ | Never ⏰ | []
Python |

1.06 KB

|

None

|

0 👍

/

0 👎

import sys, os, random, time, bext
 
 
TV_IMAGE = r'''               o
          o    |
           \   |
            \  |
             \.|-.
             (\|  )
    .==================.
    | .--------------. |
    | 'XXXXXXXXXXXXXX' |
    | 'XXXXXXXXXXXXXX' |
    | 'XXXXXXXXXXXXXX' |
    | 'XXXXXXXXXXXXXX' |
    | 'XXXXXXXXXXXXXX' |
    | '--------------'o|
    | LI LI """""""   o|
    |==================|
jgs |  .------------.  |
    | /              \ |
    |/                \|
    "                  "'''
 
TOP_BLOCK = chr(9600)
BOTTOM_BLOCK = chr(9604)
FULL_BLOCK = chr(9608)
EMPTY = ' '
STATIC_CHARS = (TOP_BLOCK, BOTTOM_BLOCK, FULL_BLOCK, EMPTY)
 
# Clear the screen:
if sys.platform == 'win32':
    os.system('cls')
else:
    os.system('clear')
print(TV_IMAGE)
 
try:
    while True:
        for y in range(5):
            bext.goto(7, 8 + y)
            for x in range(14):
                sys.stdout.write(random.choice(STATIC_CHARS))
        sys.stdout.flush()
        #time.sleep(0.1)
 
except KeyboardInterrupt:
    pass
 
 
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎