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

learn more… | top users | synonyms

-1
votes
0answers
9 views

Access denied to a website using tor [on hold]

I am trying to make a bot that requests a url through tor. I have configured tor. Below is the python code. import pycurl curl = pycurl.Curl() curl.setopt(pycurl.URL, URL) curl.setopt(pycurl.PROXY, ...
0
votes
0answers
9 views

openshift online: issues with single cartridge for nodejs and python3

I'm trying to setup a single cartridge for nodejs and python3 because i need to execute a python3 script from nodejs and by default, a nodejs cart doesn't support python3, neither do I have root ...
1
vote
0answers
43 views

Can't connect to (or write to) a socket file, despite being owner?

I am working on Debian Jessie with Django 1.8, trying to set up Gunicorn to run my Django site. I have made a user called opuser, and made this user the owner of the gunicorn.sock file and of the ...
-2
votes
0answers
28 views

Python Syntax Incorrect [migrated]

I am a novice with Python. I am trying to output a first initial last name for an email address. Such as: John Doe jdoe@domain.com I am using the following Python: primary_mail = ...
1
vote
1answer
27 views

yum or apt-get does not work on amazon-aws

when I do yum, it says bash: /usr/bin/yum: /usr/bin/python2.62.7: bad interpreter: No such file or directory my aws instance details are as given below: Linux ip-72-311-15-127 ...
0
votes
1answer
14 views

Cron: Execute python script, capture stdout & stderr and send via msmtp [duplicate]

I try this for almost 4 hours now, in different ways. I googled a lot, but nothing I try work as expected. I have a simple .msmtprpc file, that allows me to send mails like this: echo -e "Subject: ...
-2
votes
0answers
10 views

How to create sub domains in django and redirect each sub domain to some vanity domain like abc.mydomain.com--> www.yourdomain.com? [on hold]

I am trying to create a multi tenant site using django.So the basic idea is when ever a user fills all the details I want to redirect the user from mydomai.com/xyz to user.mydomain.com and if the user ...
1
vote
0answers
31 views

Flask faster requests/sec with nginx and uwsgi [closed]

I'm trying to deploy a flask app with uwsgi and nginx. I use ab and I get the following results: ab -n 10000 -c 100 http://127.0.0.1:5000/ Document Path: / Document Length: 65694 ...
3
votes
1answer
26 views

What's the difference between running Python web applications in normal way and running them under wsgi?

I know that in order to run a Python web application(an application developed with frameworks such as Flask & Django) on the server, you need to deploy it using things such as uwsgi, wsgi.. ...
0
votes
1answer
45 views

root location of Flask app returns 403 on nginx server

I've seen other posts say that either file permissions or the lack of an index directive are the cause. However, my Flask application does not have an index file at all, and most of the site works ...
1
vote
0answers
11 views

Call to pythons os.getcwd returning odd results on Lustre filesystem

I don't really know if this question should be on Server Fault or Stack Oveflow, but I thought I'd try here first. I have a python application that makes quite a lot of calls to os file system calls ...
-1
votes
1answer
31 views

Missing “app engine service account” in developers console

I'm currently in the proces of updating an old appengine application to use the new cloudstorage based files API (python). This also means setting up cloudstorage for this application. I've done ...
1
vote
0answers
24 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 ...
1
vote
0answers
71 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
21 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 ...
-1
votes
0answers
22 views

ubuntu 15.04 python module telnetlib [migrated]

I need some help with my new Ubuntu 15.04 VM. I tryied to install the pip module telnetlib3 but I got some errors: pip install telnetlib3 Downloading/unpacking telnetlib3 Downloading ...
0
votes
0answers
79 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
39 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
17 views

Why does python 3 script not execute via crontab? [duplicate]

There's one little problem with my crontab and python 3 script. Currently I'm on VDS with Ubuntu 14.04 installed. There're 2 scripts that need to be executed via crontab in desired time. The first ...
0
votes
0answers
32 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
2answers
32 views

The best approach to deploying a python solution to AWS

I have a Python solution that is deployed to AWS, my current deployment approach feels very archaic. I follow these steps each time I update the service: tar the python files that have changed scp ...
-3
votes
1answer
39 views

Run Python and Php under same server

I am trying to run python on main domain and a wordpress blog in sub-directory. Is it possible to do so? Currently the they are running good in sub-domains i.e http://main-domain.com and ...
1
vote
0answers
22 views

How can I install libmemcached on Openshift with sasl support?

I need libmemcached with sasl support to use Memcached Cloud cartridge on Openshift Online. I doing next: 1) Install sasl. curl -LO ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz tar ...
0
votes
0answers
25 views

What kind of RAM to choose for data analysis? [closed]

I'm planning to upgrade my computer and also want to buy some new DDR3 RAM modules. Making some research I realized that there are 2 main characteristics of RAMs (beside capacity): frequency and ...
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
26 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
14 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
237 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 ...
2
votes
1answer
123 views

Are Elastic Beanstalk's environment variables an appropriate place to store secret values?

I have deployed my Django application to Elastic Beanstalk with the intention of using its environment variable configuration interface to store my API keys instead of storing them in my source (as ...
0
votes
1answer
33 views

Send user level messages to syslog

I currently have syslog.conf like so to send INFO logs to /var/log/messages *.info;mail.none;authpriv.none; /var/log/messages; I have an application that uses python libraries LOG_USER facility to ...
0
votes
1answer
69 views

collectd won't recognize my python plugin

I am trying to load a super simple plugin I found online as a starting point, and collectd doesn't seem to recognize my python plugin. My conf file has the appropriate lines: <LoadPlugin ...
-2
votes
1answer
66 views

How to find out reason of python script stop working in background?

I've bought a VDS server some days ago just to have some Telegram Bots working 24/7. I can't keep shell always open, so I've decided to use this "hack": 1. In Python script add #!/usr/bin/python3.4 ...
0
votes
0answers
157 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
26 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 ...
1
vote
0answers
57 views

Amazon EC2 gives internal server error when posting via Python

I have a problem with python API and MY ec2 instance. When I am trying to post a json I am getting an error like 500 INTERNAL SERVER ERROR {"error_message": "Sorry, this request could not be ...
0
votes
0answers
38 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 ...
1
vote
0answers
41 views

Nginx - How to authorize access to repositories using python script

I have set up a local Git server using Nginx ( in Ubuntu ) ,Now I want to authorize users using external python script , which should authorize them against predefined database . AFAIK, I have to ...
1
vote
1answer
72 views

Seafile “ImportError: No module named Image” After upgrade 3.0 -> 4.2

I recently upgraded our seafile server from 3.0.4 to 4.2.3. All the upgrade scripts went fine. It's running on CentOS 6.6. But now when I try to start seahub after the upgrade like seahub.sh ...
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
62 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
183 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 = ...
1
vote
1answer
43 views

rabbitmq server does not receive messages from a python client

I am trying to publish a message to rabbitmq. this works in production environment env with the same code so I suspect this is a configuration issue. rbqueue = RabbitMQClientQueue('cn-dip-v3', host = ...
0
votes
0answers
71 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 ...
2
votes
1answer
80 views

How to establish new connection through proxy using Squid in Python script? [closed]

I am new to networking and proxy. For a project I need to give a proxy connection. I already have a connection and I want change the connection behavior of the process to connect through that proxy. ...
1
vote
1answer
115 views

vCSA command line installer fails to deploy with the error “Failed to login to host… is not a VIM server”

I'm using the vcsa-cli-installer utility under Linux (CentOS 6) to deploy VCSA 6.0 (vCenter Server Appliance). It is failing with the following: # ./vcsa-deploy -v ~/full_conf.json Start vCSA ...
0
votes
0answers
102 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
63 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
1answer
61 views

Redirect to Python script in .htaccess while maintaining request URL

I have a website configured with Apache for http://www.example.com located in /var/www/example.com/. For an arbitrary sub-path of this website I would like to have all requests handled by a Python ...