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

learn more… | top users | synonyms

1
vote
5answers
3k 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: ...
1
vote
5answers
4k views

You don’t have permission to access /index.py on this server

I am setting up a simple test page in Python. I only have two files: .htaccess and index.py. (Permissions for both set to 755) I get a 403 Forbidden error when trying to view the page - how can I fix ...
1
vote
1answer
116 views

How do I migrate from Python virtualdev environment to a Apache mod-python environment?

How do I migrate from Python virtualdev environment to a Apache mod-python environment? I couldn't find a link anywhere on the internet that describes this. My config.py file is in the root of my ...
0
votes
2answers
3k views

fedora /usr/lib vs /usr/lib64

It seems i have two python2.6 folders located in /usr/lib vs /usr/lib64 respectively. Most python stuff (source) is in /usr/lib64/python2.6 but when in installed packages they have been put into ...
3
votes
1answer
780 views

Running fastcgi->php for a blog subfolder, while rest of site is fastcgi->django

Sort of an odd question but should be pretty easy to solve. I am developing a Django website right now and the client wants a Wordpress blog as well. Because we're under the gun and have other ...
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 ...
4
votes
2answers
1k views

Which Linux distro should I use for Apache, mod_wsgi, Python, Django, PostgreSQL deployment?

Currently we are running CentOS for our production servers. Wer're deploying Django projects with Apache 2.2, mod_wsgi and PostgreSQL. We are in the process of making Python 2.5 the default version. ...
0
votes
2answers
826 views

Perl script works with Apache piped logs but not Python script

I need to port my Perl log handling script to Python. Here is a simple example of a Perl script I can use: #!/usr/local/bin/perl $|=1; # Use unbuffered output while(<>) { system("beep"); } ...
0
votes
1answer
1k views

Ubuntu: reinstalling jpeg library

I do not know alot about linux so please take a bit longer time trying to figure out what i am asking for. background story can be read here : ...
3
votes
11answers
3k views

Cron job fails silently

I've got a python script that I want to run via crontab. My crontab looks like this: 5,20,35,50 * * * * /var/www/django-apps/callreport/util.py That script is set up to parse a bunch of flat files ...
0
votes
3answers
1k views

Extracting zope data.fs

I had a zope/plone site where I stored pictures and videos from several users, but I want to move the content to another site now. What is the easiest way to extract content of Zope's data.fs? I heard ...
0
votes
3answers
764 views

How to access git:// protocol from GitPython

I am writing an app to manage git repos using the GitPython module. It works fine for my local repos but I can't get it to work with the git:// protocol. It takes my git://address-to-repo as a ...
4
votes
3answers
5k views

Uninstall Python packages built from source

How do I uninstall Python packages that have been built from source and installed via... python setup.py build python setup.py install ?
1
vote
3answers
360 views

How to diagnose erratic disk behavior?

I have a web site with users lighttpd and CGI scripts. After upgrading to Fedora 11 (ext4) the disc access became erratic. The timing of python -c 'import cgi' varies between 0.1 to almost 10 ...
0
votes
2answers
183 views

How to Compile Mod_Python 3.3.1 for Python 2.6 and Apache 2.2 on Windows?

I have no experience compiling code other than using Visual Studio's Build command. I am hoping we can create a step by step guide for compiling mod_python on windows. Please be as descriptive as ...
2
votes
3answers
120 views

To know whether my Uni can run Python web applications

I am completing my first database project. I am going to set up mod_wsgi to Apache such that I can run Python webframework on my Uni's servers. I am not sure whether my Uni has those tools or not. My ...
0
votes
1answer
298 views

Launching a process on startup in ubuntu fails to start other processes

On Ubuntu Server I've written a c++ program which launches another process which is in python. The c++ process runs fine on startup but the python process never launches. It gets created and when I ...
0
votes
2answers
429 views

win32api.dll Missing

I am trying to start a Buildbot Buildslave on a Windows XP virtual machine: python buildbot start . ImportError: No module named win32api. Google tells me that win32api is win32api.dll. I ...
2
votes
2answers
975 views

Install Python 2.4 or newer on Centos 4.x

I would like to use Python 2.4 features in my Django apps running on CentOS 4.7. The default version of Python is 2.3 and I think it would be best not to try replace it. Is there a way to install a ...
1
vote
4answers
6k views

Best way to have full Python install under cygwin/XP?

Pythons installed under WinXP have dirs like DLLs, DOC, include, etc. but python (2.5) installed with cygwin is a bare python.exe. My motivation for asking is that 'things' under XP don't seem to be ...
0
votes
3answers
2k views

Mac OS X: Change $PATH from within python script

I have a bunch of python scripts. One of them installs software (subversion) that requires it's path to be added to $PATH. After it is installed, I want the next script to use the software. If I run ...
1
vote
3answers
361 views

Apt-getting python-matplotlib for multiple python versions

I have two different versions of python running on the server, 2.4 (default) and 2.5. Python-matplotlib is install via apt-get for 2.4. I want to install it also for 2.5, but apt-get install says ...
0
votes
2answers
603 views

Different Django Version in one production server, How do I setup?

Output should looks like this. http://www.example.com/djangoapp1 django version 0.96 http://www.example.com/djangoapp2 django version 1.0.2 Using Apache Server, with mod_python. Or any Server ...
1
vote
2answers
336 views

Crossplatform way to check admin rights in python script?

Is it any cross-platform way to check that my python script is executed under admin rights? Unfortunately, os.getuid() is UNIX-only and is not available under windows :(.
0
votes
2answers
2k views

Python 3.* on Gentoo [closed]

How to install python 3.* on Gentoo without compiling by hand? Are there any ebuild or overlay for this? UPDATE: now it's absolutely possible without any hacks
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?
0
votes
1answer
298 views

Unable to run Django on Mac OS X

I'm working with a Django project on my Mac (running Leopard) and I want to show it to my team. I've already passed the neccessary port forwards from my router to my Mac's LAN IP address but it ...
1
vote
9answers
1k views

Remote performance monitoring for Solaris and Windows

I have a python framework that I've created to run performance tests in a mixed server environment of Windows, Linux and Solaris. I'm looking for a way to remotely gather performance data for the CPU, ...
1
vote
2answers
2k views

What should the DJANGO_SETTINGS_MODULE be set to in Apache when deploying a django app?

I'm deploying a django app, but I can't seem get the settings correct in the Apache configuration. I've put my django app in /path/to/mysite.com/teabag/current/ DirectoryIndex index.html ...
1
vote
4answers
2k views

Get python cpu usage

Anyone using a Python script to monitor CPU usage on a Windows machine ? i've google for some time but have not been able to find any usable script. could you guys show me some example of what you're ...
0
votes
3answers
800 views

Commands to Python Script in Command Line ( except CTRL+C)

I have a Python Script, running in command line. In some machines ( maybe Linux, I don't know), I can terminate the service by typing CTRL+C. However, I can't do this in my Windows XP machine. Is ...
12
votes
16answers
2k views

Python Hosting

I would love to start learning python by setting up a little website, and for that I need hosting. What should I look for in a hosting provider to be sure I can use python? EDIT: to be complete: I ...
1
vote
1answer
211 views

CherryPy install problem on web hosting provider

I have a linux based web hosting provider (fatcow.com) that doesn't give any command line access and won't run the setup script for CherryPy (python web server) for me. Is there any way to run get ...
1
vote
2answers
342 views

What's a good way to run Apache/mod_wsgi or similar environment on Windows Server 2003?

I need to set up an Apache instance on a windows box we have. I'm running a Python/Django application, and mod_wsgi is preferable so that I can restart individual applications. I do, however, need ...
3
votes
4answers
2k views

check admin rights inside python script

How to check that my python script is running under Administrator rights (sudo) under BSD-like OS? Need to display user-friendly warning in order it is executed without admin rights.
0
votes
2answers
1k views

How to correctly launch a python application in the Mac OS X dock?

I need to install a python application (python + wxWidgets GUI) to end users computers. I need an application to be in the Dock and start like any other application - with light "started" indicator, ...
0
votes
2answers
421 views

Recommended setup to serve both HTTPS & HTTP connections to a pylons web-application

I'm looking for a simple way to serve my pylons application in both HTTP & HTTPS (for the administration section). I had come across some tutorials on serving pylons applications through an Apache ...
0
votes
2answers
648 views

Python 3.* compilled for HP-UX ia64 (or depot)

Where can get depot (or just precompilled package) with Python 3.* or at least 2.6.* for ia64-hp-hpux11* ? Packages for hppa64-hp-hpux11* (PA-RISC) can be found at ActiveState but not for Itanium. I ...
2
votes
2answers
513 views

Recommend books/resources for this stack: linux, lighttpd, postgres, webpy

I'm trying to learn to run a simple server (and python simultaneously, but that's beside the point). The tutorials available at the websites of the aforementioned technologies were enough to get the ...
2
votes
1answer
400 views

apache prefork/mod_wsgi spawning processes beyond configuration

in a production environment running nginx reversing back to apache mpm-prefork/mod_wsgi, im seeing 90 apache child processes, when i would expect that 40 would be the maximum, as configured below. the ...
1
vote
5answers
4k views

Running Python scripts in linux

I'm trying to run Python scripts with a shebang on Ubuntu. When I create a python script #! /usr/bin/env python import sys ... and run it I get a shell error: root@host:/home/user# ...
11
votes
6answers
6k views

Python 3.0 RPMs for CentOS 5 (RHEL 5)

Where is the best repository you use to obtain RPMs for Python 3.0 which are well maintained?
9
votes
3answers
2k views

How to explain Django/Python installation to Python-newbie running a shared IIS server [closed]

For reasons beyond my control, our website is hosted with a hosting provider that uses IIS for their servers. They currently offer PHP and ASP, and also Python and Perl through cgi-scripts. I want to ...
1
vote
1answer
209 views

Python source RPMS for centos?

Anybody have a link to the page where centos source rpms are located? I'm looking for the python source rpm to build a debug python binary.
2
votes
3answers
616 views

Is there a way to register python scripts to run “by themselves” under PowerShell?

This question nicely covers getting python scripts running under CMD.EXE without having to type a bunch of extra stuff - that is "> script" rather than "> python script.py". However, I can't seem to ...
0
votes
4answers
3k views

mod_python with Apache Failures

I'm having an issue with mod_python and Apache, and I'm pretty certain I know what the problem is, but I'd like a bit of reassurance. I currently have a situation where I'm working with a very small ...
20
votes
4answers
21k views

How to run easy_install in cygwin?

I am trying to install some package in cygwin's python, but I'm getting the following error: "easy_install: command not found". I have tried to run "easy_install.py", the result is also ...
2
votes
3answers
952 views

Installing using easy_install and bdist_rpm possible?

I'm setting up a new server based on RHEL5 and wanted to install some python modules which don't come with it. I've seen that setuptools have an option to build RPM packages out of modules, but ...
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 ...
6
votes
9answers
20k views

How can I restart a windows service remotely using a script?

I have a Python web application running in a CherryPy server, which is running as a windows service. I have a batch file to deploy this application, but I'm still having to remote desktop in to the ...