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

learn more… | top users | synonyms

2
votes
1answer
431 views

ffmpeg webcam to device driver , output 8 bit grayscale

With the following command i'm trying to capture 10fps and send them the device driver. Now i want 8 bit gray raw frames (640x480= 307200 bytes per frame) to be send to the device driver. I can't ...
0
votes
1answer
72 views

How do I install kbuild?

How do I run/install this: https://github.com/kevmoo/kbuild? I installed the dependencies and tried to execute the bin/kbuild Python script, but it's giving me this error: Traceback (most recent ...
1
vote
2answers
230 views

How to kill a script which starts new processes?

The following is a Python application which spans a few threads, then spawns a new process of itself and exits: $ cat restart.py import os import random import signal import sys import threading ...
3
votes
1answer
1k views

Python.h: No such file or directory

I'm tring to build omniORB 4.1.6 under Arch Linux, however when I type make, here is the message: ../../../../../src/tool/omniidl/cxx/idlpython.cc:188:26: fatal error: python3.3/Python.h: No such ...
5
votes
1answer
1k views

FreeBSD: Can't install Python 2.7

I can't seem to be able to install Python 2.7 on my FreeBSD system. Here is some info: # portsnap update Ports tree is already up to date. Version: # uname -r 7.1-RELEASE Installation: # cd ...
4
votes
1answer
165 views

How Can I Automate the Change between a Python Script and a Nohup Python Script?

I have a Raspberry Pi connected to a digital temperature probe, which measures my fermenting beer. A python script reads the temperature every second and prints it to the console, and stores it in a ...
2
votes
1answer
4k views

Running Python on ChromeOS

Is it possible to run the Python interpreter on a ChromeOS machine? I've found various editors you can use, but I would like the ability to run python applications as well. I would like to purchase ...
1
vote
3answers
208 views

Distributions that only ships Python 3.X

Is it possible currently? I tried to remove python in Fedora 19 but yum depends on it.
-3
votes
2answers
187 views

Bash operator & not working [closed]

As per the bash reference, we can give a non-blocking command by ending it with an ampersand(&) character. However, when I try the below command its not working: python -m SimpleHTTPServer ...
2
votes
2answers
3k views

Run a sudo (or startup) python script from cron on a Raspberry Pi?

I'm helping out with an art project (http://stargateeggbeater.com/ for those interested) built on Raspberry Pi. The RPi controls an addressable LED strip through the GPIO, using the spidev device per ...
1
vote
0answers
53 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 ...
2
votes
1answer
738 views

Pip install - CPU you selected does not support x86-64 instruction set

I'm trying to use pip install mysql-python inside a virtualenv container and am getting the error building '_mysql' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall ...
1
vote
1answer
2k views

Can't run 32 bit python on 64 bit Ubuntu: error while loading shared libraries: libutil.so.1

I'm trying to run a 32 bit version of python on 64 bit Ubuntu 12.04. There are alternatives to running this specific binary, but I'm more interested in understanding what's causing the error than ...
1
vote
2answers
2k views

Installing Samba 4.0.7 on CentOS 6.4

CentOS 6.4's yum repo has only 4.0.0. I see some major security and stability patches since then. So I signed up for SerNet, and followed their directions to install their GPG key. Then I did: ...
2
votes
1answer
175 views

apt-get can not detect correct python version when using update-alternatives for python

I have installed different python versions on my Linux Mint DE. I used the update-alternatives --set statement to easily switch between the different versions. Unfortunately sometimes apt-get install ...
2
votes
1answer
126 views

Change the default shell to Python

If I changed my default shell from BASH to Python3 or IPython, would my Linux system have issues or produce errors?
4
votes
2answers
338 views

Creating deb and rpm from the same source

Is there a standard for source packages to be able to build rpms, debs (and perhaps others) without too much customization? I'm talking mostly about Python, PyQt programs.
1
vote
2answers
625 views

Running google cloudprint on boot

I use this Python script on my Debian based Guru Plug to make it work as a print server for Google Cloudprint. With this I can print from my Android devices using apps like PrinterShare or Cloud ...
9
votes
2answers
735 views

How to manage huge amount of files in shell?

$ ls ./dir_with_huge_amount_of_files/errors/ Suppose a directory is full of pictures with unix timestamps, I mean a lot measured in many GBs or even more. Shell-commands like ls will get ...
1
vote
1answer
103 views

Virtual Python installation not allowing ez_setup?

I don't have root on my system, so I'm trying to create a virtual Python installation. I ran virtual-python.py, and it told me to run ez_setup.py. I found it online and ran it with the command ...
0
votes
1answer
213 views

RHEL6 Install MySql-Python without internet connection?

Using RHEL 6 how can you install MySql-Python package without a internet connection? I can SCP files to the server but our current restrictions do not allow a direct or proxy connection to the ...
4
votes
3answers
581 views

Python 2.7 and 2.6 coexist on the same machine

I want to follow a guide to install some software on a ReadyNas Duo (sparc). The guide indicates I need python 2.7, but I already have 2.6 installed. ~# which python /usr/bin/python ~# ls -al ...
1
vote
2answers
127 views

Launcher for a Python program that requires extra libraries

I'm trying to get a launcher working for the WikidPad (python) program. I already have a python program, so I looked into the file /usr/share/applications/taskcoach.desktop. The exec line was simply ...
0
votes
1answer
113 views

Django not installing with pip because of mismatched hash

I have a virtual machine set up with a directory created with virtualenv (env2). I am inside this directory and have it activated and want to instal django 1.4. This is my command: $ pip install ...
1
vote
1answer
302 views

Debian, virtualenv, IPython notebook and matplotlib inline plots

I have been using IPython notebook on both OSX and Windows 7 for a while. Now I'm trying to create a minimal system for me to work on Debian 7 (Wheezy). I installed: LXDE Python2.7 python-dev ...
1
vote
2answers
351 views

How to get name of Display Manager on Linux? [duplicate]

I want to see Display Manager name (Gnome, KDE etc.) via python or bash script. Is there any command for it as uname? (I try fedora and Debian)
-1
votes
1answer
390 views

Convert SVG to PDF in python [closed]

I am trying to convert an SVG file to PDF in python using the svglib and reportlab packages. Here is the SVG file. <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG ...
2
votes
1answer
131 views

Where are Python dist-packages stored in FreeBSD?

I am trying to find this path on FreeBSD but it is not working: /usr/local/lib/python2.7/dist-packages This same path is working on Ubuntu. Can please some tell me where I can find Python ...
3
votes
2answers
502 views

Clearing/modifying previous libnotify notifications?

I have written a script which generates notifications like this: notify-send -i audio-card "Transferring audio playback to speakers." \ "Audio playback has been transferred to the analog output ...
3
votes
2answers
387 views

Wait for a X window to appear/disappear (in a sane way)

Inside a shell script, I need to wait for a window that has a string on its title to appear, do some action, and then wait for it to disappear, and do some other action. Until yesterday, I had this ...
0
votes
1answer
71 views

Gajim, gtalk, and logind

Since the Google talk outage earlier this month, I keep not being able to connect using gajim. I tried deleting all the configuration, updated to the latest development version, and tried in different ...
2
votes
1answer
66 views

process continous output of synclient

I am using synclient to track the position of finger on the touchpad. I use the following command. synclient -m 100 | awk '{print $2,$3}' This command gives the 'x' and 'y' co-ordinate on the ...
6
votes
4answers
1k views

Hybrid code in shell scripts. Sharing variables

This answer discusses how to run a multi-line Python snippet from the command line in a terminal. I noticed that the answer works great within shell scripts, even with nested indentation, which is ...
2
votes
1answer
401 views

Running 'make test' on an individual module for Python 2.7.4 build

I am working on building Python 2.7.4 on CentOS 6.4. When running the make test step, the test_gdb step fails, and I would like to get some more info as to why. Build commands I'm running: ...
2
votes
1answer
108 views

Can't open Gajim

When I try to open Gajim using terminal on gnome I get the following: Traceback (most recent call last): File "gajim.py", line 106, in <module> import common.configpaths File ...
1
vote
1answer
2k views

Software Center not opening in Linux Mint

I'm a Linux Mint 14 user. I'm not able to open the software center. $ software-center ERROR:root:DebFileApplication import Traceback (most recent call last): File ...
1
vote
1answer
251 views

Safely convert unicode strings to printable characters

I have many HTML files containing mixed unicode strings like \303\243 and printable characters like %s. What I'd like to do is converting the unicode strings into printable characters in a safe way. ...
2
votes
2answers
41 views

Start Repl/CLI in Background and Feed Commands

Lets say the python repl takes a long time to start up, is there a way to start it up in the background so I can create an alias and feed it commands like python-current "command to run".
3
votes
3answers
1k views

Delete XML node containing certain element

I want to remove all Placemarks from a KML file that contain the element <tessellate>. The following block should be wholly removed: <Placemark> ...
2
votes
3answers
733 views

Unmet dependencies

I am trying to compile vim and install with "--enable-pythoninterp" flag, which needs the python-dev package. INFO I obtained the vim source from ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 Vim7.3 ...
1
vote
2answers
459 views

Backup to a synology NAS with bup

I am trying to make a remote backup to my Synology NAS (DSM 4.1) using bup. I compiled bup on my NAS from source, did there: BUP_DIR=/volume1/public/Backups/bup bup init Initialized empty Git ...
0
votes
1answer
64 views

Can a GTK applet widget be instantiated through dbus?

I just posted this: #274616: “Simple” gnome applets in Unity - stickynotes ... where I could instantiate a Gnome 2 bonobo applet in a standalone window, ... using ...
2
votes
1answer
85 views

Vim :fold of python code not different to C/C++ code

When I enter the command :fold inside my python code in .py files, Vim inserts the /*{{{*/ and /*}}}*/ tags. They, of course, cannot be parsed by python interpreter. When I'm in python I would like ...
1
vote
0answers
251 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
3answers
437 views

How can I schedule a python program to run from another python program?

I'm running a Python program on my Linux server, and depending on some external data it has to run again at xx minutes or hours from now. So let's say it runs at 6 AM, and then it has to run again at ...
0
votes
2answers
377 views

How to make Python scripts usable on Windows? [closed]

I have some Python scripts in Linux. How can I make those scripts so that windows user can use and execute them?
1
vote
2answers
159 views

how to install ast python package

I'm using django constance in my project. This app used a python package ast. When I try to install that package using command pip-2.7 install ast, it results as "Could not find any downloads that ...
2
votes
2answers
1k views

What does this python2 error mean, and what should I do about it?

Whenever I attempt to use an application relating to python2(gnome-tweak-tool, bzr, etc.) it fails to start and, when run from command-line, I get this error: [username@host ~]$ gnome-tweak-tool ...
0
votes
1answer
193 views

Can't use peewee on Mac OS X Mountain Lion

I am getting an error when I run Python programs that imports peewee: ImportError: No module named peewee The same program works fine under Ubuntu 12.04. I used pip to install peewee, and it ...
1
vote
1answer
327 views

Use tabs for indentation in Python mode

I am using Emacs for Python developement. My team is using Tab indentation, so I must do the same. The problem is that I can't figure out how to make python-mode use tabs instead of spaces. I want ...