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

learn more… | top users | synonyms

1
vote
1answer
683 views

rsyslog to external script

Using CentOS I have rsyslog configured to send data to a python script via a shell execute action(^). I have python 2.7 installed, but when my script is called, the shell environment is referencing ...
0
votes
1answer
23 views

Saltstack iterate through second level pillar data

I might be missing something or this might just be the wrong way to layout pillar data. I want to iterate through the second level of pillar data. Pillar example: repo: Option1: ...
0
votes
1answer
11 views

Using python in FreeRADIUS

There seems to be documentation lacking on how to use the python module in FreeRADIUS. I want to use python to interpret a MAC address (in %{Calling-Station-ID}) and return an IP address. In my ...
0
votes
0answers
17 views

Apache single sign on redirecting to success login page, Django application

All I have a Django web application with relative paths url. For instance, I have www.example.com/inventory/get_item/?item_id=5 In the apache configuration I am using oracle single sign on to ...
6
votes
1answer
60 views

Processes hanging indefinitely when calling read(2)

I have several Debian (Wheezy, x86_64) servers all exhibiting the following behavior: All of the servers have a set of cron jobs that, among other things, pull data from S3. These usually run fine, ...
0
votes
1answer
668 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 ...
-4
votes
3answers
2k views

Reinstalling python on CentOS to be able to use yum

Yesterday I accidentally removed the python package using "yum remove" on a CentOS server. After then I realized yum was dependant on python and I could no longer use yum. I think I need to reinstall ...
-3
votes
0answers
10 views

nohup: failed to run command ‘redis-server’: No such file or directory [on hold]

When i run this command nohup redis-server & command I'm getting this error nohup: failed to run command ‘redis-server’: No such file or directory Can anyone help me out. I have installed ...
0
votes
1answer
681 views

gunicorn working vs uwsgi timeout

I've setup my Python / Django app on a vmware machine with CentOS, uwsgi and gunicorn along with all my apps dependencies. After running my app with gunicorn with the following command: gunicorn ...
0
votes
0answers
7 views

Python on IIS 7.5 - resource implications

I have a task which python is a perfect fit for : periodically (every 5min or so) manipulating a series of small, utf8 text files (20-30 files, sized between 100kb and 500kb but strictly never ...
1
vote
3answers
866 views

How to connect remote windows machine from linux terminal?

I want to execute windows command on remote windows machine from linux terminal.
0
votes
1answer
967 views

Error while installing with Python “pip”: Cannot fetch index base URL http://

I am trying to install a local version of ScrumDo for testing. Only then I come to the point in my installation that I have to run: source bin/activate pip install -r requirements.txt I get ...
-1
votes
0answers
14 views

I have been trying to run this program on a loop but [closed]

I have been trying to run this program on a loop and it runs except no output makes it into the file associated with the program. I know it is something minor, but I can't see it. It works perfectly ...
1
vote
2answers
689 views

mysql-python with MySQL 5.6

I am having problems installing the mysql-python module in my server (CentOS 6.4 x86_64) with MySQL 5.6 installed and Python 2.6.6. [python@localhost ~]$ rpm -qa | grep SQL ...
0
votes
1answer
34 views

Is it possible to run apache as root, to execute scripts [duplicate]

I am unable to execute commands (shell_exec) with php, and read on stackoverflow / here that the solution was to run apache as root. Is this possible / is this a totally wrong solution? When I try to ...
0
votes
0answers
12 views

pam_exec not working for auth?

Here's my PAM configuration file: #%PAM-1.0 auth requisite pam_exec.so seteuid /srv/auth/pam_auth_user.py Here's /srv/auth/pam_auth_user.py (I've run chmod +x and chown root:root on it): ...
-3
votes
1answer
60 views

Bjoern is 4x faster than Nginx - how to tweak Nginx to handle Bjoern proxy_requests without performance loss? [closed]

I was trying to put Bjoern behind Nginx for easy load-balancing and DoS/DDoS attack mitigation. To my dismay I not only discovered that it drops connections like chips (it varies between 20% and 50% ...
-1
votes
0answers
10 views

Python script can't open zmq-module [migrated]

I've a problem with a python-script. In a script, i have: import zmq from datetime import datetime import pytz import bottle import logging from bottle import response But, when i run ...
0
votes
1answer
672 views

Redirect all DNS queries to IP

I have a server with Ubuntu 12.04 Operating System on it.I want to make a DNS Server that accept all request including IPs,and redirect them to an specified IP......there users can login and after ...
0
votes
1answer
2k views

How to install pip/easy_install on debian 6 for python3.2

I'm trying to install pip or setup tools form python 3.2 in debian 6. First case: apt-get install python3-pip...OK python3 easy_install.py webob Searching for webob Reading ...
0
votes
0answers
31 views

pip install seems to be ignoring dependency links

I have a Python application that depends on several packages. One of those packages, unfortunately, isn't in PyPi so I have to install it directly from the git repo. I've been trying to add it into ...
0
votes
0answers
10 views

Avoid duplicate python package installs on system when using virtualenv

Is it possible to setup virtualenv so that certain packages are treated as if they are local in the virtual environment but are instead installed globally? I'm thinking particularly for packages which ...
0
votes
0answers
28 views

rhel 6.4 pip with proxy error : name or service not known

the pip command pip search statsd --proxy=http://anadi.misra:XXXXXXXXX@192.168.200.77:8080 Now my password contains an @ too so I give the encoded form in password; i.e. some@pass is supplied as ...
0
votes
2answers
57 views

Setting UWSGI to run a module in a venv

I am having a hard time trying to run a module from UWSGI. This is part of my deployment code: # ENVIRONMENT /usr/bin/pip install virtualenv mkdir -p /srv/www/test /usr/local/bin/virtualenv ...
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 ...
1
vote
1answer
669 views

How to install mod_wsgi 3.1 on Ubuntu 9.10

I have a Python 3 web app so mod_wsgi < 3.1 doesn't cut it for me. However, on my Ubuntu 9.10 installation there doesn't seem to be a package for mod_wsgi 3.1. Is there an alternative repository ...
1
vote
1answer
863 views

How is it possible for mod_wsgi to be compiled against Python 2.7.3 but use the 2.7.2 runtime?

The following is what appears in my error_log: [Sat Nov 17 23:13:14 2012] [warn] mod_wsgi: Compiled for Python/2.7.3. [Sat Nov 17 23:13:14 2012] [warn] mod_wsgi: Runtime using Python/2.7.2. If I ...
0
votes
1answer
82 views

why does my use of the saltstack apache-formula fail to set the 'id' variable

why does my use of the saltstack apache-formula fail to set the 'id' variable ? my code is as fallows ? apache: sites: changed.com: template_file: ...
1
vote
3answers
127 views

How do I find installed packages which depend on Python on a CentOS machine?

Is there a command to find out such information on a CentOS machine?
0
votes
3answers
843 views

Getting a list of patches in an HPSA patch policy

I'm trying to get a list of patches contained in a Patch Policy in HPSA -- I can get what I need via the Twister web interface (under PatchPolicy.getPatches(), give it an ID, and it happily returns a ...
0
votes
2answers
82 views

Connecting to SQL Server from Python Django

I have a Django site running on a Linux based server. My partner has SQL Server running on a IIS Windows server behind a Cisco router. We are looking for a secure way for the Django site to connect to ...
2
votes
1answer
2k 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
2answers
2k views

python mysqldb - mysql server gone away - can't reconnect

When attempting to import a bunch of data into mysql tables using python and mysqldb, I run into the following error '2006 - mySQL Server has gone away', and then I am unable to reconnect again within ...
2
votes
1answer
651 views

IIS FTP 7.5 Data Channel Problem (SSL)

Hey there I wonder if anyone can get me in the right direction. I am setting up both a FTPS Client and Server, FTPS Server using Microsoft’s iis FTP 7.5. On the client side it will be running on ...
1
vote
2answers
854 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 ...
3
votes
4answers
4k views

Python IDLE just doesn't start up

I'm using Windows 7, Python 2.7.2. Before the problem occured, I've been writing code in IDLE(Python GUI) for 30 min and everything's fine. Then I went into "IDLE configuration" and changed the ...
1
vote
1answer
809 views

How can I install Zope on Ubuntu 10.04 with Python 2.6.5?

I tried to install Zope on Ubuntu server 10.04: mnk@srv:~/zope-plone/Zope-3.4.0$ ./configure --prefix=/opt/zope-3.4.0 Configuring Zope installation Testing for an acceptable Python interpreter... ...
0
votes
1answer
21 views

Apache and mod_wsgi, worker process stuck to W state, request never dies. How to diagnose?

I am running Apache 2.2 with mod_wsgi, Python 2.7 and mpm_worker. Occassionally, one of the worker processes gets stuck and all of it threads stop in writing state (as demostrated in the screenshot ...
-2
votes
1answer
52 views

What linux configurations can cause executables to hang when making HTTP/HTTPS requests? [closed]

I have a Python application that uses urllib2 to query Facebook graph for certain user information. The solution is deployed on Ubuntu server. On my development machine the response time is what you ...
0
votes
1answer
1k views

Ubuntu 13.04 errors with Python PIP install

After trying to use Ubuntu 13.04 instead of Ubuntu 12.10 to run my Chef recepis against I am getting an error when it tries to run sudo pip install cElementTree supervisor STDOUT: ...
1
vote
0answers
40 views

Failed to emerge python 2.7

I'm trying to emerge python 2.7 on my gentoo server, somehow it's not installed any more. eselect python list Available Python interpreters: [1] python3.3 * If I try to emerge it like emerge -a ...
0
votes
1answer
152 views

python-ldap add member to Active Directory group

I am trying to add member to Active Directory group with script using python-ldap module. Here are my attempt so far: import ldap from ldap import modlist as modlist l = ldap.initialize(server) ...
1
vote
1answer
54 views

uWSGI and Python on Arch Linux, encoding failure

I am running an Arch Linux box and have setup a Python 3.4 virtualenv. I have a uwsgi vassal being run by the emperor, which specifies the following ini: (some snipped for brevity) [uwsgi] ...
1
vote
1answer
48 views

How to Access Apache Virtual Host from Cell Phone?

I'm developing a mobile web application using Django. Currently I can start the Django development server like this: python ./manage.py runserver <my-ip>:8000 When I do that, I'll get a ...
0
votes
1answer
40 views

Error starting mod_wsgi

When I run the start-server command on mod_wsgi-experess, I get this output: Server URL : http://localhost:8000/ Server Root : /tmp/mod_wsgi-localhost:8000:0 Server Conf : ...
2
votes
3answers
182 views

CentOS (rel6) with default python 2.6, but seperate 3.3.5 installation

I have a CentOS server (rel6) that had python installed (2.6), but I needed a few features in 3.3+. I installed 3.3 into a seperate folder and made a symbolic link to execute it: I installed setup ...
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 ...
2
votes
3answers
2k views

Unable to install python2.7-dev due to unmet dependencies Ubuntu 12.04

Having exactly the same problem described on this page: http://qnundrum.com/answer.php?q=431114 Below is directly quoted from that page: I am unable to install python-dev becasue of unmet ...
0
votes
3answers
55 views

bash rsync script in python works odd [closed]

I have this problem with bash in python. I want to make script that will make folder based on system date - and this works just fine. The problem is when I want to rsync two directories one with my ...
0
votes
1answer
227 views

cgi and python script files are downloading from server instead of executing there

I kept some cgi,python files under /var/www/cgi-bin and trying to execute I followed all the steps in: http://webpython.codepoint.net/cgi_tutorial Still i am not able to execute. when i enter ...