Tagged Questions

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

learn more… | top users | synonyms

2
votes
5answers
296 views

How to start process as a daemon?

I have created a service which consists of a web fronted (nginx), python runner glue handler (uwsgi) and my own python code (fetcher). I have made a script (deploy.sh) to start the difference ...
0
votes
2answers
101 views

How to choose a web server for a Python application? [closed]

Information and prerequisites: I have a project which is, at its core, a basic CRUD application. It doesn't have long running background processes which it forks at the beginning and talks to later ...
1
vote
1answer
301 views

Sending email with Python/Django through Microsoft Exchange (IMAP)

I have a Django web application which sends email through a standard SMTP, but I want it to use a mailbox from the corporate Exchange server. I would like the emails sent from the application to be ...
-1
votes
1answer
1k views

Permission denied error while creating files from a python script using mod_wsgi on apache

I'm running a python script under mod_wsgi on apache. The script attempts to create some files under a directory. The path of that directory is defined by this variable named tmpdir in the script. ...
0
votes
0answers
32 views

Communication between different servers

I have a dynamic site which has a database and a static file generator. I now want to detach the static file generator from the dynamic site and host it on a different server. The issue is I still ...
1
vote
0answers
180 views

How to tell uWSGI to prefer processes to threads for load balancing

I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all ...
1
vote
0answers
418 views

mod_wsgi ImportError with a flask app

I'm trying to deploy a Flask app using apache and mod_wsgi. I've been following the directions here. The simple hello-world example that is on that site works perfectly. When I try to substitute my ...
2
votes
1answer
534 views

Bottle.py app can't be found by nginx+uwsgi

I have a Python 3 bottle.py app that I install into a virtual environment (letting pip automatically fetch dependencies). I'm trying to get it to run under nginx and uwsgi on my raspberry pi. When I ...
0
votes
2answers
130 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 ...
0
votes
1answer
32 views

Apache and mod_wsgi prevent user from viewing source

I'm running a WSGI application written in Python with flask on Apache. I have so far configured my vhost correctly to use my application. <VirtualHost *:80> ServerName mydomain.com ErrorLog ...
0
votes
1answer
2k views

Install Python setuptools on CentOS 6

I'm trying to install setuptools with no success so far. When I do python3.3 ez_setup.py I get the following error: Extracting in /tmp/tmp6nn4cz Traceback (most recent call last): File ...
1
vote
2answers
100 views

Serving files from GIT with uWSGI

Good morning everyone! On my daily job, we are using NGINX+uWSGI+MongoDB as Python Application container. For versionning and collaborative developpement we are using GIT install on each developer ...
0
votes
1answer
412 views

difference between /bin/sh and /bin/bash(chrooted)

I am stuck in this issue: I have a new server which i access thru ssh, using PuTTy. In Configuration, i need to select which ssh shell i need in order to access the server with ssh. choices: ...
1
vote
0answers
62 views

Soccorro server does not work

I tried to configure Socorro server with apache as described here. I started httpd, but when I contact it with browser it doesn't respond. In lynx I get: HTTP request sent; waiting for response. When ...
0
votes
0answers
204 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 ...
1
vote
1answer
1k views

Unable to load configuration from uwsgi

Since yesterday I have been wrestling with this problem: unable to load configuration from uwsgi When I google it, nothing comes up. I am trying to run UWSGI under nginx with a very simple uwsgi.ini ...
0
votes
1answer
258 views

Can't deploy uWSGI Python Script: Mount Point = 0

When I run my application I get the following error: *** Operational MODE: single process *** unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in ...
0
votes
2answers
1k views

Nginx + Gunicorn + Django - nginx not allowing static files

Updated Code - this is still not working though. Settings.py STATIC_ROOT = '/home/ubuntu/virtualenv/mysite/homelaunch/static/' STATIC_URL = '/static/' nginx conf :: /etc/nginx/sites-enabled/mysite ...
0
votes
1answer
23 views

How it's possible to reload a particular user Apache WSGI?

I have multiple WSGI instances running each on it's own user account. I'm trying to give the users to reload their own HTTPD processes only on Python/DJango code update, without impacting the other ...
2
votes
2answers
1k 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
369 views

How do I make html files accessible from OpenShift server running python?

I have an OpenShift DIY app running Python. However, I cannot reach static files like html. (or run php) If I try accessing: mydomain.rhcloud.com/hello.html, I get: uWSGI Error Python application not ...
0
votes
1answer
428 views

Microcaching with nginx & uwsgi [closed]

i am running my personal website written with python on nginx with uwsgi. Since the site is very static i want to improve the performace by adding microcaching. Both nginx and also uwsgi do offer ...
-2
votes
3answers
88 views

Stop server crash [duplicate]

I run my python scripts and Scrapy framework for web scraping project on my Ubuntu 12.04 precise server. These scripts run whole day. This project is under developing/testing stage. So i dont know ...
1
vote
0answers
42 views

Automatically create virtualenvs for new user accounts

In Linux, how can I go about automatically creating virtualenvs for each newly created user account? Can it easily be done?
1
vote
0answers
434 views

How do I reduce the threads per process limit for an ISAPI app under IIS 7.5

I have a python WSGI application running under an ISAPI extension in IIS 7.5 on Windows Server 2008. I would like to increase the number of worker processes (which I know how to do) and reduce the ...
-1
votes
1answer
145 views

Python cant connect to local MySQL server through socket [closed]

I have a python script which is designed to add things to a MYSQL database. The error I get is this: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock I've checked the ...
1
vote
1answer
132 views

Running a shell command on EC2 using boto? [closed]

I am trying to find a way to pass a shell command to a Linux EC2 instance. Basically I have a script which creates an EBS Volume, brings up a CloudFormation stack, and then attaches the new volume ...
0
votes
1answer
154 views

When should Passenger, Unicorn, and Rack be used? [closed]

Reading about Puppet often Passenger, Unicorn, and Rack are mentioned, but I can't figure out what the purpose of these are. The website for Passenger says: Phusion Passenger is a web server and ...
0
votes
1answer
178 views

How to make pip or easy_install use aliases

I have some trouble installing python-mysqldb. The error I get is E: Could not perform immediate configuration on 'gcc'. Please see man 5 apt.conf under APT::Immediate-Configure for details. (2) ...
0
votes
2answers
163 views

Nginx returning 404 with Python-urllib but fine if accessed from browser

We have a repo server running on a Windows box serving some static files that are supposed to be grabbed by our worker nodes using Python-urllib. The problem lies in the fact that when we make a ...
0
votes
1answer
295 views

How to stop long-running cron process from being killed

I have a long-running cron process, running a Python script, that seems to get randomly killed. In dmesg I see: [230568.077358] init: cron main process (890) killed by TERM signal [237517.974422] ...
-1
votes
1answer
99 views

How install flask on server? [closed]

I developed an application with python flask framework.I have account in shared host. they support python and i have ssh access to server. But when i tried pip install flask and easy_install ...
0
votes
1answer
352 views

How do i install OpenEMM on CentOS 5.9

Hi i am trying to install OpenMM on my CentOS 5.9 remotely via ssh (PuTTY) based on the step mentioned here (Yes i know the guide is for CentOS 6.x). However when i try to do: yum install ...
0
votes
1answer
57 views

Strange crontab behaviour [duplicate]

This evening I have been playing with cron for the first time, and have started experiencing strange results. The script that I am trying to run is a watchdog that allows me to manage a couple other ...
1
vote
3answers
404 views

PIP not installing to virtualenv directory

I am attempting to install django to a virtualenv that already exists. Following the instructions listed on the pip-install website here, I ran the following from SSH. name@server:~$ . ...
1
vote
2answers
564 views

Capture Output of Python script in a bash script

I have a script that monitors game servers. It is written in bash. However I am attempting to put together an advanced monitor to pick up if the server has locked up. This requires a small python ...
1
vote
1answer
354 views

UWSGI can't import module 'mysite' with nginx and flask

I'm new to using uwsgi and nginx and I haven't been able to figure out why I am getting this error from uwsgi: ImportError: No module named mysite unable to load app 0 (mountpoint='my_ipaddr|') ...
6
votes
2answers
116 views

During yum update, Python installation is updated. Do I need to restart running programs?

As the title says. If I run yum update(It's a CentOS box) and there happens to be a Python update. What happens if other users have running Python programs. Do I need to alert them to restart the ...
-1
votes
1answer
62 views

How do I uninstall python from web platform installer?

I've installed python and some other packages using web platform installer, but I was having some issues getting a Django project to work so I uninstalled everything and am trying to get it going from ...
1
vote
0answers
325 views

Command not found, when it's in a directory on the path

I have the following environment variable set (trying for a 12-factor app approach): PATH="/home/hope/env/bin:$PATH" /home/hope/env/bin is the bin directory of a virtualenv, it has gunicorn and ...
2
votes
4answers
493 views

How can i create in incremental backups of mysql databases

I have linux centos 6.4 server with mysql5.6 I have the cron job for making hourly mysql database backups like this Its in python os.popen("mysqldump -u %s --password=%s -h %s -e --opt ...
3
votes
1answer
396 views

Why is ATLAS not detected on RHEL when I try a SciPy installation through pip?

I'm using RHEL6, Python 2.6.6, and trying to install SciPy through pip. [user@server ~]$ sudo pip install scipy <snip> atlas_blas_threads_info: Setting PTATLAS=ATLAS libraries ...
-1
votes
2answers
122 views

Loading environment vars on sudo -u [closed]

I have a user named www-app and it has some environment vars set on its .bashrc file. Now from another user, say ubuntu how can I ran sudo -u www-app python script.py and will load all the environment ...
1
vote
0answers
100 views

“Error importing middleware” while upgrading to Django 1.5 from Django 1.4?

I have a shared hosting account with Python 2.7.2 installed. I have done a local installation of Django 1.4 (python setup.py install --user) and everything was working fine. I decided to upgrade to ...
0
votes
1answer
448 views

Why do I need Nginx to run Tornado Web Server (python) [closed]

Maybe this is a stupid question. So stupid that I can't find the answer in tutorials or documentation. I want to make some tests with Tornado Web Server. As far as I can see in the examples, Tornado ...
0
votes
1answer
61 views

How to install moinmoin-2 on dreamhost

How to install moinmoin-2 on dreamhost? I'm putting this here, so I can find it in the future. Maybe it is useful to other people too. I found it challenging because: it needs python2.7, and ...
0
votes
2answers
666 views

flask, lighttpd with fastcgi can't get it to work

i'm tring to deploy a simple flask script to a lighttpd server with fastcgi. this is the configuration file for lighttpd builded using the flask documentation ...
1
vote
1answer
675 views

Unable to install python2.7-dev on Ubuntu 12.04.2 LTS

The command $ sudo apt-get install python2.7-dev yields this result: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be ...
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: ...
-3
votes
2answers
166 views

Can I use a .py file as a stylesheet for html5 [closed]

I have python generating my stylesheets in my html4 site (random background). Now I'm wanting to convert to html5 and I'm wondering if I can use a .py file in my css link <link rel = "stylesheet" ...