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

learn more… | top users | synonyms

-1
votes
0answers
13 views

How to ping a port with ip address using python in windows [on hold]

How to ping a specific port with ip-address in python. please provide me an example I am looking for something like this : ping ip address port
1
vote
2answers
59 views

HP BladeSystem c3000 Enclosure : Ilo : Python : get_asset_tag() Not working

I try to connect to a HP Blade Server (HP BladeSystem c3000 Enclosure ) using Python's HP-ILO module. obj=hpilo.Ilo('172.8.2.29', login='Administrator', password='<redacted>', timeout=60, ...
0
votes
1answer
38 views

how to resolve yum replace php-common --replace-with=php55w-common error?

how to resolve yum replace php-common --replace-with=php55w-common error? on CentOS 6.5 root@server [~]# yum replace php-common --replace-with=php55w-common Loaded plugins: fastestmirror, replace, ...
0
votes
0answers
17 views

Run Django on Gunicorn with Python 3.3

How would one go around to run Django on Gunicorn using Python 3.3 on an Ubuntu 12.04 LTS Server? As Ubuntu 12.04 LTS is dependend in Django 2.7, Python 3.3 has to be installed side-by-side with ...
-1
votes
0answers
13 views

New Relic Alternative? [duplicate]

I'm looking for an alternative to New Relic That I could host by myself in Python or with a Free plan as Sentry. I already use Sentry free plan for bugs trace and it is really a must have for our ...
1
vote
0answers
17 views

Python subprocess timeout with time consuming tasks [migrated]

The following code allows running a subprocess with a timeout p = subprocess.Popen([...]) while timeConsumedSoFar < timeoutLimit if proc.poll() is not None: doSomething else: ...
0
votes
0answers
36 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 ...
1
vote
0answers
15 views

Loading python modules through a computing cluster [migrated]

I have an account to a computing cluster that uses Scientific Linux. Of course I only have user access. I'm working with python and I need to run python scripts, so I need to import some python ...
0
votes
1answer
48 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
31 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
38 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 ...
0
votes
0answers
35 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
35 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
43 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
0answers
26 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
58 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
18 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
15 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
36 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
0answers
21 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
14 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
43 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
37 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
54 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
26 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
38 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
22 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
76 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
0answers
32 views

rpmbuild - File not found

I'm trying to build an RPM for Python 2.7.6 on CentOS 6.5, x86_64. The spec file used is slightly modified from that of the spec file in the Python-2.7.6 source. I am running the build like so: $ ...
0
votes
1answer
48 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
24 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
33 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 ...
0
votes
1answer
120 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
1answer
31 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 ...
0
votes
1answer
202 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
18 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 ...
2
votes
1answer
98 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
64 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
15 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
65 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
162 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... ...
0
votes
0answers
10 views

wordpress not serving fine with django [duplicate]

mysite.com/admin/ [ gives django admin panel fine] Error : mysite.com/blog/index.php [ downloads index.php instead of serving it ] Error : mysite/blog gives error from django page not found ...
-6
votes
2answers
61 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
30 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
vote
1answer
94 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
1answer
68 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 ...
0
votes
2answers
250 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
94 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
193 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
83 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 ...