Python is an interpreted programming language that is often, but not solely, used as a scripting language. A version of Python is included by default on all Ubuntu distributions.

learn more… | top users | synonyms

6
votes
3answers
4k views

How to add vte terminal widget in GTK3?

I'm trying to add vte widget in my application and the examples I've found use .fork_command() to execute a command in that widget. But according to ...
1
vote
1answer
420 views

Why is ComboBoxText giving me a “no attribute” error?

I'm trying to add a text Combo Box into my app. I've created in and populated the list but when I I try to print out the active text I get an error. Here's the part of the code in question: def ...
6
votes
6answers
19k views

How do I set up a python development environment?

Ok so I have decided to delve into the realms of casual coding and I have been told Python is a great language for beginners like myself. I know (not really sure though) the Python interpreter is ...
1
vote
1answer
180 views

Invalid syntax error when following “Creating your first ubuntu app” video

$ quickly run Traceback (most recent call last): File "bin/mybrowser", line 32, in <module> import mybrowser File "/home/michael/mybrowser/mybrowser/__init__.py", line 14, in ...
1
vote
1answer
154 views

How can I store variable changed by user?

I'm working on simple application for Ubuntu App Showdown. I'm relatively new to programming (started learning Python last week), so maybe this question sounds stupid. Anyway, lets say there's a ...
0
votes
1answer
136 views

Teeview-Binding to CouchDB not working with quickly (PyGtk + Glade)

For the Ubuntu App Developer Showdown I need to know some basics about quickly. One really important thing is to know how the Treeview-Binding works with CouchDB. I did the Tutorial1 ...
7
votes
1answer
942 views

How to use the AccountsService API with Python?

I'm writing an application for the Ubuntu app showdown and I try to read/write the user's profile picture using this >>> from gi.repository import AccountsService, GLib >>> ...
7
votes
1answer
24k views

How to run a .pyc (compiled python) file?

When I compile a python file, I get a *.pyc file. When I try to run that, I get a message saying there is no program for running them. When I search for a program online via that option, it says there ...
3
votes
1answer
3k views

Glade: How can I set the value of a spin button?

I've done some spin buttons with Glade for my Python/GTK3 app, but I don't know how to set things like default, lower or higher value. How can I do it? Using the following things for development: ...
1
vote
1answer
309 views

Open Dialog, created with quickly does not work

I tried to open a dialog like David Planella describs here (and quickly help add): Open Custom Dialog Windows (PyGTK + Quickly) But this don't works for me. I always get the same Error-Message if I ...
6
votes
3answers
5k views

How to detect a computer's physical screen size in GTK

I've come across this bug while writing my app. In short, the app's window size is fixed, which does not work well with smaller screens such as in netbooks. In those, the lower buttons are off the ...
7
votes
3answers
5k views

How do I create and use keyboard shortcuts in a Gtk app that I am developing?

I am creating an application for the Ubuntu App Showdown in Python + Gtk with quickly. I am calling it Discvur. I would have liked to include some keyboard shortcuts. Searching the web, I found this ...
2
votes
1answer
454 views

How do I access the preferences from my main dialog window? Also how do I add a new preference?

class PreferencesCalorieBurnerDialog(PreferencesDialog): __gtype_name__ = "PreferencesCalorieBurnerDialog" def finish_initializing(self, builder): # pylint: disable=E1002 """Set ...
1
vote
1answer
157 views

Is there a recommended DB to work with Quickly?

CouchDB used to be the recommended DB to work with Quickly until 12.04, when it was dropped out. Now, I want to know if there is another DB recommended to replace CouchDB that works nicely with ...
2
votes
1answer
142 views

Is there a way to use the “primary toolbar” with QT or Java?

I am developping a software in order to compete in the Ubuntu App Contest, but I am having a problem. I started with quickly and glade, but since I am not very familiar with python, and since now the ...
1
vote
1answer
3k views

Glade GTK entry get text

Sorry for a newbie question but I could not figure out how to print a text which a user enter in a GTKEntry field after he press a button. I design my app with glade, a simple TextEntry Field and a ...
4
votes
5answers
11k views

Where is Python source code?

I have Python 2.7 installed for learning purposes (I'm a starting programmer reading 'Learn Python The Hard Way') and wanted to know how some things were done. I installed it from Synaptic and want ...
0
votes
1answer
2k views

How to connect GTK3 button click events to callbacks

So, I'm developing my 1st app with GTK3 and I don't know how to link my buttons with their respective defs. Can anyone post a tutorial, an example or some docs? Using next things for developing my ...
2
votes
1answer
863 views

Changing TextView font in PyGTK

I have TextView widget in Glade named "formula-view". I'm trying to do this to change font: formulaView = self.builder.get_object("formula-view") fontdesc = pango.FontDescription('Ubuntu 16') ...
0
votes
1answer
669 views

How do I ignore missing trusted keys in apt sources.list? [duplicate]

Possible Duplicate: How do I bypass/ignore the gpg signature checks of apt? i have a problem in ubuntu hardy: i use an old hardy server that i may not upgrade with the historical sources: ...
2
votes
1answer
186 views

Custom widgets/controls in application indicators

I want to develop an app for ubuntu, that integrates inside the calendar indicator/menu. It should allow to enter info right from it, and have several controls like input boxes, drop downs, spinners ...
3
votes
2answers
320 views

Quickly packaging errors

I'm having some trouble packaging my Quickly (Python/GTK) app. Creating and packaging a new app (created using quickly create test and cd test; quickly package) works just fine, but the actual app ...
5
votes
1answer
571 views

Python/GTK3 app crashing on importing “indicate” (python-indicate)

I'm trying to integrate my Python/GTK3 app with Ubuntu's messaging menu and every time I try to import "indicate" (python-indicate) my app crashes, with the following traceback: ...
2
votes
1answer
76 views

Is there a native way to share a link?

Is there some sort of API available in Ubuntu that allows you to share a link with Twitter, Facebook etc? I've found this: https://code.launchpad.net/~ken-vandine/+junk/gwibber-api-examples but it ...
2
votes
1answer
500 views

Getting the name of the process, that corresponds to the active window

How can it be did using Python(in Ubuntu)?
0
votes
1answer
186 views

Video Codec Error

I have noticed on some videos that when I play some unusual video formats I always see this message. Can someone please give me instructions how to resolve this issue? Which codec do I need to install ...
8
votes
1answer
371 views

Create a quickly app with build dependencies

I am creating a Quickly app in Ubuntu that depends on Python Twisted, which is available in the package python-twisted. How should I add python twisted as a dependency so that it will be installed ...
0
votes
1answer
178 views

Import “prompts” in quickly (Simple Player tutorial)

I am following this tutorial on quickly. At one point I have to write from quickly import prompts in the file called SimplePlayerWindow.py. But when I do that and run my application, I get the ...
3
votes
2answers
616 views

Facing problem with “gtk.RESPONSE_OK” in the simple-player quickly tutorial

I am fairly new to both quickly and Python. I am facing several problems while learning to use quickly from the following tutorial on the Ubuntu developers site: ...
6
votes
2answers
437 views

How do I translate a quickly project?

I am just getting started with using quickly and I have a small project that's starting to take shape. Right now I would like to add a translation to my project. I already noticed that quickly ...
0
votes
1answer
230 views

How to programatically fetch the download status of Google Chrome?

How would I go about determining if Google Chrome is downloading something, and getting the "percent-done" value of that download, from the terminal using a Python, Perl, or Bash script?
4
votes
1answer
1k views

Is Quickly a Python-only development tool?

I'm looking at the Ubuntu app development tool Quickly. From what I can see only Python is available with this tool. Is this correct or are other languages like Java (and others) also available?
3
votes
1answer
1k views

Unable to open /usr/include/python2.7/pyconfig.h (Permission denied)

I am getting the following weird permission denied problem in python and this is happening whenever I login (SSH) as a normal user (means not root): Traceback (most recent call last): File ...
2
votes
3answers
1k views

Calling a Python script from a button using Glade Designer

How can I call the Ubuntu One authentication python script from a button using Glade? what I need to do is call a python script such as: $ python u1file.py login Adding Ubuntu One Files support to ...
3
votes
1answer
679 views

How can I change the application indicator label after delay?

How can I change the Application Indicator label after delay self.ind = appindicator.Indicator("new-gmail-indicator", "/usr/share/icons/ubuntu-mono-dark/status/16/ubuntuone-client-error.svg", ...
1
vote
1answer
2k views

python-tk package is not recognized?

I've got a small program I've written in python (2.7.3) that I'm moving over to another box. However, when executing this line: from Tkinter import * I get this error; Traceback (most recent call ...
0
votes
2answers
321 views

Python: Regex filter ids divisible by 3

Hi I have a list of ids separated with commas and I need to take the ids which are divisible to 3.
2
votes
1answer
2k views

apt-get install for different python versions

I have Ubuntu 10.04 with python2.6 by default. I have installed python2.7. When I want to install python packages with apt-get python- it gets installed to python2.6. How can I make it to install to ...
2
votes
0answers
1k views

Programming with DBus using PyQt

I'm trying to write a desktop environment that supports the global menu Before I get started with my main task In PyQt I'm trying to get the dbus code to work with QtDBus as a proof of concept. Here's ...
3
votes
1answer
3k views

Python script as a service on Ubuntu 11.10

I am facing the following problem. I want to run a python script as a service on Ubuntu 11.10 system (already mentioned in the following link: Python service using Upstart on Ubuntu) I followed the ...
1
vote
1answer
165 views

MySQL in Python broken in virtualenv after move to 12.04

This morning I upgraded my Xubuntu to 12.04. The virtualenv has moved up a version, and now bundles pip and I've had to rearrange some scripts to cope with this and rebuild my virtualenvs. MySQL ...
7
votes
2answers
6k views

Programmaticaly change lightdm autologin session type

I have problem with lightdm setting autologin session type (using my config tool). Lightdm logs into previously selected session. I see that autologin-session is UNIMPLEMENTED in version 1.2.1. Maybe ...
1
vote
1answer
394 views

I have written a php code which executes a python prog..it is running on a lampp server how do i get the python libraries working?

I am using ubuntu 11.10. I want to enable the execution of python libraries on my lampp server. I have written a php code that does shell_exec() to run a python script,but the libraries used in the ...
6
votes
4answers
2k views

How to make a Gtk.Iconview react to single click instead of double click?

I use a Gtk.IconView widget in my app to select different types of elements. The way the IconView works is the following: Do one click to select the item Do an additional double-click to activate ...
5
votes
2answers
1k views

How to dynamically resize GTK notebook pages

I've got a Python app that uses a Gtk.Notebook widget to display different pages. Each of these pages contain a different set of widgets, and I've noticed that the 'tallest' widget in terms of ...
2
votes
2answers
1k views

How to distribute python GTK applications?

This is in correlation with the previous question I asked here. My aim is to create and package an application for easy installation in Ubuntu and other debian distributions. I understand that the ...
5
votes
2answers
1k views

When should .mo files be generated?

I am creating a python GTK3 program. I'll like to add translation support. I know how to create a .pot and .po file. However in order to make the application available in multiple languages, I need to ...
1
vote
1answer
4k views

How can I make apache run cgi files in all directories under ./www ?

My friend and I are working on an art site and one of our scripts works fine in most of the upper levels of ./www but once we get down to ./www/testing/project2/cgi-bin/.. cgi files seem to only ...
12
votes
1answer
305 views

Promoting an app in the Ubuntu Software Center through a ratings and reviews API

As an app author, I would like to promote my app in Ubuntu. One nice way to do it is to encourage users to submit their reviews and ratings to the Software Center. It would be really cool if I could ...
15
votes
5answers
11k views

How to run asynchronous tasks in Python GObject Introspection apps

I'm writing a Python + GObject app that needs to read a non-trivial amount of data from disk upon start. The data is read synchronously and it takes about 10 seconds to finish the read operation, ...