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

learn more… | top users | synonyms

2
votes
2answers
2k views

Celery daemon as a Ubuntu service does not consume tasks while running from terminal does

On Ubuntu 11.10, I have to issue python tasks from django using celery. I'm currently testing on the same machine but eventually the celery worker should run on a remote machine. django uses the ...
2
votes
2answers
379 views

Run a python script that is never Killed

I have a script running python script.py in a new screen but sometimes the script gets killed: 18 21 Restarting processes... done 2 Killed How can I protect the script from being killed even when I ...
2
votes
2answers
267 views

Installing compiled Python modules on Windows on a virtual env

I'm using virtualenv to maintain a Python installation on Windows. I want to install the popular PIL module, which comes as .exe. I run the .exe installer, but it tries to install to the regular ...
2
votes
2answers
164 views

How to manually start and re-start Apache with mod_wsgi powering a password protected Python WSGI app?

I'm working on a project where I have to meet some regulatory requirements that require at least 3 out of 5 authorized users to start a backend web service that handles very sensitive information ...
1
vote
2answers
203 views

Install gettext-0.17-1.el5.i386.rpm on CentOS 5.8 i386 gives “/usr/bin/python is needed” error

I've removed yum by mistake. So, now I'm installing all the dependencies needed by yum manually. One of those is gettext-0.17-1.el5.i386.rpm and when I try to install it gives the following error, ...
1
vote
2answers
876 views

Lighttpd with FastCGI won't create /tmp/fcgi.sock on startup?

I'm running lighttpd-1.4.19 on a debian 5 box and try to run web2py with fastcgi. The problem with that is, that lighttpd does not create the socket file /tmp/fcgi.sock. If I'm creating the file by ...
1
vote
2answers
309 views

How to deploy local project to Amazon

I have a small webapp written in Python/Django which works fine on my local machine. I've been tinkering and setting up my server on the free tier of Amazon EC2 by following online tutorials. However, ...
1
vote
2answers
519 views

What is the best log rotator for Python wsgi applications?

I am running a wsgi based application that has concurrent users accessing it. For my logs needs I tried logrotate but found that logrotate is not too friendly to Python applications, so I tried using ...
1
vote
2answers
171 views

How to serve pages through multiple frameworks/template engines efficiently

I would like to render a file that has both PHP tags and Web2Py tags mixed together. To do this, I would like the web server to pass the file through Web2Py, then PHP. I found a method to call PHP ...
1
vote
2answers
124 views

Packaging python software with custom dependencies

I'm looking for a good way to package a Python application that is going to be deployed on a Debian server. The application itself depends on some modules which are not included in base Debian ...
0
votes
2answers
145 views

Running python script in incrontab in Debian

I have a user, dropbox, that runs the Dropbox daemon, I want to monitor the directories in the Dropbox directory for new files and run a python script when they appear. I have the python script that ...
0
votes
2answers
462 views

How can I get event details in a transform with Zenoss 3.x

I need to get the event details from a trap in an event transform. The traps come with oids in the event details. The problem is that the OIDs are not predictable because the last digit is the event ...
0
votes
2answers
306 views

Execute local (bash|python) script with mysql SQL

Basically I want to create a trigger so that when a field is updated it kicks off a local bash script (or python...whatever) to kick off a workflow (emails, work requests, etc). Is it possible to ...
0
votes
2answers
277 views

ubuntu 11.04 install mysqldb for custom python2.5

ubuntu 11.04 has native python2.7 i build python2.5 from source to /usr/local/python2.5/bin, and try to install mysqldb for my custom python2.5 install. Also i use virtualenv. I switch to my env with ...
0
votes
2answers
68 views

Installing mod_wsgi in addition to PHP

I would like to use some python scripts with my PHP-based application. I don't want to install Django; just mod_wsgi, so Apache can execute my python scripts as well as the rest of my PHP site. How do ...
0
votes
2answers
465 views

Allow php and python script with apache but still have a secure server

problem "solved"? after backtracking where the permission first stops, the permission denial suddenly went away for no reason. I am building a webpage where the user must have the possibility to send ...
0
votes
2answers
652 views

Can not run ifconfig like commands via browser

Problem is I cannot run "ifconfig" or similar commands via browser. Environment: Programming language : python Server : lighttpd(CGI) , running on busybox. Well machine is really small and so I ...
0
votes
1answer
616 views

Nginx reverse proxy with separate aliases

Interesting question I have this python code: import sys, bottle, gevent from bottle import * from gevent import * from gevent.wsgi import WSGIServer @route("/") def index(): yield "/" ...
0
votes
1answer
234 views

centos: unable to write to whoosh indexes

got a problem here. In my development server, I ran into a problem when I try to search using django/haystack with the whoosh backend engine. The path to your Whoosh index ...
0
votes
1answer
653 views

I alternated my system default python version to python2.7, but the apt-get still use python2.6

Ubuntu , I changed my system default python version from python2.6 -> python2.7. after sh-3.1$: update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2 sh-3.1$: sudo ...
0
votes
1answer
360 views

How do I get the caller name in Asterisk using Python?

I have an Asterisk (Elastix) installation. I have a MySQL database with about 10,000 customer names and numbers. I would like my call agent to recognize the name associated with the number. I can have ...
0
votes
1answer
304 views

python 2.7 3rd party modules not accessible all users

I have an custom install of python 2.7 /opt/python7.2/ built from source using the following flags: ./configure --prefix=/opt/python-2.7/ --enable-shared and make altinstall; make install on a RHEL ...
0
votes
1answer
453 views

python-cups for CentOS5

I'm try to activate airprint support on CentOS5. I found this guide, but the airprint-generate python script needs cups support. It seems this script needs the python-cups lib. How can I install this ...
0
votes
1answer
476 views

Supervisord and gunicorn_django not playing well sometimes

I can issue a command via supervisorctl to shutdown my gunicorn_django process but sometimes it hangs around until I have to eventually kill it with a -9. The log for the process usually has this: ...
0
votes
1answer
137 views

Install python in a windows web hosting running IIS 7

How do I install python in a web host running IIS 7? Mostly of my research suggest to go to the Internet Service Manager but I can only access the server through a web browser. Is this possible? What ...
0
votes
1answer
474 views

Ubuntu Apache Gives Internal Server Error 500

So I'm trying to set up a OSQA server locally as a test run, so that when I set it up on a externally hosted server it will all go smoothly. I'm following this tutorial and have been going well so ...
0
votes
1answer
125 views

Multiple virtual hosts support for apache with scgi quixote backend for some host

I'm trying to add a domain with quixote as its backend. I searched google and found that there are servaral choices to glue quixote and apache together. I chose scgi because it seems like the choice ...
0
votes
1answer
488 views

400 bad request: use the HTTPS scheme to access this URL, restclient python

I want to access an url which requires the full authentication. The following is my code. import restclient res = restclient.GET("x.x.x.x:8181/abc/def", headers = ...
0
votes
1answer
611 views

When set SESSION_ENGINE to memcached, Django website halts

I have set up memcached in Django using Pylibmc binding: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache', 'LOCATION': ['10.241.1.1:11211', ...
0
votes
1answer
329 views

Problem getting mod_wsgi running with apache

Not had any problems implementing this set up before, got a new server set up at home and wanted to work on some django projects. Im using virtualenv with virtualenvwrapper, mod_wsgi module seems to ...
0
votes
1answer
528 views

How to install Python and PostgreSQL on CentOS

I have a dedicated server running centOS. I want to install python 2.6 and postgreSQL on it so python users can host their web apps on my server. (Apache) Can anyone give me a detailed tutorial for ...
0
votes
1answer
177 views

sqlalchemy fails to connect to db after server is idle for a few hours

I have a fairly standard setup where the application server is separated by a firewall from the database server. The application is using sqlalchemy and the db is postgres. The system works fine for ...
0
votes
1answer
216 views

Distributing a Python/Django app and handling database replication

We have developed a Python/Django app which we would like to distribute to clients, so they can run it locally (on a VM). We are doing this so they can still use the app if their internet connection ...
0
votes
1answer
423 views

Zenoss - Performance issues with captured events

The problem I'm manually inserting events into Zenoss through the zensendevent command line tool. The events are successfully inserted into Zenoss. The problem is that I can just insert about 8 ...
0
votes
1answer
696 views

How to send task to celery using redis pubsub with postgresql?

How do you send task to celery through redis pubsub once a new record has been inserted into a postgresql table? My problem here is to get redis to listen for inserts in my postgresql table, and when ...
0
votes
1answer
62 views

mac mini as a buildboot

I would like to use a mac mini with the following configuration as a buildboot for compiling our application: Intel Core Duo 2 2.44Ghz Hard disk 320 GB Ram 4GB The application is targeted to work on ...
0
votes
1answer
379 views

Tornado Startup Management

I have an application written to run in Tornado server.. The application should start on boot, and if it fails ( be restarted ) Currently I am using supervisord, but i wanted to see what else is ...
0
votes
1answer
244 views

When can an FTP server close its passive connections?

Does the FTP protocol allow the server to close any of its passive connections while the client is still connected? Can it tell when the client is finished receiving and then close the connection? ...
0
votes
1answer
142 views

Cannot install pyenchant on OSX

I am trying to install pyenchant on OSX snow Leopard. I have installed enchant via macports and it produced no errors, but when I try to install pyEnchant via setup.py it gives me this error: ...
0
votes
1answer
227 views

How to test python on Centos

I have followed this tutorial and successfully did everything. http://binarysushi.com/blog/2009/aug/19/CentOS-5-3-python-2-5-virtualevn-mod-wsgi-and-mod-rpaf/ how can i check that i everything is ...
0
votes
1answer
97 views

permission errors with python/django

Error can be seen here: http://djaffry.selfip.com:8080/ If i go to the folder /srv/twingle/search and do ls -l I get -rwxrwxrwx 1 root root 65142784 May 26 20:28 words.db I gave it 777 ...
-1
votes
1answer
97 views

Python error when s3cmd is executed within bash script

I'm creating a bash script of which will run on a cron, it's purpose is to backup a directory to Amazon S3 using the s3cmd command. I get the following error when I run the script: /usr/bin/env: ...
-1
votes
1answer
40 views

Frozen exe crashes in System Center Configuration Manager 2007

We are using SCCM 2007 to deploy a custom script (written in Python) which upgrades some software and performs additional configuration on client machines. The script is frozen into an exe using ...
-1
votes
1answer
664 views

Permission denied error while creating files from a python script using mod_wsgi on apache

I'm running a python script under mod_wsgi on apache. The script attempts to create some files under a directory. The path of that directory is defined by this variable named tmpdir in the script. ...
-1
votes
1answer
55 views

How do I uninstall python from web platform installer?

I've installed python and some other packages using web platform installer, but I was having some issues getting a Django project to work so I uninstalled everything and am trying to get it going from ...
-1
votes
1answer
336 views

How to build Python-2.7 Debian (Two version Python)

I installed Python-2.7.3 on Debian 6. ./configure --enable-shared --prefix=/usr/local/python2.7 make make install Now already installed, how I can access this: shell: python2.7 Thanks.
-1
votes
1answer
607 views

YUM error. Is this a cert error

Nov 13 13:38:57 host abrt: detected unhandled Python exception in '/usr/bin/yum' Nov 13 13:38:57 host abrtd: New client connected Nov 13 13:38:57 host abrt-server[3508]: Saved Python crash dump of pid ...
-1
votes
1answer
207 views

After upgrading Python from 2.4 to 2.7 server get down

I installed Python 2.7 on CentOS in a different location, but I didn't change the PYTHON_PATH to newly installed Python. Since then, I am not able to access the system via cPanel or SSH (to revert ...
-1
votes
1answer
81 views

Scripting git commands with Python

Is there any way to pass the username and password to a git command so I can script it through Python? I understand the password will be in cleartext but for my application it is not a problem.
-2
votes
1answer
76 views

MYSQL : Connecting to mysql from : 127.0.0.1 + telling ip tables to allow only 127.0.0.1 for mysql port : Logic vs Common Sense

if i make 1 billion or 1 trillion queries to MYSQL database.. from 127.0.0.1 via port 3306.. vs.. if i make same amount of queries to MYSQL database also from 127.0.0.1 via port 3306.. but with 1 ...