Re: [Emc-users] problem in learning Glade3 Gtk Python Tutorial
import gtkglade should be import gtk.glade note the period after gtk JT On 5/4/2015 9:15 PM, chz wrote: Hi all, I‘m learning Glade3 Gtk Python Tutorial which was constributed by John Thornton(thanks for JT very much). http://gnipsel.com/glade/index.html At tutorial 3 an error occurred, when i typed the command python3.4 glade1.py in shell terminal,the result was GTK not available. I don't know how to solve this problem.I need some help. the following are some of my system information: 1.Ubuntu 10.04 Linuxcnc OS 2.Python3.4.3 3.Glade3 (GTK+ 2) 4. 5.the glade1.py #!/usr/bin/env python try: import pygtk pygtk.require('2.0') except: pass try: import gtk import gtkglade except: print('GTK not available') sys.exit(1) class Buglump: def on_window1_destroy(self, object, data=None): print quit with cancel gtk.main_quit() def on_gtk_quit_activate(self, menuitem, data=None): print quit from menu gtk.main_quit() def on_gtk_about_activate(self,object,data=None): print help about selected self.response=self.aboutdialog.run() self.aboutdialog.hide() def on_push_status_activate(self,menuitem,data=None): self.status_count+=1 self.status(self.context_id,Messagenumber %s % str(self.status_count)) def on_pop_status_activate(self,menuitem,data=None): self.status_count-=1 self.statusbar.pop(self.context_id) def on_clear_status_activate(self,menuitem,data=None): while (status_count0): self.statusbar.pop(self.context_id) self.status_count-=1 def __init__(self): self.gladefile = tutorial-1.glade self.builder = gtk.Builder() self.builder.add_from_file(self.gladefile) self.builder.connect_signals(self) self.window = self.builder.get_object(window1) self.aboutdialog=self.builder.get_object(aboutdialog1) self.context_id=self.statusbar.get_context_id(status) self.status_count=0 self.window.show() if __name__ == __main__: main = Buglump() gtk.main() regards -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] problem in learning Glade3 Gtk Python Tutorial
After checking your code against the tutorial I see you have a typo in the import statement. JT On 5/4/2015 9:15 PM, chz wrote: Hi all, I‘m learning Glade3 Gtk Python Tutorial which was constributed by John Thornton(thanks for JT very much). http://gnipsel.com/glade/index.html At tutorial 3 an error occurred, when i typed the command python3.4 glade1.py in shell terminal,the result was GTK not available. I don't know how to solve this problem.I need some help. the following are some of my system information: 1.Ubuntu 10.04 Linuxcnc OS 2.Python3.4.3 3.Glade3 (GTK+ 2) 4. 5.the glade1.py #!/usr/bin/env python try: import pygtk pygtk.require('2.0') except: pass try: import gtk import gtkglade except: print('GTK not available') sys.exit(1) class Buglump: def on_window1_destroy(self, object, data=None): print quit with cancel gtk.main_quit() def on_gtk_quit_activate(self, menuitem, data=None): print quit from menu gtk.main_quit() def on_gtk_about_activate(self,object,data=None): print help about selected self.response=self.aboutdialog.run() self.aboutdialog.hide() def on_push_status_activate(self,menuitem,data=None): self.status_count+=1 self.status(self.context_id,Messagenumber %s % str(self.status_count)) def on_pop_status_activate(self,menuitem,data=None): self.status_count-=1 self.statusbar.pop(self.context_id) def on_clear_status_activate(self,menuitem,data=None): while (status_count0): self.statusbar.pop(self.context_id) self.status_count-=1 def __init__(self): self.gladefile = tutorial-1.glade self.builder = gtk.Builder() self.builder.add_from_file(self.gladefile) self.builder.connect_signals(self) self.window = self.builder.get_object(window1) self.aboutdialog=self.builder.get_object(aboutdialog1) self.context_id=self.statusbar.get_context_id(status) self.status_count=0 self.window.show() if __name__ == __main__: main = Buglump() gtk.main() regards -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] problem in learning Glade3 Gtk Python Tutorial
Those tutorials were done with Python 2.7 or 2.6 I don't remember. How did you get Python 3.4 installed in Ubuntu 10.04? The error indicates you either don't have gtk or gtkglade installed which you should have both it you used the LinuxCNC LiveCD to install. JT On 5/4/2015 9:15 PM, chz wrote: Hi all, I‘m learning Glade3 Gtk Python Tutorial which was constributed by John Thornton(thanks for JT very much). http://gnipsel.com/glade/index.html At tutorial 3 an error occurred, when i typed the command python3.4 glade1.py in shell terminal,the result was GTK not available. I don't know how to solve this problem.I need some help. the following are some of my system information: 1.Ubuntu 10.04 Linuxcnc OS 2.Python3.4.3 3.Glade3 (GTK+ 2) 4. 5.the glade1.py #!/usr/bin/env python try: import pygtk pygtk.require('2.0') except: pass try: import gtk import gtkglade except: print('GTK not available') sys.exit(1) class Buglump: def on_window1_destroy(self, object, data=None): print quit with cancel gtk.main_quit() def on_gtk_quit_activate(self, menuitem, data=None): print quit from menu gtk.main_quit() def on_gtk_about_activate(self,object,data=None): print help about selected self.response=self.aboutdialog.run() self.aboutdialog.hide() def on_push_status_activate(self,menuitem,data=None): self.status_count+=1 self.status(self.context_id,Messagenumber %s % str(self.status_count)) def on_pop_status_activate(self,menuitem,data=None): self.status_count-=1 self.statusbar.pop(self.context_id) def on_clear_status_activate(self,menuitem,data=None): while (status_count0): self.statusbar.pop(self.context_id) self.status_count-=1 def __init__(self): self.gladefile = tutorial-1.glade self.builder = gtk.Builder() self.builder.add_from_file(self.gladefile) self.builder.connect_signals(self) self.window = self.builder.get_object(window1) self.aboutdialog=self.builder.get_object(aboutdialog1) self.context_id=self.statusbar.get_context_id(status) self.status_count=0 self.window.show() if __name__ == __main__: main = Buglump() gtk.main() regards -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] problem in learning Glade3 Gtk Python Tutorial
On 5 May 2015 at 03:15, chz chz316085...@163.com wrote: when i typed the command python3.4 glade1.py in shell terminal,the result was GTK not available. I think that you might need to sudo apt-get install glade-gtk2 But whether that will work with your OS and Python combination I am not sure. -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
[Emc-users] problem in learning Glade3 Gtk Python Tutorial
Hi all, I‘m learning Glade3 Gtk Python Tutorial which was constributed by John Thornton(thanks for JT very much). http://gnipsel.com/glade/index.html At tutorial 3 an error occurred, when i typed the command python3.4 glade1.py in shell terminal,the result was GTK not available. I don't know how to solve this problem.I need some help. the following are some of my system information: 1.Ubuntu 10.04 Linuxcnc OS 2.Python3.4.3 3.Glade3 (GTK+ 2) 4. 5.the glade1.py #!/usr/bin/env python try: import pygtk pygtk.require('2.0') except: pass try: import gtk import gtkglade except: print('GTK not available') sys.exit(1) class Buglump: def on_window1_destroy(self, object, data=None): print quit with cancel gtk.main_quit() def on_gtk_quit_activate(self, menuitem, data=None): print quit from menu gtk.main_quit() def on_gtk_about_activate(self,object,data=None): print help about selected self.response=self.aboutdialog.run() self.aboutdialog.hide() def on_push_status_activate(self,menuitem,data=None): self.status_count+=1 self.status(self.context_id,Messagenumber %s % str(self.status_count)) def on_pop_status_activate(self,menuitem,data=None): self.status_count-=1 self.statusbar.pop(self.context_id) def on_clear_status_activate(self,menuitem,data=None): while (status_count0): self.statusbar.pop(self.context_id) self.status_count-=1 def __init__(self): self.gladefile = tutorial-1.glade self.builder = gtk.Builder() self.builder.add_from_file(self.gladefile) self.builder.connect_signals(self) self.window = self.builder.get_object(window1) self.aboutdialog=self.builder.get_object(aboutdialog1) self.context_id=self.statusbar.get_context_id(status) self.status_count=0 self.window.show() if __name__ == __main__: main = Buglump() gtk.main() regards -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users