Questions tagged [python]

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

1743 questions
5
votes
3 answers

Compile Python 3.1.1 with --enable-shared

This is a two pronged question... The context of the question is getting a good Python 3.1.1 build to use with building and running mod_wsgi. See this document for more information on why a shared library is a good idea. What are the ramifications…
gahooa
  • 266
  • 1
  • 4
  • 10
5
votes
1 answer

How to serve static files with apache on openshift official python cartridge?

I have scalable openshift online app with official python-2.7 cartridge. By default everything is served with mod_wsgi handler. How do I configure my app and/or Apache to serve some static files in my repo (like images, css and javascript) with…
RSSCake
  • 101
  • 1
  • 5
5
votes
0 answers

AttributeError: 'module' object has no attribute * python

I am struggling with compiling python 2.7.9 from source and have been advised to ask this question here. While installing python 2.7.9 following the steps described here the following errors occurred: python make: *** [libinstall] Error 1 I tried…
Sebi
  • 229
  • 2
  • 4
  • 10
5
votes
1 answer

Environment variable not available in python

I have a pretty interesting problem regarding environment variables, and googling around didn't show me any meaningful results: $ echo $BUCKET && python -c "import os; print os.environ['BUCKET']" mule-uploader-demo Traceback (most recent call…
Gabi Purcaru
  • 153
  • 1
  • 5
5
votes
3 answers

salt-stack : No Top file or external nodes data matches found

To test salt-stack I would like to copy a config file to another distant one (I am testing master and minion in localhost) /etc/salt/minion : master: 127.0.0.1 file_roots: base: - /srv/salt/base /etc/salt/master: interface: 0.0.0.0 The…
4m1nh4j1
  • 167
  • 1
  • 2
  • 8
5
votes
2 answers

fedora /usr/lib vs /usr/lib64

It seems i have two python2.6 folders located in /usr/lib vs /usr/lib64 respectively. Most python stuff (source) is in /usr/lib64/python2.6 but when in installed packages they have been put into /usr/lib/python2.6 How the system decides which…
Weiwei
  • 367
  • 1
  • 5
  • 10
5
votes
1 answer

Multiple python versions under apache+mod_wsgi

I have several virtual hosts configured under the same apache instance on redhat: apache-2.2.15 mod_wsgi-3.5 compiled with default system python-2.6 For every virtual host WSGIScriptAlias setting is pointed to the python file where the virtual…
alecxe
  • 81
  • 1
  • 2
  • 16
5
votes
1 answer

nginx + uwsgi - what is serving static files?

I am using nginx as a proxy to a couple of flask apps, with uwsgi as the middleware. Here's my nginx config for a test app. server { listen 80; server_name test.myapp.com www.test.myapp.com; charset utf-8; …
reptilicus
  • 153
  • 1
  • 1
  • 5
5
votes
11 answers

Cron job fails silently

I've got a python script that I want to run via crontab. My crontab looks like this: 5,20,35,50 * * * * /var/www/django-apps/callreport/util.py That script is set up to parse a bunch of flat files and stick the info into a MySQL db, then delete…
saturdayplace
  • 263
  • 1
  • 3
  • 10
5
votes
0 answers

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 number of threads per process (which I don't). I'm…
solublefish
  • 168
  • 1
  • 9
5
votes
1 answer

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 18:32:40 [error] 16723#0: *27796 upstream timed out…
skyler
  • 465
  • 3
  • 8
  • 17
5
votes
3 answers

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 ?
pufferfish
  • 2,830
  • 11
  • 39
  • 40
5
votes
1 answer

What is preferred approach to deploy Python app using RPM?

I am new to the dev-ops side of things, and I've been working to get a Python application packaged into an RPM (using python setup.py bdist_rpm) deployed onto a centos VM via Yum. Chef is used to manage the VM. The Python app will run within a…
woodbon
  • 53
  • 3
5
votes
6 answers

RHEL 6.x - yum gives "ImportError: No module named cElementTree" errors

I'm making a set of changes to a group of 150 servers. All systems were able to successfully download and install a specific set of RPM's via yum, except for one. One this particular system, all yum commands outside of "clean" dump the following to…
ewwhite
  • 197,159
  • 92
  • 443
  • 809
5
votes
3 answers

Apache won't restart after inserting mod_wsgi

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 32bit, on win7 64bit. The registry files I see for…
chris
  • 51
  • 1
  • 2