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

learn more… | top users | synonyms

1
vote
1answer
360 views

Pipe Python Shell to source-highlight

When I try to make the Python shell get color: python 2>&1 | source-highlight --failsafe -f esc -s python the >>> prompt seems to be always delayed by 1 command. Why is this ...
1
vote
2answers
2k views

Python library conflict with lower version

I am trying to reinstall yum in CentOS. Because I made some mistake by removing python. so I got error as follows There was a problem importing one of the Python modules required to run yum. The ...
1
vote
1answer
1k views

ImportError when running WSGI app in Apache: undefined symbol: PyUnicodeUCS2_DecodeUTF8

I'm trying to run MoinMoin under Apache on SLES 11P1. I'm getting the following error in my Apache log when somebody tries to access the site: mod_wsgi (pid=20772): Target WSGI script ...
1
vote
1answer
336 views

How to build a python egg for a TRAC plugin?

I'd like to install a mercurial plugin for Trac. The manual provides an svn path with the source code. I need to create an "egg" from that source code. Do I need to have SVN installed in order to do ...
1
vote
1answer
32 views

“make test” failed while compiling Python

I compiled Python 3.4.1 on an emulated Debian 7 ARM system. make test failed on test_multiprocessing_fork: FAIL: test_semaphore_tracker (test.test_multiprocessing_fork.TestSemaphoreTracker) ...
1
vote
1answer
15 views

'altinstall' python-devel; can't install psycopg2 on centos

I installed python2.7 on my centos 2.6.32-431.17.1.el6.x86_64 following these directions: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/ #after the yum stuff... # Python ...
1
vote
2answers
83 views

Do all Linux processes write EOF to stdout when they are terminating/have finished terminating?

I'm having trouble with sending shutdown -h 0 to a lxc Debian container (i.e. executing this command in the lxc) with with the python pexpect module (in a python script). In this module the user can ...
1
vote
1answer
78 views

Trouble installing lxml with custom install location for libxml2/libxslt

I am attempting to install a python module called lxml to my account on a supercomputer running RHEL. I do NOT have root access or super user status. lxml requires the dev/devel versions of libxml2 ...
1
vote
2answers
81 views

How to change the default version of Python in Debian 7.5?

I'm using Debian 7.5, and I've installed Python 3.3 and 3.2. How do I make 3.3 the default for when someone types python in the command line?
1
vote
1answer
73 views

Modoboa 1.1.1 Deployment Errors

I try to install modoboa follow this steps: http://modoboa.readthedocs.org/en/latest/getting_started/install.html I installed modoboa with pip install modoboa Traceback (most recent call last): ...
1
vote
0answers
63 views

Unexpected behavior from an “os.system”call in Python [closed]

I want to save the file type of the file sample in a text file called type.txt. I wrote the following for that in Python: os.system('file sample > type.txt') When I run this code, type.txt shows ...
1
vote
0answers
60 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
1answer
244 views

E: python-setuptools upgrade fails, apt-get broken

I wanted to install gnome-maps with apt-get, and then I got this error: Preparing to unpack .../python-setuptools_3.4.1-1_all.deb ... Unpacking python-setuptools (3.4.1-1) over (3.3-1) ... dpkg: ...
1
vote
0answers
66 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
85 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
2answers
108 views

How to restart python script after one second of going down using UPSTART?

I am running my Python script using upstart feature of Ubuntu so that if for whatever reason my Python script dies or gets killed, it can be restarted automatically and everything is working fine - ...
1
vote
1answer
396 views

Running ipython notebook on Debian

I'm trying to get ipython notebook to run on my Debian machine without much success. I've installed ipython and ipython-notebook via apt-get, but when I try to start it up I get the following: $ ...
1
vote
0answers
55 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
68 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
1answer
88 views

trac svn python bindings messed up rebuild python

My trac and svn used to work it still does if i click on the links many times. How ever it complaines of he followign and i am not sure what to do i have followed ...
1
vote
1answer
130 views

How can i fix the following gmp library dependency error while trying to install Charm?

I am trying to install Charm crypto python framework in ubuntu 11.04 with python 2.7. Requirements say that i should have gmp installed 5.*. I have successfully installed gmp lib and i have run all ...
1
vote
1answer
88 views

Change default python distribution for postgres from the system's python (to Enthought Canopy)

On an RHEL6 system, I'd like my postGIS implementation (ie my postgres/postgresql databases) to use Enthought's Canopy distribution of python, rather than the built-in GNU's distribution. (This is ...
1
vote
0answers
179 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
2answers
438 views

installing eric5 in CentOS 6.4

I am trying to install Eric Python IDE 5 in my CentOS 6.4. The problem here is even I have installed PyQT4 its again saying that module is missing. what I am supposed to do ? here is the terminal log ...
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 ...
1
vote
1answer
642 views

setcap error on Debian Squeeze: “unable to set CAP_SETFCAP effective capability: Operation not permitted”

My python script needs at least the CAP_NET_RAW capability, because it's using a pcap library, but I don't want to use sudo (and in fact sudo causes my script to not work properly, with the script's ...
1
vote
1answer
457 views

Can't install python because of zypper conflict

I have a virtual machine I just set up. I'm running a completely fresh install of OpenSUSE (with online updates from yast). At the terminal I tried to run python: $ python bash: python: command not ...
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 ...
1
vote
0answers
178 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
234 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
1answer
58 views

What to include in an RPM created from python packages

I'm looking to create a rpm for this tarball and couldn't figure out which files needed to be included in the package after the install. I am used to compiling some code and including the binary ...
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 ...
1
vote
3answers
255 views

I want to run commands like make, make install, python setup install without changing directories

I have written a script which will download software from the internet to the current user's home directory and then untar it. And then I have to make and make install it and in some software I have ...
1
vote
0answers
89 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
145 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
67 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 ...
1
vote
1answer
2k views

How to check if process already exists in python script? [duplicate]

Possible Duplicate: Check for process already running in webfaction? How can I check if a process is already being run using Python + Django on WebFaction hosting? For example, my process ...
1
vote
0answers
246 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
2answers
760 views

using cron to run script

Hey guys, im trying to run a script using cron, im using a crontab created by the user ashtanga, in the crontab i have */5 * * * * /home/custom-django-projects/SiteMonitor/sender.py in top of the ...
1
vote
0answers
791 views

Which scripting language is most widespread in system administration tasks? [closed]

I am migrating to Linux and have some experience with the Mac OS X command line/bash. I'd like to automate system admin tasks via scripting, but I am unsure as which language is the most used in the ...
0
votes
3answers
324 views

Is shebang always the same as the interpreter's installation directory?

Must the shebang header always match the interpreter's installation directory? If so, then why do both #!/usr/bin/python and #!/usr/local/bin/python work for me?
0
votes
3answers
209 views

*nix whose package manager DOES NOT split Python into multiple packages

Is there a *nix whose package manager doesn't split Python into multiple packages (typically something like python and python-devel). I'd really like to just get the entire standard library when I ...
0
votes
2answers
214 views

Making md5sum understand file names with spaces

I need to use md5sum in Python by using pipe to calculate checksum for a bunch of .mp3 files... is there a command which ignore whitespaces in filenames on the command line of md5sum program? For ...
0
votes
2answers
195 views

Adding ALSA module in Python in Linux

I have recently started working in linux, I wanted to to add ALSA module in my Python. I have used this, sudo apt-get install libasound2-dev After that I've installed pyalsa package, pyalsa ...
0
votes
1answer
34 views

install python module for particular python instance

I have 2 python instance on a CentOS machine, i.e. /usr/bin/python2.4 and /usr/bin/python2.7. Modules for 2.4 are in /usr/lib/python2.4, and modules for 2.7 are in /usr/local/python27. When I do ...
0
votes
2answers
223 views

Compiling python .py to .pyc doesn't happen

I have read that python will compile the source file .py by itself to produce .pyc, but this doesn't happen in my case. I have the source file inside /opt/osqa folder where I always have to use sudo ...
0
votes
2answers
2k views

What is wrong with my cron job?

I'm new to linux, and was told I could use a feature called cron job to run a python script I made execute every 10 minutes. Problem is the the python script isn't running. There doesn't seem to be a ...
0
votes
2answers
1k views

Running Python script via cron with sudo?

Im using Linux Mint. I have written a python script that is designed to not be accessible to the logged in standard user but is still be executed while they are logged in. It is to run and log them ...
0
votes
2answers
378 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?
0
votes
2answers
27 views

Why can't my python script change umask?

This is my script #!/usr/bin/python import os print "hello world from python" os.system("echo 'hello world from bash'") os.system("umask 055") os.system("ls -alh > test") If I run this code ...