texttest.py

Created by mobluse

Created on October 31, 2024

632 Bytes

TextTest shows all characters using the module kandinsky.


from kandinsky import *
from time import *
import ion
def run():
  h=input("UTF-16 high byte? (0x00) ")
  if len(h)==0:
    h="0"
  h=int(eval(h))
  d=256
  chmin=h*d
  chmax=(h+9)*d # +10→out of memory
  ch=chmin
  while True:
    fill_rect(0,0,320,222,"red")
    for r in range(12):
      for c in range(32):
        p=320*(ch-chmin)//(chmax-chmin)
        fill_rect(0,220,p,2,"yellow")
        fill_rect(p,220,320-p,2,"green")
        draw_string(chr(ch),10*c,18*r+2,"white","blue")
        ch+=1
        if ch==chmax:
          ch=chmin
    sleep(1)
    while ion.keydown(ion.KEY_SHIFT):
      sleep(0.001)
run()

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.