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

learn more… | top users | synonyms

-1
votes
1answer
63 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
347 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
513 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
435 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
131 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
104 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 ...
1
vote
1answer
477 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
67 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
720 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
720 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
181 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" ...
0
votes
1answer
23 views

Is it possible to install and run a separate version of python from a directory in CentOS?

I'm working a linux machine running CentOS. I don't have full sudo powers and theres multiple versions of python already installed on the machine and the whole thing is a bit of a mess, stuff like ...
0
votes
1answer
34 views

Running server side applications that have no front end or user interaction.

I am setting up a system that required a series of scripts that run 24/7 quering a database to check if data meets certain requirements and then triggers alarms as well as inserting data into the ...
1
vote
1answer
1k views

How do I debug this Nginx to uWSGI timeout?

I'm running a database-backed web site that receives very little traffic. However, once or twice day, a request will timeout and I'll see this (or a similar) error in Nginx's error.log: 2013/06/13 ...
0
votes
1answer
571 views

Apache: permission error while opening file

I have a cgi script that opens a file (using python). The cgi script runs fine but when I try to open this file, I get a permission error: Traceback (most recent call last): File ...
0
votes
1answer
121 views

How to get client host IP by means of utmp

My question is pretty simple: how to get client host IP by means of utmp (who am i)? Well. Several weeks ago for connecting from my laptop to the remote server I used such command: ssh ...
0
votes
1answer
209 views

PYTHONPATH overwritten when running under supervisord

I have the following supervisor program config: [program:showvars] environment=TESTVAR=hi,PYTHONPATH=/home/eric/python/tools/ command=python /home/eric/showvars.py where showvars.py simply loops ...
0
votes
1answer
52 views

Issue configuring Apache virtualHost with modwsgi

Hello i have a problem configuring apache with Virtualhosts and ModWSGI, see i want to run a Python Script when i access to the domain, but it keeps showing me the content of my folder instead ...
0
votes
4answers
426 views

Apache taking ownership of file and folder

I have django site running on Ubuntu with apache2 configured with mod_wsgi. The media (folder where user uploaded files go) is owned by ubuntu user (with sudo access) and the group of media folder is ...
1
vote
1answer
189 views

Non-responsive apache + mod_wsgi after installing scipy

I am currently running a Centos 6.4 server, with Apache 2.2.15 and mod_wsgi 3.2. The server is hosting a django-based site (django 1.5.1, python 2.6.6). Everything was running fine until I installed ...
1
vote
1answer
587 views

nginx and uwsgi; different ports

I have Nginx and two python virtual environments with uwsgi. These environments are for dev and production. What I want is to run production on :80 and dev on :6544 ports Here's the config I have ...
-6
votes
1answer
90 views

Deleted part of /usr/bin [closed]

I was navigating on my Ubuntu 12.10 64bit box through Windows WinSCP with root user and suddenly pressed "delete" "enter" when I was on usr directory. I immediately cancelled the delete process and ...
2
votes
0answers
84 views

What is a good, HTTP[S] proxy that is customizable in Python? [closed]

Trying to find a good HTTP proxy that I can customize with Python. Hopefully, this proxy library or application would allow me to add custom plugins for the request / response cycle - particularly a ...
-1
votes
2answers
56 views

Which python to use on Enterprise Linux? [closed]

I'm currently learning python and I recently bought a book that goes through Python 3. Where I work we use Red Hat Enterprise Linux, and I've noticed that on RHEL 5 and RHEL 6 the versions of python ...
-1
votes
1answer
763 views

Python, “you don't have permission to access that port” [closed]

I'm setting up my first Django project on a server When I do python manage.py runserver .0.0.0.0:80, it tells me You don't have permission to access that port. When I do python manage.py runserver ...
-1
votes
2answers
190 views

Watching python logs real time while running on webhosting? [closed]

I have a python script that is running on my site \ webhosting. I've activated it by going to the url -> script.py. Is there a way to watch the logs the script outputs the way you'd see in the ...
2
votes
1answer
153 views

Unable to serve Django static files

I am trying to serve Django admin static files but nothing seems to be working below is my nginx configuration : upstream django { server 127.0.0.1:8000; } server { listen 4321; ...
0
votes
1answer
1k views

Redirect all DNS queries to IP [closed]

I have a server with Ubuntu 12.04 Operating System on it.I want to make a DNS Server that accept all request including IPs,and redirect them to an specified IP......there users can login and after ...
0
votes
0answers
24 views

Compiling mod_wsgi on MacOSX with EPD Python

I'm trying to compile mod_wsgi 3.4 on MacOSX 10.7.4 with the Enthought EPD Python distribution, which I require to do some mathematical modelling from the web server. I run configure using: ...
2
votes
1answer
196 views

Using pv with a Python script: monitoring progress when uploading to AWS Glacier using the boto glacier utility

I am looking to use boto's glacier command line tool to upload data to AWS Glacier. I'd like to monitor the progress of my upload. Normally I use pv to monitor progress. I've perused the code of the ...
0
votes
1answer
234 views

python script crash prevent/reason check

I run a python script several days ago using 'python a.py &' on my Ubuntu 12.04. I assume it's running all the time, but just now I found it crashed 2 days ago. Is there any log information on ...
3
votes
1answer
258 views

How to disable Xvfb using TCP ports when using pyvirtualdisplay (Python)?

Trying to use pyvirtualdisplay for Python to start some applications with a virtual Xvfb X terminal. However, we've seen port clashes and would like to disable Xvfb from using TCP ports. I have ...
1
vote
1answer
132 views

How should I use a proxy server to access the internet - with custom Python plugins for request processing? [closed]

We're trying to understand how to set up a proxy server for our Web application. We need several processes to access the Internet through a proxy server in the internal network. Ideally, we could ...
3
votes
1answer
290 views

Use uWSGI as a proxy server

Question: Is there a way to use uWSGI as a proxy server? More about the system: 6 load-balanced nginix/uWSGI servers Python Requirements: Set up a few proxy servers that can: Accept requests ...
0
votes
1answer
521 views

cgi and python script files are downloading from server instead of executing there

I kept some cgi,python files under /var/www/cgi-bin and trying to execute I followed all the steps in: http://webpython.codepoint.net/cgi_tutorial Still i am not able to execute. when i enter ...
1
vote
2answers
858 views

How do I install Python 2.7.4 OR 3.3.1 on an Amazon AMI?

I have an EC2 instance running a standard AMI, and have exhausted the limit of my abilities with yum and similar avenues to update python to 2.7.4 or 3.3.1 for a library I need to use. Unfortunately, ...
0
votes
1answer
90 views

Can't get monit to start program

I'm trying to get monit to monitor a program and start it if it goes down. Here's my basic config: check process maitre_d_8000 with pidfile /home/tango/env/maitre_d/8000/pid.pid start program = ...
1
vote
1answer
138 views

mod_wsgi : share daemon processes between vhosts

I have many sites each using the same 5 Django applications (with local settings), hosted on Apache. At present each site app has its own config as follows: WSGIDaemonProcess api_example threads=15 ...
0
votes
1answer
715 views

centos 6.4 - django deploy with apache and mod_wsgi

I'm trying to deploy on a VM with centos 6.4 a basic django project with apache and mod_wsgi. This is the project tree: myproj/ ├── manage.py ├── myapp │   ├── __init__.py │   ├── models.py │   ├── ...
1
vote
4answers
4k views

Python-devel for python 2.7 on CentOS 6.4

Ok, i want to run django web-application on production VPS. Operation system of the VPS is CentOS. Application code written on Python 2.7. I have already installed Python 2.7 with configured virtual ...
0
votes
0answers
320 views

is there a way to get PSEXEC to output the results of python

The situation: I am running psexec.exe from one windows machine to another and would like to run a python script on the remote machine and look at the output of the script without having to pipe it ...
0
votes
1answer
40 views

Python app with wsgi apache2 returns *.py file content

I have a small Flask app that I managed to get running using apache2 and mod-wsgi. I set it up to run on a subdomain like test.example.com The app is in /var/www/flasktest . Now if I go to ...
0
votes
2answers
272 views

How to run python script which required root privilage for execution in apache with mod_python at openbsd

I am trying to run python script in Apache 2.x with mod_python. I edited httpd.conf with publisher LoadModule python_module /usr/local/apache2/modules/mod_python.so <Directory ...
1
vote
1answer
107 views

how to understand what Apache is busy with?

I have Apache on a Linux server, and a Python script inside it (Trac, to be more specific). With a minimum traffic it consumes 99% of CPU and load average is above 3.00. Is it possible to understand ...
1
vote
3answers
1k views

How to connect remote windows machine from linux terminal?

I want to execute windows command on remote windows machine from linux terminal.
0
votes
1answer
457 views

OpenStack over NGINX+uWSGI

Following this not so popular question: OpenStack & NGINX+uWSGI I've start to build my dashboard node using well... NGINX and uWSGI of course, but I'm now facing a path problem. Indeed, uWSGI is ...
0
votes
1answer
267 views

Getting future feature absolute_import is not defined error while installing lxml on centos

I am getting this error while installing libxml I tried this python27 setup.py build_ext -i -I /usr/include/libxml2 --with-xslt-config=/opt/xslt/bin/xslt-config ...
1
vote
0answers
269 views

Executing a python script from PHP to open a socket

I have a python script chatserver.py that includes:- #!/usr/bin/python from twisted.internet.protocol import Protocol, Factory from twisted.internet import reactor <SNIP> ...
1
vote
1answer
831 views

Linux RDesktop Lockups

I have a script I wrote to create RDP connections from Linux workstations to Windows servers. Everything is great when used on a machine plugged into an Ethernet jack but when used on a wireless ...