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

3
votes
1answer
2k views

Ubuntu Server Automatically Insert Password Using Python3

I'm trying to create a small python3 program for my friend which will install and configure the nessarcary set-up for his Ubuntu Server. I want him to be able to start the program, give some basic ...
1
vote
2answers
90 views

RAM usage for webadmin

I would like to know RAM usage. I know there are several commands like free, top, but how can i get only the number in MB's like "3172", so i can use it in my webadmin script? Thanks in advance.
3
votes
1answer
417 views

Error while configuring python in apache2

I was trying to configure python to apache2 as suggested by http://ubuntuforums.org/showthread.php?t=91101 First downloaded and installed and enabled mod_python module Changed ...
3
votes
2answers
4k views

How to default to newest version of Python? [duplicate]

Possible Duplicate: How do I make the terminal run python 3.1? I am using Ubuntu 10.10 and just installed Python 3.1 but entering python on my Gnome Terminal gets me Python 2.6 . How to fix ...
9
votes
2answers
2k 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 ...
1
vote
2answers
796 views

How do I install and use python 2.6? [closed]

I use ubuntu 8.04 as I have to use gcc 4.2. I tried to download python 2.6 using apt-get, but the package is not available. Is there any way to use python 2.6 in ubuntu 8.04?
3
votes
3answers
2k views

HP LaserJet 1020 always asks for driver install

On Ubuntu 10.10, HP LaserJet 1020 works plug and play style (plugged it in, printed test page without installing anything). But, every time I connect (or power on ubuntu) printer starts it's driver ...
2
votes
2answers
2k views

Manually installing Python 2.6?

Ubuntu 8.04 comes with Python 2.5 and no 2.6 package support in the apt-get ecosystem. Searching around I found http://www.saltycrane.com/blog/2008/10/installing-python-26-source-ubuntu-hardy/ and all ...
2
votes
1answer
680 views

What's the difference between python-minimal and python-all?

Basically the question. I need to setup an environment that supports tkinter programming in python and maybe some network socket stuff too. I'd also like to emphasize that I need python 3.
4
votes
1answer
543 views

Ignore files in Ubuntu One

I found that I can use: ignore.default = \A#.*\Z \A.*~\Z \A.*\.py[oc]\Z \A.*\.sw[nopx]\Z \A.*\.swpx\Z ...
6
votes
1answer
16k 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 ...
0
votes
1answer
613 views

On 10.04, should I upgrade from Python 2.6.5 to 2.6.6?

The default Python version on Ubuntu 10.04 server edition is 2.6.5. The latest version of the Python 2.6 series is 2.6.6. Does Ubuntu support 2.6.6 or should I leave it at the default version. If I ...
1
vote
1answer
3k views

How to install python 2.7?

I have some troubles installing python2.7 on ubuntu 10.10 I ran sudo apt-get install python2.7(*) but when I try to run an example program I get the ~/Downloads% python2.7 clockwindow.py Traceback ...
4
votes
1answer
314 views

Why does my Messaging Menu code not work when split into functions?

Below are two python programs. They're exactly the same, except for one is split into two functions. However only the one that's split into two functions doesn't work - the second function doesn't ...
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
14k 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
292 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
678 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
239 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
525 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 ...
7
votes
2answers
13k 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 ...
12
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
8k 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 ...
22
votes
1answer
26k views

Can I use easy_install?

Can I use easy_install on Ubuntu 10.10? If yes, then how?
1
vote
1answer
590 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
838 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
278 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
925 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
322 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
990 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
3k 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 ...
14
votes
1answer
5k 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 ...
30
votes
4answers
15k 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
485 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 ...
24
votes
2answers
11k 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
272 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
249 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
406 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
805 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. ...