0

I have this code:

import pyfiglet, time, sys

def mecanografiar(textouwu):

    listapalabrasuwu = textouwu.split()

    for palabritas in listapalabrasuwu:
        sys.stdout.write(pyfiglet.figlet_format(palabritas, justify="center", font="standard", width=110))
        sys.stdout.flush()
        time.sleep(0.3)
        
uwu = "This is a test message"
mecanografiar(uwu)

and the result its this:

                                              _____ _     _     
                                             |_   _| |__ (_)___ 
                                               | | | '_ \| / __|
                                               | | | | | | \__ \
                                               |_| |_| |_|_|___/
                                                                
                                                    _     
                                                   (_)___ 
                                                   | / __|
                                                   | \__ \
                                                   |_|___/
                                                          
                                                          
                                                     __ _ 
                                                    / _` |
                                                   | (_| |
                                                    \__,_|
                                                          
                                               _            _   
                                              | |_ ___  ___| |_ 
                                              | __/ _ \/ __| __|
                                              | ||  __/\__ \ |_ 
                                               \__\___||___/\__|
                                                                
                                                                            
                                   _ __ ___   ___  ___ ___  __ _  __ _  ___ 
                                  | '_ ` _ \ / _ \/ __/ __|/ _` |/ _` |/ _ \
                                  | | | | | |  __/\__ \__ \ (_| | (_| |  __/
                                  |_| |_| |_|\___||___/___/\__,_|\__, |\___|
                                                                 |___/          

My problem is, i want to have the message in column format, but i want the message in row format, and because the code do an typing effect, i have this error and i dont know how to fix this

I try researching in the github resources about pyfiglet and i dont see anything

the result i'm searching its this

       _____ _     _       _               _            _                                              
      |_   _| |__ (_)___  (_)___    __ _  | |_ ___  ___| |_   _ __ ___   ___  ___ ___  __ _  __ _  ___ 
        | | | '_ \| / __| | / __|  / _` | | __/ _ \/ __| __| | '_ ` _ \ / _ \/ __/ __|/ _` |/ _` |/ _ \
        | | | | | | \__ \ | \__ \ | (_| | | ||  __/\__ \ |_  | | | | | |  __/\__ \__ \ (_| | (_| |  __/
        |_| |_| |_|_|___/ |_|___/  \__,_|  \__\___||___/\__| |_| |_| |_|\___||___/___/\__,_|\__, |\___|
                                                                                            |___/      
Inby
  • 3
  • 3

1 Answers1

0

Try this:

import pyfiglet, time, sys

def mecanografiar(textouwu):
     sys.stdout.write(pyfiglet.figlet_format(palabritas, justify="center", font="standard", width=110))
     sys.stdout.flush()
     time.sleep(0.3)
        
uwu = "This is a test message"
mecanografiar(uwu)
Sunderam Dubey
  • 1
  • 11
  • 20
  • 40