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

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
3k 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 ...
3
votes
1answer
913 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
694 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
328 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
595 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: /usr/lib/python2.7/...
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
535 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
187 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
373 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
180 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
627 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: http://developer.ubuntu.com/resources/...
6
votes
2answers
440 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
238 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 "/usr/...
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
700 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
330 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
167 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
7k 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
409 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
12k 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, ...
5
votes
2answers
203 views

How do I package a python app for ppa?

I am planning to package FBuntu into PPA for easier distribution. The nature of this app is that the user has to make specific edits to the auth.py file to make it work and hence I am stuck from ...
53
votes
1answer
37k views

Should I use PyQt or PySide for a new Qt project?

Recently I've been involved in conversations about creating a Quickly template for a Qt and QtQuick Ubuntu app. The idea is to make it as easy to develop Qt apps from concept to package as it is right ...
8
votes
1answer
716 views

How to make Glade load translations from /opt

I've created an application that I'd like to submit through the Ubuntu app developer process. One of the requirements for the process is that when installed, all files go into the /opt/extras.ubuntu....
3
votes
2answers
1k views

Problems with simple media player tutorial [duplicate]

Possible Duplicate: Facing problem with “gtk.RESPONSE_OK” in the simple-player quickly tutorial I'm following along with this tutorial, but came to a stopping point where the program has an ...
5
votes
1answer
1k views

How to make a Gtk.ComboBoxText's entry editable in Glade

I'm using Glade to write a PyGI app, and I've come across a problem whereby I've got a Gtk.ComboBoxText with a Gtk.Entry, but I cannot make the entry editable for some reason. I.e. when the UI is ...
3
votes
2answers
352 views

How to programmatically fetch a list of applications from the Software Center

Im writing a PyGI app where I'd like to show a list of matching applications from the Ubuntu Software Centre in an auto-completion text entry or dropdwon. I haven't yet figured out the best way to ...
1
vote
1answer
5k views

Path to user desktop using python

This may seem stupid to a few, but I was wondering if there was some code to find out the operating system of the present user, and then the path to his Desktop using python.
4
votes
1answer
94 views

How to dynamically get name, version and other info from a Python app at runtime

I'm writing an Python app that makes use of a Gtk.AboutDialog. Some of the information shown in the dialog comes from setting properties for bits of info I've just given elsewhere, and I'd like to ...
11
votes
3answers
7k views

How do I run a script when a Bluetooth device connects?

I'd like to start my music player (Clementine) when my bluetooth headset connects to my computer. How do I detect the bluetooth device connecting so I can run a script to start the player?
2
votes
2answers
523 views

Why can't I log in after unistalling Python 2.7 and installing Python 3?

I uninstalled the Python 2.7 package to try and upgrade to Python 3. I uninstalled Python 2.7, and noticed some of my launcher items were completely gone. At this point I had installed Python 3. Now ...
3
votes
1answer
289 views

Where is the pygame template in Quickly?

Same as the title says. When I want to create a new Quickly project, I don't get the pygame template option any longer. ubuntu-application ubuntu-cli ubuntu-flash-game Those 3 are the templates ...
9
votes
1answer
815 views

How to highlight buttons in a GTK toolbar

I've written an application using Python and Glade. The app has got a toolbar with a dark background, and each toolbar button has got a custom image (i.e. no stock icons are used). I've noticed that ...
4
votes
1answer
2k views

How to change the cursor to hourglass in a python gtk3 application

I've a function taking quite a long time to perform and I'm trying to change the cursor to an hour glass during the time the function is executed. But it only works the very first time the function is ...
6
votes
1answer
4k views

How to install keryx?

How to install keryx in ubuntu 12.04? knowing that keryx1.0 needs python <2.7 and ubuntu 12.04 has python2.7.3 so what could i do either to downgrade python or installing keryx bas some way. Also ...
2
votes
1answer
1k views

How to get the user downloads folder location with Python

So, I'm developing a simple download manager powered by Wget, [EasyDownloader][1], which I'm using for learning Python, and I have a problem. I want to save files at the Downloads folder, but it's ...