Tag Info

Hot answers tagged


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): ...


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