Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2008 19:01:47 -0800
From:      Gary Kline <kline@thought.org>
To:        FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG>
Subject:   python and Guile-gtk...  [a bit OT]
Message-ID:  <20080229030144.GA45790@thought.org>

next in thread | raw e-mail | index | archive | help
	Guys,

	Thanks to the bunch of you  who steered me toward python; it's 
	a really nice OO scripting language, and I'm picking it up 
	pretty rapidly.  Apppended is a "Tkinteri" [GUI] file that python
	doesn't like.  Any ideas why?  I did install this port.

	I'd like help getting python to read from a file and display a 
	steram of text on a textcanvas. I'll fiure out the buttons later.  
	I'd appreciate any insights about regular gtk and guile-gtk.  Or 
	whichever GUI libraries have the best python interface.

	thanks muchly,

	gary

	Apended simpleTextArea.py

-- 
  Gary Kline  kline@thought.org   www.thought.org  Public Service Unix
        http://jottings.thought.org   http://transfinite.thought.org





 from Tkinter import *
 
 root = Tk()
 root.title('Text')
 text = Text(root, height=26, width=50)
 scroll = Scrollbar(root, command=text.yview)
 
 text.configure(yscrollcommand=scroll.set)
 text.tag_configure('bold_italics', font=('Verdana', 12, 'bold', 'italic'))
 text.tag_configure('big', font=('Verdana', 24, 'bold'))
 text.tag_configure('color', foreground='blue', font=('Tempus Sans ITC', 14))
 text.tag_configure('groove', relief=GROOVE, borderwidth=2)
                    
 text.tag_bind('bite', '<1>', lambda e, t=text: t.insert(END, "Text"))
 
 text.pack(side=LEFT)
 scroll.pack(side=RIGHT, fill=Y)
 root.mainloop()
 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080229030144.GA45790>