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

learn more… | top users | synonyms

5
votes
0answers
252 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
16 views

Block port on boot2docker vm on virtualmachine

I have Boot2Docker image running in VirtualBox on my mac. I use Kitematic to run docker on my Mac. I have activemq docker running, on port 32769 in boot2docker vm. I have application running which ...
3
votes
0answers
378 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 encoding=...
2
votes
0answers
24 views

How do you install Django when there is a problem with scl?

scl is installed on RedHat 6. The man pages for scl work. I want to install Django. I believe that a prerequisite is to install SCL for Python. $scl -l returns nothing. I believe that this is ...
2
votes
0answers
46 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
64 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
83 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
50 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
51 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
554 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" sniff(iface="mon0",...
2
votes
0answers
537 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
131 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
151 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
200 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
158 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
235 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
229 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
965 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
417 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
564 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
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
277 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 pyjamas....
1
vote
0answers
16 views

Glade gtk drag and drop tools

Glade is a program to create windows, panels, buttons... My question is does glade provide the tools to write apps for drag and drop. I've gone through the tools on the left side and couldn't find ...
1
vote
0answers
34 views

How to install mailman when it needs an older version of Python?

I am working on an install of mailman 3.0.3 on Ubuntu Server 16.04 which ships with Python 3.5.1 and 2.7.11. Per Barry Warsaw that version of mailman requires Python 3.4.n. https://gitlab.com/mailman/...
1
vote
0answers
23 views

How do I run a supervisor command in a Eclipse PyDev project without being asked for a password?

So I've got the following code that should check whether an npm package is installed: def is_installed(name, as_global=True): # Returns whether NPM package is installed. s = shell(...
1
vote
0answers
42 views

PyOpenCL on Linux Mint: PLATFORM_NOT_FOUND_KHR

I've been trying to get PyOpenCL and PyCUDA running on a Linux Mint machine. I have things installed but the demo scripts fail with the error: pyopencl.cffi_cl.LogicError: clgetplatformids failed: ...
1
vote
0answers
11 views

Installing Python modules on ChromeOS

Is there any way you can download Python modules in ChromeOS without accessing developer mode? I am using a student Chromebook that blocks access to developer mode.
1
vote
0answers
144 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
66 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
35 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
66 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
56 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
69 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
15 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 fbpanel-master>&...
1
vote
0answers
56 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
67 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
26 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
55 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
48 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 http://file....
1
vote
0answers
65 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
416 views

Python is unable to 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
39 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
152 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
164 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 3....
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
33 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
336 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
105 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 cross-...
1
vote
0answers
65 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
256 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())