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

-2
votes
0answers
10 views

After run '>>> GPIO.setup(1, GPIO.OUT)', app python3 crash: [on hold]

After executed the followings commands, app python3 crash: ~# rp01@rp01:~$ sudo python3 [sudo] password for rp01: Python 3.4.3 (default, Mar 26 2015, 23:09:09) [GCC 4.9.2] on linux Type "help", ...
-1
votes
1answer
21 views

Explaination about modules in python [on hold]

what are modules and explain a bit about how they work? import hello The hello program will be as follows: hello.py def func(a,b): print 'a is',a; print 'b is',b; what will be ...
1
vote
1answer
28 views

What is the difference between these python functions?

What is the difference between this: def total(initial=10, *numbers, **keywords): count = initial for fake in numbers: count = count + fake for key in keywords: ...
0
votes
0answers
10 views

A new window in glade using python [on hold]

How can I make a new window appear by just a pressing a button in glade application? Python commands are appreciated :)
0
votes
0answers
15 views

Why Is the Package Installer Giving the “Dependency is not satisfiable” Error Even After I've Installed the required packages?

I'm trying to install GameTree. I downloaded the deb. file from the site and tried to open it with the package installer. It popped up dependency is not satisfiable: python (>= 2.4) This is ...
1
vote
1answer
16 views

Cannot install lxml on Ubuntu 14

I have problems installing lxml on my virtual machine, cloud server, Ubuntu 14.04.2 with 512MB RAM. For people that are going through this, I will document little steps of problems that occurred on ...
0
votes
1answer
19 views

How can I disable “selection by clicking ” on GTK treeview [on hold]

I have this code where I get a treeview and a sign when I click or move the up / down over the lines. For my application I need to disable the selection when the user clicks on a row, further I wonder ...
0
votes
1answer
25 views

how to use python 3's pip?

I want to switch my project from python 2.7 to python 3.4 and I want to use python3's virtualenvwrapper and pip. I have tried sudo apt-get install python3-pip, easy_install3 pip and python3 ...
-1
votes
0answers
25 views

python file for execute file [on hold]

I want execute python file for testing. I have text file and python file. How can I write loop ? #!/bin/env python testSE.py import subprocess import os import sys import requests import optparse ...
0
votes
1answer
13 views

How to make python module run in dist-packages folders in the desired order?

I am using Ubuntu 14.04. I have installed a python module called PyBluez. When I compile and install the module from source code, the output is installed in the folder ...
0
votes
0answers
21 views

Python Imaging Library (PIL) in UNIX jpg - bmp [on hold]

The Python Imaging Library (PIL) is meant to Convert a jpg (Jpeg) image into bmp (Bitmap) image on python. I am attempting to have this program on UNIX Operating System on a raspberry pi and cannot ...
2
votes
6answers
168 views

How can I extract text between a pair of the same character?

Input: blahŤfoobar1Ťblah Desired output: foobar1 I want to get the text between two "Ť" characters. Assume there will always be either 0 or 2 "Ť" characters, to make things easier. I tried the ...
0
votes
1answer
19 views

Installed script with pip: Run like a command

I installed this python script scdl to download audio from soundcloud. The script is installed to ~/.local/bin How can I run this script in a terminal like a programm? So I don't enter the whole path ...
-1
votes
0answers
21 views

Using google protocol buffers: downgrading protoc

I am trying run a python code that has sections generated from proto files. However the internal syntax is for protocol-buffers 2.6.1, while i have 3.0.0. I tried to pip install -I protobuf==2.6.1 ...
1
vote
0answers
23 views

How to edit and refresh a locally opened html using python script?

Using python program a local html file is opened in browser,there is a table in the html file,I want to edit the content of a cell in the table. Also I want to refresh it using python,since the ...
0
votes
1answer
14 views

install colorama python module

I import colorama in python code and I have below error : Traceback (most recent call last): File "stevoku.py", line 5, in <module> import colorama ImportError: No module named colorama and I ...
1
vote
1answer
18 views

How do I install pybel such that my python environment recognizes it?

On Chemistry Stack Exchange I asked a question regarding Open Babel & Python being used together. The problem is that the answer I was provided (by Geoff Hutchinson) requires Python to be able to ...
0
votes
1answer
28 views

Playonlinux asks to install Python

just few days ago I installed other version of Python on Ubuntu (I need it for coding). Installation of Python went pretty much smoothly, but when I try to launch League Of Legends I get a problem. ...
2
votes
2answers
112 views

Problem with Java while trying to run pycharm-community-4.5

I've just installed pycharm-community-4.5 into my Ubuntu 14.04 (64 bit). After installing I ran the command /opt/pycharm-community-4.5/bin$ ./pycharm.sh to run pycharm but the terminal showed me some ...
-1
votes
0answers
20 views

Error compiling Python 3.4.3 from source [closed]

I have been trying to update Python 3.4.3 from source, but each time, during the ./configure command, I get an error in the configure.status configure: creating ./config.status ./config.status: line ...
3
votes
1answer
31 views

Pycharm broke pip

Situation: Whilst using Pycharm on a python3 project, I came across the option under the "Project Interpreter" settings to install a package manager. I clicked it absentmindedly and immediately ...
1
vote
0answers
12 views

How to get gnome session idle time?

Has the method to get the session idle time through dbus changed in the recent Ubuntu or my dbus code here is wrong? #!/usr/bin/env python import dbus bus_name = 'org.gnome.ScreenSaver' obj_path = ...
1
vote
1answer
34 views

Link button to application in Glade

I'm new to Glade and I just love the possibilities this program has for (beginner) GUI developers. I started making an application with some text and buttons and I would like to assign a button to ...
4
votes
3answers
78 views

How I can monitor new files in a directory and move/rename them into another directory?

A program generates output textfiles, named output.txt, after every 15th iteration of a certain process. Doing so, it overwrites the last output.txt. I want to keep the files however, and I can't ...
1
vote
1answer
43 views

wrong ELF class for python 2.7 (32-bit ubuntu 14.04)

I installed Acestream and found that acestreamengine won't run. Trying to start acestreamengine, I get this output: 2015-05-10 12:19:52,008|MainThread|acestream|error during startup Traceback (most ...
-2
votes
0answers
22 views

Why on Ubuntu 14.04.2(updated) the Python 2's version is 2.7.6 [duplicate]

i have just installed a Vagrant box of Ubuntu 14.04.2 (Trusty). Now, as i ran Python interpreter, it loads up Python 2 automatically. That's ok. However, i wonder why the Python 2's version is 2.7.6 ...
0
votes
0answers
46 views

Cant get Python library to install in ubuntu

I am trying to get the "Dirac" python library installed in ubuntu 15.04. Using synaptic i find it, and install it just fine, but when i try to "import dirac" in the python shell it says ImportError: ...
3
votes
6answers
299 views

Use bash to extract number from between square brackets

My file looks like this: [581]((((((((501:0.00024264,451:0.00024264):0.000316197,310:0.000558837):0.00857295,((589:0.000409158,538:0.000409158):0.000658084,207:0.00106724 ...
-1
votes
1answer
42 views

python simpleHTTPServer woking only with local machine

I ran following command to run http server python -m SimpleHTTPServer and get following message Serving HTTP on 0.0.0.0 port 8000 ... but i am not able to access it on another machine/mobile in ...
1
vote
0answers
17 views

Gedit Plugin: How to get the buffer of a newly opened file from another file in Gedit?

I've written a code for a Gedit Plugin which opens another file, self.window.create_tab_from_location(Gio.file_new_for_path(file_path), None, line_number, 0, ...
2
votes
2answers
37 views

How can I put a cluster lines in numeric order?

How can I convert this: -foo -bar 42 \ randomtext=00 "00" \ -randomtext=00 "00" \ -foo -bar 104 \ randomtext=00 "00" \ -foo -bar 1 \ -randomtext=00 "00" \ To this: ...
2
votes
0answers
105 views

Why does pip -t not work on Ubuntu 15.04?

I've been having an odd problem with pip on Ubuntu 15.04. When I try to install anything using the "-t" option to put it in a specific directory, it fails with the following error: error: can't ...
1
vote
0answers
22 views

save data to excel using openpyxl

I use the code fragment below to copy data to an excel file using openpyxl. for i, j in enumerate(fint): _= ws1.cell(column=i +1, row=globdat.cycle, value=j) wb.save(filename = ...
0
votes
0answers
58 views

Python PATH issue (Anaconda_Python, minpower and gurobi interfacing)?

I am using Ubuntu 14.04 LTS, installed Anaconda_python recently Installed minpower and gurobi. Extracted gurobi in home directory, added path as mentioned which is gedit ~/.bashrc export ...
0
votes
1answer
43 views

Problems with python-gtk2-dev after update to Ubuntu 15.04

Every apt-get operations gives me the following error message: dpkg: warning: subprocess old pre-removal script returned error exit status 1 dpkg: trying script from the new package instead ... dpkg: ...
2
votes
1answer
34 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 ...
1
vote
1answer
63 views

Ubuntu Phone SimpleHTTPServer python

It is possible to use the module in Python SimpleHTTPServer on my Ubuntu Phone?
5
votes
8answers
507 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. ...
0
votes
1answer
29 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: ...
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
3answers
65 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
50 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
32 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 ...
2
votes
1answer
27 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 ...
0
votes
1answer
37 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
101 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
52 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 ...
1
vote
1answer
28 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 ...
0
votes
0answers
14 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
27 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 ...