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

36
votes
5answers
6k views

How do I create a deb package for a single python script?

I have a single python script that I want to distribute as a deb package. It is a indicator which shows local date in Unity panel. I did follow create a .deb Package from scripts or binaries but I ...
20
votes
4answers
4k views

Can I develop ubuntu for phones apps in Python? [duplicate]

Does anyone know if we can develop apps for ubuntu for phones in Python ? PyQT / PySide would seem to support also QML. But can we use them on the phones ?
8
votes
1answer
314 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 ...
9
votes
1answer
1k views

How to create a new Quickly application template?

Cannot find the answer elsewhere, I'm asking for a documentation of the process to create a new template for quickly. I'm interested in writing a pyside (python + qt4) template like the pygtk one. ...
15
votes
3answers
2k views

Is it possible to use Python with the Ubuntu SDK?

David Planella wrote in his answer to a question I posted that: ...the recommended way to develop apps for Ubuntu is the Ubuntu SDK. So I installed it, but looks like the supported programming ...
2
votes
2answers
278 views

Horizon: Apache exceptions at import_module

I've deployed Openstack using juju, and everything looks normal except that I cannot browse to openstack-dashboard. I get error 500 Internal Server Error. I looked through apache2 logs at that node ...
20
votes
2answers
2k views

What is the black header widget in some programs?

In some of the ubuntu programs (ubuntu control panel, system settings), but not e.g. in banshee, the top part of the window contains elements in dark tone (with the Ambience theme). But I cant find a ...
10
votes
3answers
11k views

How do I make the terminal run python 3.1?

Currently, when I type "python" at the terminal I get v2.6 which is all fine and dandy but how can I set it to use v3.1 instead? Is there a "path" variable out there somewhere that I can change like ...
45
votes
3answers
2k views

Is #!/bin/sh read by the interpreter?

In bash or sh, I guess anything which starts with # is a comment. But in bash scripts we write: #!/bin/bash And in Python scripts, there is: #!/bin/python Does this mean that # by itself is a ...
15
votes
2answers
7k views

easy_install/pip or apt-get

As noted in the Ubuntu wiki page on Rails it is recommended that gems manages your Rails/Ruby dependencies. What is the best practise with Python packages like Django? Should I install them through ...
6
votes
1answer
4k views

How do I set IDLE as the default editor for Python scripts?

I would like to set IDLE as the default editor for python scripts, but when I click on "open with application" and hit the dropdown to show more applications it isn't an option. Here's exactly what ...
3
votes
3answers
317 views

Python 3 error when running the print command

All I wrote in the interpreter was as follows: >>> print "Hello, World!" File "<stdin>", line 1 print "Hello, World!" ^ SyntaxError: invalid syntax How ...
72
votes
8answers
28k views

Is there an GUI Designer for python?

Is there a GUI IDE for programming python just like java has netbeans? I wanted one where we could drag & drop test boxes & labels just as we do in swing components using netbeans or eclipse. ...
45
votes
5answers
121k views

How do I install python 2.7.2 on Ubuntu?

I want to install python 2.7.2.tgz on Ubuntu, downloaded from http://python.org/download/. Is this a correct way to install : ./configure make make install If not , how can I do that?
23
votes
2answers
10k views

What's the best way to get Python 2.5 and 2.7 on Ubuntu 10.04

Ubuntu 10.04 has only two supported Python versions 2.6 and 3.1. Developers often need more, to test that their Python code works on 2.7, 2.5 (and maybe even 2.4 and older ones). What's the best way ...
13
votes
2answers
4k views

How to read dbus-monitor output?

i'm playing around with dbus-monitor to try and understand how dbus is working in Ubuntu environment. I have several questions in this regard: Could you please let me know how to read the following ...
20
votes
3answers
2k views

How to add support for the global menu to a python non-gtk, non-qt app?

I'm looking for good documentation (an example, tutorial, or guide) on how to add global menu support to a non-gtk, non-qt application. (In gtk it works 'magically' for the main menu...). The ...
10
votes
2answers
737 views

Quickly template for PyQt?

Because I like Qt and Python, is there a Quickly template for PyQt similar to the PyGTK one?
3
votes
2answers
244 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 ...
9
votes
2answers
4k views

How can I remove python 2.7 after installing python 3.3?

I have successfully installed python 3.3 on Ubuntu 12.10. Since I don’t need multiple versions of python, I want to remove the existing python 2.7. When I try to do that, using sudo apt-get remove ...
3
votes
2answers
3k views

How to install XML parsers with Python

I'd like to use etree, expat or similar, though I understood etree is easier to use. But how do I install that when I already have Python 2.7.2 installed on Ubuntu 11.10? All documentation I can find ...
2
votes
2answers
580 views

How to install pygame?

I am running Ubuntu 13.10. I have python 2.7.5 with anaconda 1.8.0. Whenever I start python and type import pygame it tells me that there is no module named pygame. How can I install pygame?
1
vote
1answer
1k views

Update Manager won't open (error related to pythonverbose)

I'm having an issue with update-manager. Last night, my computer restart suddenly during the update process. Now it won't open and it keep appearing on the notifier with a message warning that an ...
49
votes
8answers
52k views

How can I install Python 2.6 on 12.04?

According to https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/UbuntuDesktop "Python 2.6 is no longer available for install". I need to support legacy software that runs only on Python 2.6. How ...
22
votes
5answers
15k views

Will python2.7 be available for 10.04 in the future?

Since Ubuntu 10.04 is an LTS release will it support python 2.7 as a default package maintainer version or at least have a python2.7 package in future? Since it will be the last major python 2.x ...
17
votes
2answers
9k views

How to set up and use a virtual python environment in Ubuntu?

Python virtual environments are used to create isolated python environments to avoid dependency and version conflicts, and also indirectly takes care of permission issues. But what is the easiest way ...
18
votes
3answers
3k views

How do I get started creating an Ubuntu Desktop App?

I want to create an Ubuntu desktop app, specifically to replace Gwibber. I can code in Java, Python and a few other technologies. Adobe Flex would have been an option until Adobe decided to suck some ...
14
votes
2answers
2k views

How can I write Nautilus scripts in Python?

I want to write a Nautilus script in Python. Is that possible? If it is possible, how can I do that?
10
votes
4answers
393 views

How do I add a daemon to my Quickly application?

I am building a app with quickly, and I wanted to add a daemon that will run in the background. How do you do this?
18
votes
1answer
21k views

Upgrading to python 3.2

I want to use new functools that provides with the lrucache, I am currently using python 2.6, which doesn't support this, What is the best way I can upgrade to python 3.2? or is there any other ...
15
votes
5answers
8k views

Python HTTPS requests (urllib2) to some sites fail on Ubuntu 12.04 without proxy

I have an little app I wrote in Python and it used to work... until yesterday, when it suddenly started giving me an error in a HTTPS connection. I don't remember if there was an update, but both ...
13
votes
1answer
1k views

Is there a detailed API documentation on the python binding for appindicator?

I'm getting serous with a project of my own and need a good documentation on the appindicator module for python. What I've found so far: API documentation on dev.ubuntu.com Community wiki entry API ...
6
votes
2answers
4k 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 ...
4
votes
4answers
17k views

What is the best way to install python packages?

What is the best way to install python packages in Ubuntu 11? I am a recent convert to Ubuntu and want to learn best practices. For context, I am looking to install the tweeststream package, but I ...
21
votes
4answers
6k views

What's the difference between GTK and QT?

Please bear with me as I'm a newcomer to Linux. I've been writing GUI programs in REALbasic on a Mac for several years. I'm trying to learn Python and I want to write GUI apps for Linux (primarily ...
16
votes
4answers
3k views

How to program a status icon that will display in Ubuntu as well as in other distributions?

The application in question does some action (here connecting audio to network streams) and runs minimized if these actions were successful. Therefore a status icon is needed to display the state of ...
12
votes
1answer
2k views
+500

Dropbox Fails To Start With “VerificationError: importing pylinux…”

Dropbox Fails To Start With "VerificationError: importing pylinux..." . It seems that some recent Python update breaks Dropbox, resulting in the following error: Starting Dropbox...Traceback (most ...
4
votes
1answer
1k views

Listening to incoming libnotify notifications using DBus

I am attempting to filter every notification through espeak. However, I can't seem to find a way to get the notification body from a python script, or even what signal_name to listen to. ...
6
votes
6answers
8k 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 ...
12
votes
3answers
885 views

How do I call a dialog for authentication?

I am writing a gui program using wx module in python. In program whenever I am accessing a folder which requires root privilege then it asks password at terminal but I want to display the dialog to ...
5
votes
1answer
9k views

Why do I get “permission denied” errors with Python easy_install?

I'm an Ubuntu newbie and have been trying to install python's easy_install so that I don't have to deal with source files when install Python libraries. I"ve ran the following, and it seems to ...
3
votes
3answers
2k views

How do I get the names in my icon theme for use with pythons appindicator module?

How do I get the strings I can insert instead of 'gtk-execute'? #!/usr/bin/python import gobject import gtk import appindicator if __name__ == "__main__": ind = ...
1
vote
2answers
4k views

How to install python 2.5.4?

I have installed Ubuntu 12.10 on my laptop, now i want to use Python 2.5.4 for educational purpose. Can any one help me with step by step instructions... I also need IDLE for 2.5.4.
1
vote
3answers
6k views

need to have 2 versions of python?

Well, as I say, I need to have 2 versions of python installed on my PC. The first must be the latest one in order to use youtube-dl, and the second must be the 2.7 version to use it for a course ( ...
12
votes
1answer
283 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 ...
4
votes
1answer
1k views

Broken dependencies after upgrade

After an apt-get upgrade I got the following error: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not ...
4
votes
1answer
2k views

How do I install Pygame in virtualenv?

In installed python-virtualenv, because this question said I should use virtualenv to install pygame. However, I'm not really sure how that's accomplished. What I did (following these instructions): ...
4
votes
1answer
2k views

How to update ubuntu's python with latest version from source?

I'm using Ubuntu 11.10. The python 2.7.2 provided has a bug that has been corrected in the latest 2.7.2 sources from the python repository. What is the recommended way to replace the ubuntu provided ...
3
votes
2answers
413 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: ...
3
votes
2answers
252 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 ...