Tag Info

Hot answers tagged

4

The problem is that you are looking at the PyGTK documentation, but are using PyGI/GTK3 in your script. The docs on gtk_widget_render_icon() says the following: gtk_widget_render_icon has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_render_icon_pixbuf() instead. Then the docs on ...


4

Development libraries usually don't show up very well in the software center. Usually using apt-cache search will help here. So for example: apt-cache search python gobject Will show you all the packages related to python and gobject introspection. Here is a snippet of the results: python-gi - Python 2.x bindings for gobject-introspection libraries ...


2

You can get the contents of a TextBuffer using get_text(): start_iter = self.textbuffer.get_start_iter() end_iter = self.textbuffer.get_end_iter() text = self.textbuffer.get_text(start_iter, end_iter, True) And save it like any other text file: with open(save_file, 'w') as f: f.write(text) I suggest that ...


2

You are probably looking for system() method in os package. Have rewritten the snippet, had a few corrections too: #!/usr/bin/env python import pygtk import os pygtk.require('2.0') import gtk class Base: def send(self, widget): os.system('ifconfig') #this executes commands on the terminal def writecommand(self, widget): ...


1

This piece of code solved the problem and prints the filename as I wished: def on_filechooserbutton_file_set(self, widget): self.videoInput = widget.get_filename() print "Video file Choosen: ", self.videoInput



Only top voted, non community-wiki answers of a minimum length are eligible