Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

learn more… | top users | synonyms

1
vote
1answer
324 views

Trouble installing lxml with custom install location for libxml2/libxslt

I am attempting to install a python module called lxml to my account on a supercomputer running RHEL. I do NOT have root access or super user status. lxml requires the dev/devel versions of libxml2 ...
26
votes
4answers
2k views

python vs bc in evaluating 6^6^6

I am evaluating the expression 6^6^6 using python and bc separately. The content of the python file is print 6**6**6. When I execute time python test.py, I get the output as real 0m0.067s ...
7
votes
4answers
5k views

Install PIL/Pillow via pip in Debian testing (Jessie)

On Debian testing (Jessie), when I try to install PIL or Pillow (python imaging libs) in a virtualenv via pip I get the following error: running egg_info writing Pillow.egg-info/PKG-INFO writing ...
-2
votes
1answer
28 views

Ruby alternative to fabric [on hold]

Is there a Ruby alternative to Python based Fabric?
1
vote
1answer
27 views

Failing to import python modules only on specific user

I've been trying to figure out this for ages. When I run certain python programs they would crash saying that certain module can't be imported, while it's actually installed and should be importable. ...
3
votes
2answers
200 views

Aliasing 'python' to 'ipython' only when 'python' is run without args

I thought it would be nice to have an alias (in ~/.zshrc) to have 'python' aliased to 'ipython' ONLY when 'python' is run without args (otherwise, programs won't launch). First of all, how to express ...
1
vote
2answers
569 views

installing eric5 in CentOS 6.4

I am trying to install Eric Python IDE 5 in my CentOS 6.4. The problem here is even I have installed PyQT4 its again saying that module is missing. what I am supposed to do ? here is the terminal log ...
1
vote
1answer
164 views

How can I install hulahop

I cloned hulahop via git and I'd like to use it and try to run this example. I have a problem to find out how to build and install it. I also tried to install it with apt-get but I don't have this ...
3
votes
2answers
207 views

How can I disable the new history feature in Python 3.4?

Since upgrading to Python 3.4, all interactive commands are logged to ~/.python_history. I don't want Python to create or write to this file. Creating a symlink to /dev/null does not work, Python ...
1
vote
1answer
38 views

How to install PySide package for CentOS 7

I'm trying to install PySide on CentOS 7. Seems pretty straightforward, enable EPEL repo, and install. Except that EPEL doesn't seem to contain a PySide package (yum install python-pyside fails with ...
0
votes
1answer
23 views

Error importing lxml package python in Ubuntu

When I try importing lxml package in python I am receiving the following error. Traceback (most recent call last): File "<stdin>", line 1, in <module> File ...
1
vote
1answer
696 views

Running ipython notebook on Debian

I'm trying to get ipython notebook to run on my Debian machine without much success. I've installed ipython and ipython-notebook via apt-get, but when I try to start it up I get the following: $ ...
1
vote
1answer
94 views

“except (IOError, OSError), e: SyntaxError: invalid syntax” when configuring python-lockfile

I am having trouble installing any new packages in Ubuntu because of python. I tried sudo apt-get install python3 python3-dev but I am getting the following output :: dpkg: error processing ...
0
votes
0answers
16 views

Using tee to get realtime print statements from python [migrated]

I have a python script that looks something like this: for item in collection: print "what up" #do complicated stuff that takes a long time. In bash, I run this script by doing the ...
0
votes
1answer
24 views

CRON path problems

I have a Python script that runs from the command line beautifully, but when I try and run it from CRON does strange things. The script generates, then runs an apk script file. The apk script file ...
2
votes
1answer
51 views

Cron job not behaving as expected

So I have a python script that pulls down git/svn/p4 repositories and does some writing to a database. I'm simply trying to automate the running of this script and based from what I see in syslog it ...
2
votes
1answer
71 views

To write this Pseudocode with Regex

I am doing a Makefile which I run regularly by Crontab every day at 0230 crontab -e; 30 2 * * * /bin/thePseudocode Python-like Pseudocode directories = ["Cardiology", "Rheumatology", "Surgery"] ...
1
vote
1answer
37 views

Make debian package to install python

I have two Python scripts, and I need to package them into a Debian package. I have tried quite a few things with some success. For example, I made a setup.py and then used python-stdeb to create a ...
1
vote
1answer
20 views

Custom python REPL with fifos

Is it possible to make a custom REPL (for e.g. python) with two fifos? Explanation of the problem Suppose I have two fifos in and out. I have three terminals. In the first I want to run commands ...
1
vote
2answers
27 views

Window manager with python support/extensions

My prefered desktop environment lately has been Lxde. I like handling most things from the command line, so gnome and kde always seem to get it my way more than I like. But I do envy some of the new ...
1
vote
1answer
33 views

CheckInstall fails to install on Debian

I tried CheckInstall to track installation of package on Debian, but it fails to install it. Installation follows the typical configure/make process $ autoconf $ ./configure $ make $ make install ...
0
votes
2answers
29 views

checkinstall package conflicts with python

I'm trying to do a distribution upgrade from Debian 6 to 7 and am having some issues with some packages I created and installed with checkinstall. When doing the upgrade I get the following message: ...
0
votes
1answer
175 views

Python3 error “no module named bluetooth” on Linux Mint

I am trying to connect my Lenovo S10E to a Nintendo Wiimote via bluetooth. I am using a simple Python script, reproduced below. I am calling it from the Linux Mint (version 16, "Petra") command line ...
1
vote
1answer
785 views

setcap error on Debian Squeeze: “unable to set CAP_SETFCAP effective capability: Operation not permitted”

My python script needs at least the CAP_NET_RAW capability, because it's using a pcap library, but I don't want to use sudo (and in fact sudo causes my script to not work properly, with the script's ...
1
vote
1answer
528 views

Can't install python because of zypper conflict

I have a virtual machine I just set up. I'm running a completely fresh install of OpenSUSE (with online updates from yast). At the terminal I tried to run python: $ python bash: python: command not ...
8
votes
3answers
849 views

python == python2 OR python == python3 ? How to package, distribute python py2k scripts?

Depending on system, python==python2 or python==python3. Executable Python scripts, starts with: #!/usr/bin/env python #!/usr/bin/env python2 #!/usr/bin/env python3... For python py3k it is ...
2
votes
3answers
515 views

Debian 7.1: duplicity error when using gdocs backend

I've installed duplicity backup tool plus python-gdata library on my debian 7.1 amd64 system. When I want to use duplicity to store my documents on Google Drive, it shows this error after asking for ...
1
vote
2answers
40 views

Howto include output of a script into the zsh prompt

I would like to add the output of a Python script into my zsh prompt but I am not sure how to do it? Is this done by what is called "PROMPT EXPANSION" in the man pages? Please someone set me on the ...
3
votes
2answers
2k views

Installing python modules for python2.6

On my CentOS 5.8 system (el5 , 64bit), I had python2.4 after OS install and I installed python2.6 now. Now I want to install python modules using yum. But whenever I install a new python module it ...
0
votes
1answer
75 views

How to install Binwalk on Debian without installing the graphs libraries?

What is the proper way to install the Binwalk tool on Debian 7.0 without the added graphing capabilities (and it dependencies)? I've read that I can skip the make deps command, but this deps.sh script ...
2
votes
1answer
516 views

Python script run while screen is locked

I have a python script which seems to be failing to continue running its while True: ... sleep() loop my code is at http://github.com/xdaimon/xdaimonConky What happens is I autostart python on ...
5
votes
4answers
7k views

Run Python script on startup

Running on Ubuntu Karmic. I need to execute the following (updated) script at boot time #!/bin/sh # /etc/init.d/scripts # Description: Starts Python scripts # ————————————————– # ### BEGIN INIT INFO ...
0
votes
1answer
28 views

Conversion of the bsonfile with two different outputs

I want convert some bson file to some json file. I do it by the using of bsondump function. bsondump exemple.bson > example.json By the old version 2.4.9 of the bsondump (depended on the version ...
2
votes
0answers
33 views

How do I execute a program in Xfce and make it use another xfwm4 theme other than the default one?

I want to run a python script (the one in the answer to Python - how to make transparent window with gtk.Window but not with Gtk.) that displays a transparent window. I'm running it from a bash script ...
0
votes
0answers
68 views

Capstone for Python not working

I'm unable to get Capstone (http://www.capstone-engine.org/lang_python.html) for Python to work. I have attempted to install capstone both using pip and compiling and installing from source. Both are ...
0
votes
1answer
18 views

Linux packages - Separate Python's external libraries from the system

I read this articles (check What About Python CLI Tools?). Well, this is obivous, separate external Python packages from your System Python's site-packages. When doing a sudo apt-get install package ...
0
votes
1answer
85 views

PiGlow not working

After following the steps specified in Boeeerb's PiGlow github repo, when I try to run the test.py file it gives me the following message: Traceback (most recent call last) : File "test.py" , line ...
0
votes
1answer
68 views

add-apt-repository Raises A Python Error

I wanted to install Numix icon theme, therefore I needed to add ppa, but it strangely raised this error: Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 163, in ...
1
vote
0answers
104 views

configure python3-tk for manually installed python 3.4 debian wheezy

On wheezy apt packaging python3-tk requires python3.2 & python3 packages. I want python 3.4 and have built it manually. The trouble is I don't know how to get my manual 3.4 build to 'see' the ...
3
votes
2answers
834 views

py3compile error - Unable to get the locale encoding

After reinstalled the python3.2, I got the error as below when call py3compile: Fatal Python error: Py_Initialize: Unable to get the locale encoding LookupError: no codec search functions registered: ...
3
votes
2answers
488 views

Unable to pass a bash variable as a python argument in bash

For some reason I cannot pass the bash variable $FOLDER as a python argument on the following code. The python script downloads some files from amazon s3. Bash script: #!/bin/bash FOLDER=$(./aws get ...
2
votes
4answers
179 views

How to restart python script after one second of going down using UPSTART?

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 - ...
1
vote
1answer
74 views

calling script from perl/python/ruby and retrieving output [closed]

I inherited a tcsh "master" script that works and extracts lines from files with data with using 'zcat' piped to 'grep' and some other commands/scripts. The extracted lines contain numbers . It is ...
1
vote
1answer
94 views

Can't install Python3 package in Debian 7

I get error while installing python3 in Debian 7 (I have all updates installed): root@nuclight:~# aptitude install python3 The following NEW packages will be installed: python3 python3.2{a} 0 ...
1
vote
0answers
34 views

Archlinux proper PKGBUILD: Python executable error

In a previous question, I asked about how to write a PKGBUILD to install a binary .deb package. The solution was to extract the contents of the .deb and copy the data to the archlinux package ...
1
vote
1answer
53 views

How Do I Package a Django Website for Debian (Not a Python Package or Egg)?

I have been searching for the last two weeks and chased myself into multiple dead ends trying to figure out the path that takes me where I want to go. However I finally have to admit that my answer ...
9
votes
3answers
5k views

How can I rename photos, given the EXIF data?

Let's say I have a bunch of photos, all with correct EXIF information, and the photos are randomly named (because of a problem I had). I have a little program called jhead which gives me the below ...
1
vote
2answers
47 views

How to check if disk has linux inside

I am trying to boot a external USB drive which runs Linux to check whether the main computer hard drive is running (so it contains) Linux or not, and mount it into /mnt directory to modify some files. ...
0
votes
1answer
61 views

How to copy rows of different files and paste column-wise?

I want to create a new file by copying rows of each file and pasting columnwise according to their file name orders. Here is the sample input and required output files below. file1.txt 1234 5678 ...
3
votes
1answer
39 views

certificate errors trying to create a virtualenv on old Ubuntu

On an old Ubuntu 8.04 (cannot upgrade yet) I need to create a Python virtualenv, install some packages and then my software. I do get certificate errors: Could not fetch URL ...