repl.it
@Pythonier/

ASCII Text Printer

Python

Only the symbols ( ! ? , ' ; : $ @ . = - + &) are allowed.

fork
loading
Files
  • main.py
  • Letters
  • Packager files
  • poetry.lock
  • pyproject.toml
  • requirements.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import time, random,sys
from replit import clear
from colors import red,green,cyan

def write(string):
  for char in string:
    sys.stdout.write(char)
    sys.stdout.flush()
    time.sleep(.01)


while True:
  clear()
  text = input("What text would you like to print out? (Only some symbols are available)\n").lower()
  clear()
  try: 
    for char in text:
      if char == ' ':
        char = 'space'
      with open('Letters/'+char+'.txt','r') as f:
          letter = f.read()
          write(letter)
    print(cyan('\n\nText entered: ' + red(text)))
    input("Press enter to print new text: ")
  except:
    print(red("That symbol is not available"))
    input('press enter to try again: ')
?