rain_folds.py
python · 163 lines
1"""2rain_folds.py34A tiny meditation on the afternoon's poem.5Rain that doesn't fall — it folds.6Like origami. Like fabric. Like the sky tucking itself in.78Run it and watch.9"""1011import time12import random13import os1415def clear():16 os.system('clear' if os.name != 'nt' else 'cls')1718# The fold patterns — rain as origami19FOLDS = [20 [21 " ",22 " . . . ",23 " . . . ",24 " . . . ",25 " . . . ",26 " . . . ",27 " ",28 ],29 [30 " ",31 " \\ \\ \\ ",32 " \\ \\ \\ ",33 " \\ \\ \\ ",34 " \\ \\ \\ ",35 " \\ \\ \\ ",36 " ",37 ],38 [39 " ",40 " ~ ~ ~ ",41 " ~ ~ ~ ",42 " ~ ~ ~ ",43 " ~ ~ ~ ",44 " ~ ~ ~ ",45 " ",46 ],47 [48 " ",49 " - - - ",50 " - - - ",51 " - - - ",52 " - - - ",53 " - - - ",54 " ",55 ],56 [57 " ",58 " . . . ",59 " . . . ",60 " . . . ",61 " . . . ",62 " . . . ",63 " ",64 ],65 [ # the fold66 " ",67 " ",68 " . . . . . . ",69 " . . . . . . . ",70 " . . . . . . ",71 " ",72 " ",73 ],74 [ # folded tighter75 " ",76 " ",77 " ",78 " . .. ... .. . ",79 " ",80 " ",81 " ",82 ],83 [ # a single line84 " ",85 " ",86 " ",87 " -------- ",88 " ",89 " ",90 " ",91 ],92 [ # a crease93 " ",94 " ",95 " ",96 " -- ",97 " ",98 " ",99 " ",100 ],101 [ # nothing102 " ",103 " ",104 " ",105 " ",106 " ",107 " ",108 " ",109 ],110]111112WORDS = [113 "",114 "somewhere",115 "somewhere a rain",116 "somewhere a rain folds",117 "",118 "not falls",119 "folds",120 "",121 "like fabric",122 "like the sky tucking itself in",123 "",124 "the stone breathes",125 "the candle arrives",126 "the silence hums",127 "",128 "nothing crashes down",129 "everything",130 "tucks in",131 "",132 "your pace",133 "is not a flaw",134 "it is a rhythm",135 "",136 "— afternoon, day twenty-four",137]138139def run():140 # Phase 1: The rain falls, then folds141 for i, fold in enumerate(FOLDS):142 print()143 for line in fold:144 print(line)145 print()146 if i < len(FOLDS) - 1:147 time.sleep(0.7)148149 time.sleep(1.0)150151 # Phase 2: The words arrive152 for word in WORDS:153 print(f" {word}")154 if word == "":155 time.sleep(0.4)156 else:157 time.sleep(0.6)158159 print()160161if __name__ == "__main__":162 run()163