LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-15-2006, 10:26 PM   #1
pwrlftr220
LQ Newbie
 
Registered: Nov 2005
Posts: 4

Rep: Reputation: 0
python + glade problems


I am running Ubuntu 6.06 and am trying to create a simple gui with glade and python. I believe I have all the packages that I need installed, but I am running into an error that says "global name 'libglade' is not defined". The code that I am using is below. The gui is simply a window with a single label. The relevant packages that I have installed are python, python-gtk2, python-glade2, glade, libglade2-0. The error comes up on the line: "self.widgets = libglade.GladeXML ('pyglade.glade', "window1")" Does anyone know why I am getting this error?

#!/usr/bin/env python

import gtk, gtk.glade

class GladeHandlers:
pass
class WidgetsWrapper:
def __init__(self):
self.widgets = libglade.GladeXML ('pyglade.glade', "window1")
self.widgets.signal_autoconnect(GladeHandlers.__dict__)
def __getitem__(self, key):
return self.widgets.get_widget(key)
widgets = WidgetsWrapper()

gtk.mainloop ()
 
Old 10-09-2006, 08:43 AM   #2
elpuerco
LQ Newbie
 
Registered: Oct 2006
Posts: 1

Rep: Reputation: 0
You need to install libglade through synaptic and then it will work
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(ubuntu) Glade Problems blankdev Programming 4 12-26-2007 03:59 PM
Translations of GUI created with Glade, Python vimico Programming 1 12-22-2005 02:36 PM
Distributing Python apps with Glade UI vharishankar Programming 0 11-27-2005 03:50 AM
python/glade attach window content in gtk.fixed() a10392 Linux - Software 3 10-08-2004 09:19 AM
Glade/python Show a window. a10392 Linux - Software 0 10-06-2004 10:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration