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
40 views

Finding Mouse click position in IconView in GTK

I am building a file browser using Gtk.IconView in python. I am trying to find the path of an icon selected using " selection-changed" signal using gtk.IconView.get_path_at_pos(x,y). The docs are mum ...
0
votes
1answer
68 views

Ubuntu 12.04 desktop with no launcher and no shortkeys working [duplicate]

I have accidentally uninstalled python 2.7 and python-minimal from my Ubuntu. It gave me an error saying wicd has shut down and there are broken packages. When I restarted the system, only the ...
1
vote
2answers
338 views

lscpu output differs when called indirectly?

I use lscpu | grep 'MHz' to get my clock speed. I am getting different results based on the method I am calling this command. Method 1: typing it in the terminal CPU MHz: 1200.000 Method 2: ...
4
votes
1answer
996 views

Configuring Python Development version installation

While installing PSI4 on Edit: Ubuntu 13.10 (earlier Ubuntu 12.04), I'm encountering the following error: configure: error: Could not link test program to Python. Maybe the main Python library has ...
1
vote
1answer
402 views

How to use UPSTART feature of ubuntu to restart the python script but not as root?

I am running my Python script using upstart feature of Ubuntu so that if for whatever reason my Python script dies or gets killed, it can be restarted automatically and everything is working fine - ...
3
votes
1answer
251 views

how to use python3 shortcuts on emacs?

I am new to emacs and I am trying to set python3 as default interpreter. I have installed from software centre the python plugin for emacs. I can run a python3 file going to pyexec-->execute ...
1
vote
2answers
173 views

Get full path of currently open files

I'm trying to code a simple application that must read all currently open files within a certain directory. More specificly, I want to get a list of files open anywhere inside my Documents folder, but ...
0
votes
1answer
39 views

Uninstalled Pyton 2.7, now I cant log in

I uninstalled python using following command: sudo apt-get remove python2.7 It ended up removing lot of related system files as well. Now when ubuntu boots up it prompts me login, but after that ...
3
votes
1answer
8k views

Python 2.7.6 on Ubuntu 12.04 How to?

I'm developer and I need to make my enviroment work with Python 2.7.6 (not 2.7.3) on the Ubuntu 12.04. Please, provide me some notes how to do that?
1
vote
1answer
152 views

How to install Err in a Python 3 virtual environment?

I'm trying to install Err on Ubuntu Server 12.04.4. It requires python plus a bunch of dependencies. When I followed the install instructions, I couldn't get it to work using the "default" which ...
0
votes
1answer
648 views

Installing Graphite on Ubuntu 12.10

I am trying to install and run Graphite on Ubuntu 12.10. To do it I followed this manual. Unfortunately on the step: Next, we will configure the Graphite database. Go to the Graphite webapp ...
0
votes
1answer
55 views

environment setup for Importing a userdefined module

I am creating an User defined module an .so file and importing that in the python module. The functions in the library are not responding as expected. What are the environment variables to be set ...
1
vote
1answer
4k views

Install python setup tools for Ubuntu 12.04

I am trying to install Savanna in OpenStack but I am getting this error that I have posted on askubuntu.com Someone told me that it might happen because I have not right version of python-setup-tools ...
0
votes
1answer
2k views

pip install … Failed with error code 1

I'm trying to configure my new system with Ubuntu 13.10 but pip won't let me install anything. No matter what package I try to install I always get the error: ...failed with error code 1 in ...
0
votes
1answer
153 views

Installing & running a python script on Ubuntu

I have a (most likely very stupid) question to ask: I recently setup a fresh install of Ubuntu 10.04 to use as an internal web server for some very basic tasks. I came across a python script that I ...
2
votes
1answer
945 views

couldn't open output file: Read-only file system

I just installed Ubuntu. My problem is I am attempting to write a log file to home. I am using logcat from a python module called adb. When I attempt the terminal command adb logcat -f <path> I ...
1
vote
1answer
76 views

how do I make a python program write directly to the command line?

This is the code I have, I want it so that I can write to the command-line from the window after I press the "SEND" button. If I want to see my "ifconfig" in the terminal, the command gets writen in ...
0
votes
1answer
219 views

can't open software-center and software & updates

This is the error i'm getting Traceback (most recent call last): File "/usr/bin/software-center", line 130, in <module> app = SoftwareCenterAppGtk3(options, args) File ...
-4
votes
1answer
9k views

Ubuntu 14.04 Python 2.7 still default, set 3.x as default [closed]

Please set 3.x Python as default in 14.04, currently even writing python in terminal starts 2.7
0
votes
0answers
67 views

Is it possible to downgrade the default version of Python from my Ubuntu installation? [duplicate]

I have installed Ubuntu 14.04 which comes with Python 3.4 installed by default. But I wish to downgrade it to Python 3.3 for my needs. However, when I try to remove it, it also wants to remove other ...
-1
votes
1answer
69 views

remove the newline from a list stored in a text file and read the text file in python [closed]

consider the following situation, for example the code is:: List = open("mylist.txt").readlines() for x in List: f =open('show.sh', 'a') f.write("my line "+x+" > temp.txt\n") f.close() ...
4
votes
1answer
1k views

I accidentaly did sudo apt-get remove python [closed]

I accidentaly did sudo apt-get remove python command and now terminal look has changed, rhythmbox, ubuntu software center and everything is quite changed. I reinstlled python with the command sudo ...
2
votes
3answers
590 views

Ubuntu 13.10: Trying to set default applications for .py files that aren't in the 'Open With' applications

I have followed the instructions in this thread: How do I set IDLE as the default editor for Python scripts?, but it hasn't resulted in the option to open in IDLE being shown. So I used the 'Find ...
0
votes
1answer
208 views

undefined symbol: PyExc_TypeError

I'm using Ubuntu 12.04 and I have weird problem that started appearing. I've been using virtualenv command for working with my Python projects and I never had trouble with it. However, for some reason ...
0
votes
1answer
54 views

itunes2rhythm python3 script returns syntax error [closed]

I am trying to execute this script with Python3 itunes2rhythm Using this command: python3 /media/trunk/SOUNDS/itunes/itunes2rhythm-master/itunes2rhythm.py I am getting the error: Traceback ...
1
vote
3answers
82 views

Adding file paths to Python code

I am currently running the code for a program called HotNet. In its simpleRun.py file, there is a place to insert a file path to be run. parser.add_argument('-mf', '--infmat_file', required=True, ...
1
vote
1answer
813 views

Finding Volume Label of a usb mass storage device using python

Could someone please tell me how I could obtain a usb mass storage device's volume label(the name displayed in the explorer, not the device name::/dev/sdX) using python? libraries/modules though HAL ...
4
votes
1answer
2k views

pkill not killing

I have a Script named PirateRadio.py That I am writing a script for. I need to kill and reload the script. Possibly with the same PID. I thought SIGHUP was a sure thing. when i run #pkill -1 ...
0
votes
1answer
364 views

installing python-appindicator in 13.10

I'm trying to install python-appindicator in Ubuntu 13.10 but I'm receiving not found error: E: unable to locate package python-appindicator How can I install python-appindicator in 13.10 ?
0
votes
1answer
125 views

python photometry tools

Anybody has experience with photometry? I am trying to use ppt (Python Photometric Toolbox) with no success. I have two branching questions: anybody can suggest a WORKING photometry solution ...
1
vote
1answer
1k views

How to get text buffer from file and loading into TextView using python and Gtk+3

I want to create an Ubuntu App that uses Gtk+3 and Python. However, I would like to know how I can get the text buffer from a file and load it into a TextView. Does anyone know how this can be done ...
1
vote
1answer
300 views

How to save text buffer to file using Python and gtk?

I am trying to create a text editor for Ubuntu (going to give it a try!) using gtk2 and python. So far I have been able to implement the open function. However I just don't know how I can get the ...
0
votes
3answers
143 views

How to keep a maximum of 79 characters per line in case of Python list comprehensions?

I have function which consists of 1 line. It is something like: return [item for item in list if something_very_long and something_else_very_long] == [] How is it most appropriate to separate this ...
1
vote
2answers
168 views

How to change window opacity dynamically in Python and Quickly?

The app is written in HTML and is running using webkit and Quickly. The opacity can be changed using Glade. I want to add a slider functionality in HTML which will change the title of the HTML ...
1
vote
1answer
298 views

howto link / execute / add to $PATH: python3.3.5 after manual installation in 12.04 LTS

I'm trying to install python3.3.5 on /home/myUser/XX, where home is located on a separate partition. I'm relatively new to Linux and have only basic knowledge about installing packages on my own, ...
0
votes
1answer
101 views

Ubuntu software store not working

i try to install or un-install some think and i get this: installArchives() failed: (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading ...
2
votes
1answer
865 views

Identify udev subsystems and devtypes

I have to write a python script to monitor for usb mass storage devices. To successfully filter the required media it must be identified by its subsystem and DEVTYPE. Does anyone know the required ...
5
votes
1answer
327 views

How can I deploy my local Juju Charm with Amulet framework?

I use amulet as testing framework for charms which we developing. I've already tried to reproduce an example, provided on https://juju.ubuntu.com/docs/tools-amulet.html and it's work fine. But now I'm ...
26
votes
2answers
23k 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 ...
2
votes
0answers
180 views

How to properly install PySide via pyenv?

I'm running Ubuntu 13.10 with Python 3.3.4, installed via pyenv. Running sudo apt-get install python3-pyside installs PySide in /usr/lib/python3/dist-packages/PySide, and I can make a symlink to that ...
9
votes
4answers
13k views

Unable to download videos using youtube-dl ('sig error'), how to correct?

I used to download videos using youtube-dl command line tool, from the past two days whenever i try to download any video I get an error as shown below. $ youtube-dl ...
0
votes
0answers
18 views

Fix dpkg error 1 in python-minimal [duplicate]

I have seen a number of fixes on these forums, but they all seem to involve removing the offending package. in my case, that's python-minimal, and if I remove that it will break everything. Can anyone ...
1
vote
2answers
4k views

How to pass arguments to functions while executing a python script from terminal?

I have a python file named solution.py and I can successfully execute it through the terminal using the following commands: chmod +x solution.py python3 solution.py This works just fine if I have ...
1
vote
0answers
72 views

Implementing Unity Global Menu

I'm working on a desktop (like XFCE) as a private project, and I would like to implement the Unity Global Menu in my desktop using python. I've looked at the Dbusmenu API and even Unity's dbus ...
2
votes
1answer
167 views

Gedit plugins error

i can 't run some plugin in gedit. when i run some plugin like " externaltools " program is closed and show this error in the terminal: > > (gedit:11796): GVFS-RemoteVolumeMonitor-WARNING **: ...
0
votes
2answers
1k views

libpython2.6.so.1.0 doesn't exist

I am trying to run an application called powerpc-eabi-gdb, however, when I start it, I get the following error: error while loading shared libraries: libpython2.6.so.1.0: cannot open shared object ...
0
votes
1answer
588 views

No such file or directory: '/usr/lib/python2.7/sitecustomize.py' but it is there in red color

While trying to install denyhosts but I am getting this error: IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/sitecustomize.py' I verified that ...
1
vote
1answer
2k views

Uninstall the preinstalled PIL

I would like to install Pillow, but according to the Pillow's documentation, I must remove PIL first, which seems to have come preinstalled in Ubuntu 13.10. What's the best way to do that?
3
votes
2answers
3k views

Installing pyusb on ubuntu 13.10

I tried this link, but got the following message on shell: sudo apt-get install python-pip : vineet@vineet:~$ sudo pip install --upgrade pyusb Downloading/unpacking pyusb Could not find a version ...
0
votes
1answer
47 views

Cannot open application in Quickly

I'm creating web browser in Quickly. When I am running my application (quickly run) I have errors about gtk. Without the WebKit code it can run. Sorry about my english. Errors: ...