Hot answers tagged pygtk
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 ...
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 ...
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 ...
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): ...
Change control file in debian/DEBIAN folder, edit "Depends" field. Example of control file: Package: root-your-phone-tool Version: 1.0.0 Architecture: all Section: base Maintainer: Gustaf Haglund <firstname.lastname@example.org> Depends: android-tools-adb, python, python-gtk2 Description: Root your phone easy with this tool.
No. This is a GTK 3.x feature.
Only top voted, non community-wiki answers of a minimum length are eligible