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

learn more… | top users | synonyms

3
votes
1answer
4k views

How to do a binary install of Python 2.7 on SUSE Linux Enterprise Server 11?

My SLES11 box came with Python 2.6 installed. I would like to upgrade to 2.7. What is the easiest way to do this?
0
votes
0answers
28 views

Setting different path for installation in python packaging

I am new to python packaging. My Command Line Interface (CLI) named virtdc modules has to be installed in /var/lib/virtdc. virtdc is the top folder structure /var/lib/virtdc/ framework/ ...
1
vote
1answer
899 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: $ ...
0
votes
1answer
10 views

Permissions when creating a simple Python package for pip

I'm trying to package a simple app I wrote, so that it can be installed on a system using python setup.py install and (later) using pip install awesomeapp. The app consists of two files in the same ...
5
votes
3answers
2k views

On Debian, how do I add a Python package in dist-packages to a virtualenv?

Given some python package in /usr/share/pyshared/ or /usr/lib/pythonX.Y/dist-packages/ (take python-numpy or python-scipy for example), how do I add that package to a virtualenv? When adding the ...
1
vote
0answers
20 views

Profiling memory, disk, cpu, and time from python

I have a workflow, implemented in python, and I would like to profile memory, disk (IO), cpu, and time information in python in an unobtrusive manner. This is NOT a question of profiling code, but ...
2
votes
1answer
580 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 ...
1
vote
2answers
29 views

Lots of unmet dependencies while updating Python

It was suggested that I uninstall and reinstall Python, so I deleted every directed labeled python until 'which python' and 'which python3.4' didn't show anything. Then I did apt-get remove python ...
1
vote
1answer
590 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 ...
6
votes
1answer
49 views

“ValueError: _system not initialized” when using apt.VersionCompare

I wrote a bash script that has to compare two version strings to decide to download new version or not. The test relies on a Python script that does apt.VersionCompare(), which does version comparison ...
0
votes
0answers
24 views

How to grant sudo permission for a .py script on a apache folder?

I've exemplo.py in an folder /opt/lampp/htdocs/cgi-local/exemplo.py folder. The script creates a socket that needs super user permissions. My question was a little confusing? I need to access ...
1
vote
0answers
16 views

How to monitor the integrity of a script that is running?

I want to make sure a running python script was not modified accidentally by some other process (or cosmic ray, or unexpected developer update). I've heard of comparing a checksum of the script (e.g. ...
3
votes
1answer
996 views

Can I upgrade to a new version of Python on an old version of Ubuntu?

I have Ubuntu 8.04.3 LTS and ran this: $ sudo apt-get install python2.7 I got this: Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find ...
2
votes
1answer
46 views

readline - why does does it only do carriage return and not a line feed when reaching end of line?

I developped a python application that uses the cmd module to make an interactive command-line interface. This cmd module uses readline for command-line management: completion, history... My issue ...
3
votes
1answer
52 views

How to catch mount events on Linux?

I want to somehow get notified if a mount or unmount occurs for a USB drive. At the moment I use udev and then wait for x seconds for a new entry in /proc/mounts. This works ok if the mounting is ...
3
votes
2answers
3k 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 ...
2
votes
2answers
644 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 ...
16
votes
3answers
1k views

Why is coreutils sort slower than Python?

I wrote the following script to test the speed of Python's sort functionality: from sys import stdin, stdout lines = list(stdin) lines.sort() stdout.writelines(lines) I then compared this to the ...
-4
votes
1answer
63 views

What does PIP stand for? [closed]

What does pip stand for? Does it stands for Python Package Installer? No, I don't think so, it is PPI
5
votes
1answer
60 views

Why is this Python package trying to use a non-existent gcc?

I'm trying to install PyCrypto for Python 3 on Solaris. Whether I do it via "python3 setup.py install" or "pip3 install pycrypto", I run into the same problem: a call is made to a gcc which does not ...
1
vote
1answer
520 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 ...
1
vote
1answer
34 views

Pyajam in debian 7

I'm trying to make the installation package python Pyajam I tried to install for pip, I received an error 4Suite-XML package $ pip install Pyajam Installing collected packages: pyajam, 4Suite-XML ...
1
vote
1answer
34 views

How can I modify a python shared object (.so) file?

I have a python code (Running on a raspbian OS) which reads the value of a joystick axis and then sends the value to an arduino. At the start of the code I have typed: import pygame I can then use ...
4
votes
2answers
124 views

Why does my Python background process end when SSH session is terminated?

I have a bash script that starts up a python3 script (let's call it startup.sh), with the key line nohup python3 -u <script> &. When I ssh in directly and call this script, the python ...
2
votes
2answers
65 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 ...
1
vote
0answers
35 views

Startup commands in /etc/rc.local won't work

I have a Python program and an nginx/uwsgi/django web setup. I want the program to start with the system, as well as the web server. Here's my /etc/rc.local: crawler_dir=/home/mohammed/git/crawler ...
4
votes
3answers
2k views

Recommended way of installing python packages on Arch

What's the recommended way of installing python packages on Arch? Searching for them on the AUR and installing them from there (or create a PKGBUILD file to make a package yourself) or using pip? I ...
0
votes
0answers
265 views

python error using an executable with Z shell

I'm getting this error from the Unix Z shell (I'm on Mac): python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or ...
2
votes
1answer
49 views

Why is my pip-installed Python script not executable for everyone?

In my Vagrant instance: vagrant@archlinux:~$ sudo pip2 install vcard Downloading/unpacking vcard Downloading vcard-0.9.tar.gz Running setup.py (path:/tmp/pip_build_root/vcard/setup.py) egg_info ...
0
votes
1answer
35 views

Installing Python without package manager

I need to install Python 2.7.x on a TI Sitara ARM processor (based on the BeagleBone Black) running a minimal custom version of Linux. In particular, the OS does not have any package manager, no gcc, ...
1
vote
0answers
33 views

writing into file using python [closed]

I am new using Python. So I have code here and tried to write in a file. When I run the code the only written in the file is only one line of word. But when I tried printing it into the screen it will ...
1
vote
0answers
35 views

Hotmail not receiving emails from a script, but works from the server

I have a working mail server running Debian stable, the following elements are working. SPF DKIM rDNS My IP is not listed in any backlist, I used: mxtoolbox.com for all this. My problem: Sending ...
2
votes
1answer
32 views

Ways to store data for command line API

I am developing an API in Unix environment for virtual machines. I have to store some information in a table about virtual machines. Currently I am using python dictionary of virtual machine objects ...
3
votes
1answer
55 views

Issues with Skyperious

I am trying to install Skyperious on Ubuntu 13.10, I have installed all the required dependencies, my python version is Python 2.7.5+. When I run the following code from terminal python main.py ...
4
votes
5answers
5k views

How can I upgrade pip on Ubuntu 10.04?

On Ubuntu 10.04 I've used apt-get install pip to install pip after which I installed django. Then I tried to uninstall django with pip via pip uninstall django which gives me: pip: error: No command ...
1
vote
2answers
829 views

How to install meld 3.11 in Ubuntu 14.04?

I am trying to get meld 3.11 to work on ubuntu 14.04 I tried following the method below" cd ~ git clone https://git.gnome.org/browse/meld cd meld sudo ln -s ~/meld/bin/meld /usr/bin/meld But ...
2
votes
1answer
16 views

How to use a custom library for certain programs?

Here's my situation. I'm running Centos 7, have the standard version of libcurl as provided by my package manager, and several programs that depend on libcurl. One of them is pycurl, a python ...
0
votes
0answers
18 views

Sage Math browser interface not working

I wanted to try Sage Math as an free alternative to MatLab. I installed it from AUR, and it works in terminal, but I can't access it via browser. I tried to Google it, but had no luck. ~> sage ...
1
vote
0answers
52 views

How to suppress input overrun messages

I have a Raspberry Pi running Raspbian (a Debian flavor: Linux version 3.12-1-rpi (debian-kernel@lists.debian.org) (gcc version 4.7.2 (Debian 4.7.2-5+rpi1) ) #1 Debian 3.12.9-1+rpi1 (2014-05-19) ). ...
0
votes
1answer
38 views

Make python module as an installable API

I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this. I want to make this as an installable API, I mean to ...
3
votes
2answers
134 views

Basic steps to develop python API in Unix environment

I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this. I have the file extension as abc.py. I would like to make ...
1
vote
1answer
20 views

Maintain the path in installable UnixAPI

I am developing an API in Unix environment for virtual machines. Most of the modules are developed in python. I have few questions on this. Inside the API I am using absolute path like ...
2
votes
1answer
69 views

Permission denied in scripted chroot jail

I am attempting to script the creation of a chroot jail (I know that there are tools for this, but I am in it for the experience, so please don't recommend a tool). I have a script which looks up ...
2
votes
1answer
640 views

How to install Node.js in CentOS 5.10 with Python 2.4?

I want to use Grunt on websites we have hosted on our WHM dedicated server. It is running CENTOS 5.10 x86_64 standard with WHM 11.42.1 (build 21). It is critical that things do not break, as we have ...
2
votes
1answer
48 views

Output of a python script running as unit is out of order while shells seems unnafected

How would I get all outputs of systemd managed python2 script instantly into journal, just like it appears in terminal I'm on centos 7, but seems to be same on arch according to systemd manual, ...
1
vote
2answers
52 views

Find average CPU, vMem, sMem usage on 1, 5, and 15min

I am trying to find at time T the average CPU usage on 1, 5, and 15min, just like what you get from /proc/loadavg Same thing for virtual memory, and swap memory. I would be fine with a python ...
1
vote
3answers
216 views

Why can't my python script change umask?

This is my script #!/usr/bin/python import os print "hello world from python" os.system("echo 'hello world from bash'") os.system("umask 055") os.system("ls -alh > test") If I run this code ...
2
votes
2answers
523 views

'NoneType' object has no attribute 'decompressobj' while installing Bootstrap setuptools

I have just started (as in 30 minutes ago) to use Ubuntu 12.04 (all my previous experience is with windows) and I just started to learn how to program a couple of weeks ago so this is probably a ...
2
votes
2answers
162 views

How does a parallelized Python program look with top command?

I work on a shared cluster. I've seen people run parallelized c code on this cluster which, when I use top to see what processes are running, are shown to be using (for example) 400% of the CPU, ...
5
votes
4answers
354 views

Using jq to extract values and format in CSV

I have the below json file: { "data": [ { "displayName": "First Name", "rank": 1, "value": "VALUE" }, { "displayName": "Last Name", "rank": 2, ...