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

learn more… | top users | synonyms

1
vote
0answers
250 views

pysqlite for python 3.3.5 on Centos 6.5

I have compiled python 3.3.5 from source in the /opt folder as follows: yum install sqlite-devel ./configure --prefix=/opt/python3 make make install ln -s /opt/python3/bin/python3 /usr/bin/python3 ...
0
votes
1answer
1k views

Could not find any downloads that satisfy the requirement iso8601>=0.1.9 for DevStack

My machine operating system is Ubuntu 12.04 I tried to implement the all in one openstack solution for development. But ./stack.sh did not succeed. It looks like a package problem for pip. so, I ...
1
vote
1answer
331 views

Uwsgi and flask with unix socket instead of URL

I was trying to find out the difference between a socket as a unix file and a socket that is a ip and port. If I switch something like uwsgi to use a file instead of a port and ip, how do I then ...
0
votes
1answer
195 views

Auto-Tagging EC2 Instances in AWS (Windows Servers only)

I am looking for some guidance from the serverfault community. We are spinning up several new AWS instances (windows server 2008/2012) over the next few days. We have a naming convention in place for ...
3
votes
1answer
290 views

Supervisor cannot correctly stop uwsgi

Supervisor can start uwsgi but after stopping uwsgi, when i try to start it again I get this error: 2014-03-16 08:38:34,249 DEBG 'app' stderr output: ...
0
votes
1answer
85 views

Starting supervisor with init fails

I installed supervisor using pip on my debian 7 installation. I then grabbed this file and moved it here: /etc/init.d/supervisord https://github.com/Supervisor/initscripts/blob/master/debian-norrgard ...
2
votes
1answer
77 views

Serving multiple web-service instances [closed]

We're building an API-based web solution on Python which is going to be delivered to individual customers. Each customer is going to have a separate dataset. Currently, it's not a problem to deploy ...
0
votes
1answer
535 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) ...
0
votes
1answer
280 views

Using uwsgi and gunicorn at the same time or fully switch to gunicorn?

We are running our python app behind nginx. First we used uWSGI, because it is fast, reliable and easy to deploy. Next, as the number of simultaneous clients (using server-sent events/eventstream) ...
0
votes
1answer
21 views

Python code location on debian [closed]

Simple question, which of these is a better directory setup for locating my project and why, as I have seen both recommended on different tutorial sites: Option 1: ...
0
votes
0answers
85 views

Centos Supervisord Python 'invalid literal for int() with base 10: 'process_num'

Im doing the following in supervisord: [program:inf_svr] process_name=inf_svr%(process_num)s directory=/opt/inf_api/ environment=USER=root,PYTHONPATH=/usr/local/bin/ command=python ...
0
votes
1answer
143 views

Supervisord (exit status 1; not expected) centos python

Ran into additional issue with Supervisord. Centos 6.5 supervisor python 2.6 installed with the OS python 2.7 installed in /usr/local/bin supervisord program settings [program:inf_svr] ...
0
votes
1answer
685 views

Uwsgi configuration - No module called site

I am trying to get uwsgi working in combination with nginx for a flask application. This is UWSGI ini file: [uwsgi] socket = 127.0.0.1:8001 processes = 4 module = run:manager virtualenv = ...
0
votes
0answers
32 views

mkfs doesn't work using fabric

I am writing a python script that creating an amazon volume and attach it to an instance using boto. To do so, I need to create a file system using mkfs command. So, I wrote this code: with ...
1
vote
1answer
209 views

Is it possible to schedule a python script to run at the end of logrotate?

I am using Piwik Analytics on a site that doesn't run any javascript and I would prefer to have data created from the access logs instead of from the image tracker - results from the logs are actually ...
0
votes
1answer
134 views

Apache2 mod_rewrite redirect all except one folder [duplicate]

I need to redirect the requests for my old website (www.old.com) to the new domain (www.new.com) but I would like to keep the old content available in a different folder (www.old.com/oldsite). I've ...
0
votes
2answers
543 views

Can't start Gunicorn via Supervisor after server reboot

I have a Django application "djngxgun" that uses Nginx and Gunicorn. I just installed Supervisor so that I can use it to manage my Gunicorn processes. The problem is that Supervisor isn't starting ...
0
votes
1answer
124 views

Supervisord, Flask, Tornado (exit status 1; not expected)

Having some issues getting supervisor to run my tornado apps. I have a REST API built with Flask, using Tornado to try and serve it. Problem I am having is that when I try to run with supervisor it ...
0
votes
1answer
110 views

Securing the Django web site which is run with Apache mod_wsgi

I have made a website in Django 1.6 with PostgreSQL database which is hosted on Ubuntu 12.04.3 with Apache 2.2.22 and I have recently noticed lots of hacking (probing) attempts from various IPs ...
0
votes
1answer
45 views

How do I tell what request a mod_wsgi process is serving?

Occasionally, I get an apache process running at 100% CPU. I've tried letting it run it's course, but I've seen it go more than half an hour without giving up. My running hypothesis is there is an ...
0
votes
1answer
408 views

Apache Processes in top more than MaxClients

We have Apache running with the worker MPM and have MaxClients set to 6, yet when I open up top I can see more than 6 Apache processes running. 13 visible in the screen dump below. Can someone explain ...
0
votes
1answer
203 views

How to pass kwargs from a state file to my custom module?

I'm writing a custom module to create a local mirror on Ubuntu using debmirror. Here's my code: ''' Build a local mirror with debmirror. ''' import logging import os import salt.utils from ...
0
votes
2answers
142 views

Setting up mail delivery to Django on Ubuntu

I have a server running Python 2.7 and Django 1.6. I'd like to allow Django to send and receive emails with as little overhead as possible. I'd prefer not to even have a Mailbox set up for Django. ...
1
vote
0answers
84 views

python urllib2 hangs when invoked by apache

I have a python script that reads a resource using urllib2 like so response = urllib2.urlopen('http://www.google.com') html = response.read() response.close() which works fine when invoked in a ...
1
vote
1answer
550 views

Why does httpd seem to use a different version of python with the same executable?

I am running Apache httpd 2.4.4 on a RedHat 5 machine. I am using Django and running through mod_wsgi. I have Python 2.4.3 installed in /usr/bin and Python 2.7.6 installed in /usr/local/bin and I want ...
0
votes
2answers
122 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 ...
1
vote
1answer
1k views

uWSGI permissions issue

I'm trying to set up a chef recipe that will get my site running and everything seems to be working fine except for uWSGI which is giving me the following error: *** has_emperor mode detected (fd: 6) ...
0
votes
0answers
93 views

nginx and gunicorn configuration test using ab-BenchMark

I am using c1.medium (2 cores, 2gb) with nginx web server and gunicorn app server.I am running this with 5(2*cores+1) gunicorn workers. how can i improve my server performance??? Here is my nginx ...
3
votes
1answer
488 views

Deploying CherryPy apps: Standalone, WSGI Server or NGinx?

I intend to use a single VPS to deploy multiple low-traffic CherryPy apps as subdirectories; eg: example.com/app1, example.com/app2, etc. After researching on WSGI deployment, it looks like the ...
1
vote
0answers
139 views

Example pyodbc db2 connection

I am trying to get a pyodbc connection (on a Centos machine), to a DB2 database running on an IBM i. Whatever connection string or configuration I add, I always get the same message .. Traceback ...
0
votes
0answers
35 views

How to secure django powered site on IIS 8.0

I have setup a django site using Helicon Zoo with IIS 8.0 on Windows Server 2012. My site includes the /admin, and I want secure only the admin with HTTPS. I have been searching on the Web for a ...
0
votes
1answer
839 views

nginx + uwsgi - what is serving static files?

I am using nginx as a proxy to a couple of flask apps, with uwsgi as the middleware. Here's my nginx config for a test app. server { listen 80; server_name test.myapp.com ...
1
vote
2answers
618 views

cannot reinstall python2.6

I am trying to reinstall python2.6 on debian 6 but I get: root@ff: apt-get install --reinstall python2.6 Reading package lists... Done Building dependency tree Reading state information... ...
-6
votes
2answers
159 views

How to get public/private key from cacert.pem [closed]

i has download cacert.pem from internet, but how to get cacert.key ? How to get public/private key from cacert.pem ?
-1
votes
1answer
52 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 ...
3
votes
1answer
698 views

Serving django with nginx and uWSGI

I followed this post to serve my django project. The project runs well with manage.py runserver and I want to set it up for production. Here are my setting files: nginx.conf: upstream django { ...
0
votes
3answers
505 views

fail2ban error about python?

I have just installed fail2ban on my debian7 machine but whenever i start it i get a lot of error which seems to be about python? [....] Restarting authentication failure monitor: fail2banTraceback ...
2
votes
2answers
1k views

How do I authenticate a user on specific tasks using Ansible?

I'm getting 'msg: Failed to lock apt for exclusive operation' when trying to install some dependencies in a playbook using apt, with the vagrant user. I'm suspecting it tells me this because it can't ...
0
votes
2answers
1k views

fabric how to define complex env.hosts

i am working on Fabric for my deploying tools and also distribute the command on multiple hosts. but i don't know how can define a complex hosts in my fabfile.py for example: i have 4 servers. ...
0
votes
1answer
1k views

Python script to send mail through Amazon SES

I'm setting up Splunk to send e-mails through Amazon SES. But before doing this, I found a Python script (Splunk uses Python to send the mails) that I wanted to test which is not working on my Linux ...
0
votes
1answer
257 views

PAM exec stdout issue

I am having an issue with a dead simple python script; called with pam_exec. I added a line at the end of that file /etc/pam.d/common-session : session optional pam_exec.so /bin/python ...
2
votes
1answer
566 views

Running multiple Django projects within Apache, sys.path being over written

I have been trying to research how to do a multiple Python / Django deployment using Apache VirtualHosts. The issue I am encountering seems straight forward, ImportError: Could not import settings ...
3
votes
1answer
38 views

Being notified when Python security updates are made

I maintain a few Python-based web apps. I need to be notified immediately when new Python releases are made, especially micro level releases that fix security issues, so I could update my sites to use ...
0
votes
1answer
109 views

WMS Service Tilecache Python 403 error

I´m trying to migrate a Webserver + Mapserver to a new Ubuntu 12.04 machine. Everythings (apache2, mapserver 6.2.1 ) working so far, except a tilecached wms service (tilecache 2.11-2 is installed) ...
0
votes
2answers
665 views

How to kill the process using the name of the program instead of PID?

I started my Python program in the background using nohup as mentioned below - nohup zook.py & Now I am trying to kill this process so I did the ps command as mentioned below ...
1
vote
1answer
369 views

Django WSGI application in a subdirectory?

Recently, I wanted to put one of my WSGI applications into a subdirectory, so that the other directories that cointain various scripts would work as before. In order to do that, I added the following ...
0
votes
1answer
248 views

Puppet Init VirtualEnv Just Once

So here's a snippet from my manifest (based on this module: https://github.com/stankevich/puppet-python): python::virtualenv { $virtualenv_dir: ensure => present, version => 'system', ...
0
votes
2answers
730 views

how to test as local SYSTEM account? (accessing remote files from Python)

I'm trying to access some remote files from a web application server. Let's call them servers M and R. Both are running Windows Server (2008 and 2003). The remote files are on server R on a file ...
3
votes
2answers
2k views

Should I install Ansible with python pip or homebrew on Mac OSX Mavericks? [closed]

I recently moved to using OSX to administrate my linux box, so I'm very new to using linux programs on OSX. I want to use Vagrant with Ansible to bootstrap my development environment, so I need to ...
1
vote
1answer
261 views

Trying to run gunicorn from supervisor gives error - error: class uri 'simple' invalid or not found

I am already running successfully 2 django projects (in same virtualenv with python 2.7) with Django + gunicorn + virtualenv + Supervisord environment. But now i am trying to run another project in ...