free software resistance
the cost of computing freedom is eternal vigilance
### kite.py
*original date:* oct 2014
*orginally posted:* sep 2024
like it says, kite (a basic program i wrote) ported to python:
```
#!/usr/bin/env python
#kite
#2007 mennonite
#ported to python 2009
#public domain
import time
import sys
import random
def color(f, b):
#### this \x08-after-printing business was lousy, it's all about sys.stdout.write() now
n = "0"
if f > 7: n = "1" ; f = f - 8
if f == 1: f = 4
elif f == 4: f = 1
if f == 3: f = 6
elif f == 6: f = 3
if b > 7: b = b - 8
if b == 1: b = 4
elif b == 4: b = 1
if b == 3: b = 6
elif b == 6: b = 3
print "\x1b[" + n + ";" + str(30+f) + ";" + str(40+b) + "m\x08",
def locate(l, c):
print "\x1b[" + str(l) + ";" + str(c) + "H",
def cls():
print "\x1b[2J\x1b[1;1H",
def qprints(q):
print "\x08"+str(q),
q = "...../\\........./__\......./____\\...../______\\.../________\\./__python"
q = q + "__\\\\__________/.\\________/...\\______/.....\\____/.......\\__/...."
q = q + ".....\\/....."
color(7, 1)
cls()
print "\x1b[?25l", # hide cursor
strn=""
for a in range(1, 11):
strn = strn + "||" + chr(247)
csrl = 0
b, a = 0, 0
try:
while True:
cls()
b = b + random.randint(-1, 1)
a = a + random.randint(-1, 1)
if b < 1: b = 1
elif b > 10: b = 10
if a < 1: a = 1
elif a > 67: a = 67
for y in range(1, 13):
for x in range(1, 13):
one = q[y * 12 - 12 + x -1]
fc = ".2_4567890\\23:5".find(one) + 1
if fc < 1:
fc = 11
if one != "/": fc = 14
#fc = "1234567890/23P5".find(one) + 1
color(fc, 1)
locate(y + b, x + a)
print "\x08" + one,
color(15, 1)
csrl, atwo = y + b, 0
while csrl <= 23:
locate(csrl + 1, x + a - 6 + atwo)
atwo = atwo + random.randint(-1, 1)
print "\x08" + strn[csrl], ; csrl += 1
locate(1, 1) ; print "",
for p in range(1000): # this was ridiculous
locate(1, 1) ; print "",
if not p % 10: time.sleep(0.0025)
except KeyboardInterrupt:
color(7, 0) ; print "\x1b[?25h", ; cls()
sys.exit()
```
license: 0-clause bsd
```
# 2007, 2009, 2014 mn
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```
=> https://freesoftwareresistance.neocities.org