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

learn more… | top users | synonyms

4
votes
0answers
36 views

How to declare accented variables in Python [migrated]

I need to write few basic scripts for students in Python, like this one: #!/usr/bin/python # -*- coding: utf-8 -*- mia_età = 31 print mia_età But apparently I cannot use accented characters while ...
0
votes
0answers
21 views

Run Git Pull from a shell start-up script

I have raspberry-pi that loads a shell script on start up. This script runs a python script 'boot_camera.py' which is found in a repository. I Have a server which sends the raspberry-pi a command ...
0
votes
0answers
17 views

Error in Python multiprocessing process [migrated]

I am trying a write a python code having multiple processes whose structure and flow is something like this: import multiprocessing import ctypes import time import errno m=multiprocessing.Manager() ...
-1
votes
0answers
10 views

PyGI: SIGSEGV on change label of button [on hold]

After running i've got this: /home/drmgc/dev/prj/zelobar/zelobar/ui.py:72: Warning: g_param_value_set_default: assertion 'G_IS_VALUE (value)' failed self._clock_label.props.label = ...
1
vote
2answers
32 views

Url Decoding shell script

How can I store the url-decoded string in a variable using shell script #!/bin/sh alias urldecode='python -c "import sys, urllib as ul;print ul.unquote_plus(sys.argv[1])"' ...
1
vote
0answers
13 views

How to use vim-slime from within a single tmux session?

I'm trying to integrate ipython and vim through a single tmux session using the popular vim plugin "vim-slime." The problem is that while I can get it to work fine provided that vim is opened in a ...
0
votes
0answers
13 views

Centos 7.1.1503 no longer has some static libs that python packages assume are present

I ran repoquery -ql readline-devel and it revealed that only various .so libs are a part of this repository. /usr/include/readline /usr/include/readline/chardefs.h /usr/include/readline/history.h ...
1
vote
1answer
22 views

How do I make Python plugins work in Pluma?

I'm trying to add the Python plugin trailsave to the text editor Pluma* (which is a Gedit fork) but the plugin doesn't show up in the "Active plugins" list in the Pluma preferences. Also, I have ...
1
vote
0answers
14 views

setting up pycurl for embedded ARM

I am working on a linux x86_64 machine, and I am trying to set up pycurl for an embedded ARM processor running petalinux. I need pycurl library before building the embedded linux image. I have ...
0
votes
2answers
45 views

Service start fails after Capistrano2 deploy task

Below is a part of the /etc/init.d script that controls a daemon. The full init.script is available at http://pastebin.com/02G5tpgH case "$1" in start) printf "%-50s" "Starting ...
1
vote
0answers
13 views

Passing a parameter to a dstat plugin

I wrote a simple plugin (dstat_externalBackup.py) for dstat to monitor the filesystem free space and placed it in /usr/share/dstat and it works as intended. € dstat --externalBackup 3600 extern free ...
2
votes
1answer
56 views

Compiling Python 3.4.3 error

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: checking for device files checking for ...
2
votes
2answers
57 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(): ...
11
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
26 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
5 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
17 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
1answer
24 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
48 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
41 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
51 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
1answer
45 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
225 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
58 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
105 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
31 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
28 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
53 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
55 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
83 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
48 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
49 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
144 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
72 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
166 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
23 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
150 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
57 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
0answers
39 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
0answers
63 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
77 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
20 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
126 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
78 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
147 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
42 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
43 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 ...
1
vote
0answers
32 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 ...