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

14
votes
2answers
6k 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 ...
14
votes
2answers
10k views

Ubuntu 14.04 LTS and Python 3.4.2

Is it possible update default Python 3.4 to 3.4.2? How?
14
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 ...
13
votes
6answers
25k views

What version of Python do I have?

How can I find out what versions of Python I have? I am using Ubuntu 14.04 (Trusty Tahr).
13
votes
4answers
73k views

run python in terminal

Trying to learn how to run my scripts through Ubuntu's terminal regularly. That being said I am familiar with bash, wget, and awk being called but how do I call python files to run in the terminal? ...
13
votes
3answers
1k 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 ...
13
votes
2answers
7k views

How do I install packages with pip when there are multiple Python versions?

I have different versions of python installed, python 2.7 being the default and 3.2 the second. Now I want to install pyramid to the 3.2 installation. How can I do this? Just using pip to install ...
13
votes
1answer
2k views

Putting an arbitrary gtk.Widget into an appindicator.Indicator

Putting any gtk.Widget inside a gtk.Menu works, somewhat, by putting an empty gtk.MenuItem in first. It doesn't seem to be reliable - but it basically works. With an appindicator.Indicator, it doesn't ...
12
votes
4answers
3k views

Writing indicators with Python, GIR and GTK3

I'm writing an application that needs to use an indicator. I've done this in the past using PyGTK and GTK2, using as reference this document: ...
12
votes
3answers
4k views

How to use Rhythmbox python console

Maybe this is obvious and I am missing it, or maybe someone's already written a great guide and my (seeming exhaustive) googling is failing to turn it up, but I cannot figure out for the life of me ...
12
votes
2answers
791 views

How to Change Quickly's Editor?

I've just downloaded Ninja IDE and I really like it's interface. Is there a way to configure the Quickly app to launch my project in Ninja IDE when I type quickly edit?
12
votes
1answer
3k views

How can I get tab-completion in the interactive Python interpreter?

I often use Python 3000's interactive interpreter, but it's missing the convenience of tab-completion I'm used to from ipython, which isn't available for Python 3.x. How do I enable tab completion in ...
12
votes
1answer
295 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 ...
12
votes
3answers
4k views

How can I install numpy on Python 3.1?

I have Ubuntu 10.10 server on EC2. I installed Python 3.1, and now I want to install NumPy on it. How do I do it? I tried easy_install-3.1 numpy but got this error: RefactoringTool: Refactored ...
11
votes
3answers
17k 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 ...
11
votes
3answers
368 views

Is there a Perl or Python script I can write which can minimize the Gnome terminal window?

I'm on Ubuntu 14.04 with the old-style GNOME setting from the GDM. (I don't like the new Unity interface.) Is there a way I can create a command that I can type in my terminal window to minimize it? ...
11
votes
4answers
45k 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 ...
11
votes
1answer
9k views

How do I use Python with apache2?

I'm trying to get Python working with Apache, however I'm failing to have success with either CGI or mod_python. Does anyone know a good tutorial or something? Thanks.
11
votes
4answers
1k views

Why do most GNOME developers prefer Python over Java for GTK+ programming?

I only know C and Java. And I really don't want to learn another language when I can work with what I already know. I haven't ever written a GTK+ application, but I am planning to start with an ...
11
votes
1answer
6k views

What language(s) can I use in LibreOffice for macro scripting?

Not finding any info online; I hope somebody here knows. It was Python in OpenOffice; is it still Python? Or are they moving to gasp VBA?
11
votes
2answers
861 views

Quickly template for PyQt?

Because I like Qt and Python, is there a Quickly template for PyQt similar to the PyGTK one?
11
votes
2answers
3k views

I have installed python-doc. How can I access it?

Sorry if this is a such an obvious question, but where does Ubuntu put documentation packages for python, node.js, redis, mysql, mongodb, and other applications? And why I cannot access it by typing ...
11
votes
1answer
309 views

Show personalized banner exhibits on Ubuntu Software Center

How can I show my own personalized banner exhibits on Ubuntu Software Center? I've seen some URL definitions on /usr/share/software-center/softwarecenter/enums.py and ...
10
votes
2answers
1k views

Symbolic links: why are they so bad?

Why is using symbolic links to change the default python version on Ubuntu considered as being unsafe ? I read this information on several forums but did not find an answer as to why is this so.
10
votes
2answers
6k views

Install uwsgi 1.2.5 via pip

Welcome, Currently I'm trying to install latest uwsgi on my VPS (Ubuntu 11.10) based on instruction from the site http://projects.unbit.it/uwsgi/wiki/Quickstart pip install uwsgi During ...
10
votes
3answers
1k views

Where to store user settings for an app?

If I want my application to store a few settings, that persist when an application closes, then where should I store them? I'm not talking anything complicated: two booleans and a string (although in ...
10
votes
3answers
32k views

Problem installing Python-Dev

I am having trouble installing python-dev. It all started when I tried to install another Python package and got the error: SystemError: Cannot compile 'Python.h'. Perhaps you need to install ...
10
votes
2answers
2k views

Installing Pylint for Python3 on Ubuntu

My understanding is that the latest release of Pylint (1.0.0 at the time of this writing) has support for Python 3, but I can't get it to work on 64-bit Ubuntu 13.04 with Python 3.3. I followed the ...
10
votes
2answers
776 views

How do I make a rich menu for an appindicator?

I'm adding menu items to an appindicator in pygtk. I don't want them to behave like ordinary menu items: I want them to have normal appearance, but not to respond to mouse hovers and mouse clicks. The ...
10
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. ...
10
votes
3answers
7k views

How to install and configure IPython so it uses Python3.2 on 11.10?

How to install and configure IPython so it uses Python3.2 on 11.10? I've checked that installing by sudo apt-get install ipython will uses python2.7. [EDIT1] $ sudo python3 configure.py ...
10
votes
2answers
949 views

Is PyGTK still relevant?

I'm new to Linux but not to app development. I come from a RealBasic on a Mac background. I've accepted that I need to learn a new language to develop for Linux (since RB won't run on 64 bit distros ...
10
votes
1answer
767 views

How do I make the launcher progress bar work with my application?

Background Research I am attempting to update the progress bar within the Unity launcher for a simple python/Gtk application created using Quickly called test; however, following the instructions in ...
10
votes
2answers
278 views

How do I use get_media_file() in the latest Quickly?

I am writing a project with Quickly and GTK 3 and I want to use the get_media_file() helper so I can load an icon in my data/media directory. I can't see how I use get_media_file() with the latest ...
10
votes
4answers
446 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?
10
votes
2answers
574 views

Quickly application with ListStore as preference

I'm starting to write a program with 'quickly'. A list of desired languages will be one prefereces. Example: languages = ["en", "de"] The (automaticly created) quickly code that handles the ...
10
votes
1answer
3k views

Is it possible to call Python functions from Libre Office Calc?

Consider the following simple Python function: def mysum(a, b): return a + b I would like to put =mysum(5, 7) in a cell of the Calc spreadsheet, so that is simply returns the number 12. Is this ...
9
votes
4answers
13k views

Unable to download videos using youtube-dl ('sig error'), how to correct?

I used to download videos using youtube-dl command line tool, from the past two days whenever i try to download any video I get an error as shown below. $ youtube-dl ...
9
votes
2answers
18k 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 ...
9
votes
3answers
4k views

How can I change the wallpaper using a Python script?

I want to change my wallpaper in Ubuntu 11.10 (with Unity) in a small Python script. I found the possibility to change it via the gconf-editor in /desktop/gnome/background/picture_filename. With ...
9
votes
1answer
4k views

How to use a python virtualenv with sudo?

I am trying to make a python environment separate from the system one (using virtualenv) in a directory which is not under /home, because I need to use it to build other software that has to be ...
9
votes
1answer
640 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 ...
9
votes
3answers
1k views

Has anyone managed to configure Nautilus to show EXIF data?

I followed instructions on the Ubuntu Forums to configure Nautilus to display additional information about image files - specifically, the EXIF data: [SOLVED] Adding mp3 info columns (e.g. bitrate, ...
8
votes
2answers
6k views

Why can't I import “pygtk” with Python 3.2 from PyDev?

I have installed Eclipse + PyDev + Python 3.2. Now I have two Python interpreters in PyDev: Python 2.7 and Python 3.2. If I try to execute command import pygtk with 2.7 interpreter it works fine, but ...
8
votes
2answers
1k views

Rename a file during install of a Debian package

I have a python script that I want to package for Debian. I use a debian/install file where I wrote auto_dice.py /usr/bin/ Linitan then complains about the .py extension ...
8
votes
1answer
12k views

Upgrading to python 2.7.5 on Ubuntu 12.04

Ubuntu 12.04 comes with python v 2.7.3 by default. I want to upgrade it to v 2.7.5. I tried the instructions given in this question, sudo apt-get install build-essential sudo apt-get install ...
8
votes
1answer
353 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 ...
8
votes
2answers
627 views

Can I use a desktop install as a server?

I'm new to Linux and Ubuntu is my first distribution. I have chosen Ubuntu because I want to learn more about Linux. I'm under time constraints and need to setup a server as soon as possible. I have ...
8
votes
6answers
1k views

Deleted the python binary, and can't recover using apt-get, what can I do?

Well. Yep. Wanted a fresh start because I was having dependency confusions, so I ran "whereis python" and literally erased all of the files and directories that came up. Then when I go to run apt-get ...
8
votes
1answer
2k views

How can I install a Gsettings Schema without root privileges?

The typical workflow to install a Gsettings Schema is this: Create a schema, with the extension .gschema.xml, with contents like this: <?xml version="1.0" encoding="UTF-8"?> ...