Python is a dynamically and strongly typed programming language that encourages readability.

learn more… | top users | synonyms

22
votes
7answers
32k views

How to set up Mod_WSGI for Python on Ubuntu

I am trying to setup MOD_WSGI on my Ubuntu box. I have found steps that said I needed to do the following steps I found at http://ubuntuforums.org/showthread.php?t=833766 sudo apt-get install ...
8
votes
3answers
18k views

Install Python 2.5 on RedHat/Centos

Current Python version is 2.4... yum upgrade python Gives Could not find update match for python Do I have to install from source?
2
votes
5answers
7k views

IO Wait causing so much slowdown (EXT4 JDB2 at 99% IO ) During Mysql Commit

I am writing an indexer, using python, which indexes documents and insert them into Database, Before it was single process but now i made it to multiprocessing with 4 parallel processes running.After ...
3
votes
2answers
1k views

Can I “register” python scripts to execute on Windows?

I have Python 2.5 installed on Windows XP and a collection of scripts available in a certain directory. According to this article by Amanda Birmingham I can setup up a path for the Python executable ...
2
votes
1answer
2k views

mod_wsgi daemon mode - WSGIDaemonProcess per virtual host configuration?

I had a fairly simple question. When mod_wsgi is run in Daemon mode, and you enable the WSGIDaemonProcess and WSGIProcessGroup directives on a per virtual host basis, are these picked up by other ...
1
vote
2answers
683 views

Is there any equivalent to php5-cgi for python?

nginx doesn't allow to directly execute external programs, so to run CGIs you need to run an standalone fcgi backend and connect to it with the fastcgi_pass directive. For php it's easy, e.g. using ...
0
votes
1answer
123 views

Auto-Tagging EC2 Instances in AWS (Windows Servers only)

I am looking for some guidance from the serverfault community. We are spinning up several new AWS instances (windows server 2008/2012) over the next few days. We have a naming convention in place for ...
3
votes
1answer
2k views

How to setup Python with Lighttpd and FastCGI (like PHP)

Running Lighttpd on Linux, I would like to be able to execute Python scripts just the way I execute PHP scripts. The goal is to be able to execute arbitrary script files stored in the WWW directory, ...
3
votes
2answers
500 views

Connecting to Exchange PowerShell from a Linux machine

We currently have a Python script that automates user creation tasks on our servers. This script provisions users in OpenLDAP and ActiveDirectory by using python-ldap. Now, I want to modify some ...
3
votes
2answers
3k views

Processing incoming emails with Python

I'm developing a web application that requires that a registered username be able to receive emails to: <some-username>@<my-web-app>.com I need a way to be able to process the email ...
1
vote
3answers
981 views

Can a virtual PC find out the identity of its host?

There's a Microsoft Virtual PC instance on my network that runs build scripts and reports problems by sending me an e-mail. I don't what machine it's running on! I can access the machine by Remote ...
1
vote
3answers
2k views

Downloading php files from python simple http server

I started python -m SimpleHTTPServer on one computer on lan and used wget to download php files from it to another. As far as i see, they seem to be downloaded correctly - i got php sources instead of ...
2
votes
3answers
795 views

Python equivalent to Heroku

Is there a Heroku or Engine Yard equivalent for Python?
2
votes
2answers
1k views

How do I get Apache to run Python 2.7 rather than 2.5?

How do I get Apache to run 2.7 rather than 2.5? I'm configuring Apache to use mod_wsgi with Django and Python 2.7, but error logs show Apache is using Python 2.5.2 and can't find ...
2
votes
2answers
3k views

Python simple http server and virtual machines - can't connect. Ip changed?

I sometimes use python -m SimpleHTTPServer one liner to serve files from my vms for download to my host. Today i tried to use it inside virtualbox vm that is under NAT network settings - i typed this ...
1
vote
2answers
421 views

cannot reinstall python2.6

I am trying to reinstall python2.6 on debian 6 but I get: root@ff: apt-get install --reinstall python2.6 Reading package lists... Done Building dependency tree Reading state information... ...
1
vote
2answers
2k views

yum error No module named CElementTree

I've the following problem with yum: $ yum There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named cElementTree Please ...
1
vote
1answer
3k views

Python version mismatch, expected '2.6.5+', found '2.6.6'

I have this error that comes up every time I do an apache2 restart and am just wondering if anyone can shed some light on the issue. Is it something I even need to worry about at all? I have had it ...
1
vote
5answers
2k views

Cannot install mercurial properly - PYTHONPATH error

I have a server running on Ubuntu 10.04 on which I wanted to install Mercurial via % sudo apt-get install mercurial It seems to have installed successfully and doesn't show me any error messages. ...
1
vote
1answer
440 views

Trac causes RuntimeError: instance.__dict__ not accessible in restricted mode

I have the below Apache configuration. The following services are on each port: 8022 - Apache. Testing port, in the long run it will be port 80. 8002 - XDV, a themeing proxy which sits in ...
1
vote
0answers
253 views

How can I use WPHP with Python Paste

It was suggested to me in answer to my question How can I use Python’s CGIHTTPRequestHandler as a dev server for PHP that I try WPHP. I've tried: import wphp my_php_app = ...
1
vote
1answer
337 views

How can I use Python's CGIHTTPRequestHandler as a dev server for PHP

I love how to try a Rails app out, I just type script/server. I wish there were a way to do something similar from the top level directory of a PHP project. This answer to the question "Downloading ...
0
votes
1answer
43 views

Apache and mod_wsgi, worker process stuck to W state, request never dies. How to diagnose?

I am running Apache 2.2 with mod_wsgi, Python 2.7 and mpm_worker. Occassionally, one of the worker processes gets stuck and all of it threads stop in writing state (as demostrated in the screenshot ...
0
votes
2answers
85 views

Gnu parallel not utilizing all the CPU

I have a simple python script that read from stdin (a single line), do some processing (string parsing, no IO involved) and output to stdout e.g. python parse.py < in.txt > out.txt I have an ...
0
votes
1answer
62 views

IIS Won't Let Python Script Set Headers

I am trying to get Python working with IIS 7.5. I have added a script handler for Python: Python itself doesn't seem to be the problem. I have ran scripts on the command line with no problem. The ...
0
votes
1answer
335 views

how to resolve yum replace php-common --replace-with=php55w-common error?

how to resolve yum replace php-common --replace-with=php55w-common error? on CentOS 6.5 root@server [~]# yum replace php-common --replace-with=php55w-common Loaded plugins: fastestmirror, replace, ...
0
votes
1answer
996 views

syslog-ng not flushing the pipe to external program (SOLVED)

I have written a python script that takes log entries from syslog-ng and writes them to MongoDB (I couldn't do it with afmongodb driver because I need to do some special processing). This is how it ...
0
votes
1answer
776 views

'gcc' failed with exit status 1 - MySQL-python-1.2.3

I am installing MySQL db for python2.6. I installed it from here but when I am on the line I extracted the file and when I did python2.6 setup.py build it gives a lot of errors and warring and ...