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

learn more… | top users | synonyms

1
vote
1answer
252 views

Can I execute a python statement from a terminal?

I'd like to simply execute a Python command without having to write a script or enter the interpreter. Is there a way that I could run something like: python --execute "pow(12.31351,2)" And have it ...
1
vote
2answers
1k views

Python script to shutdown system doesn't work in cron

A python script to shutdown system works fine from the terminal but doesn't work when included in crontab. The script is called by cron but ends with an error 'shutdown command not found'or 'init 0 ...
1
vote
1answer
654 views

Install virtualenv on Fedora 16

I come from Ubuntu. I know how to install virtualenv and configure stuff on Ubuntu. Now Fedora seems pretty strange to me... Following these two guides: Setting up virtualenv, pip, virtualenvwrapper ...
1
vote
2answers
9k views

How to install the latest Python version on Debian separately or upgrade?

I'm still new to Linux, so I'm still trying to understand where executables and their libraries are and how to install packages, so I have Debian Wheezy 7.3 which has these Python versions: Python ...
1
vote
3answers
546 views

How to install easy_install using non-default Python Interpreter on CentOS?

I have downloaded, compiled and installed Python 2.7 on CentOS. I would like to download and install easy_install (and pip) for it but I am a little bit confused as to how to do that. How can I ...
1
vote
2answers
4k views

On Red Hat Enterprise Linux 6.2 how can I use Python 2.7 as default not Python 2.6? I did but still showing 2.6?

RHEL 6.2 I have python 2.6 but I need default python 2.7 using yum packaging (so that nothing goes messed up, cause its a heavy duty working system, all I need the python 2.7 on it, without messing ...
1
vote
4answers
1k views

pysqlite install error on FreeBSD in virtualenv

I am trying to install pysqlite using pip under a virtualenv in FreeBSD 7.3, with Python version 2.6.2. I didn't have any issues for installing other packages like Django, PIL etc. All of them I ...
1
vote
4answers
682 views

chmod - change permissions on a file

I have a Python virtualenv, and the Python executable is located in the /bin directory. In this virtualenv I'll have to execute some unsafe code, that can damage my system. I tried to chmod a-r on the ...
1
vote
3answers
360 views

How to know which compiler is used to compile Python programs?

How can I know which compiler is used when I type python myapp.py in terminal?
1
vote
1answer
407 views

Multicast UDP not working

Multicast UDP on raspberry pi I haven't narrowed things down enough to know if my issue is because of debian, raspbian specifically, or if I am just missing a something completely. I have a python ...
1
vote
1answer
118 views

Missing Python.h in Arch

I use Arch Linux. I want to compile a C++ file that includes <Python.h>. But I can't do it. In Debian based systems this problem is resolved with sudo apt-get install python-dev. How I can ...
1
vote
1answer
64 views

Protected Execution Environment

I've been recently investigating for the best way to implement a Protected/Secured Execution Environment that would allow me to "upload" some code into that environment and block any kind of output ...
1
vote
1answer
437 views

How do you use minicom with stdin and stdout?

I need to communicate with Python over a USB to RS-232 converter, to a device. The application minicom connects seamlessly, so if I could run that in non-interactive mode, everything would would be ...
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 ...
1
vote
1answer
130 views

When I am in VirtualEnv and do apt-get install, is there any difference?

If I have a virtualenv activated when I do something like sudo apt-get install python2.7-dev should I expect different results than if I did it outside the virtual env? Limited theory says no, ...
1
vote
1answer
162 views

How can I install hulahop

I cloned hulahop via git and I'd like to use it and try to run this example. I have a problem to find out how to build and install it. I also tried to install it with apt-get but I don't have this ...
1
vote
1answer
180 views

Python in GNOME code base

Is Python present in the Gnome code base? If so, how is it involved? Note: My question concerns the core GNOME Desktop Environment only (e.g. nautilus, gnome-session, NetworkManager) and any ...
1
vote
2answers
126 views

pipe function arguments to command line arguments in python

I have a python code (cmd.py) which accepts files as command line arguments and process using parse_args. I want to pass files from another code (files.py) to cmd.py, just like passing function ...
1
vote
1answer
461 views

Install wicd on Slackware 14.1

I am trying to install wicd-1.7.2.4 on Slackware 14.1. I couldn't find configure or makefile in wicd-1.7.2.4.tar.gz. Running python setup.py configure (following the INSTALL guide) causes: sh: ...
1
vote
1answer
259 views

No module Found error in Linux but Works fine in Windows

I am trying to run a Program that I coded in Python in Windows environment When I am trying to copy the program and running it in Linux(Debian), It won't work, It is giving the following error, ...
1
vote
3answers
55 views

How can I make a switch accessible via the internet, that allows users to turn on or off a python script?

I have a python script running on a home laptop that runs Ubuntu 13.10. I want to give 2 or 3 people the ability to start or kill that script, but no other privileges. I don't want to give them access ...
1
vote
1answer
772 views

Numpy module not found despite being in path

I am having trouble with the module on python. Here is my path variable, /opt/local/bin /opt/local/sbin /Developer/usr/bin /usr/local/git/bin /usr/X11/bin /Users/oskarniburski/.rvm/bin /usr/X11R6/bin ...
1
vote
2answers
231 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 ...
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: ...
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
353 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
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
2answers
460 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 ...
1
vote
1answer
329 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 ...
1
vote
2answers
466 views

How do I compile Python 3.2 on NetBSD? Error code 127

I'm getting strange errors when I try to compile Python 3.2 on NetBSD 5.1: python ./Objects/typeslots.py < ./Include/typeslots.h > ./Objects/typeslots.inc python: not found *** Error code 127 ...
1
vote
3answers
2k views

7z command line add file to a flat directory 7z file

I would like to compress file "./data/x.txt" to path "./data/x.7z". When running 7z a ./data/x.txt.7z ./data/x.txt The file "./data/x.txt" holds data/x.txt as opposed to just (what I want) ...
1
vote
1answer
28 views

Identify python script is waiting for a manual input

I'm writing a shell script which executes a Python script. The Python script halts for a manual enter to be provided. However, I don't wan't to have to press enter each time to the script. Instead, I ...
1
vote
1answer
32 views

Uninstall a python software properly

I installed a little python software (pycarddav) before to notice there is a packaged version for Debian sid... Now, I would like to uninstall properly this software and then, install the packaged ...
1
vote
1answer
94 views

Why does PyCrypto require a C compiler?

Is there a python crypto library that does not rely on anything besides python? Or pre-complied bundles of PyCrypto for Linux?
1
vote
1answer
940 views

How to exit out of the shell script successfully so that python subprocess think it is successfull exit? [closed]

Below is my shell script which simply execute a url like this http://example.com:8080/beat and parse the response and verify certain conditions on it. If that condition is met, then exit successfully ...
1
vote
1answer
1k views

FreeBSD Ports Broken — Python Issue? Portmaster -a

Upgraded FreeBSD from 8.2 >> 8.4 >> 10.0-RELEASE today. In the process, I believe I have mangled my ports tree quite badly and am having issues upgrading/reinstalling ports (as the upgrade asks me to ...
1
vote
1answer
119 views

Different version of Python cannot find modules

In my Suse system I have these 2 versions of Python: # which python2.6 # /usr/bin/python2.6 # which python2.4 # /usr/local/bin/python2.4 2.6 is the system one, and 2.4 was compiled by me. If I ...
1
vote
1answer
137 views

OfflineIMAP tells me SQLite isn't installed, even though it is

Whenever I run OfflineIMAP v6.5.3.1 I get an error for every folder (i.e. tag and folder in Gmail) which tells me there was a problem and then right after it tells me: SQLite backend chosen, but no ...
1
vote
1answer
167 views

Installing python module pyexiv2 on CentOS?

I downloaded the latest pyexiv2 files: pyexiv2-0.3.2.tar.bz2 and I looked at the README file which said: To build and install the library, while in the top-level directory (e.g. '~/dev/pyexiv2', ...
1
vote
1answer
246 views

How can I custom rename podcasts after downloading them with gPodder?

I'm using Arch Linux. To download podcasts, I use gPodder 3. To listen to my podcasts, I'm using Rockbox on my iPod Classic. The thing is, the podcasts don't get sorted nicely on my iPod: ...
1
vote
1answer
302 views

Python Web interface for simple mysql database

We need a new web interface for our internal car booking system, which is implemented in mysql database. Could somebody please advise, what would be a suitable solution (which framework, if any). The ...
1
vote
2answers
584 views

Simple console text editor suited to python

I am looking for a light weight shell editor for Linux that a young child (eg 7-8 year old) can write python scripts in. The motivation is to find something that is helpful for a beginning programmer ...
1
vote
1answer
303 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
1answer
252 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. ...
1
vote
1answer
155 views

I want to install a library which requires a python version and, having two installed, finds the wrong one

I want to install a library on my debian machine and it requires a python version above 2.6.6-7. The machine had installed the version 2.5.2-3, so I installed python 2.7. When I run python -V, the ...
1
vote
1answer
280 views

Managing the output streams of many subprocesses with deadlocks

I have a Python script that does more or less this current_tasks = TaskManager() MAXPROCS = 8 while len(outstanding_tasks) > 0: if len(current_tasks.running) < MAXPROCS: ...
1
vote
2answers
160 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 ...
1
vote
2answers
626 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 ...
1
vote
2answers
575 views

What scripting language or platform to use for web page downloads and screen interaction? [duplicate]

Possible Duplicate: Does anybody here have experience in automating some tasks in web applications using curl? Here is what I need to do? Wondering what platform is most suited - easy to ...
1
vote
1answer
1k views

python-pam not working… How to dig for the error?

I have a django application where users should be able to login according to the system's shadow database. I found this login backend which uses python-pam, as far as I can tell. While installing the ...