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

learn more… | top users | synonyms

2
votes
1answer
2k views

django mod_wsgi memory problem

I have my django application on a VPS server (128mb ram) When i start it with python manage.py runserver, it works perfectly, but if I try to use it over apache/mod_wsgi it causes major slowdown very ...
4
votes
3answers
17k views

How do I install Python 2.6 on Debian 5.0 (lenny) using apt-get?

After some digging and experimentation, I figured out how to install Python 2.6 on Debian 5.0 using apt-get. So I thought it best to post on SF as a question and answer. I know this can be manually ...
1
vote
3answers
590 views

UK-based web hosting with Django support [closed]

I'm planning to set up a personal website in the near future, and I'd like to use Django on the site. I haven't yet made any decisions about hosting and I was thinking of going with Fasthosts, who ...
1
vote
5answers
3k views

How do I find the Python executable that my server is using?

I'm new to Linux. I'm managing a (Linux - Apache - mod_wsgi - Django) server, where there are multiple installations of Python. The site is currently working, but I want to find out which executable ...
0
votes
1answer
1k views

Getting modified year of file via FTP

I want to compare the modified date of a local file and the equivalent file on a remote FTP site (via FTP, no SSH access). I'm using Python's ftplib btw. The only way I can find to get the remote ...
1
vote
2answers
337 views

Is it a good idea to chmod my Python site-packages directory to 777?

I use Python on Linux and OS X, and I'm trying to think of a good reason not to chmod my Python site-packages directory to 777. It seems like that is better to do than sudoing every time I want to ...
1
vote
1answer
1k views

How can I check integrity of the builtin windows 2003 software raid from a script

I want to write a script (using python or windows batch) to check if in the raid system on a winows 2003 server all disks are online, alive and synced. This is the builtin windows 2003 software raid ...
0
votes
2answers
782 views

Is there a log file generated from python setup.py install?

When I am installing a python module, I use python setup.py install I see all of the output on the command line, but is all of this output saved to a log file somewhere? I'm asking because I ...
2
votes
4answers
1k views

CherryPy, Load Balancing, and Remote Failover

Our company's current customer-facing site & intranet site is currently built on Classic ASP running on IIS 6. The current site only contains about 10 customer-facing pages, and an internal site ...
1
vote
2answers
171 views

Forum Solution in Ruby or Python

I need to find a suitable forum in Ruby or Python for my company's web site. I've been given the following general criteria: Data Migration: How do they store the data? Preferably in database not ...
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
211 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
595 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
537 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
119 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
34k 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
517 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
869 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
249 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
717 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
3k 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
208 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
247 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
777 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
4k 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
517 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
7k 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
880 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
232 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
484 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
130 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
90 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
218 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 ...