interactive programme (add a new line in Tk)

nigel cm012b5105 at blueyonder.co.uk
Mon Mar 27 00:47:35 CEST 2006


somebody recently  showed me how to create a new line using \n which was 
great.The thing is when i am creating the programme the text i wish to add is 
quite long.and it ends up stretching the width of several pages,which i think 
looks quite messy.Would it be possible for some one to show me how to create 
another line while writing my programme.What i mean by this is where my text 
ends "iv arrived"i wish to add a new line beneath to continue my text so i do 
not reach the end of the page.

from Tkinter import *

root = Tk()

w = Label(root, text="\n Hello, world! \n iv arrived")
w.pack()

root.mainloop()

Thanks nige



More information about the Python-list mailing list