Oh Snap!

Please turnoff your ad blocking mode for viewing your site content

Hit enter after type your search item

Python Tkinter ASCII Art Generator From Text or String and Downloads it as Image GUI Desktop App Full Project For Beginners



Welcome folks today in this blog post we will be generating ascii art from string or text in tkinter. All the full source code of the application is shown below.



Get Started



In order to get started you need to install the following library using the pip command as shown below


pip install tkinter


After installing this library make an app.py file and copy paste the following code




#By Dx55
import tkinter as tk
import requests

#Generating window
window = tk.Tk()
window.title("ASCII ART")
window.grid_columnconfigure(0, weight=1)

#Download function
def download_ascii():
    if text_input.get():
        user_input = text_input.get()
        payload = {"text": user_input}
        response = requests.get("http://artii.herokuapp.com/make",
        text_response = response.text
        text_response = "Write Up"

#Text widget
    textwidget = tk.Text()
    textwidget.insert(tk.END, text_response)
    textwidget.grid(row=3, column=0, sticky="WE", padx=10, pady=10)

#Credits label
credits_label = tk.Label(window, text="Ascii Art By artii.herokuapp.com")
credits_label.grid(row=4, column=0, sticky="S", pady=10)

#Welcome label
welcome_label = tk.Label(window, 
                         text="Welcome! Write something",
welcome_label.grid(row=0, column=0, sticky="N", padx=20, pady=10)

#Text input
text_input = tk.Entry()
text_input.grid(row=1, column=0, sticky="WE", padx=10)

#Download button
download_button = tk.Button(text="DOWNLOAD YOUR ART", command=download_ascii)
download_button.grid(row=2, column=0, sticky="WE", padx=10, pady=10)

#Main loop
if __name__ == "__main__":


READ  Python PyQt5 GhostScript Example to Convert PDF to JPG/PNG Image Full Project For Beginners


And now if you execute the above script with the command which is shown below


python app.py


Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar
Coding Shiksha 2020. All Rights Reserved.
Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views :