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
113 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
75 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
33 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 ...
1
vote
1answer
2k 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?
0
votes
0answers
87 views

install 64 bit mysql

I had installed mysql by using below command. sudo apt-get install mysql-server But this a 32-bit mysql installation. i want to install 64-bit mysql. Please advice me how to delete 32bit mysql and ...
1
vote
1answer
87 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
324 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
32 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
1k 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
718 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
0answers
39 views

MySQLdb on Brython?

Hi there I'm working on a server-based point of sale for a sports club, and downloaded Mysqldb lib so that I can access and modify it through python scripts, they work great!, so I decided to use ...
0
votes
1answer
56 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
577 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
63 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
67 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
5k 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
1
vote
0answers
204 views

Ubuntu 12.04 ext4-fs error/inode

I am running a Dell PowerEdge T420 with Ubuntu 12.04 32bit. The hard drives are a RAID1 setup. Last week, I began getting errors that cause the build I am running to fail. I found this in the log ...
0
votes
0answers
65 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
39 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
363 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 ...
0
votes
0answers
91 views

tesseract OCR Engine reorganization problem

i'm trying to use 'tesseract' on JPG image's. its seems that it doesnt recognize the number's and character's in the command-line currently. but when i use OCRFeeder manually and select the bounds ...
0
votes
0answers
197 views

OpenERP server problem message when installing an app

I recently installed open erp v7 on ubuntu 13.10, I could install the warehouse app fine, as well as the sales app , but I'm having trouble installing a few other apps. It looks like it is either a ...
2
votes
3answers
252 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
0answers
18 views

itunes2rhythm python3 script errors

while trying to run this script https://github.com/guillier/itunes2rhythm in python3 i am getting multiple errors about localhost blah blah. I think what is happening is that the library file is ...
0
votes
1answer
131 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
43 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
66 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
350 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 ...
3
votes
1answer
344 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
123 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
0answers
33 views

Create tab using Gtk+3 and Python and load file into it

I want to create an Ubuntu app using Gtk+3 and Python. In the app I want to be able to get the file from the user; create a tab and load the file into it (i.e. into the TextView that will be ...
0
votes
0answers
39 views

Launch a new window from Gtk+3 app

I want to create an Ubuntu app using Python and Gtk+3. I want to get the contents of the file displayed in the main window and load it into a separate window (load it into another TextView for ...
0
votes
1answer
75 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
523 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 ...
0
votes
0answers
179 views

Install module BZ2 on python

I'm trying to install the module bz2 on python v2.7. I'm using Ubuntu 12.04 LTS and I have already installed libbz2-dev through Synaptic. I read that I need to rebuild python to take the changes of ...
0
votes
0answers
204 views

Unmet dependency issue installing libmapnik

I'm trying to install CartoDB, and have run into the dreaded "you may have requested an impossible situation" message: $ sudo apt-get install -y libmapnik-dev python-mapnik mapnik-utils Reading ...
1
vote
1answer
135 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
97 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 ...
0
votes
2answers
100 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
141 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
65 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 ...
1
vote
1answer
331 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
196 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 ...
13
votes
2answers
8k 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
125 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 ...
8
votes
4answers
7k 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
178 views

Customize gedit color theme as python idle

class Player(): My gedit used python idle theme so when i type this piece, 'class' show orange but 'Player' is black. so if i want change classname or function name's color into blue, what should i ...
0
votes
0answers
17 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
887 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 ...
0
votes
0answers
158 views

Telnet and opennig command prompt script in linux

I don't have any major scripting experience and I am really confused about the script which I am working on it. I am using dynagen in Linux and created a basic topology with two routers ...