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

7
votes
2answers
2k views

How to add checkbox or radio buttons to a Unity quicklist?

I have been searching how to make that happen but i can't find it anywhere. I even guessed how to enable/disable the quicklist item, so as how to add function invoked after the item is clicked, but ...
19
votes
2answers
25k views

How do I run Python 3?

The description here says that 12.04 ships with python 3.2.3 as well. What command do I run to get this? Running python -v or python2 -V or python2.7 -V all give me the same result 2.7.3. There are no ...
3
votes
1answer
474 views

Python gzip fails on Ubuntu 11.04

This function is based on the Python sample code @ http://docs.python.org/library/gzip.html. It runs reliably on Ubuntu 10.04 with its default Python 2.6x. On Ubuntu 11.04, however, the code fails @ ...
0
votes
1answer
345 views

Installing the Numenta Platform

I want to install the Numenta Platform in Ubuntu12.4. It created by python 2.5 and for Ubuntu 9.4. You can see the installing step and requerment in the below link The Numenta installing help But ...
4
votes
2answers
1k views

KEY.is_pressed() in gi.repository.Gdk?

I was wondering if anyone knew how to detect if a key is currently pressed with either Gtk or Gdk and python? I don't want to use the key-pressed or key-released event for this scenario, but rather ...
0
votes
1answer
689 views

WxPython 2.8 Offline Installation on Ubuntu 9.10 with 2 version of Python

How do you do an offline installation of wx 2.8.12 for python2.7 on Ubuntu with python 2.6 as default Python? Tried searching on google but can't found anything specific. I'm a noob with Linux. ...
1
vote
1answer
915 views

How can I install Python 2.7 x64 in x64 wine on 12.04?

It keeps failing when I run wine msiexec /i python-2.7.2.amd64.msi /qn as recommended as a workaround for an installer bug in some google results. I just wanted to help the next guy that encounters ...
4
votes
1answer
2k views

PulseAudio and Python3

Accessing PulseAudio with Python2 is a bit tricky, but it works with the help of ctypes. The problem is that the same code fails to work with Python3. Apparently something was changed in ctypes, but I ...
4
votes
1answer
2k views

Where is libpython-dev?

I've just upgraded to 12.04 and I can't find libpython-dev anymore. Can you tell me where it is?
1
vote
1answer
423 views

How to include locally build Python package system-wide?

For example: I build numpy with Intel MKL libraries and it's available in Python shell, but if I want to install some package from repository that depends on numpy, my build is not considered. What ...
3
votes
2answers
720 views

How can I get the source code to gnome-system-monitor and use it in my application?

I want to create a system monitor quite similar to gnome-system-monitor in ubuntu using python. I have used quickly application for the GUI and now i want to show the cpu history as shown by the ...
1
vote
2answers
1k views

Python, Gtk3 and Gstreamer

This isn't a really happy combination, but it does work for the most of the time. However, I just bumped into a problem with Gio.File. This will always result in TypeError and Python segfaulting: ...
71
votes
8answers
82k 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 ...
13
votes
3answers
3k 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 ...
3
votes
1answer
226 views

Unity lens not included in global search

I'm using the quickly unity lens template here http://developer.ubuntu.com/2012/04/how-to-create-a-wikipedia-unity-lens-for-ubuntu/ It works quite all right, but even though i have set ...
1
vote
1answer
1k views

How to get pygtk with python2.6 ? the update to 12.04 removes it. (cannot go python2.7 because of specific extensions)

I have updated to the latest 12.04 and it removes the pygtk bindings for python2.6. I've looked at the python-gtk package and it now installs only the lib for python2.7. The problem is : I have an ...
3
votes
2answers
962 views

How to let an icon in the launcher wiggle?

Trying to let my python application inform the user by wiggling or shaking its icon in the launcher, I found: Wiggling seems to be the "urgent animation": How can I change the wiggle time of '...
2
votes
1answer
2k views

Installing matplotlib 1.1.0 on Ubuntu 11.10

I installed matplotlib 1.1 from source, but I cant get any plot to show. python setup.py build shows the following: BUILDING MATPLOTLIB matplotlib: 1.1.0 python: 2.7.2+ (...
3
votes
1answer
2k views

“Additional data from the script executed” message in Inkscape

This is very irritating. I'm Using Ubuntu Oneiric and when I use Inkscape and make a couple of copy-paste operations inside the image, I get the following popup message: Inkscape has received ...
3
votes
2answers
137 views

How to add Quicklists to GTK2 application?

We want to add Quicklists to our app Nitro. However Nitro uses GTK2 as it uses the pywebkitgtk library. As far as I'm aware, we can't use Quicklists because it requires PyGI which requires GTK3 and ...
8
votes
1answer
259 views

Only show a menu under Unity

We want our app Nitro to be more native on Ubuntu. We're going to do this by adding Unity quicklist support & appmenu support. Is it possible for the app to only utilize the app menu? If the user ...
2
votes
1answer
213 views

how to fix ipython notebook 0.12 dashboard links

I've installed ipython 0.12 on a freshly installed machine with ubuntu 12.04 (precise), mainly because I wanted to use the notebook interface. Now it turns out that all the links in the python ...
2
votes
0answers
914 views

how to upgrade to latest python? [duplicate]

Possible Duplicate: How to update ubuntu’s python with latest version from source? I am using ubuntu 11.04. by default, there's a python already installed, it is version 2.7.1+ I know the ...
4
votes
1answer
981 views

Working with quickly, are there any gtk.Builder code sketching tools that integrate?

Example: quickly create ubuntu-application testing quickly design #makes changes #insert some other command here that would be roughly equivalent to 'quickly sketch' quickly edit #to populate the ...
4
votes
1answer
2k views

Executing “unicode” Python script from Gedit vs Terminal

As can be seen from screenshot, same script run from Terminal and Gedit behaves differently - in terminal script executes succesfully and in Gedit it raises error: But if I change python in Gedit ...
1
vote
1answer
134 views

Fix Nautilus URIs in a Python script

I have a very basic Python script I wrote mostly for learning purposes. It opens a terminal in the current folder. However, I can't get it to work in folders with accented characters in the URI (e.g....
1
vote
2answers
1k views

Build binary deb package from python source

I have created python package (using Ubuntu Quickly) and want to create deb package. Unfortunatelly Quickly builds package with source python files (.py) and I want not to include source files. The ...
0
votes
4answers
3k views

Help with installing Gnome Shell Google Calendar Extension

I am having trouble running the script to install the gnome-shell-google-calendar extension into Gnome Shell. I keep getting this: rafael@Raf:~$ ./calendar/gnome-shell-google-calendar.py Logging in ...
22
votes
7answers
42k 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 ...
1
vote
2answers
896 views

DBus nested dictionary in python

I have dictionary like this {key: { key1: '', key2: [{ key3: '' }] }} I have tried a{sv}, but I got error: **to message with signature a{sv}: <type 'exceptions.TypeError'>...
0
votes
1answer
1k views

Connect to MySQL on remote server from inside python script (DB API)

Very recently I have started to write python scripts that need to connect few databases on mySQL server. The problem is that when I work from office my script works fine but running a script from my ...
1
vote
1answer
662 views

Upstart for pydoc webserver

I'm trying to use upstart so that the pydoc webserver for a package I'm developing always runs. If I run it from the command line: pydoc -p 7464 /some_path/my_python_package it works fine, and ...
0
votes
1answer
3k views

Python PyBluez loses Bluetooth connection after a while

I am using Python to write a simple serial Bluetooth script that sends information about my computer stats periodically. The receiving device is a Sparkfun BlueSmirf Silver. The problem is that, ...
1
vote
1answer
6k views

Why is /dev/rfcomm0 giving PySerial problems?

I am connecting my Ubuntu box to a wireless readout setup over Bluetooth. I wrote a Python script to send the serial information through /dev/rfcomm0. The script connects fine and works for a few ...
5
votes
1answer
2k views

Is it ok to install python 3.2 in 11.10?

I'm just wondering if it is okay install the package python3.2 from ubuntu's repositories?. I have been so unlucky with ubuntu lately, that I'm afraid to do anything because everything seems to break ...
1
vote
1answer
709 views

why is python running at over 90 percent on cpu all the time in ubuntu 11.10?

I just checked my processes over last 3 hours and python was running over 90 percent,sometimes 110.whats causing this ?it says something about a checkbox running when i hover over it.I uninstalled two ...
0
votes
1answer
201 views

Focusing a specific application instance by code?

I'm writing an application using Python and GTK3. This application will open instances of other applications, such as GEdit. Now, I'd also want my application to be able to focus each of those ...
1
vote
4answers
996 views

I changed my Python version - but it didn't “take” everywhere?

Free Ubuntu-ers. I have a strange problem which I've spent a while trying to debug, and later I searched fairly thoroughly for data on it, without any luck. I have a fairly new server running Lucid ...
0
votes
2answers
380 views

How to exclude a certain file type using newsmangler

I'm trying to upload everything in a folder besides a .avi file and i was wondering what i would put at the end of the path for it to ignore all avi files. I know that putting "/*avi" will make it ...
1
vote
1answer
5k views

Installing numpy for python 2.6

How do I install numpy for python2.6? When I installed the package python-numpy, it was installed in python2.7 (the default in Ubuntu), but not 2.6.
3
votes
2answers
6k views

Python Compared to BASH

I've been studying bash for the past three weeks or so, and it is very easy to learn since it is basically just command line inputs. I've decided to now move onto python but I've been lost the whole ...
0
votes
1answer
988 views

If I want to control the mouse cursor using Python, should I look into docs for GNOME or X?

I want to write a program in Python runs on Ubuntu and moves the mouse cursor, just like a hardware mouse would. What should I try to connect to: X or GNOME? I am pretty sure that X would work, but ...
0
votes
3answers
2k views

Error in running Python scripts

I have python 2.7 installed and I'm facing errors while trying to run scripts in Python. The GUI based Launchpad app Ground Control can't start and is facing bugs. But even a simple program can't run:...
1
vote
2answers
1k views

python: os.system does not execute shell comand

I need to execute shell command in python program (I have ubuntu). More specifically I want to create graph using graphviz in python script. My code is os.system("dot -Tpng graph.dot -o graph.png") ...
27
votes
4answers
13k views

How do I send text messages to the notification bubbles?

I wrote a python code for getting random text into a .txt file. Now I want to send this random text into notification area via 'notify-send' command. How do we do that?
1
vote
2answers
208 views

How do I limit a Ubuntu machine to a Python GUI?

I wrote a python GUI in Tkinter for a time-clock system. The micro machine is wall mounted and the employees only have access to the touchscreen menu I programmed and a barcode swipe. I know how to ...
4
votes
1answer
2k views

How to use custom icon in an appindicator?

This question has already which icon names you can pass to the set_icon_full (set_icon is deprecated if someone is wondering), but I couldn't find ressources of how to set a custom icon from a file ...
0
votes
2answers
549 views

Compiling Pyqt4 program

I am trying to package a program I wrote (using Pyqt4) into a single executable for linux. I tried using Pyinstaller however it has problems with importing Gio (for settings) from gi.repository ...
14
votes
4answers
5k 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: https://wiki.ubuntu.com/DesktopExperienceTeam/...
2
votes
1answer
195 views

What are the benefits/problems about upgrading Python to a newer version

What advantages and disadvantages does upgrading Python to a newer version not available in the Distro bring. For example, upgrading from 2.6/2.7 to 3.1/3.2. Since there are several questions relating ...