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

learn more… | top users | synonyms

1
vote
3answers
1k 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 ...
0
votes
1answer
209 views

Tornado - transferring a file to CDN

I have the nginx upload module handling site uploads, but still need to transfer files (3-20 MB each, let's say) to our CDN, and would rather not delegate that to a background job. what is the best ...
0
votes
1answer
592 views

Where can you get Python 2.6 bindings for Subversion 1.5.6?

I'm stuck at this point with ViewVC ImportError: No module named svn I can't find prebuilt Python 2.6 bindings for Subversion, and I can't seem to locate the source for them either!
0
votes
3answers
515 views

Cronjob executing multiple times at once

I have a cronjob similar to this: */1 * * * * /usr/bin/python /home/root/test.py >> /home/root/spring.1 In test.py, I am just printing the current time. After few mins of observation, I see this in ...
0
votes
2answers
118 views

How to upgrade the version of Python used by Apache?

On a Red Hat box, I upgraded Python from 2.3 to 2.6.4 and changed the symlink to python so when I type in python the 2.6.4 interpreter comes up. However my .py file works from the command-line, but ...
18
votes
3answers
7k views

How do I uninstall gitosis?

I've installed gitosis on my dramhost machine but now I want to uninstall it because it's causing more problems than solutions. The thing is that I can't find how to uninstall it. I deleted the ...
22
votes
7answers
33k 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 ...
4
votes
1answer
516 views

Django VPS Configuration

I'm looking to run some Django sites on my VPS, with nginx acting as a front-end for it. I've been having some issues with mod_python and Apache, the site just starts erroring out whenever the traffic ...
0
votes
2answers
2k views

Ubuntu execute python script at logon as root after user logon

I've installed MythBuntu on a computer. MythTV doesn't support the Asus AI remote IR receiver so i searched for possible solutions. One of them was a Python script that acts as a bridge between a ...
3
votes
3answers
1k views

Throttle connections to web service if load gets too high?

I have a web site that communicates via XMLRPC with an XMLRPC server web service. (The web service is written in Python using xmlrpclib.) I believe that xmlrpclib will block while it is handling one ...
0
votes
1answer
2k views

Using wsgi with python 2.6 on ubuntu

I'm using libapache2-mod-wsgi 2.5-1 on ubuntu. Python 2.4 and 2.6 also installed. On server start i get the following warns in the error log: [Sun Nov 29 14:23:47 2009] [warn] mod_wsgi: Compiled for ...
0
votes
1answer
3k views

mod_wsgi+Django with a different Python version

My server runs Python 2.4 by default, and I've used make altinstall to get an alternate Python 2.6 installation, for my Django webapp. However, mod_wsgi seems to be defaulting to using ...
0
votes
2answers
805 views

Python program not being started by rc.d in FreeBSD 7.1

I have a python program which I wrote and would like to run on startup in FreeBSD 7.1. For my current installation, the script lives at /home/devuser/project/trunk/src/proj. At the beginning of my ...
1
vote
1answer
247 views

Is it possible to run Mercurial without ssl installed?

I have a Solaris 5.8 machine without OpenSSL. This platform is a real pain to get OpenSSL compiled for, and getting Mordac, our unix admin, to install the Solaris package isn't an option. I'd like ...
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 ...
0
votes
2answers
710 views

Installing mysql-server with python ssh connection

I'm writing a script in Python, which is connecting to server via ssh, then installing some packages. But there is problem with dialogue box, where i can type in a root password- i don't know how to ...
2
votes
1answer
805 views

How to configure Nginx to serve a variety of back-ends via multiple FCGI processes?

I've seen a lot of tutorials showing one how to set up PHP/Python/Perl/RoR on nginx via various FCGI processes. None of the tutorials that I found show one how to serve multiple FCGI services off one ...
1
vote
3answers
2k views

Best PGP/GPG Encrypt/Decrypt Script

Is there are good default python or simple shell script that I can use to encrypt and decrypt files via PGP/GPG? I would be running this script every 5 minutes.
1
vote
2answers
204 views

Best FTP Transfer Script

I am looking for a robust FTP transfer script that I can use with cron, any recommendations? I would love a script in Python that could run in the background.
1
vote
2answers
241 views

Starting all mod_wsgi processes

mod_wsgi processes seems to be lazily started i.e. on request. However, I prefer to start all the processes from the beginning because the process start up time is long. Is there a configuration ...
1
vote
3answers
762 views

Reloading mod_wsgi processes safely in production

Is there a way to safely restart mod_wsgi processes on demand, possibly running on multiple machines? I'm serving a django app with mod_wsgi in daemon mode with apache: WSGIDaemonProcess myapp ...
0
votes
1answer
1k views

Delete files older than X days from remote FTP server

My backups are stored on remote FTP server. I'm looking for a universal way to clean-up the FTP directory using bash or python. Any help would be appreciated. Edited: I have only FTP access to the ...
0
votes
5answers
3k views

In CentOS, how do I update Python 2.4.3 to 2.5?

I want Python 2.5, not 3.0. Can I use yum update for this?
0
votes
2answers
512 views

CherryPy (or other Python framework) with FastCGI on shared host

I am trying to configure the Python mini-framework CherryPy with FastCGI (actually fcgid) on Apache. I am on a shared host, so I don't have access to httpd.conf, just htaccess. I have followed these ...
2
votes
5answers
2k views

How to copy /etc/hosts to all my machines?

import os, sys, time servers = ['dev','admin','db1'] for s in servers: cmd = 'scp /etc/hosts regular_user@%s:/etc/hosts' % s print cmd os.system(cmd) I have written this script to copy ...
3
votes
3answers
6k views

PYTHONPATH environment variable…how do I make every subdirectory afterwards?

I currently do this: PYTHONPATH=/home/$USER:/home/$USER/respository:/home/$USER/repository/python-stuff How can I make it so that the PYTHONPATH can include everything subdirectory? PYTHONPATH = ...
0
votes
1answer
94 views

server datetime value jumps

would anyone give insight on this datetime issue: My web-application (on centos/apache/wsgi/django) shows different current time (datetime.datetime.now()) from call to call - I'm not asking why the ...
2
votes
1answer
850 views

Running Web.py as an IIS CGI Script

I recently wrote a web.py-based stand alone web service. Due to unforeseen circumstances, the service has to run through IIS. I've heard that it's possible to run web.py as a CGI in IIS, but I'm ...
2
votes
2answers
4k views

How would you set up wildcard subdomains with nginx and tornado web server?

How would someone go about setting up wildcard sub-domains with the suggested Tornado deployment? Specifically for SaaS apps that would allow users to have http://username.example.com/ As well as ...
2
votes
1answer
227 views

Correcting “Python support for SSL and HTTPS is not installed”

I was working with mercurial tonight on Apple's OS X (10.5), and received this error message while attempting to clone from a repository over SSL: Python support for SSL and HTTPS is not installed ...
0
votes
1answer
7k views

/usr/bin/env: python2.5: No such file or directory

I'm trying to play with Cloudera's Distribution for Hadoop on my EC2 account. For configuring it i'm using THIS tutorial. Everything seems to me fine but when I'm trying to run hadoop-ec2 I'm ...
4
votes
2answers
6k views

easy_install'ing under different Python version

I'm trying to easy_install a Python 2.5 package, but I've also got Python 3.1 installed, so I get a syntax error: except pkg_resources.VersionConflict, e: ...
0
votes
1answer
476 views

Why doesn't memcache work?

from django.core.cache import cache def testcache(): cache.set('test','I am putting this message in',3333) print cache.get('test') It just prints "None" This is in "ps aux": ...
4
votes
3answers
2k views

Scheduling tasks with Django

I have a Django website, and I want to have a certain piece of Python code run at regular intervals. What would be a good way to do that? I know I can cron, but I would prefer the solution to be ...
-1
votes
1answer
186 views

Memcache and Python

I installed Memcache doing this: gunzip memcached-1.2.1.tar.gz tar -xvf memcached-1.2.1.tar cd memcached-1.2.1 ./configure make make install Now, what exactly is the next step? (for Python) I know ...
4
votes
3answers
127 views

Openerp wIth Ubuntu 9.04

I had Ubuntu 8.10. I upgrade it to 9.04. I have Openerp5.0 server/client/web. It worked on 8.10 but not with 9.04. Now when I try to launch my server using: ./openerp-server.py I have this error: ...
1
vote
1answer
89 views

Getting waaay too many “Spawning Local” fastcgi messages

I've got Lighttpd running 7 Python apps via fastcgi on an Ubuntu server. I turned on fastcgi debugging in the Lighttpd configuration and noticed something very weird in the logs: Normally, when you ...
0
votes
3answers
3k views

Compile Python 3.1.1 with --enable-shared

This is a two pronged question... The context of the question is getting a good Python 3.1.1 build to use with building and running mod_wsgi. See this document for more information on why a shared ...
2
votes
5answers
1k views

Why doesn't my python script keep running when I use &

I have my gameServer.py script running remotely through PuTTy. gameServer.py looks like this: while True : (( listen for packets )) (( send all packets to all clients )) WHEN I execute the ...
0
votes
2answers
215 views

Why doesn't my python process die?

I have a simple python game script on my server which runs a loop like: while True : (( listen for packets )) (( send packets back to all connected clients )) I launch this script with ...
0
votes
2answers
591 views

nginx and Server-Side Scripting/CGI

Hey all, I've read up on the wonders of nginx the last few days and recently downloaded it....they only question I have is how exactly do you run files on it? I went to localhost in my browser, and ...
0
votes
1answer
2k views

mod_fcgid + Python + Apache 2.2 / RHEL 5 : output to error_log, not browser

I'm trying to get a Django + mod_fcgid setup working (mod_wsgi is tricky as I have a statically-linked Python. Don't ask.) While this was trivial on my Mac OS X development box, getting it running on ...
1
vote
1answer
774 views

configuring default PYTHONPATH

I have Django application and few Django commands that I would execute through cronjobs on CentOS 5. Recently I updated my python-setuptools package, which in-turn update python-devel packages. ...
4
votes
2answers
2k views

Better webserver performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi

I am currently running a high-traffic python/django website using Apache and mod_wsgi. I'm hoping that there's a faster webserver configuration out there, and I've heard a fair number of ...
2
votes
3answers
1k views

Temporarily set ENV variable for just one shell command?

Is it possible to set an ENV variable for just one shell command (ie make it expire right after the command executes)? For example: export VERSIONER_PYTHON_PREFER_32_BIT=yes winpdb I'd like to set ...
0
votes
3answers
1k views

How to remove a Python service in Windows?

I have a custom Python package which we are installing to several Windows platforms (XP, 2003, 2008). During setup, this command is run which registers a service: python.exe setup.py install What ...
1
vote
1answer
1k views

Installing the MySQLdb Python package

I'm trying to install the MySQLdb Python package on my CentOS 5.1 machine, without success. At first I tried using easy_install, but the version it installed was 1.2.1, which was too old for Django, ...
1
vote
2answers
830 views

Is there a work around for the “Permission denied” error from urllib2.urlopen?

I'm running some Python code which uses urllib2.urlopen which works fine when run as the user, root (Linux). However, it doesn't work when run as user apache (we're running it through apache version ...
4
votes
2answers
5k views

debian python2.6 as default?

is it possible to set the default python to 2.6 for debian lenny somehow?
1
vote
5answers
4k views

How do I create subdomain names dynamically?

I would like to be able to create and remove subdomain name dynamically using scripting languages such as PHP, Python, Perl or others. I am using Apache as a web server Example: ...