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

learn more… | top users | synonyms

35
votes
0answers
5k views

What advantages/features does Puppet or Chef offer over Salt (or vice versa)? [closed]

I am looking at rolling out a new configuration management tool to replace our home-grown solution. The defacto standards are Chef and Puppet, both of which are Ruby-centric (though can be used to ...
25
votes
3answers
3k views

Shinken - Anyone using it? [closed]

I've recently discovered Shinken, which is a new implementation of Nagios using python. Shinken "divides" Nagios in 5 different types of daemons, each one performing separated tasks. I haven't tried ...
22
votes
7answers
34k views

How to set up Mod_WSGI for Python on Ubuntu

I am trying to setup MOD_WSGI on my Ubuntu box. I have found steps that said I needed to do the following steps I found at http://ubuntuforums.org/showthread.php?t=833766 sudo apt-get install ...
21
votes
4answers
27k views

How to run easy_install in cygwin?

I am trying to install some package in cygwin's python, but I'm getting the following error: "easy_install: command not found". I have tried to run "easy_install.py", the result is also ...
21
votes
1answer
3k views

Python CGI on Amazon AWS EC2 micro-instance — a how-to!

How can you make an EC2 micro instance serve CGI scripts from lighthttpd? For instance Python CGI? Well, it took half a day, but I have gotten Python cgi running on a free Amazon AWS EC2 ...
19
votes
1answer
2k views

Recommended Nginx + WSGI Configurations

Please explain pros/cons when using the different Nginx WSGI interfaces? Please explain in detail what differentiates each configuration? Which configuration should scale the best? If relevant, what ...
18
votes
3answers
7k views

How do I uninstall gitosis?

I've installed gitosis on my dramhost machine but now I want to uninstall it because it's causing more problems than solutions. The thing is that I can't find how to uninstall it. I deleted the ...
14
votes
1answer
2k views

Is virtualenv suitable for a production server?

I'm planning to set up a Python app (Pyblosxom) on my server and considering to run it in its own virtualenv sandbox with --no-site-packages. I'm hoping that such a setup would be easily portable and ...
12
votes
16answers
2k views

Python Hosting

I would love to start learning python by setting up a little website, and for that I need hosting. What should I look for in a hosting provider to be sure I can use python? EDIT: to be complete: I ...
11
votes
1answer
3k views

How to undo “yum remove python”

I have a Centos 6 based VPS with an ssh connection. Recently wanting to install python 2.7.2, I bravely ran: yum remove python wich apparently removed yum itself being written or depends on python. ...
11
votes
6answers
7k views

Python 3.0 RPMs for CentOS 5 (RHEL 5)

Where is the best repository you use to obtain RPMs for Python 3.0 which are well maintained?
9
votes
3answers
3k views

How to explain Django/Python installation to Python-newbie running a shared IIS server [closed]

For reasons beyond my control, our website is hosted with a hosting provider that uses IIS for their servers. They currently offer PHP and ASP, and also Python and Perl through cgi-scripts. I want to ...
8
votes
4answers
1k views

init.d scripts written in Python

A question came up on SO asking about writing init.d scripts in Python. One comment indicated that these scripts should be programmed in shell not Python. Is writing init.d scripts in Python: Bad. ...
8
votes
3answers
19k views

Install Python 2.5 on RedHat/Centos

Current Python version is 2.4... yum upgrade python Gives Could not find update match for python Do I have to install from source?
8
votes
2answers
3k views

How do I list the files associated with a Python package installed using pip or easy_install?

I've installed a Python package using pip, which is a replacement for easy_install. How do I get a list of which installed files are associated with this package? Basically, I'm looking for the ...
8
votes
2answers
422 views

FreeRADIUS 2 should use a different Python than default

We've got a FreeRADIUS 2 deamon installed on a CentOS 5.7 server. We'd like to use a pre-written Python module to do authorization but there's a problem: The Python module we've got requires Python ...
7
votes
1answer
1k views

Active Directory 2012 LDAP Integration Service Principal Name Entry is Disappearing?

Creating Python Service to Query AD Attributes I'm integrating our AD with web services running Python on linux using Python-LDAP over SASL(DIGEST-MD5) to query AD 2012 user attributes (division, ...
7
votes
2answers
2k views

'pip install carbon' looks like it works, but pip disagrees afterward

I'm trying to use pip to install the package carbon, a package related to statistics collection. When I run pip install carbon, it looks like everything works. However, pip is unconvinced that the ...
7
votes
2answers
3k views

How can I upgrade Python to 2.7.9 on Ubuntu 14.4?

Ubuntu 14.4 comes with Python 2.7.6 built-in, but I'd like to upgrade it to 2.7.9 (it has security features that I want). Is that even possible? If so, how can this be achieved?
7
votes
2answers
507 views

Processes hanging indefinitely when reading from network connections

An update to the below: I have experienced a similar problem on an unrelated script, on a Debian virtual machine in a different datacentre. This looks suspiciously like the issue described here (and ...
6
votes
9answers
21k views

How can I restart a windows service remotely using a script?

I have a Python web application running in a CherryPy server, which is running as a windows service. I have a batch file to deploy this application, but I'm still having to remote desktop in to the ...
6
votes
3answers
5k views

How To Tell Puppet To Only Install Using Pip If A File Doesn't Exist

I am using Puppet to install some Python packages using pip. I'm using Puppet 2.7, so my package declarations look something like this: package { "carbon": require => ...
6
votes
2answers
1k views

How to handle 20k concurrent persistent connections

I'm trying to design an architecture to handle massive TCP socket connections and I'm in doubt on the limits of this architecture. I'll have to handle ~20k concurrent TCP connections and these are ...
6
votes
3answers
593 views

deploying Python code with Puppet

I'm trying to implement a deployment system for my web application, based on Puppet. The application consists of several services (a couple of web servers: Django- and Tornado-based and a worker ...
6
votes
2answers
122 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 ...
6
votes
1answer
4k views

Django + gunicorn + virtualenv + Supervisord issue

I have a strange issue with my virtualenv + gunicorn setup, only when gunicorn is launched via supervisord. I do realize that it may very well be an issue with my supervisord and I would appreciate ...
6
votes
3answers
6k views

Configure FastCGI for Python

I have nginx running on a VM and I want to run a Trac site. I need to run a python FastCGI server, but I cannot tell which is the server to use. I have found the following: Lighttpd spawn-fcgi But ...
6
votes
4answers
4k views

Slow Memcached: Average 10ms memcached `get`

We're using Newrelic to measure our Python/Django application performance. Newrelic is reporting that across our system "Memcached" is taking an average of 12ms to respond to commands. Drilling down ...
6
votes
4answers
6k views

Ubuntu 11.10 with Nginx and uWSGI

I'm trying to get a LNP [Linux Nginx Python] stack (is that even a thing? heh) going, but I'm having some difficulties. A lot of blog posts and documentation on doing this seems to revolve around ...
5
votes
1answer
4k views

Error 2006: MySQL server has gone away

I'm running a Python Pyramid app on a CentOS server using uWSGI and nginx. I'm using SQLAlchemy as an ORM, MySQLdb as the API, and MySQL as a database. The site hasn't gone live yet, so the only ...
5
votes
4answers
7k views

Perl or Python, better suited for Unix system automation?

I have been using bash for most of my system administration tasks. I also know a bit of perl. Should I learn Python or Perl is better for system automation. So far from my experience learning perl ...
5
votes
5answers
7k views

How can I create multiple, numbered copies of a file in Windows?

I have a file named poll001.html, and need to create 100 copies that are named incrementally (i.e poll002.html, poll003.html...etc). I know this is stupid, but it is what boss-man wants. any ...
5
votes
6answers
12k views

IO Wait causing so much slowdown (EXT4 JDB2 at 99% IO ) During Mysql Commit

I am writing an indexer, using python, which indexes documents and insert them into Database, Before it was single process but now i made it to multiprocessing with 4 parallel processes running.After ...
5
votes
2answers
5k views

How to run php with SimpleHTTPServer?

I just found this awesome tip in the Apple SE: Start a quick webserver from any directory: python -m SimpleHTTPServer 8000 Is there a way to have this parse php scripts, or is this for ...
5
votes
2answers
2k views

Where to find python fabric setup examples?

I want to know what is your experience with fabric scripts? Do think it is useful? is there sample scripts for this? copying, setup service etc I know there is puppet and chef but i am looking for ...
5
votes
1answer
2k views

Error installing mod_wsgi in centos with python2.7

When i do "make" in mod_wsgi folder i get this error I configured using following ./configure --with-apxs=/usr/local/apache/bin/apxs --with-python=/opt/python27/bin/python /usr/bin/ld: ...
5
votes
1answer
637 views

rsyslog update on Amazon Linux suddenly treats INFO level messages as EMERG

I'm having strange issue with rsyslog on some of my EC2 instances running Amazon Linux 2012.3. Upon yum upgrading rsyslog 4.6 to 5.8.10, it seems like every INFO level log message is suddenly treated ...
5
votes
5answers
2k views

Is there a simple LDAP-to-HTTP gateway out there?

We have a local LDAP directory that provides basic contact information about our user community. We would like to integrate this into some third-party hosted services that allow us to implement ...
5
votes
3answers
2k views

Python version for mod_wsgi

how can I change the default version mod_wsgi uses? I am using Debian 5 with Apache 2.
5
votes
3answers
2k views

Apache won't restart after inserting mod_wsgi [closed]

Python interested me as a web scripting language so I wanted to set it up on my testing server. Cannot get Apache to restart with mod_wsgi. Running xampp v win32-1.8 w/apache v2.4, python v2.7 ...
5
votes
1answer
353 views

Google c2dm transient 401 errors on some AWS instances

How can we figure out why we're getting occasional 401 errors from the Google c2dm push service on some AWS instances when asking c2dm to deliver a notification? This is a transient problem. All AWS ...
5
votes
2answers
1k views

Has anyone used uwsgi nginx and django for a high-load environment?

I was wondering if anyone has used uwsgi with nginx to serve a high-load django site before. If so, did they have any problems?
4
votes
6answers
11k views

How can I check whether a volume is mounted where it is supposed to be using Python?

I've got a backup script written in Python which creates the destination directory before copying the source directory to it. I've configured it to use /external-backup as the destination, which is ...
4
votes
4answers
441 views

Confused with doing sys admin things with python or not

I was doing backups in bash and I have written few other bash scripts as well. I wanted to shift it to python because I needed to learn python for AI techniques and I was always delaying that. As I ...
4
votes
4answers
1k views

yum claims python isn't installed

Trying to install collectd, but for some reason it claims python isn't installed: yum install collectd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Setting up Install ...
4
votes
2answers
1k views

Which Linux distro should I use for Apache, mod_wsgi, Python, Django, PostgreSQL deployment?

Currently we are running CentOS for our production servers. Wer're deploying Django projects with Apache 2.2, mod_wsgi and PostgreSQL. We are in the process of making Python 2.5 the default version. ...
4
votes
3answers
6k views

Uninstall Python packages built from source

How do I uninstall Python packages that have been built from source and installed via... python setup.py build python setup.py install ?
4
votes
4answers
1k views

Telnet connection to an AS400 system via telnetlib (Python)

I use telnetlib - Python - to create a telnet client - port 23 - to communicate with an AS/400 server. communication with the telnet command that is no problem, but with telnetlib I do not get any ...
4
votes
3answers
7k views

PYTHONPATH environment variable…how do I make every subdirectory afterwards?

I currently do this: PYTHONPATH=/home/$USER:/home/$USER/respository:/home/$USER/repository/python-stuff How can I make it so that the PYTHONPATH can include everything subdirectory? PYTHONPATH = ...
4
votes
3answers
130 views

Openerp wIth Ubuntu 9.04

I had Ubuntu 8.10. I upgrade it to 9.04. I have Openerp5.0 server/client/web. It worked on 8.10 but not with 9.04. Now when I try to launch my server using: ./openerp-server.py I have this error: ...