If you have a long message to display in a large readable font, then this little Tkinter GUI toolkit code might help.
A ticker for long messages (Python/Tkinter)
''' Tk_Text_ticker102.py
using Tkinter to create a marquee/ticker
uses a display width of 20 characters
not superbly smooth but good enough to read
tested with Python27 and Python33 by vegaseat 04oct2013
'''
import time
try:
# Python2
import Tkinter as tk
except ImportError:
# Python3
import tkinter as tk
root = tk.Tk()
# width --> width in chars, height --> lines of text
text_width = 20
text = tk.Text(root, width=text_width, height=1, bg='yellow')
text.pack()
# use a proportional font to handle spaces correctly
text.config(font=('courier', 48, 'bold'))
s1 = "We don't really care why the chicken crossed the road. "
s2 = "We just want to know if the chicken is on our side of the "
s3 = "road or not. The chicken is either for us or against us. "
s4 = "There is no middle ground here. (George W. Bush)"
# pad front and end of text with spaces
s5 = ' ' * text_width
# concatenate it all
s = s5 + s1 + s2 + s3 + s4 + s5
for k in range(len(s)):
# use string slicing to do the trick
ticker_text = s[k:k+text_width]
text.insert("1.1", ticker_text)
root.update()
# delay by 0.22 seconds
time.sleep(0.22)
root.mainloop()
Ismatus3 13 Junior Poster in Training
TrustyTony 888 pyMod Team Colleague Featured Poster
Ismatus3 13 Junior Poster in Training
Ismatus3 13 Junior Poster in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Ismatus3 13 Junior Poster in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
bobles 0 Newbie Poster
Gribouillis 1,391 Programming Explorer Team Colleague
Mohamed_65 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.