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

learn more… | top users | synonyms

4
votes
0answers
236 views

Enable sqlite FTS Enhanced Query Syntax in python in RHEL6?

SQLite's full text search engine offers a simple query syntax (with AND and OR operators and -term for negation), as well as an enhanced query syntax which also allows parenthesis and NEAR — as well ...
3
votes
0answers
51 views

What is wrong with my systemd unit file?

Here is my unit file: [Unit] Description=Backend Service After=mariadb.service Requires=mariadb.service [Service] Type=simple ExecStart=/var/www/html/pythonscripts/Backend.py [Install] Alias=BEd ...
3
votes
0answers
274 views

ViM and Python says the encoding is ANSI_X3.4-1968

In ViM, the following command (using Python 3.4.3) outputs ANSI_X3.4-1968: :!python -c "import sys; print(sys.stdout.encoding)" However, I want UTF-8 everywhere. In .vimrc, I do have set ...
2
votes
0answers
39 views

Why did this program install into ~/.local/bin … thats the first time I have seen that happen?

Why did this program install into ~/.local/bin ... thats the first time I have seen that happen? When I install this "Taurus Blazemeter 'bzt'" program, it ends up being installed into ~/.local/bin ...
2
votes
0answers
56 views

Why can't this Python script access XDisplay from Root terminal?

I need to run this Python script as below because it needs access to user's xdisplay: DISPLAY=:0 XAUTHORITY=/home/<USER>/.Xauthority su <USER> -c "python-script" The command above has no ...
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 ...
2
votes
0answers
41 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
0answers
43 views

One liner to enable some SCLs and a python virtual environment?

I'm writing a python 3.4 app on a centos box. Normally, when I have to reset my tmux session, such as after a reboot I do the following: [zippy@localhost ~]$ scl enable rh-python34 httpd24 bash ...
2
votes
0answers
448 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" ...
2
votes
0answers
475 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
114 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. ...
2
votes
0answers
132 views

arecord until sound level drops low enough

I am trying to implement constant voice recognition on my Pi at the moment, I am achieving this by having two threads running, one constantly recording (with arecord in a bash script) for X amount of ...
2
votes
0answers
186 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 ...
2
votes
0answers
141 views

Install `mpl_toolkit.basemap` on RedHat without compiling from source

I need to install matplotlib and mpl_toolkit.basemap on a RedHat machine. matplotlib is already installed but for mpl_toolkit.basemap the only way I could find was to download the source and compile ...
2
votes
0answers
204 views

Why is the Debian package I've created for a single Python script empty?

I have a quite simple Python project that might be very useful for some people. So I thought about packaging it. The project is called maptool and is a tool that allows people who have Panasonic ...
2
votes
0answers
213 views

listen a power-button event in Python (no ACPI)

I am using a Debian machine which does not include the acpid package. Is there a way that I can reboot the machine using Python language when the power-button is pressed, without installing that (or ...
2
votes
0answers
900 views

FreeBSD: How to start a python script as daemon?

I'm facing an issue with a python file that I'd like to start as a service. I named my service ocrserver and the script I want to start is in /home/administrator/ocr/ocrserver/init.py with some ...
2
votes
0answers
405 views

linking problems when installing python module and dependencies as non-root

I want to install a certain (non-public, numerical) python module on a remote (Debian squeeze) system on which I do not have root (or sudo) privileges. As the python-dev package was not installed, I ...
2
votes
0answers
166 views

mozilla sync server and mysql auth

Recently I updated my debian squeeze to wheezy. Unfortunately my firefox sync server (weave) stopped working. I saved the config files and downloaded the new version via hg. I already fixed some ...
2
votes
0answers
536 views

avconv/ffmpeg output through /dev/ttyAMA0

I tried to pipe streaming video from video4linux2 webcam connected to a Raspberry Pi through /dev/ttyAMA0 to a computer using an Arduino as a intermediary. First of all, is it possible? Because I was ...
2
votes
0answers
60 views

Losing sound after installing wine 1.5 (+python 2.7)?

I have a desktop and a laptop computer. Since I wanted to run IrfanView (that works great now!), I installed wine 1.5.22, which involved installing 1 GB of dependencies. The desktop continues to work ...
2
votes
0answers
2k views

MySQL socket and PHP (and other languages)

Background info I'm currently running CentOS (or Red Hat?). uname -a gives (I edited out my domain name) Linux XXXXXXXXX.com 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 ...
2
votes
0answers
272 views

Why am I getting an AttributeError when I try to use Pyjamas desktop on Fedora 15?

I am trying to run pyjamas-desktop on my Fedora 15. All packages were installed, I have adjusted PYTHONPATH to include /usr/share/pyjamas/library, but when I try to run a simple example: from ...
1
vote
0answers
31 views

Installing Anaconda on a Chromebook

So I'm not sure if this is the right place for my question since I'm using Chrome OS, but I've put it in developer mode and opened a shell, which looks very reminiscent of a Unix shell. I've never ...
1
vote
0answers
18 views

Fatal Python error: pycurl: libcurl link-time version is older than compile-time version

When updating yum via sudo on our (Amazon Linux) server, I get the following error: Fatal Python error: pycurl: libcurl link-time version is older than compile-time version I find the following ...
1
vote
0answers
29 views

Start my webpy server using supervisor

I am trying to start my python web.py server at boot, but I am having difficulties getting it running by itself. I have a config-file like the following. It's basically the sample file with an added ...
1
vote
0answers
28 views

How to use a tty as a sound device for pjsua?

I have a bi-directional PCM device that appears as /dev/ttyUSBxx. It provides and consumes 16-bit linear PCM at 8KHz (though that can be changed to u-LAW or a-LAW). I would like to use the device in ...
1
vote
0answers
33 views

Running Python application on boot through init.d script

I am trying to start an Python application on a Debian based OS that is running on a router. This application comes prebundled with site-packages and a python binary. Like a virtual environment. The ...
1
vote
0answers
31 views

how to find default SMTP server name?

I have a python script which uses smtplib to send out an email. I am not sure what to use for mail server name in the smtplib.SMTP initialization. On my test server I use the below and it works fine. ...
1
vote
0answers
41 views

Python installation fails in chroot

I tried to install Miniconda Python in a chroot: chroot $1 wget -q https://repo.continuum.io/miniconda/Miniconda3-3.19.0-Linux-x86_64.sh -O /tmp/miniconda.sh ...
1
vote
0answers
10 views

trying to get fbpanel installed but getting confusing errors

I'm not too keen on these python errors to figure them out. this is the error I am getting, but I'm using alsa/pulseaudio so I have no idea how to read python errors. %mike@voidz ...
1
vote
0answers
33 views

Build xpra on local directory without root priviledges

I am trying to build xpra on local directory without root priviledges. The xpra official site says: https://www.xpra.org/trac/wiki/Building Building with distutils For installing into a local ...
1
vote
0answers
38 views

Can I copy output from sage to my clipboard?

I run sage from the terminal. One nice feature of sage is that it can automatically latex-ify results. I would like to be able to pipe these results to my clipboard (I run Ubuntu 14.04). I have ...
1
vote
0answers
20 views

Can I change owner of a tunnel after creating it?

I've been trying to finagle pytun to do my bidding in creating persistent ssh tunnels, but I very much do not want these to be owned by root and unless I modify the python package myself (which as a ...
1
vote
0answers
44 views

Installing armhf libboost-python-dev in amd64 cross environ

I'm trying to install libboost-python-dev for armhf in amd64 cross compilation build environment. apt install libboost-python-dev:armhf libboost-python-dev depends on python2.7-minimal, which ...
1
vote
0answers
42 views

How to get all files of a certain type from a virtual web path?

I try to use wget to download certain files from a website. But probably the virtual locations of the files do not represent their actual location. For example, if the link to the file is ...
1
vote
0answers
48 views

How do I emulate a virtual keyboard with an arbitrary character set?

I am writing a couple applications that change how your keyboard works. (One that allows key-chording, and another that allows you to say syllables out loud to type individual characters.) 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
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 ...
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
0answers
138 views

Make PyCrust use Python 3

I make successfully python 3.2.3 by opening it through terminal, I make it by alias python="python3" But when I open the PyCrust IDE, it opens up with Python 2.7.3, not 3.2.3. How can I make ...
1
vote
0answers
1k views

CentOs7 Python 3.4 Install Method

This post relates to this question where I was asked to explain how I installed python3 on my system. I was attempting to install python3 on my system for development purposes. Something went wrong ...
1
vote
0answers
30 views

Is it normal that I need u+w to set extended filesystem attributes?

I noticed that on panfs, Python's copystat fails when the source file does not have the u+w permission bit set; setting attributes fails with Permission denied command line equivalent: (attr_set: ...
1
vote
0answers
290 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 ...
1
vote
0answers
89 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 ...
1
vote
0answers
61 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 ...
1
vote
0answers
225 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())
1
vote
0answers
996 views

Unable to use python speech_recognition lib Microphone class due to ALSA

I am attempting to write a speech recognition program for the raspberry pi, however I am facing some issues using python's speech_recognition library. From the error messages (posted below) I think ...
1
vote
0answers
204 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 ...
1
vote
0answers
162 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. ...