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

learn more… | top users | synonyms

0
votes
0answers
17 views

How to efficiently re-order packets in PCAP files based on timestamp?

I have a PCAP file which contains many packets. They are however out of order based on the timestamp (it is actually randomized). What is the best way to efficiently sort the PCAP packets based on ...
0
votes
0answers
45 views

uwsgi and “No module named django.core.wsgi”

On a fairly vanilla FreeBSD system without virtualenv, I'm having trouble getting uwsgi to work with Django. Attempting to run generates this error: Traceback (most recent call last): File ...
0
votes
0answers
17 views

Trying to get metircs from collectd with python plugin

I am trying to write a python plugin for collectd that will grab selected metrics and send them as json somewhere else. I have seen a few similar projects such the librato plugin here. However when ...
0
votes
0answers
67 views

Docker on freebsd11

I am trying to build a python application on freebsd11 and docker i have installed docker as per https://wiki.freebsd.org/Docker and all seems to work fine. my Dockerfile is like FROM python:2-slim ...
0
votes
0answers
9 views

Uwsgi Fallback Strategies

I'm giving some thought to application redundancy, and I was wondering what the best-practices are for improved reliability using uwsgi fallback features. Specifically, I had two thoughts: 1) We ...
0
votes
0answers
34 views

pyffmpeg installation on Ubuntu fails with Cython related errors

I'm failing in pyffmpeg installation on Ubuntu. Cython installation seems to be correct: $ sudo python setup.py install ... Adding Cython 0.22.1 to easy-install.pth file Installing cython script to ...
0
votes
0answers
28 views

Uwsgi “Permission denied” after “Gracefully killing worker”

I run python environment with uwsgi on old centos 6.6 (it necessary for customer). But often i get error 502. log of uwsgi with error: 1) Request to /show/12763 took 0.474370002747 seconds Request ...
0
votes
0answers
18 views

How to configure NGINX to servce Python file and also Django file?

I have the following NGINX configuration: server { listen 8888; root /var/www; index index.html index.htm; location / { try_files $uri $uri/ /index.html; } } ...
0
votes
0answers
24 views

RHEL 6.6 pip after python upgrade “ImportError: /usr/local/lib/python2.7/lib-dynload/array.so: undefined symbol: PyUnicodeUCS2_FromUnicode”

I originally have python 2.6 and installed 2.7 and want to use pip to install some libraries like futures (with an s :)). Unfortunately, it seems like pip's libraries has been messed up. When type pip ...
0
votes
0answers
12 views

ip command vs qdisc discrepancy in dropped packets

I am simulating packet loss via mininet network on Ubuntu 14.04. Why are there no dropped packets showing up in ip command? For switch s3, I have Qdisc (sudo tc -s qdisc show): qdisc htb 5: dev ...
0
votes
0answers
185 views

Python3 virtualenv: ImportError: no module named 'ConfigParser'

I'm working on OSX and I'm trying to create a virtualenv with Python3, but I'm getting an error: $ virtualenv --python python3 env Running virtualenv with interpreter ...
0
votes
0answers
132 views

Internal Server Error with Nginx and uWSGI

I'm trying to host an app using Nginx on Linode.com but I'm stuck early on uWSGI config. I've used "Getting Started" guide and "WSGI using uWSGI and nginx on Ubuntu 12.04 (Precise Pangolin)" guide ...
0
votes
0answers
25 views

Correct tmux disconnect

I have got ubuntu server 12.04 for android application. Application server(python, postgresql) started via tmux. After closing tmux terminal(or "tmux detach") on my computer, application server is ...
0
votes
0answers
30 views

nginx auth_request configuration

I'm running nginx and I wanna configure it to authenticate via a python script that will look up in my database. I need to receive the password and username in my python script but I can't figure out ...
0
votes
0answers
32 views

IIS-8 - Python CGI needs to access a library outside of the web directory structure

I've got a python script that calls a dll in a directory off of C:\ (ctypes module). When I access the script, the errror I get back is in <module> mydll = ...
0
votes
0answers
59 views

how to generate a list of currently active proxies in python

I have a python script where I get connected to some sites through proxy if direct connection fails. What I want to do is get a list of currently active proxies and I cant figure out how to do so
0
votes
0answers
171 views

General SOCKS server failure while using tor proxy

I am proxying traffic over tor, so letter on when I need to call localhost port, it gives failure error. def create_connection(self, address, timeout=None, source_address=None): sock = ...
0
votes
0answers
65 views

Windows - Flask app deploy on IIS 7 - IOError

For internal needs, I have to deploy a Flask application on IIS7 (Windows Server 2008 R2 Standard), following a resource that I found on the web: http://netdot.co/2015/03/09/flask-on-iis/ the ...
0
votes
0answers
97 views

MySQL connection hanging intermittently

I'm having an intermittent bug where, on some queries, a MySQL database I'm using never responds to my queries. I am running a MySQL server and querying it through the python mysql connector module. I ...
0
votes
0answers
54 views

How do I create an SQLAlchemy class with two foreign keys (to different tables)?

Contrived example: class Person(Base): __tablename__ = 'person' id = Column(Integer, primary_key=True) name = Column(Unicode) class Location(Base): __tablename__ = 'address' id = ...
0
votes
0answers
21 views

Python/CGI on IIS - find user ID

I have a very basic Python/CGI based front end hosted on an IIS server. I'm trying to find the users within my shop that have accessed this site. All users on the network sign on with their LAN ...
0
votes
0answers
62 views

How use namespaces and fabric

I am using python and fabric, I have a hypervisor (KVM) defined as follows: env.hypervisor_address = 'hypervisor' # 192.168.0.250 From one VM (in the hypervisor) I want to SSH to other VMs with ...
0
votes
0answers
70 views

Celery worker timeouts

I'm trying to run a celery worker with each task having a timeout of 30 seconds. However whenever I run celery with the --time-limit option, it simply quits. This is the command I use. python ...
0
votes
0answers
65 views

RADIUS server does not call a custom script

I do have a RADIUS server which called a custom script for authentication in the past. In the /etc/freeradius/sites-enabled/default, I modified the following lines to archieve this: authorize{ ...
0
votes
0answers
199 views

Django / uWSGI - Nginx giving 502 status code: error.log says “Permission Denied”

I'm trying to setup my Django app to use uWSGI and Nginx. I'm following this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html I'm on the "Using Unix sockets ...
0
votes
0answers
432 views

Error installing Python packages on an AWS Ubuntu server

I am trying to install the Ansible control server on Ubuntu 14.x (an AWS instance). When trying to install the dependencies, I saw an error. I'm not sure what I need to do. Is this an ignorable ...
0
votes
0answers
111 views

How do I re-compile python?

I am attempting to install pip on RHEL. When I run: [root@somewhere ~]# python get-pip.py Traceback (most recent call last): File "get-pip.py", line 20204, in <module> main() File ...
0
votes
0answers
40 views

openshift gear borks and restarts

I have a Django application on Redhat OpenShift that uses a postgresql database. I use the free plan with 1 small gear using: Python 2.7 PostgreSQL 9.2 For a certain command I get thrown out from ...
0
votes
0answers
255 views

python django venv ImportError: No module named site

I have tried to deploy a django application using apache webserver. I have enabled wsgi_module in apache. Now i have created a virtual environment and installed django in it. Also installed required ...
0
votes
0answers
43 views

Rights issue, extracting a zip archive

I'm in need for some expertise. I've been tinkering a few days at this with fruitless results. I'm trying to write an update script starting out in PHP. PHP will download a zip archive via FTP ...
0
votes
0answers
115 views

PySphere ESXi 5.0 Python VM Provision

I found this tutorial on creating a vm with Python. http://jensd.be/?p=370 I'm stuck on the bit about "esx_host" I tried the IP of the ESXi server and 127.0.0.1 and the script errors saying it ...
0
votes
0answers
84 views

Running python to unlock luks full disk encryption

I wish to make use of full disk encryption using Luks on ubuntu 14.04. However, i wish to make use of my own python script to carry out the functionality of generating the decryption key during device ...
0
votes
0answers
280 views

HAProxy tcp load balancing with an https check fails

I'm trying to load balance a posgres tcp connection, with a node check done via a python script residing on an https connection. conf file looks like so: global log 127.0.0.1 local2 ...
0
votes
0answers
203 views

Running Python and PHP on the same server

I've got Django, Gunicorn, and Nginx set up and working nicely together. I'm only going to have a few pages on this Django website, so I'm trying to I'm trying to set up the server such that files ...
0
votes
0answers
21 views

Can I distribute my python objects without having admin rights?

Playing at home, I learned to build my objects in python and use them in VBA with pythoncom tools. Now I want to do the same at work so colleagues (in the intranet) can load and use the same objects. ...
0
votes
0answers
110 views

cx_Oracle suddenly slow to connect

Have a test machine set up with oracle 11g installed: I'm trying to connect with python and cx_Oracle. Yesterday, my code worked perfectly: import cx_Oracle print "connecting..." with ...
0
votes
0answers
25 views

Python in the debian-installer context

My broader question is about using Ansible to perform the late_command in a preseeded Debian/Ubuntu install. The specific question is, is there some straightforward or documented way to get a working ...
0
votes
0answers
97 views

Cannot add dynos on Heroku app after seemingly successful app push

I recently launched an app on Heroku using git push heroku master and got a couple of errors: remote: raise ValueError("Missing distribution spec", line) remote: ValueError: ...
0
votes
0answers
92 views

Python logger stops logging

On an application server (CentOs 6.4), python's native logger will stop writing to a log file after about 48 hours of continuous operation. This started occurring when we added fluentd (td-agent) to ...
0
votes
0answers
247 views

Python libraries slow to load from NFS mount point

Several of our computers are diskless, and they load their Python libraries from an NFS mount point across the network. This means it can take up to three minutes to start up a Python process that ...
0
votes
0answers
71 views

UnicodeDecodeError starting Radicale server during boot process

I set up the Radicale CalDAV server on Debian Wheezy (raspbian). I can launch it manually as expected. However, when I try to start it during boot process it fails with the following error: ...
0
votes
0answers
99 views

Download log files from a server with Fabric

I'm using Fabric to download some log files from a server. So far so good, i'm having problems with the following scenario: env.roledefs = { 'dev': ['192.168.0.5'], 'hml': ['192.168.0.5'], ...
0
votes
0answers
53 views

Elasticsearch service automatilly terminates

When i try to start the elasticsearch service, it starts normally (no error messages). But terminates immidiately. There is no log in the /var/log/elasticsearch directory.I'm using elasticsearch ...
0
votes
0answers
223 views

Mount NFS share and symlink it to a directory using non-Administrator account

I'm on Windows 8.1 Enterprise and what I'm trying to do is to have a python script that will: Mount an NFS share for the current user Create a symlink in the current working directory to a drive ...
0
votes
0answers
262 views

Nginx returning 500 Error instead of 400 Error

On validating user input into my api, I want to return 400 http status codes for bad requests. It works fine from flask and when running my api through gunicorn, but they always come out of nginx ...
0
votes
0answers
93 views

VMware Creating Windows Images through commandline

I have a ESX server and I'm using Vsphere client to connect to ESX, I have to create more than 100 of windows images, which would be a combination of Windows XP,Windows Server 2003, Windows 7 etc. ...
0
votes
0answers
464 views

Serving static files through apache

I am new to the whole mod_wsgi and serving files through apache. I am really comfortable with flask but this is something i can't get my head around. I did the hello-world program and successfully ...
0
votes
0answers
45 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
0answers
93 views

Is there any way to 'describe-instances' for another AWS account from awscli?

I've added a role to allow another account to list instances, but there doesn't appear to be any option to choose which account I'm listing instances from. Is there some undocumented option to pass in ...
0
votes
0answers
300 views

problems while installing python-mysql package

I've got an Ubuntu 12.04 x64 Server edition VM that I'm running python2.7 on and trying to install the MySQLdb package via the command (I've already got easy_install installed and working): $ sudo ...