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

2
votes
1answer
1k views

Is there a difference between using setuid()/setgid() within a program and invoking it with sudo -u xxx -g xxx?

Consider this python script, which invokes HandBrakeCLI, a program that attempts to read from the dvd drive: invoke.py #!/usr/bin/python import sys import os import subprocess as subp import ...
8
votes
2answers
2k views

Using GIO in Python 3

How can I access the gio module for Python 3.2? (I want to interface with GVFS.) I did sudo apt-get install python3-gobject but this does not allow me to do import gio as it did in Python 2.7. ...
3
votes
1answer
969 views

Load configuration from XML (Xfconf)

I'm trying to make an app to switch your XFCE4-Panel's layout between 3 layouts. I applied those layouts and copied the XML file where Xfconf stores its configuration for the panel. The general idea ...
0
votes
1answer
915 views

I need wxpython on Ubuntu 11.10, how do i get it

I have a program that requires wxpython, but the site for wxpython only covers Ubuntu upto 11.04. It requires u to list the name or your distribution in the command for the installation (ie. ...
2
votes
1answer
415 views

How to run normal session from user script after passing init=MY_SCRIPT in grub entry

I have entry in grub to start my configuration script written in Python. I would like to give user option to start normal session after the work is done. But I've found that /sbin/init needs to have ...
2
votes
2answers
825 views

How to run interactive python script after boot as user USER

I want to run my system configuration script (written in python) after boot. System should ask for password for user USER and run my script. After that system should reboot, eventually run gui. I ...
6
votes
1answer
917 views

PyGTK Application Icon Blurred in Unity

I have 128x128 icon referenced in main window glade file like <property name="icon">../media/my-icon.svg</property>. I tried, with both svg and png, but it is always very blurred in ...
1
vote
2answers
579 views

Appindicator Theme Dependent Icons

I am developing PyGTK app with appindicator. I create my appindicator similar like in this example. In this example "indicator-messages" stock icon is used. So, I can: use stock icon (from existing ...
57
votes
5answers
15k 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 ...
0
votes
1answer
2k views

Python - pip module install 2.6 instead of 2.7

I use Django 1.3 with Python 2.7 on Ubuntu 10.04. $ python Python 2.7.1 ... >>> I'm trying to install the python module django-grappelli. $ pip install django-grappelli ...
3
votes
1answer
1k views

Appindicator best practices in PyGTK apps

I have problem adding appindicator to my PyGTK app. When I place this into my init.py, before gtk.main(), it works, but when I put it in my main window finish_initializing() method, it does not get ...
3
votes
2answers
1k views

Installing python-pygments, ImportError

I want tot use pygments in my python app. At first, I installed pygments like this: $sudo python setup.py install --prefix=/usr/local /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown ...
5
votes
1answer
1k views

Why '*.exe's in Python installation?

Just out of curiosity I executed following command and I was surprised to see MS Windows Executables in Python installation directory. 20:36:46 nixlap [~] $ locate -i -r exe$ [snipped] ...
7
votes
3answers
3k 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. ...
8
votes
1answer
6k views

Storing passwords with python keyring

I'm using keyring library to store passwords in my python app. import keyring keyring.set_password('My namespace', username, password) keyring.get_password('My namespace', username) And this works ...
5
votes
2answers
997 views

Upstart not executing the exec function in upstart.conf

I have a completed upstart conf file loaded here: http://pastebin.com/5E7J5jEY but I'm having trouble with the upstart not executing the exec function and/or relinquishing the kernel console CLI back ...
6
votes
1answer
2k views

ubuntu upstart script execute a script.py program

I'm creating an upstart script to execute a python program I've written. When the service is starting I want to echo starting service - script.py... and echo the process id of the program once ...
2
votes
1answer
292 views

Using libnotify from a daemon started with upstart

I have a python script that gets messages from an MQTT server and parses them to display using libnotify. This works fine when I run it from a terminal, but when I run it using upstart I get no ...
2
votes
2answers
288 views

Processes and .desktop launchers (Identification)

I have a python application which behaves in two different ways. When started without arguments, it runs in CONFIGMODE and shows a Configuration GUI (pygtk). When started with an argument it runs in ...
0
votes
1answer
624 views

Custom PyGTK dialog with Glade

I'm building simple PyGTK app using Glade UI designer. I followed pattern from default Ubuntu app, where preferences and about dialog are implemented extending gtk.Dialog, so I added new dialog with ...
1
vote
1answer
189 views

quickly run ERROR: run command failed Aborting

I have simple PyGTK app made with quickly. After syncing source files via Ubuntu One and running on other machine I got: $ quickly run Can't execute bin/myapp ERROR: run command failed Aborting ...
1
vote
1answer
884 views

PyGTK application example

I'm planing to write my first Ubuntu app. I'm new in Python and looking for good example, an open source app, just to pick the patterns and architecture. Is there any good example? It would be nice ...
4
votes
2answers
2k views

Python application has no icon in Unity launcher

I have written a python application (with pygtk and pymozembed) which I use very often. In the Unity dash my application has an icon (as I definded in the .desktop file). But when I start it, there ...
1
vote
1answer
1k views

How to auto answer an incoming Skype call?

Is it possible to auto answer to an incoming Skype call from specific Number or contact? I Think this should work with a Python script using Skype4py but as I am not a programmer I don't have an ...
9
votes
3answers
6k 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 ...
25
votes
4answers
11k 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 ...
11
votes
2answers
1k 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 ...
3
votes
2answers
1k views

How do I rename photos based on their shotwell titles?

I recently gave ~200 photos numerical titles in Shotwell which describe their sequences--001, 002, etc. But I'd like for this sequence to be the same in the filenames, too, so that when I open the ...
12
votes
2answers
839 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?
3
votes
7answers
2k views

Recommendation for a non-programmer's guide to self-teaching Python

I am new to Ubuntu and to programming, and I am seeking to teach myself Python. I installed the software from the Software Center and was wondering how to be sure it is up to date with the latest ...
5
votes
3answers
8k views

Python script won't write data when ran from cron

When I run a python script in a terminal it runs as expected; downloads file and saves it in the desired spot. sudo python script.py I've added the python script to the root crontab, but then ...
6
votes
2answers
10k 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 ...
1
vote
2answers
87 views

Which programming language suits a system that must work without user input

I'm building a prototype of a device that will function much alike a digital photoframe. It will display images retrieved from the internet. The device must start up and run the photoframe. It will ...
2
votes
3answers
570 views

How can I install python-envisage?

My question is about how I can install Ubuntu 11.10 packages on Ubuntu 10.04. I would like to install python-envisage (4.0.1), but in the Ubuntu 10.04 Software Center there is only python envisage ...
3
votes
1answer
4k views

How do I force apt-get to install a package that will not install due to a bug introduced by Ubuntu 11.10?

Ubuntu 11.10 separated out python-profiler from the Python standard library due to licensing philosophies. (According to what I could Google, correct me if I'm wrong.) This is an active bug since ...
2
votes
3answers
16k views

What would cause the “gi” module to be missing from python?

After some not so clever editing of the default Python version in Ubuntu, from 2.7 to 3.2, I ended up breaking my entire system. After my computer imploded and everything stopped working, I tried to ...
3
votes
2answers
209 views

Can't get activate_uri signal working when making a lens

I'm trying to develop a lens for unity in ubuntu 11.10 and I can not get activate_uri signal working. This is an extract of my code: def _on_activate_uri (self, scop, uri): print "----> " + ...
3
votes
1answer
2k views

Typing commands into a terminal always returns “-bash: /usr/bin/python: is a directory”

I think I messed something up on my Ubuntu server while trying to upgrade to Python 2.7.2. Every time I type in a command that doesn't have a response, the default from bash is this: -bash: ...
0
votes
3answers
1k views

How to get the latest IMDbPY in 10.04 LTS

I am using Ubuntu 10.04 LTS. I would like to install the latest IMDbPY because the one in the repository has a bug with the country codes. This bug has been fixed in the later versions, but I don't ...
8
votes
2answers
11k 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 ...
2
votes
2answers
1k views

How to determine all python-nautilus extensions in use?

I need to provide an application developer with a list of all other python-nautilus extensions I have installed/running (I am trying to provide information on this issue). What is the easiest way to ...
1
vote
2answers
2k views

Software Center won't start: “AttributeError: 'gi.repository.Gtk' object has no attribute 'FontSelectionDialog' ”

When I try to run software-center from the terminal it gives me: Traceback (most recent call last): File "/usr/bin/software-center", line 33, in <module> from gi.repository import Gtk ...
3
votes
2answers
108 views

How to show spreedX client ApplicationIndicator?

For my job I require the use of the spreedX client which allows me to share my desktop when using the Spreed web conferencing environment (www.spreed.com). In pre-Unity Ubuntu versions, this ...
0
votes
1answer
577 views

Python problem during Bibus installation

I cannot install bibus from the application centre. I am a new user of ubuntu and I found it is very helpful. When I was trying to install Bibus, they told me the Package dependencies cannot be ...
2
votes
1answer
202 views

I can't seem to get any application indicators to show up - why not?

I am trying to run a program that makes use of application indicators - but it isn't working. This could be because I am missing a package (I didn't use the Desktop Installer CD to install Ubuntu - I ...
2
votes
2answers
2k views

How to configure PyQt4 for Python 3 eclipse in Ubuntu?

I installed PyQt4 with synaptic. I'm using Python3 so I need to configure the path for PyQt4 in eclipse, but it seems synaptic only installed PyQt4 for python 2 since I only found relative files and ...
0
votes
1answer
922 views

Create a batch rename srcipt in python?

Firstly, this question was made as a follow up of my previous question: How to batch rename files with "variables"?. I'm just restating it considering Sergey's recommendations. I use xmbc ...
1
vote
2answers
217 views

Python specifics in relation to ubuntu [closed]

I was wondering what experiences you have and can share in regards to using Python in an Ubuntu environment? I have worked with Ubuntu a bit but is there anything special that can be done with Python ...
5
votes
2answers
2k views

Porting “import gobject” to use GObject-Introspection. (PyGTK to PyGI and GTK 3)

I've been trying to port a library from PyGTK to use GI and GTK3. The problem is I can't find any resources specific to the gobject imports, but only for GTK. I was hoping that if someone would ...
22
votes
6answers
52k views

How do I install Python Pandas?

I'm trying to install Pandas (python package) on Ubuntu. I can't find it in the repos. Is there a package repo for this or do I have to install from source?