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

76
votes
8answers
37k views

Is there an GUI Designer for python?

Is there a GUI IDE for programming python just like java has netbeans? I wanted one where we could drag & drop test boxes & labels just as we do in swing components using netbeans or eclipse. ...
65
votes
4answers
76k views

How do I sudo a command in a script without being asked for a password?

I want to turn my system on automatically every day. So I use the below code in my Python script, but sudo asks me for a password every time: os.system('sudo sh -c "echo date \'+%s\' -d \'+ \ ...
54
votes
8answers
59k 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 ...
52
votes
5answers
157k views

How do I install python 2.7.2 on Ubuntu?

I want to install python 2.7.2.tgz on Ubuntu, downloaded from http://python.org/download/. Is this a correct way to install : ./configure make make install If not , how can I do that?
46
votes
3answers
3k views

Is #!/bin/sh read by the interpreter?

In bash or sh, I guess anything which starts with # is a comment. But in bash scripts we write: #!/bin/bash And in Python scripts, there is: #!/bin/python Does this mean that # by itself is a ...
40
votes
1answer
22k views

Should I use PyQt or PySide for a new Qt project?

Recently I've been involved in conversations about creating a Quickly template for a Qt and QtQuick Ubuntu app. The idea is to make it as easy to develop Qt apps from concept to package as it is right ...
38
votes
5answers
7k 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 ...
28
votes
2answers
6k views

Connect WebKit WebView form to a Python callback?

I am writing a small Python and WebKit app; I am using WebKit as the UI for my app. What I want to do is to create an interactive element in WebKit (namely a combo box or a set of clickable regions) ...
26
votes
5answers
3k views

How to easily start a webserver in any folder?

I'm looking for a relatively painless way to launch a web server with document root in any folder I specify (or better yet, where I'm launching). I often try out new things like JS frameworks or so ...
23
votes
5answers
6k views

Setting up python to start learning

So I am interested in learning to code in python. I started with html and css which requires no set up just using gedit to write my code and testing on chromium. I was recently told to learn to do ...
23
votes
4answers
8k 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, ...
23
votes
2answers
10k views

What's the best way to get Python 2.5 and 2.7

Ubuntu 10.04 has only two supported Python versions 2.6 and 3.1. Developers often need more, to test that their Python code works on 2.7, 2.5 (and maybe even 2.4 and older ones). What's the best way ...
23
votes
4answers
7k 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 ...
22
votes
5answers
16k 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 ...
21
votes
2answers
2k views

What is the black header widget in some programs?

In some of the ubuntu programs (ubuntu control panel, system settings), but not e.g. in banshee, the top part of the window contains elements in dark tone (with the Ambience theme). But I cant find a ...
21
votes
3answers
3k views

How to add support for the global menu to a python non-gtk, non-qt app?

I'm looking for good documentation (an example, tutorial, or guide) on how to add global menu support to a non-gtk, non-qt application. (In gtk it works 'magically' for the main menu...). The ...
20
votes
4answers
5k views

Can I develop ubuntu for phones apps in Python? [duplicate]

Does anyone know if we can develop apps for ubuntu for phones in Python ? PyQT / PySide would seem to support also QML. But can we use them on the phones ?
19
votes
3answers
4k 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?
19
votes
1answer
24k 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 ...
18
votes
3answers
5k views

How do I get started creating an Ubuntu Desktop App?

I want to create an Ubuntu desktop app, specifically to replace Gwibber. I can code in Java, Python and a few other technologies. Adobe Flex would have been an option until Adobe decided to suck some ...
17
votes
4answers
53k views

How do I install python imaging library (PIL)?

How do I install the python imaging library (PIL) on Ubuntu? I tried doing sudo apt-get install python-imaging but now when i run python selftest.py (a script I got from somewhere on the ...
17
votes
4answers
3k 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 ...
17
votes
1answer
3k views

Dropbox Fails To Start With “VerificationError: importing pylinux…”

Dropbox Fails To Start With "VerificationError: importing pylinux..." . It seems that some recent Python update breaks Dropbox, resulting in the following error: Starting Dropbox...Traceback (most ...
17
votes
2answers
18k 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 ...
17
votes
1answer
14k views

Can I use easy_install?

Can I use easy_install on Ubuntu 10.10? If yes, then how?
17
votes
2answers
15k views

How to set up and use a virtual python environment in Ubuntu?

Python virtual environments are used to create isolated python environments to avoid dependency and version conflicts, and also indirectly takes care of permission issues. But what is the easiest way ...
17
votes
3answers
951 views

How to write Appindicators in python?

I'm looking to try and develop some simple indicators, for numlock/capslock and brigthness, etc. How would I go about creating indicators in python? Are there any tutorials that walk me through ...
17
votes
1answer
4k views

Where is virtualenvwrapper.sh?

I don't know what's more embarrassing: that I don't know how to go about finding the answer to this question myself, or that it has to be asked at all in the first place, but... where does apt-get ...
17
votes
3answers
2k views

Is it possible to use Python with the Ubuntu SDK?

David Planella wrote in his answer to a question I posted that: ...the recommended way to develop apps for Ubuntu is the Ubuntu SDK. So I installed it, but looks like the supported programming ...
16
votes
3answers
23k views

How to create a virtualenv with Python3.3 in Ubuntu?

I'm running Precise Pangolin amd64. I installed Python 3.3 from ppa:fkrull/deadsnakes. Now I want to actually use this new Python version in a virtualenv. But How can I do this? I get the following ...
16
votes
2answers
8k 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 ...
16
votes
2answers
1k views

Developing Unity compliant apps in Python - where to start?

I'm an experienced programmer who is interested in developing apps for Linux, specifically GTK, and more specifically apps that are Unity compliant. Aside from the obvious step of learning Python, ...
15
votes
7answers
12k 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 ...
15
votes
3answers
3k views

Why does Ubuntu use Python 2.6 and not 3.X?

I have recently started learning Python and thus have learned that Ubuntu (10.10) uses Python 2.6. It seems to me that Python 3.X is still rather unpopular in the Linux/Ubuntu community. Why is that? ...
14
votes
6answers
2k views

Wanting to start development for Ubuntu (and most Linux distributions in general), which is suitable? Python or Vala?

I'm a computer science graduate, and learned languages like C, C++, C# and Java. Though I have more experience with Java. I want to develop for Linux and I'd prefer to develop for GNOME, I'm confused ...
14
votes
5answers
16k 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 ...
14
votes
5answers
7k views

How to run asynchronous tasks in Python GObject Introspection apps

I'm writing a Python + GObject app that needs to read a non-trivial amount of data from disk upon start. The data is read synchronously and it takes about 10 seconds to finish the read operation, ...
14
votes
2answers
2k 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?
14
votes
4answers
24k views

How to use Qt Creator with Python?

I want to use Qt for developing Ubuntu desktop, phone and tablet applications but I don't want to learn a new programming language (C++, JavaScript). Is it possible to write Qt application in Python ...
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
2answers
7k views

apt-get install vs pip install

I am a bit confused about the cases in which the above commands must be used when downloading python packages. I was trying to download a package named pyudev in accordance with an answer with this ...
13
votes
2answers
5k 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 ...
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
2answers
6k views

How to use the newest ipython in ubuntu12.04?

How to use the newest ipython in ubuntu12.04? The newest ipython is 1.0. The ipython in official software center is too old. Thanks
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
740 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
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 ...
12
votes
1answer
291 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
4answers
8k views

“Authentication service is not available” when installing IDLE (using python 2.7)

I am getting this error installing IDLE on 12.10: Software can't be installed or removed because the authentication service is not available. (org.freedesktop.PolicyKit.Error.Failed: ...
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 ...