I designed glade file with the preference as follows:

Project file format to "GtkBuilder"
Object name to "within the project"
Toolkit version to "2.16"

Then i tried to connect this glade file through python code which i have 
attached here. But I failed to make connection. I got the error as follows.

selvam...@selvamani-laptop:~/Documents/Documents/Selvamani/Project$ python 
flower_main.py

(flower_main.py:19730): libglade-WARNING **: Expected <glade-interface>.  Got 
<interface>.

(flower_main.py:19730): libglade-WARNING **: did not finish in PARSER_FINISH 
state
Traceback (most recent call last):
  File "flower_main.py", line 23, in <module>
    flower = Flower()
  File "flower_main.py", line 18, in __init__
    self.wTree = gtk.glade.XML(self.gladefile)
RuntimeError: could not create GladeXML object
selvam...@selvamani-laptop:~/Documents/Documents/Selvamani/Project$

Could you please advise what could be done to resolve this problem.

Notes : The above python code works for the preference project file format for 
libglade which doesn't support "liststore" object for "treeview" widget in my 
project.

Thank You,

Regards,

Selvamani. S




      Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! 
http://downloads.yahoo.com/in/internetexplorer/
import sys
try:
	import pygtk
	pygtk.require('2.0')
except:
	pass
try:
	import gtk
	import gtk.glade
except:
	print('GTK not available')
	sys.exit(1)
		
class Flower(object):
	wTree = None
	def __init__(self):
		self.gladefile = "flower_main.glade"
		self.wTree = gtk.glade.XML(self.gladefile)
		self.window = self.wTree.get_widget("flower_window")
		self.window.show()

if __name__ == "__main__":	
	flower = Flower()
	gtk.main()
	



_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to