The python tag has no wiki summary.
1
vote
1answer
41 views
Apache2 mod_wsgi python 2.6 Django very slow
I've tried about 1000x things, but I can't seem to figure out why a simple django website is slow using apache 2.2.14/wsgi latest / django 1.3. I've confirmed the problem isn't our database by turning ...
1
vote
0answers
17 views
'pip install carbon' looks like it works, but pip disagrees afterward
I'm trying to use pip to install the package carbon, a package related to statistics collection. When I run pip install carbon, it looks like everything works. However, pip is unconvinced that the ...
0
votes
0answers
22 views
MySQL socket with PHP and Python (MySQLdb)
Background info
I'm currently running CentOS (or Red Hat?).
uname -a gives (I edited out my domain name)
Linux XXXXXXXXX.com 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 ...
0
votes
0answers
19 views
reference missing of pyOpenSSL in twisted
when i am trying to run punjab (BOSH connection manager) using following command
twistd -y punjab.tac
i am getting follwing error
in punjab.tac i am referencing
from twisted.internet import ...
1
vote
1answer
21 views
How to determine if ftp/smtp is up and running using a script?
Similiar to how these uptime monitoring servieces perform checks if your smtp or ftp server is running, how could I do this myself using python/ruby?
0
votes
0answers
25 views
running both python and php on the same Ubuntu server
I am going to be setting up an Ubuntu 11.10 virtual server (linode) to run both php and python applications. I have set up Apache for both php and python, but not both, and seem to recall some issues ...
1
vote
1answer
23 views
safesquid external parser
i am running safesquid and it does support an external parser, so i wrote this simple URL rewrite code in python which also logs the initial request...
#!/usr/bin/env python
import sys
def ...
1
vote
2answers
63 views
Python - rebuild with SSL
I have built/installed Python 2.7 on my Ubuntu 10.04 and I just saw that SSL is not activated.
Do I have to rebuild Python ?
How can I rebuild it with SSL support and update my current install ?
I ...
0
votes
1answer
29 views
Can send mail but never receive the “Failed permanently” emails
I'm trying to build a system that analyzes incoming emails and automatically removes emails that fail permanently. But I never receive those emails that you usually receive when you send an email to ...
0
votes
1answer
90 views
Nginx with site build on Pyramid framework (Python): how to configure?
I have wrote site on Pyramid framework (Python) and bought VPS (OpenVZ technology) server.
I'm new to server administration and there is no much docs on how to configure Nginx with Python and ...
7
votes
2answers
52 views
FreeRADIUS 2 should use a different Python than default
We've got a FreeRADIUS 2 deamon installed on a CentOS 5.7 server.
We'd like to use a pre-written Python module to do authorization but there's a problem: The Python module we've got requires Python ...
0
votes
1answer
93 views
Accidentally installed Python 2.7 on CentOS
I need newer Python so I downloaded .tar.gz from the site, unpacked, run ./configure; make; make altinstall. I had then separate Python 2.7 and default 2.5 and all worked fine.
But recently I needed ...
0
votes
1answer
30 views
mod_wsgi won't compile - cannot find -lpython3.2
I am trying to install Python 3.2 and mod_wsgi on my web server, but I am not having much luck.
I downloaded the Python source files and compiled using this command:
./configure --enable-shared ...
0
votes
1answer
16 views
Adding a Python handler in suPHP?
I have the PHP handler working perfectly fine, but one of my friends would like to use Python as well. I have Python installed on my server at /usr/bin/python2 (for Python2) as well as /usr/bin/python ...
2
votes
3answers
97 views
Django: Nginx with WSGI or Apache with WSGI
Are there any studies comparing the performance (RPS, CPU, Memory usage etc) of delivering python web apps (Django in my case) between nginx and Apache?
Can someone help me with facts?
Which ...
0
votes
1answer
36 views
Running Django on CentOS?
I have a problem running Django with mod_wsgi and Apache on CentOS.
Django runs on Python 2.5 or above but CentOS comes with Python 2.4. I can't just upgrade the default Python 2.4 because it breaks ...
0
votes
0answers
86 views
Useful Python scripts for sysadmins: tips and tricks? [closed]
What are some sysadmin tasks that Python scripting is useful for, and utility scripts for performing those tasks?
0
votes
4answers
53 views
Access ports on localhost from external IP
I'm currently in the process of setting up a web server just for personal and testing use. Right now I'm trying out running some python applications but when I start them, they are ran at ...
0
votes
1answer
56 views
Clustering TCP servers, so can send data to all clients
I'm developing a real-time mobile app by setting up a TCP connection between the app and server backend. Each user can send messages to all other users.
(I'm making the TCP server in Python with ...
0
votes
1answer
60 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 ...
1
vote
3answers
36 views
Python app server & web server co-existing?
I have a site example.com that runs off a 'normal' web server ie at the moment Apache but looking to go for a less RAM intensive alternative in future so I don't want mod_WSGI on apache.
Shortly I ...
0
votes
0answers
45 views
Generic RPM package for Python 2.x
I have a python application, it can run on Python >= 2.6 and it's architecture independant.
I need the rpm package of this application to be installed on Fedora 14 (python 2.7) and Centos 6.2 (python ...
0
votes
1answer
68 views
Supervisord: Can supervisord monitor remote processes
Can supervisord be used to start remote processes, monitor and manage the processes?
0
votes
3answers
242 views
Ubuntu 11.10 with Nginx and uWSGI
I'm trying to get a LNP [Linux Nginx Python] stack (is that even a thing? heh) going, but I'm having some difficulties.
A lot of blog posts and documentation on doing this seems to revolve around ...
0
votes
0answers
10 views
Can I register event callbacks using the libvirt Python module with a QEMU backend? [migrated]
I would like to write some code to monitor events for domains running under QEMU, managed by libvirt. However, trying to register an event handler yields the following error:
>>> import ...
0
votes
1answer
27 views
Unable to install OpenLDAP on Red Hat Enterpise Linux
I'm trying to install PythonLDAP on my remote server, and in order to do this I have to install OpenLDAP as a prerequisite.
I downloaded OpenLDAP, transferred it to my server, extracted it, ran the ...
0
votes
1answer
27 views
Python eggs are not imported for Apache2 mod_wsgi
I'm setting up Apache2 and mod_wsgi for Django in Debian, but I found problems.
First, these are my directories:
/webapps/lib/python2.6/site-packages # python eggs
/webapps/lib/python2.6/ # python ...
0
votes
1answer
135 views
Django, nginx, FastCGI - running via unix sockets, permission problems
I've configured nginx to run django site via socket:
fastcgi_pass unix:/tmp/django.socket;
now I'm (manually) running
./manage.py runfcgi socket=/tmp/django.socket
http request results in 502 ...
0
votes
3answers
73 views
Where to see logs of a program that crashes on Ubuntu Server?
I have been running a service (a python script using twistd library) as a non-root user that stays in the background. I've been noticing that it crashes at random times and I want to understand why. ...
0
votes
1answer
79 views
centos,django, mod_wsgi & different python installations
I am getting this error
File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
TemplateSyntaxError: Caught ImportError while rendering: No module named ...
0
votes
1answer
48 views
How do I set Django to use Python 2.7 instead of Python 2.4?
I have installed Python 2.7 but still kept Python 2.4. When I enter the command python, it runs python 2.4 and I want to keep it this way. But how to I set Django to use /usr/local/bin/python2.7 when ...
0
votes
2answers
118 views
Installing Python 2.7 broke “yum”
I installed Python 2.7 and pointed /usr/bin/python to /usr/local/bin/python2.7
After installing Python 2.7, I get the following error message every time I use yum
> sudo yum install setuptools
...
1
vote
2answers
97 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 ...
2
votes
1answer
243 views
UWSGI and NGINX for Python Apps on Ubuntu 11.10
I am trying to find an optimal way to set up my server to use NGINX and UWSGI to serve python applications. The following has worked so far:
Initial setup:
sudo apt-get install nginx uwsgi ...
0
votes
1answer
76 views
Uninstall python modules
How to uninstall all python modules that where ocasionally installed. I need this cleanup (as if it is a fresh installation) to start working with virtualenv. Also I want to be sure that there's no ...
0
votes
1answer
87 views
pycurl install looks for a non-existent file (libcurl.a)
I'm running a Gentoo Linux system under which I've never had problems installing anything into my virtualenv using pip. I've managed installing PIL and django, but for some reason, pycurl (a ...
0
votes
1answer
83 views
Change 64bit Registry from 32bit Python
I am having difficulty do understand this. If I'm correct, A 32bit Python can't run a code and change registry values in 64bit. Do I get it right? Or is there a switch to turn on in which enables this ...
1
vote
1answer
105 views
Keeping a Python Script alive after leaving SSH Client?
I have a while loop in my Python Script and its independent script so I can't run it as a daemon.
Also I have tryed using nohup, but I'm having this error:
root@ubuntu:~/Desktop/starthere-group-ok# ...
0
votes
1answer
78 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:
...
1
vote
1answer
70 views
How to run php with SimpleHTTPServer?
I just found this awesome tip in the Apple SE:
Start a quick webserver from any directory:
python -m SimpleHTTPServer 8000
Is there a way to have this parse php scripts, or is this for ...
1
vote
1answer
34 views
Print Out Redirect URL without Actually Redirecting
I have set up a server that is a clone of our production server that we want to use as a test server for testing our redirector. Importantly, we don't want to actually redirect to these urls like we ...
0
votes
0answers
72 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, ...
0
votes
1answer
24 views
Trouble Opening a File As The Apache User
I am having trouble running a python file as the apache user.
When I run this command: sudo -u apache /etc/httpd/conf.d/upsell_by_id.py I get this error:
File "/etc/httpd/conf.d/upsell_by_id.py", ...
9
votes
1answer
316 views
How to undo “yum remove python”
I have a Centos 6 based VPS with an ssh connection. Recently wanting to install python 2.7.2, I bravely ran:
yum remove python
wich apparently removed yum itself being written or depends on python.
...
2
votes
1answer
38 views
I have a Flask app running on Mac that will need to manipulate files on a samba share, how do I ensure that it will always have access?
I'm writing an internal tool for my company that will need to probably always have access to a samba share. How can I always ensure that the drive is mounted at the same address /Volumes/... or have ...
0
votes
1answer
106 views
Segmentation Fault (11) with modwsgi on CentOS 5.7 when running pyramid app
I'm getting Segmentation fault error when trying to access the "Hello World" pyramid app. This
error only occurs when running against CentOS 5.7 setup, but no problem whatsoever when tested
against ...
2
votes
1answer
302 views
Nginx + uWSGI + Django performance stuck on 100rq/s
I have configured Nginx with uWSGI and Django on CentOS 6 x64 (3.06GHz i3 540, 4GB),
which should easily handle 2500 rq/s but when I run ab test ( ab -n 1000 -c 100 ) performance stops at 92 - 100 ...
1
vote
1answer
45 views
How do you implement mod_wsgi on web servers?
All of the documentation I've seen outlines the process for self-managed Apache configuration. I currently have my site hosted through Media Temple. Is it possible to configure WSGI for these types of ...
1
vote
1answer
182 views
nginx: [emerg] unknown directive “http”
When i try to make code like it:
1. http {
2. script
3. server {
4. ...
5. location ...
6. }
7. }
i get error:
nginx: [emerg] unknown directive "http" in ...
1
vote
3answers
129 views
How can I make check_nrpe wait for my remote script to finish executing?
I have a python script that's being used as a plugin for NRPE. This script checks to see if a process if running on a virtual machine by doing an SSH one-liner with a "ps ax | grep process" attached. ...