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

learn more… | top users | synonyms

2
votes
1answer
2k views

Install newer & older versions of python on debian?

How can I install extra versions of python on Debian (jessie). On Ubuntu I can use the "deadsnakes" PPA which will give me any python version I want, with the version name in the command (e.g. ...
0
votes
0answers
130 views

why md5 encrypted password insert into php ldap admin extra {md5}

I am using python script to inter encrypted password into php ldap admin but the problem I am facing is LDAP add extra {md5} before the encrypted password, I simulated the code by creating two files ...
-2
votes
1answer
44 views

What is posix, and how can I elevate my permissions using python? [closed]

I was wondering if I could elevate my permissions on a chromebook with the os posix using a python script. I was not given the administrative permissions when I was given the laptop for college.
0
votes
1answer
72 views

Unable to start Terminator in Fedora

I'm not a Unix-friendly user, so my question could be very dummy. I installed Terminator using this command: sudo dnf install terminator After some days of using without problem, for some reason, ...
0
votes
0answers
79 views

How to automate HP 3PAR in CentOS using Python?

I have worked out in Windows to start 3PAR using python but I am not able to login into 3PAR in CentOS. Additionally I need to know how to view system, hosts, provisioning Tab(list Volumes, Virtual ...
0
votes
1answer
45 views

How do I make a Make, Make Install, and deb file for a python program?

I recently wrote a python program. Now the question: how do I go about making an installation script for it? From my understanding, you need to create a make file, I believe that a make file is made ...
5
votes
1answer
185 views

Running Deamon Involving GPIO on Pi

I have a daemon that monitors various things using the GPIO ports. I have used python to write the code for this using the RPi.GPIO module. I would like to ensure that the daemon is always running, ...
0
votes
1answer
177 views

syntax error while trying to execute python program in bash shell

I'm trying to use python to read in data from a text file but I keep getting "syntax" errors when I execute the program. Python Code: Test.py import os import numpy as np Ye,Eb,Tb = ...
1
vote
1answer
88 views

Running python script, error appears

https://github.com/g-oikonomou/sensniff/blob/master/host/sensniff.py The link above refers to a python script that is to be run on Ubuntu. When I run the script, the following error appears on the ...
0
votes
2answers
275 views

pexpect fails to match command is grater than 65 characters

Issue with pexpect, python module. Pexpect fails to do expected behavior if the length of the command is greater than 65. #!/usr/bin/python import pexpect sshCmd='ssh root@15.186.22.105' ...
0
votes
0answers
135 views

Install previous version of iceweasel (raspberry Pi)

I am trying to get selenium (python) working on the raspberry pi. I am using Iceweasel for lack of another browser, but there is some bug that I am not sure about in the current version that stops ...
0
votes
1answer
42 views

How do I create a Debian package for a python progarm?

I created a python game that I want to distribute on my website via a Debian package. The game has a few dependencies that are usually not installed (such as pygame) on some Linux computers, but often ...
0
votes
2answers
48 views

How to install python on debian? [closed]

I'm new to Linux, so I don't know a lot of things, and I want to know how can I download and install python on my linux VPS (with SSH access).
0
votes
1answer
450 views

pip install gives “TypeError: 'int' object is not iterable ”

In Debian Stretch, when I try to install the python package python-constraint via pip install python-constraint I get the following error; Exception: Traceback (most recent call last): File ...
0
votes
1answer
86 views

Encountered “error: command 'c++' failed with exit status 1” while trying to install pymedia in ubuntu

I'm trying to install pymedia in ubuntu to run scripts using python 2.7. So, I tracked down the dependencies and got them installed : sudo apt-get install python-dev libogg-dev libvorbis-dev ...
0
votes
0answers
15 views

I want to merge CSV files to one Excel workbook in different sheets. I want each file in one sheet with the CSV file name as sheet name [duplicate]

input: 1-example.csv a b c 2-example.csv 1 2 3 output: output.csv/.xls sheet1-data(1-example.csv) sheet2-data(2-example.csv) a 1 b ...
2
votes
1answer
78 views

Why do I have so many python versions on my mac?

I'd like to get into scipy and first setup my macbook air for python development. The problem is I have many different versions of python installed - here is what I get when bash autocompletes "pyth": ...
0
votes
0answers
197 views

Python 3.4 & 3.5 glitch

I recently installed Python 3.5 from source code on elementary OS Freya. Without removing Python 3.4. For some time things ran fine, later they turned nasty. for example pip installs the packages at ...
10
votes
6answers
15k views

Why is this python error message generated whenever I type a nonsense command?

Whenever I type any "nonsense" command, this python error message is generated. Normal commands work fine. Any idea how to debug this? $ somenonexistingcommand Traceback (most recent call last): ...
2
votes
1answer
449 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 ...
1
vote
0answers
291 views

Why Python cant import OpenSSL

I created a virtual env for a matrix home server installation on a shared hoster. $ virtualenv -p python2.7 /home/tristank/venv/synapse $ source /home/tristank/venv/synapse/bin/activate I installed ...
1
vote
1answer
55 views

`man` pages for languages other than C (e.g, python, R, javascript, etc)?

man pages are a phenomenal resource while programming in C on Linux. While looking at someone else's code, if you see something foreign you can immediate research it in another terminal with $ man 3 ...
4
votes
1answer
103 views

Where is the default device name (e.g. /dev/ttyUSBx) specified?

I'm investigating dynamic device name mapping via udev. The goal: On a multi user system, each user can allocate and free devices like usb-serial converters or PCIe cards (FPGAs). If an user ...
0
votes
1answer
32 views

Terminal Software to add Watermarks to Videos?

I have a bunch of videos, 12,000+ a month. I would like to add a watermark to all of them, like a logo with our website. Is there any software I can use on the Terminal to do this? Ideally I'd like ...
1
vote
1answer
705 views

Running a python script 200,000 times in parallel using bash [duplicate]

I need to run my Python script 200,000 times. Is it possible to do parallel execution using bash? Since it's 200,000 times I would like to use at least 10 threads simultaneously
1
vote
3answers
843 views

Copy and get files from one machine which is connected via ssh to another one

I read a lot of answers to questions very similar to this one, but I couldn't find something that really fits my problem. Here's the situation. I have a machine whose address is "machine1@address", ...
3
votes
3answers
15k views

On Red Hat Enterprise Linux 6.2 how can I use Python 2.7 as default not Python 2.6? I did but still showing 2.6?

RHEL 6.2 I have python 2.6 but I need default python 2.7 using yum packaging (so that nothing goes messed up, cause its a heavy duty working system, all I need the python 2.7 on it, without messing ...
0
votes
1answer
78 views

How do I clean up vi and reinstall it completely? [closed]

Basically when I try to run vi, I have the following error (and after open it, there are a lot of errors): Error detected while processing function UltiSnips#bootstrap#Bootstrap: line 35: Traceback ...
3
votes
1answer
2k views

Convert xml subtitle file to srt format

I have a xml subtitle that looks like this: <?xml version="1.0" encoding="utf-8" ?><transcript> <Item from="1.16" duration="4.68"><![CDATA[(Dong-hyuk is coming to see you now.) ...
0
votes
1answer
478 views

How to fix “cannot find -lxml2” error while installing 'igraph' for python?

On Ubuntu 15.04 I am trying to install 'igraph' using the following command: pip install python-igraph in order to, well, use the igraph package in python to work with graphs and stuff. However, ...
2
votes
1answer
1k views

PIL install error: SyntaxError: Missing parentheses in call to 'print'

I am trying to install PIL (the Python Imaging Library) using the command: pip install PIL --allow-unverified PIL --allow-all-external seeing the following errors: gkhan@Gkan ~ $ pip install PIL ...
1
vote
1answer
296 views

Run a Python script in the background on boot

I recently installed the Google App Engine Development server on my FreeBSD home server to be able to test my GAE app remotely. What I can't figure out is how to run the Python development server as a ...
0
votes
1answer
81 views

How to import self made modules in Python on Ubuntu 15.04

I just moved from windows 8 to Ubuntu 15.04. I do some programming in python3, and some programs rely on imports from self made modules. In windows all I had to do was add the directory which contains ...
1
vote
0answers
27 views

The first click on Linux Mint menu does not open it

I noticed that the first click on the menu after rebooting or turning my computer on does not open it, I must click again to actually show it. I use LMDE with MATE. I have followed the instructions I ...
2
votes
0answers
76 views

Why is denyhosts not banning *some* brute force root SSH login attempts?

I recently noticed in my logwatch emails from a couple of servers that although denyhosts was doing its job for some brute force root ssh login attempts others seem to be ignored and continue to ...
1
vote
1answer
652 views

LD_LIBRARY_PATH ignored by Python 2.7

I'm trying to install Theano on a box for which I have no root access and it looks like that LD_LIBRARY_PATH is ignored by my installation of Python 2.7. Since I can't install packages at the system ...
1
vote
1answer
24 views

How is python invocation different when launched by Nagios nrpe?

When invoked with python2 after importing os and sys, the following function runs successfully but acts incorrectly when invoked by Nagios nrpe: def get_proc1_open_files(): # Set proc1_children ...
9
votes
3answers
2k views

How to list all object paths under a dbus service?

This is a follow-up question to A list of available DBus services. The following python code will list all available DBus services. import dbus for service in dbus.SystemBus().list_names(): ...
0
votes
1answer
88 views

Why are the bytes I'm receiving not the bytes I sent?

I've been working my way through a security games site, trying to automate what I'm doing using pwntools. I've come across a problem somewhere in my process, however. When I try to run the vulnerable ...
1
vote
0answers
121 views

How do I use the Python module “keyboardleds” to determine Caps Lock state?

I want my system to ascertain the state of Caps Lock (is it on or off) by inspecting the keyboard DIRECTLY. After much searching, I understand that this can be done in Python by using the module ...
1
vote
1answer
3k views

Install wicd on Slackware 14.1

I am trying to install wicd-1.7.2.4 on Slackware 14.1. I couldn't find configure or makefile in wicd-1.7.2.4.tar.gz. Running python setup.py configure (following the INSTALL guide) causes: sh: ...
0
votes
0answers
119 views

permission needed for Python to access USB drive?

I got this Python script that reads media files from USB stick. It used to run fine, today it keeps giving me OS Error: [Errno 13] Permission denied: media/myName/usbName when the script runs the ...
1
vote
1answer
69 views

How do I get the pid of the exact progarm launched

So I have a couple python programs say program A and program B, when using "pgrep python" to get the pid, it gives me the pid of both program A and program B. However, I am writing a program that need ...
0
votes
1answer
73 views

python gnupg cannot user keychain keys

I have an issue using the gnupg module in python in Ubuntu 14. My keychain is set up correctly. I can use gpg on the command line to decrypt files with having to enter my passphrase. I have also ...
2
votes
0answers
42 views

How can X11 shortkeys be captured by a Python program?

I want to have a little Python program running in the background that monitors for certain shortkey presses (e.g. Ctrl Alt direction key). The idea is that these shortkeys can trigger various actions. ...
2
votes
1answer
550 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
2answers
404 views

root access on new chromeos lenovo n21 for python dev

We've purchased several new Lenovo N21 chrombooks to run Python workshops for inmates in the local jail. Trying to install Crouton, Debian, and Anaconda to prepare. All require developer mode and ...
14
votes
5answers
19k 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 ...
0
votes
0answers
127 views

Compiling 64bit Python on HP-UX (Itanium)

I'm trying to compile 64bit Python (2.7.10) on HP-UX (ia64), as per the Python readme, but can't seem to get it to work properly. This is what I'm using. I've also removed the "-O" from the OPT line ...
0
votes
0answers
13 views

How to avoid the python script file output in the terminal? [duplicate]

I'm in my Macintosh Terminal. I was running a python proxy script at local and everything works fine except the python script keeps throwing out all kinds of logs in my terminal. How do I avoid them? ...