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

8
votes
2answers
2k views

How to add a pygtk Widget to the Glade palette?

Say I've created a gtk Widget like this: class AwesomeTextView (gtk.TextView): def set_font(self, font_description): self.modify_font(pango.FontDescription(font_description)) How can I ...
7
votes
2answers
10k views

Questions about using Regex Search & Replace in gedit

I am trying to use Regex Search & Replace plugin of gedit. I want to search a digit that repeats 2 or 3 times, so I thought the regex was [0-9]\{2,3\} But it doesn't match the target it ...
4
votes
2answers
290 views

PPA & Packaging: Packaging Source as a Binary Package

I'm trying to create a .deb for a python-based IRC bot. I've already gone through the Ubuntu Packaging Guide, and done a debuild -S on it to create the source package. When its uploaded to the PPA, ...
8
votes
2answers
645 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 ...
1
vote
1answer
232 views

Scripts used by `jockey-common`

Is it possible to make a script that basically does the same thing as jockey-common? i.e. An script to find any hardware that requires proprietary drivers and install them. EDIT As Oli mentioned, the ...
5
votes
2answers
506 views

How do I program the GNOME Clock Calendar with Python?

I want to develop a little application and I want to add events to the calendar of the Gnome panel clock. How does it work? Is there a D-Bus Interface I can use? Or can I directly access the ...
6
votes
2answers
11k views

How can I install a 32bit python on 64 bit Ubuntu

I am using Ubuntu 10.10 (Linux pc07 2.6.35-27-generic #48-Ubuntu SMP Tue Feb 22 20:25:46 UTC 2011 x86_64 GNU/Linux) and the default python package (Python 2.6.6). I would like to install python-psyco ...
11
votes
1answer
10k 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.
0
votes
2answers
152 views

Using Python applications

I downloaded and installed a Python-based application according to this page. How do I use it?
5
votes
2answers
3k views

Setting the Python path for the trunk version of Django

I am trying to run the unit tests for the trunk version of Django. I also have a version of Django installed on my system which I installed via apt-get install. How can I change the Python path to ...
12
votes
1answer
7k 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?
4
votes
1answer
3k views

USB device changes using udev and D-Bus

I am trying to get a list of currently plugged in USB devices in Ubuntu 10.10 and monitor changes that happen, like devices being plugged in or out using udev and D-Bus. I'm fairly new to ...
21
votes
1answer
22k views

Can I use easy_install?

Can I use easy_install on Ubuntu 10.10? If yes, then how?
1
vote
1answer
540 views

How to make a python script run in Anacron

I have a python script that I would like to run daily using anacron, but I haven't been able to get it to work. The script is in my home directory, and I have put a symlink to it in /etc/cron.daily/. ...
10
votes
2answers
798 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 ...
4
votes
5answers
274 views

How do I find the .desktop information for a given binary?

Given the path to an executable (say /usr/bin/gvim), how can I find the Gnome .desktop file for that application? I'm futzing around in python, so a python-specific answer would be most helpful.
0
votes
1answer
865 views

Encrypted replication between normal CouchDB and Ubuntu One?

this is a very special question. Currently I'm starting to develop a new online shop using Python (Flask). I want to use CouchDB to store (and sync) new orders. But CouchDB does not encrypt the ...
1
vote
1answer
320 views

Shared location for all python interpreters

is there a shared location for all python interpreters? I want to install a module so it becomes avaiable to all interpreters (2.6, 2.7, 3.1). Thanks you in advance, rubik
11
votes
2answers
899 views

Quickly template for PyQt?

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

Which window has current focus?

I'd like to know (programmatically) which window has current focus. Is there a window-manager independent way of discovering that? Otherwise, how does one determine which window has focus in Compiz ...
12
votes
1answer
4k 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 ...
2
votes
1answer
1k views

Installing python-sexy?

I'm trying to install it by doing sudo apt-get install python-sexy but it tells me This may mean that the package is missing, has been obsoleted, or is only available from another source. I ...
7
votes
2answers
978 views

How can I access UbuntuOne contacts and notes with Python?

I want to use UbuntuOne in my own Python application. I want to access contacts and maybe store other data. But I could not find any documentation or (Python) examples. How can I use this?
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 ...
8
votes
4answers
1k views

Two gedit plugins clash. How to change shortcut keys, or enable/disable a plugin

Gedit has two plugins from Gnome's Gedit Plugins page which I both particularly want... Multi-edit Control Your Tabs However they both vie for the same shortcut keys: Ctrl+PageUp and ...
3
votes
3answers
1k views

How to programatically manipulate application windows?

Anyone know a library, preferably for ruby or python, that will let you access a list of open applications and let you manipulate them? All I really want to be able to do is change their geometry and ...
26
votes
4answers
12k views

What are the packages/libraries I should install before compiling Python from source?

Once in a while I need to install a new Ubuntu (I used it both for desktop and servers) and I always forget a couple of libraries I should have installed before compiling, meaning I have to recompile, ...
7
votes
2answers
461 views

Reverse rendering of Urdu fonts

I am working on a project that is based on Urdu language in Ubuntu platform. I'm using Python language and have almost achieved my task. The problem is that, the Urdu text is rendered in reverse ...
22
votes
2answers
10k 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
268 views

How to create a diff of a file between it's current and the latest tagged version in bzr?

I have a file that is tracked using bzr, and I'd like to script the creation of a diff between it's current (current as in current, not latest commited), and latest commited version that is tagged. ...
4
votes
1answer
247 views

Rhythmbox plugin code for hot key not working - why?

def activate(self,shell): self.shell = shell self.copy_selected() self.action = gtk.Action ('foo','bar','baz',None) self.activate_id = self.action.connect ('activate', ...
2
votes
2answers
388 views

How can I listen to a specific signal in Rhythmbox?

I want to listen to the key press of lets say Ctrl+W in Rhythmbox, and call a functions if that happens. How can I do that in Python ?
7
votes
1answer
2k views

How to install Revolution R Enterprise, an rpm, when alien fails?

Revolution R Enterprise is available as a red-hat rpm file. Normally I would use alien to install an rpm file as explained in another more generic question about installing rpms , but the instructions ...
7
votes
1answer
2k views

Too many Python processes running

I am running ubuntu 10.10, and everything is working fine. I just checked the system monitor to see what processes run in a linux system..and noticed something strange. There were many python ...
1
vote
1answer
3k views

Pipe error with bash script called from python

I'm trying to run a shell script inside some python code, but I keep getting an error message. Python script (test.py): import os f = os.popen('/home/test/Downloads/record.sh') f.close() ...
6
votes
2answers
742 views

Generate powerpoint slides automatically

I'm often faced with the tedious task of generating a PowerPoint from a collection of pictures. Each picture is to be placed with in its own slide, centered and enlarged so that it fills the screen. ...
2
votes
6answers
2k views

How to open a remote python program from terminal by ssh?

I type ssh -X name@blah.edu and asks for a password, I type it in and get logged in. name@blah.edu:~$ program.py then nothing happens, when it should actually pop up. Why is this happening and ...
23
votes
5answers
18k 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 ...
18
votes
5answers
24k views

How to remove a deb without removing its dependencies

I would like to install the most recent version of boto, which I do via python setup.py install Yet when I try to remove the old version the following packages also get removed: apt-get remove ...
20
votes
1answer
28k 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 ...
5
votes
2answers
963 views

How do I export all the Python docs of a package and get it into Devhelp?

At the moment, to read the documentation of a package, quickly for examle, I do this: >>> import quickly >>> help(quickly)   >>> import quickly.widgets >>> ...
14
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 ...
1
vote
0answers
616 views

Cx_freeze - How can I Install the shared libraries to /usr/lib [closed]

I am using cx_freeze to compile my python script and when I compile the program, all the files are placed in one specified folder. The executable wont run if the shared libs are not within the same ...
1
vote
1answer
446 views

Accessing googlecl using python script

I am trying to create a python gtk program which uses googlecl tools like listing google calendar appointments, accessing the google blog etc. However I do not know how to call the command in python ...
15
votes
1answer
3k 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?
11
votes
3answers
20k 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 ...
3
votes
1answer
372 views

Can't launch CoverGloobus: ImportError

I installed CoverGloobus on my ubuntu 10.10. But every time I try to run it, I get this error: [WARNING] Using default configuration Traceback (most recent call last): File ...
4
votes
3answers
137 views

What is the right way to reinstall from source after package was installed via apt?

I have a python package previously installed via apt(by default). Now I want to install new version and compile it manually from the sources with all the required modules. How can I do that? I ...
18
votes
4answers
4k 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 ...
5
votes
1answer
2k views

Installing Python 2.4 for development?

I have a VM of Ubuntu 10.10 x86, and I need to build a Mercurial installation against Python 2.4. I have to do this because the web host I am working on has Python 2.4 as the latest copy of Python. ...