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

learn more… | top users | synonyms

13
votes
3answers
2k views

Why does python still work after being removed?

On Debian 8 jessie I've removed python: perry@perry:~$ sudo apt-get remove python Reading package lists... Done Building dependency tree Reading state information... Done Package 'python2.7' ...
0
votes
0answers
45 views

QtPy5 on Raspbian, getting ImportError: cannot import name QtCore

I need to be able to use the latest WebKit that includes WebRTC support How do I install Qt5+QtPy5 on Raspbian? What I have tried so far... Installed Qt5 on RPi2 - PASS Native build Qt5 on RPi2 ...
0
votes
0answers
8 views

Pip managed python extending distribution packaged modules

I am looking for recommendations on extending the python library managed by my arbitrary distribution with packages available via PPI. Basically I have been working with a distro managed installation ...
0
votes
1answer
30 views

Debian Lenny Adafruit_BBIO failure to install

Im sorry if i have this in the wrong forum, but im not sure where to put this. Google Groups is going to be too slow in a response (They are where i posted to first). I have Debian Lenny installed on ...
1
vote
2answers
50 views

IPython Qt Console doesn't have a title in GNOME app switcher

When I use the app switcher in GNOME 3.16, the IPython Qt Console (version 3.1.0) doesn't have a title under its icon (see image, and compare with Chromium). I also noticed that the icon doesn't ...
0
votes
1answer
50 views

Log output from more than one script

I have a problem concerning the logging of a process: I have 3 scripts, a.py, b.py and c.sh a.py calls b.py and b.py calls c.sh The goal is to continuously log std out/err (write to file and ...
0
votes
1answer
47 views

Crontab giving no result

I have set up a cronjob on my server which is supposed to run every minute and store the output in the given file. I have been trying a lot and saw a lot of links but nothing seems to work. Following ...
2
votes
1answer
73 views

Convert TeX accents to UTF-8 in Python

edit below First of all, I am quite sure this is a duplicated question. But I have no idea how to search for it. I spent quite a long time already. I am reading with python from a .txt file the path ...
0
votes
0answers
17 views

Can I update python within a user scheme?

I'm running python on a shared server without root access. I've installed pip using the user scheme which allows me to install the packages I need. I can't find any documentation on how to do an ...
1
vote
2answers
74 views

Installing VIM with Python support locally without sudo

I'm trying to install VIM with Python support on Linux without sudo, but for some reason VIM always gets installed without python ( -python in vim --version ) I first installed Python locally by ...
3
votes
2answers
278 views

Why do I receive a “/bin/bash cannot find command” error for an alias?

I am using multiple python, I alias python3 to py: alias py="/opt/python3.4/bin/python3" I want to run python in vim so I write this: map <F9> :call SpecialCompileRun()<CR> func! ...
1
vote
1answer
110 views

Python now thinks arguments are files: Broken emerge, pip, livestreamer and most tools using Python

For these commands (in both bash and fish): sudo emerge eix emerge eix I get this error: usage: emerge [-h] [--version] [input [input ...]] emerge: error: argument input: can't open 'eix': [Errno ...
0
votes
1answer
166 views

Can't use apt because python encoding issue

I'm getting a python unicode error every time I try to install or update anything with apt or aptitude, preventing me to update my system. The error I'm getting is the following: File ...
0
votes
2answers
15 views

A file containing exports

I have a file containing the following: export PYTHONPATH=/home/myuser/squish-5.0-xyz/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/myuser/squish-5.0-xyz/lib I don't what to place it in my ...
2
votes
2answers
37 views

Cron job is writing the error to error log but fails to write outputs to output log file

I have 2 python codes which i schedule using cron. My codes actually runs from 10:30am to 4:20pm everyday. from 10:30am to 11:00am my codes outputs 2-3 lines every minute and after that they start ...
-1
votes
1answer
37 views

How do I set an environment variable in the shell to be result of python script? [duplicate]

If I run export TEST=script.py echo $TEST It outputs script.py script.py code: return 5 can TEST be set to 5? Obviously script will do something in future not just return a number
1
vote
2answers
62 views

Checking desktop environment from command line

I am using SSH to login into my Linux RedHat server from my Windows machine. I want to create a GUI in python on the server but I am not sure if there exists any Desktop environment on the server. I ...
0
votes
0answers
106 views

RuntimeError: You need gevent installed to use this worker

I need gevent to run docker-registry but i have this error: Error: class uri 'gevent' invalid or not found: [Traceback (most recent call last): File ...
1
vote
1answer
134 views

Getting Python errors whenever I try to use terminal in Linux Mint

I've had Mint installed as a dual boot on my laptop for some time. I use it as my dev environment, for desktop and web related coding. I recently started getting errors which have rendered my terminal ...
2
votes
0answers
94 views

How to get scapy to sniff on the correct interface?

The sniff function in scapy in python2.7 worked fine before upgrading my linux Operating System. from scapy.all import * client_mac="c4:3d:c7:8f:03:19" wlan_mac="00:c0:ca:6d:ac:fa" ...
0
votes
0answers
86 views

Incorrect installation of python-2.7.2 - cannot use zlib

I am installing python 2.7.2 from Python-2.7.2.tar on Linux Ubuntu-14.04. I untar it, then ./configure --prefix=/apps/python/install/2.7.2. I then make and get : Python build finished, but the ...
3
votes
2answers
429 views

Why can't I load modules while executing my bash script, but only when sourcing it?

I am using modules to control the packages on my system and I have python/2.7.2 installed as a module. I have simple python executable python_exe.py which I am going to call from a simple 'driving' ...
1
vote
0answers
90 views

Filter packets by mac address and “EAP” in scapy

Is there a way to filter packets by mac address and "EAP" protocol using scapy in python? this is my sniff command line: sniff(iface="mon0",prn=lambda x: x.summary())
0
votes
1answer
214 views

“SyntaxError: invalid syntax” on File “goslate.py”, line 222 while installing goslate using pip

I fail to install goslate with sudo pip install goslate. Log of error message is below. What I am missing? Or what is my computer (Debian) missing? It is possible to install the package in Python 2, ...
0
votes
0answers
47 views

Are there any Packet Sniffing tools other than scapy in python?

Are there any packet sniffing tools other than scapy in python3x that does the following: sniff packets without being connected to a network show packet structure, example fields/tags and their hex ...
0
votes
0answers
313 views

“socket.error: [Errno 99] Cannot assign requested address” in python

I tried creating an ICMP network sniffer as follows: import socket,os host="192.168.1.7" #create a socket protocol socket_protocol=socket.IPPROTO_ICMP sniffer = socket.socket(socket.AF_INET, ...
0
votes
0answers
101 views

how to retreive all income information from serial port /dev/ttyUSB0 with python an pexpect

i'im trying to write a script in order to automate firmware flashing with commotion wireless router when using serial: import serial import sys import time ser = ...
0
votes
1answer
58 views

csvkit Permission denied

I am on Mac and installed csvkit. When I run csvlook, I get a traceback with the following error message: IOError: [Errno 13] Permission denied: '/Library ...
0
votes
1answer
96 views

Process Being Killed due to low swap

I'm running a python (2.7) script on mac osx yosemite. The script is fairly computationally intensive, certainly bumping up against my machine's RAM limitations. The computer crashes and restarts ...
2
votes
2answers
82 views

Clone Python from one linux machine to another

I want to run some of my python scripts on my new Linux (Centos 6.5) machine that I developed on another Linux machine (also Centos 6.5). But my problem is that my new machine is not having internet ...
0
votes
0answers
31 views

Trigger a graphic window during kickstart

I have built some custom centOS instalaltion CD with the help of anaconda and kickstart, nothing really exciting here, everything is working fine, packet are installed, pre and post installation ...
0
votes
1answer
194 views

Yum Corrupted on RHEL 6

I really need help. I am encountering the issue with my yum command. It seems to be exactly the same as the issue described on this site, Yum corrupted on CentOS 6.2, Problem importing one the python ...
0
votes
0answers
120 views

Opening a TCP port in Linux

I am trying to establish a TCP socket between my linux server and my client running on my laptop. The TCP server code I am running is, from socket import * HOST = '' PORT = 1999 ...
2
votes
0answers
201 views

Can I connect to Multiple Bluetooth devices using a Bluetooth dongle?

I am using a usb bluetooth adapter on my PI 2 , which communicates to an arduino using HC-06 Bluetooth module. This script runs to connect to that module: #! /usr/bin/python import serial from ...
2
votes
0answers
50 views

Catch/diagnose user process being killed - Inexplicably logged out automatically

Context: I'm using bash in Mac OSX Yosemite. Problem: I'm executing a (python) script that I expect to use alot of resources and take a few hours to run, redirecting stdout and stderr to a log file. ...
0
votes
0answers
58 views

Does python has a Key Derivation Function (kdf) module used in Wifi Protected Setup (WPS)?

I have tried browsing python's documentation website to determine if there is a Key Derivation Function (kdf) module. The kdf is a function used in the Wifi Protected Setup (WPS) to generate keys for ...
2
votes
0answers
37 views

Why won't my python scripts run without the python command when moved from Windows to Linux? [duplicate]

I have some Python files that I wrote on my Windows PC and then sent over to a Linux machine using pscp. They work as intended on Windows, but when I try to execute them on the Linux machine, I always ...
0
votes
0answers
42 views

Control TCP Connections in Python

For my college project I am trying to develop a python based traffic generator.I have created 2 CentOS machines on vmware and I am using 1 as my client and 1 as my server machine. I have used IP ...
0
votes
0answers
116 views

CentOS: Connection reset by Peer error while running python script

For my college project I am building one traffic generation tool using python. I have developed my own linux server and client on Vmware. I am using urllib2 for traffic generation in python. The ...
0
votes
0answers
427 views

How do I get Ubuntu to use Anaconda's python instead of the standard /usr/lib/python…?

I installed Anaconda using instructions provided on the main website, which are similar to those that can be seen here: http://askubuntu.com/questions/505919/installing-anaconda-python-on-ubuntu ...
2
votes
2answers
68 views

check “newness” / “is-read” of /var/spool/mail/$USER like pam_mail for custom motd script

How can I check with bash or python (preferred) if there are some unread mails in /var/spool/mail/$USER like pam_mail does? I'd like to use this for my own custom motd script, motd.dynamic
0
votes
1answer
71 views

Local system doesn't forward to intended port defined in OpenShift proxy app

I've set up a proxy server via OpenShift based on this tutorial and used a few days by forwarding my local system's ports to remote app's ports: $ rhc port-forward AppName The result in the proper ...
0
votes
2answers
103 views

How to execute unix “jobs” command in python environment

I want to know currently running background process by using unix "jobs" command in python environment. I tried using import os os.system('jobs') but it not works for me
1
vote
1answer
1k views

uninstall Python installed by compiling source?

I installed Python 2.7.9 on Ubuntu 14.04 by compiling its source, by .configre, make, and make altinstall. make altinstall is because I don't want to overwrite the default Python 2.7.6. My self ...
0
votes
3answers
67 views

How can I set up using a different version of Python from the OS?

my OS (Ubuntu 14.04) uses an older version 2.7.6 of Python as /usr/bin/python which points to /usr/bin/python2.7 I installed a new version 2.7.9 of python as /usr/local/bin/python2.7. In my own ...
3
votes
2answers
296 views

how to execute a bash command in a python script

How can I launch a bash command with multiple args (for example "sudo apt update") from a python script?
0
votes
1answer
136 views

Adding commands in a shell script to add a python module path

I want to modify a linux shell script used to install a python module (setup.sh) to add the folder the an environment variable. This is needed so I can run the python module from a terminal. e.g. ...
1
vote
1answer
64 views

Enable cursor keys in python shell over ssh

I run OpenElec on a Pi. I can ssh to the Pi and open a python shell. How do I enable the cursor keys to work like up getting to last command in the python shell, like it does on my Ubuntu box. Now ...
1
vote
3answers
102 views

Simple install script says it is unable to locate package

This install script is giving me the error Unable to locate package for most of the programs. #! /bin/bash apps=( 'python-dev', 'python-pip', 'python-numpy', 'python-scipy', 'python-matplotlib', ...
-2
votes
1answer
100 views

How to parse json output through shell / Python [closed]

I am running a curl command which gives me json response. Now I want to parse the response output to get the keys and corresponding values from the output or getting value for a particular key. I ...