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

learn more… | top users | synonyms

6
votes
0answers
32 views

How do I activate Xorg record module on Raspian?

I'm trying to automate some tests on my RaspberryPi and I'm using python's pymouse to perform some emulated clicks. On my Debian it works fine, but when it comes to Raspian it keeps failing with this ...
4
votes
0answers
199 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
147 views

Display cron job times in a human-friendly format

Is there a way to display or is there a tool that can parse a crontab expression and display it in a human-friendly way? 10 6 * * * sh /usr/local/crons/file_check.sh For example, for the above cron ...
2
votes
0answers
18 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
117 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
243 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
58 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
79 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
115 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
257 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 ...
2
votes
0answers
106 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
167 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
612 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
155 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
441 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
1k 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
262 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
29 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
130 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
50 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 ...
1
vote
0answers
39 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
26 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
100 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
103 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
59 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. ...
1
vote
0answers
262 views

Startup commands in /etc/rc.local won't work

I have a Python program and an nginx/uwsgi/django web setup. I want the program to start with the system, as well as the web server. Here's my /etc/rc.local: crawler_dir=/home/mohammed/git/crawler ...
1
vote
0answers
108 views

Hotmail not receiving emails from a script, but works from the server

I have a working mail server running Debian stable, the following elements are working. SPF DKIM rDNS My IP is not listed in any backlist, I used: mxtoolbox.com for all this. My problem: Sending ...
1
vote
0answers
294 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) ). ...
1
vote
0answers
111 views

Archlinux proper PKGBUILD: Python executable error

In a previous question, I asked about how to write a PKGBUILD to install a binary .deb package. The solution was to extract the contents of the .deb and copy the data to the archlinux package ...
1
vote
0answers
218 views

lxml with custom install location for libxml2/libxslt doesn't find correct location

I am using CentOS 6.5 and want to use newer versions of Python, lxml, libxml2 and libxslt2 than what's available from the repos. So I build libxml2, libxslt2 and python 2.7.8 from scratch, and add ...
1
vote
0answers
137 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 ...
1
vote
0answers
78 views

Better approach to generating and adding contents to files

I have an input file like below. 1 First one 2 First two 3 First three 3 Second three I am generating 2 output files like below. #FILE1 1 First one 2 First two 3 First three #FILE2 1 ...
1
vote
0answers
178 views

How to import screenlets on Python

(I'm using Ubuntu 10.04 with Linux 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686) For some reason I had updated some Python files (I'm not able to tell which ones, but it was ...
1
vote
0answers
101 views

Cygwin DenyHosts daemon-control file: no such file or directory error

I have been trying to figure out this error and searched everywhere with no luck. I have installed DenyHosts on Cygwin and also the DenyHosts daemon but when I try to start the daemon by typing: ...
1
vote
0answers
127 views

mongodb “hijacking” port

I'm having some trouble with Python HTTP Server and MongoDB. In this case HTTP server represents a REST service providing data from MongoDB. MongoDB is running on default port (27017) at all times. ...
1
vote
0answers
326 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 ...
1
vote
0answers
66 views

Modifying installation directories for Python versions

I am groping towards having a documented and ideal environment for me to develop in Python. I am going to utilize virtualenv to do so. I know that I can pass the python version as an argument to ...
1
vote
0answers
260 views

How to resume the ?WATCH command when a USB GPS is reconnected

I have some hacks to ensure that my USB GPS devices continues spitting data if disconnected, then reconnected. The devices are so flaky that they need restarting so as to continue transmitting data. ...
1
vote
0answers
375 views

Python bindings for libtorrent-rasterbar are not working on debian

I'm running Debian 6.0.6 I've downloaded latest version of libtorrent-rasterbar from here: http://code.google.com/p/libtorrent/downloads/detail?name=libtorrent-rasterbar-0.16.6.tar.gz&can=2 and ...
1
vote
0answers
94 views

How do I fix my FastCGI Pinax / Django deployment?

I'm running OSX Lion (posted here because this is a Unix-specific question), and am trying to deploy a Pinax project via FCGI. I have the FastCGI daemon running: $ ps wwaux | grep fcgi jonathan ...
1
vote
0answers
191 views

How do I satisfy the “warnings” Pinax requirement?

I'm trying to build a Pinax virtualenv. I get, on Precise Penguin with 0.7: jonathan@ubuntu:~/Downloads/Pinax-0.7-bundle/scripts$ ./pinax-boot.py ~/virtual New python executable in ...
1
vote
0answers
88 views

How to access storage device related events with Zeitgeist?

I am trying to get my mind around Zeitgeist, using the Python DBus API. To get the latest accessed files and application is not so hard, here is what I do: #! /usr/bin/env python from ...
0
votes
0answers
7 views

Zenoss pythonThresholdException error

Zenoss query here, first things first: I have a CentOS 5.6 virtual server hosting Zenoss 4.2.5 and I am experienced no compatibility issues with this so far - it does everything I need. The problem ...
0
votes
0answers
9 views

LSF bsub implimentation of LUT

We have an implementation of LSF (bsub) on our HPC system. I want to run a model several times with various input parameters. I will have a table either csv or other format with the required ...
0
votes
0answers
19 views

Why won't MOTD display output from a Python script it calls outside of /etc/update-motd.d/ unless it's in this directory?

The Situation We're running a headless Ubuntu 14.10 Server to fulfill various needs and tests. I was experimenting with changing the MOTD for SSH sessions via /etc/update-motd.d/ so as to display ...
0
votes
0answers
14 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 how to view system,hosts, provisioning Tab(list Volumes, Virtual Volume sets, ...
0
votes
0answers
28 views

Is it possible to execute python script on Visual studio with Linux environment

Is it possible to execute python script on Visual studio with Linux environment For example The following python code was written on the visual studio import os f = os.popen('date') now = ...
0
votes
0answers
19 views

RewriteRule ^/(.*) http://127.0.0.1:5050/$1 [L,P]

What is the full meaning of following line - RewriteRule ^/(.*) http://127.0.0.1:5050/$1 [L,P] There are three application both running by python on ubuntu 14.4. they are visible as below link ...
0
votes
0answers
18 views

ImportError: No module named gtkmozembed (Fedora)

I am trying to run this python script https://github.com/coderholic/PyWebShot but I am using Fedora (20) and I do not know how to get module gtkmozembed. Yum provides and yum search do not help me. ...