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

1
vote
1answer
7 views

copy from python to excel (xlwt)

I'm trying to copy data to an excel file using xlwt in a python code worksheet.write(globdat.cycle,1,fint) globdat.cycle is a count. No problems there since it gets values 1, 2.... n in each ...
19
votes
3answers
1k views

Saving output of a grep into a file with colors

I need to save the result of a grep command into a file, but I also want the output file to be formatted and keep the colors just like in the terminal. Is there a way to do that? Maybe make grep save ...
5
votes
8answers
450 views

How can I delete text that is NOT in quotes or parentheses?

Input: 19. "foo foo" (bar bar) (19) raboof "foo foo" raboof Expected output: "foo foo" (bar bar) (19) "foo foo" As you can see, I would like to keep the double quotes and parentheses. ...
1
vote
1answer
40 views

Ubuntu Phone SimpleHTTPServer python

It is possible to use the module in Python SimpleHTTPServer on my Ubuntu Phone?
-1
votes
1answer
2k views

How to connect to sql server 2008?

I am using ubuntu 12.04, and i have a microsoft sql server 2008 which is running on a windows server 2008 on port 1433, but windows server 2008 is virtualized it is running on vmware and further this ...
0
votes
1answer
15 views

how to send desktop notification using python3.4?

I have a python3.4 script. I would like to send to the desktop at a moment a notification. How do I handle this in python? Can I use notify-send? I'm using Ubuntu 14.04 #in my script if something: ...
3
votes
2answers
11k views

How to install pygame?

I am running Ubuntu 13.10. I have python 2.7.5 with anaconda 1.8.0. Whenever I start python and type import pygame it tells me that there is no module named pygame. How can I install pygame?
6
votes
1answer
5k views

How to create Excel xlsx files from a script?

I'm looking for packages available in Ubuntu main/universe repositories able to create Excel 2007+ xlsx files from a script (python or perl) My requirements: 100% compatible Excel XLSX files. Solid ...
0
votes
0answers
8 views

how to package a python application for publishing in Ubuntu Software Center [duplicate]

I have a running python application, I am wondering how package it for publishing into myapps
1
vote
1answer
287 views

How to install Dia plugins on Ubuntu 12.04?

I am running Ubuntu 12.04.5 LTS (Precise). I already install and using Dia. I need to use dia_orgchart.py downloaded from http://dia-installer.de. As the instruction given, I try to put ...
2
votes
1answer
61 views

How to get the package versions corresponding to Unity 7 launcher applications?

I'd like to know the Ubuntu package version of all applications locked into my Unity (7) Launcher from the command line. The command should return a list of packages names and their versions, ...
1
vote
3answers
44 views

Is there an IDE for Ubuntu that combines Python, Gtk and Glade in one unique program?

I like PyCharm, but it doesn't have a GUI designer. I like the quickly package but I don't want to use Gedit as my editor. I tryed Ubuntu SDK but it's kind of hard to use python on it, and it's not ...
2
votes
1answer
19 views

Install miniconda Python 2.7

I am trying to install miniconda Python 2.7 on ubuntu 12.04. I have already written this: if ! [ -f ~/.bash_profile ]; then touch ~/.bash_profile; fi if ! [ -f ~/.bashrc ]; then touch ~/.bashrc; fi ...
2
votes
1answer
20 views

Python applications crash with module errors

I just updated some software on my system, and now I get a bizarre error every time I try to start a program that uses Python, even though all of the dependencies on my system have been resolved ...
1
vote
2answers
5k views

Installing Pygame Ubuntu 13.04

I recently installed Ubuntu 13.04 and want to install pygame. I've attempted doing as instructed on the pygame page (using the source code) however I am unable to install the dependencies and I get ...
0
votes
3answers
11k views

The following packages have unmet dependencies!

I am writing this because I am very confused about installing postgresql 9.3 on mine Ubuntu 14.04. First I need it for mine Python/Django development, and I ran in to the problem, when i tried to ...
2
votes
1answer
19 views

How to fix these problems installing imgdupes

I'm trying to install imgdupes, but the terminal says pip command not found. https://github.com/jesjimher/imgdupes sudo apt-get install python-cffi python-dev libjpeg-dev gir1.2-gexiv2-0.10 sudo pip ...
20
votes
1answer
27k 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 ...
0
votes
1answer
35 views

How do I add my own program to the terminal? [duplicate]

I want to be able to make a program for example in Python and then execute it in the terminal no matter where I am located. I mean, if I have an executable python file AND I'm in the same folder of ...
0
votes
1answer
6k views

ssl missing from Python. 'module' object has no attribute 'HTTPSConnection'

My main issue is that httplib module of python is missing HTTPSConnection. When I try to use pip to install fabric using pip it gives me this error: 'module' object has no attribute ...
0
votes
1answer
43 views

VIM error after installing python3 in ubuntu 15.04

I have a fresh installation of the latest ubuntu 15.04. I installed VIM using sudo apt-get install vim It was working fine. Later I installed python3 and pip3. sudo apt-get install python3 ...
1
vote
2answers
33 views

wanting to add back and forward buttons. Using: quickly, glade, and webkit, webview, python [closed]

I'm new to linux, ubuntu, and basically everything else talked about in this question. I'm building a web browser in Quickly, following Jono Bacon's tutorial on YouTube, using Glade as the gui ...
2
votes
1answer
5k views

Why do I get ImportError when trying to import Pandas Python module?

I installed the Pandas module for Python 2.7 using apt-get. However, when I try to import the module, it raises an ImportError: import pandas as pd File ...
-1
votes
0answers
26 views

update problems, related to unresolved 14.10 update problems [closed]

After the update to 14.10, update-software-center and related programs stopped working (resulted in a segfault). I was hoping this new update to 15.04 would fix the problems, but i am unable to run ...
1
vote
2answers
623 views

How do I include basic image editing in my python application?

I am making an application for the Ubuntu App Showdown and I want to include basic image editing like adding black and white, grey effects etc to the image. But I don't know how to do that. I have ...
1
vote
1answer
27 views

Cron can't find file at night? [duplicate]

I have a cron job written to root (I'm writing to a log in /var/log so need root permission). The problem is that sometimes it works, and sometimes it doesn't. The cron job is simply to call a python ...
1
vote
2answers
111 views

Error installing pynauty: “error: command 'x86_64-linux-gnu-gcc' failed with exit status 1”

I'm trying to install the pynauty Python package. When I ran python setup.py build, I got the following error. I have installed the dependencies. How can I successfully install this Python ...
1
vote
2answers
290 views

Can't get IPython to start: “ImportError: cannot import name start_ipython”

I'm trying to start IPython from the terminal. I input: ipython into the terminal and I get this output: Traceback (most recent call last): File "/usr/local/bin/ipython", line 4, in ...
1
vote
2answers
1k views

Openshot 1.4.3 no longer recognising blender when making animated titles

I was using openshot and blender to create some animated titles and it was working fine until openshot just started to cry out for blender for no apparent reason. The previews work fine, and some ...
0
votes
0answers
7 views

Create a jumpbox menu

I am looking to create a menu on a network jumpbox I have ~200 servers that I connect to and I do not want to have a CRT session for each of them. I want the menu to be searchable so I can hit "/" ...
0
votes
0answers
17 views

How to set a video as wallpaper in Ubuntu 14.04

I want to set a video as a wallpaper in ubuntu. For that I had written a python script which extracts images from the video and sets them as wallpaper one by one sequentially, and this continues until ...
1
vote
2answers
8k views

How to use rsync from within a python script? [closed]

I plan to move file from one system to another system. For this, I am using rsync command in linux terminal. It works fine. But I need to implement this command to python. I am very new in python, so ...
0
votes
1answer
3k views

AttributeError: 'module' object has no attribute

I am trying to get the depth map of two stereo images. I have taken the code from http://docs.opencv.org/trunk/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.html I get the following error: ...
1
vote
1answer
15 views

apt-get /usr/bin/datetime.so wrong ELF class

I'm trying to add a repo to apt-get bit it fails complaining over ELF headers sudo add-apt-repository -y ppa:chris-lea/node.js Traceback (most recent call last): File "/usr/bin/add-apt-repository", ...
2
votes
3answers
55 views

Unmet dependencies error

So some unmet dependencies are there and I cant install anything without getting rid of them. When i type in: sudo apt-get install -f I get this: patrick@patrick-Z97N-WIFI:~$ sudo apt-get ...
0
votes
0answers
26 views

appindicator icons not shown in cinnamon

I had a small python script that used to work from the appindicator on unity. Here is what it looked like I now installed cinnamon. The same code looks like this now. How do I get the icons back? ...
1
vote
4answers
5k views

Perform multiple statements in one line in Python 3.2.3

Is there a way to execute multiple statemens while performing them in one line, like this: import time print ("Ok, I know how to write programs in Python now.") time.sleep(0.5) print (".") # This ...
1
vote
0answers
25 views

Uninstall dysfunctional python module

I have installed python module functools via easy_install, and now I cannot uninstall it. When I run python like this python -c 'import functools' I got this error Traceback (most recent call ...
-1
votes
4answers
1k views

“Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel” while installing PyPy version of Numpy

I am trying to install the PyPy distribution of Numpy (Note that PyPy requires a different version of Numpy than that found in the repositories), but get the error: Cannot compile 'Python.h'. Perhaps ...
1
vote
1answer
35 views

Error importing Pygame on Ubuntu 14.04 (ImportError: libSDL-1.2.so.0: undefined symbol: _XGetRequest)

I have compiled Pygame for Python 3.4 on Ubuntu 14.04 following the instructions listed here. However, when I try to compile a Pygame program, I get the following error: Traceback (most recent call ...
18
votes
1answer
4k 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 ...
-1
votes
1answer
34 views

Unable to install package via apt-get although it is listed on ubuntu package manager

I'm using Ubuntu 14.04. Following the instructions here, I see the Python 2.7.9 package here: http://cz.archive.ubuntu.com/ubuntu/pool/main/p/python2.7/ However apt-get install or apt-cache search ...
-4
votes
1answer
44 views

why this python code is not working? [closed]

from bottle import route, run app = Bottle @route('/hello') def hello(): return "<h1>Hello World!</h1>" run(host='local host', port=8080)
0
votes
0answers
21 views

Ubuntu 14.04 - Python 3.4 UnicodeDecodeError

Recently I've made an update, and I've started getting these errores in some programs (in 2 indicators for Unity, specifically): File ...
0
votes
1answer
48 views

Adding custom changes to the OpenBlas for Python

My question: How do I get Python to use my own compiled OpenBLAS version? Background The Theano install guide suggests that one should test that the BLAS library components associated are correctly ...
0
votes
1answer
17 views

How can I specify an alias in ERIC python IDE

I have a code in python which sets an environment variable and an alias to another code. eg - when i run 'install.py' I get the environment variable and alias to a code named pyfem.py. I can use ...
1
vote
1answer
27 views

what does setup.py do?

I am not from a computer science background, and I would like to ask how come when I downloaded python packages from github, I have to run setup.py? what does that do to the program and my other ...
3
votes
2answers
917 views

How to determine all python-nautilus extensions in use?

I need to provide an application developer with a list of all other python-nautilus extensions I have installed/running (I am trying to provide information on this issue). What is the easiest way to ...
0
votes
2answers
75 views

Enforce a shell script to execute a specific python version

Update. Changing the alias unfortunately does not work. I have changed the alias to alias python='/usr/bin/python2.7' however the shell script still runs the python script in 2.4.3. Muru - I am ...
3
votes
4answers
1k views

GtkFileChooserButton 'Select Folder' mode returns no path

I have added a GtkFileChooserButton to my app via Glade. It is set to folder selection mode. When the widget is clicked it shows a dropdown list of Nautilus bookmarks with an 'other' option in the ...