Questions tagged [mod-python]

Mod_python is an Apache module that embeds the Python interpreter within the server.

Mod_python is an Apache module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.

Currently mod_python is not under active development. This does not mean that it is "dead" as some people have claimed. It smiply means that the code and the project are mature enough when very little is required to maintain it.

Projects website:

Current State of Mod_Python

289 questions
3
votes
1 answer

SQLAlchemy Expression Language problem

I'm trying to convert this to something sqlalchemy expression language compatible, I don't know if it's possible out of box and are hoping someone more experienced can help me along. The backend is PostgreSQL and if I can't make it as an expression…
Torkel
  • 138
  • 10
3
votes
2 answers

Web programming: Apache modules: mod_python vs mod_php

I've been using for more than 12 years PHP with Apache (a.k.a mod_php) for my web development work. I've recenlty discovered python and its real power (I still don't understand why this is not always the best product that becomes the most…
Olivier Pons
  • 15,363
  • 26
  • 117
  • 213
3
votes
1 answer

Can I run flask on an Apache server with mod_python?

I have a pre-configured Apache server with neither root nor any shell access. I only can push files via ftp. However, I know that the server supports Python via mod_python. Here is what the config says: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny16 with…
mcbetz
  • 2,329
  • 4
  • 20
  • 30
3
votes
1 answer

Python Server Pages Implementations

I've been a PHP developer for quite awhile, and I've heard good things about using Python for web scripting. After a bit of research, I found mod_python, which integrates with Apache to allow Python Server Pages, which seem very similar to the PHP…
DLH
  • 2,771
  • 3
  • 23
  • 30
3
votes
1 answer

python webpage mod_wsgi

Before I used mod_python for python websites. Unfortunately mod_python is not up to date any more so I looked for another framework and found mod_wsgi. In mod_python it was possible to have an index method and also other methods. I would like to…
1408786user
  • 1,868
  • 1
  • 21
  • 39
3
votes
1 answer

python ascii codes to utf

So when i post a name or text in mod_python in my native language i get: македонија And i also get: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-9: ordinal not…
badc0re
  • 3,333
  • 6
  • 30
  • 46
2
votes
2 answers

Really odd (mod)_python problem

this one is hard to explain! I am writing a python application to be ran through mod_python. At each request, the returned output differs, even though the logic is 'fixed'. I have two classes, classA and classB. Such that: class ClassA: def…
Aiden Bell
  • 28,212
  • 4
  • 75
  • 119
2
votes
1 answer

python list to javascript array

Probably a quick answer from you experts, but i am stumbling upon a interesting challenge that I can't wrap my head around. I have a python .psp file that contains both a list mylist[] which gets populated on runtime and a javascript function…
Jim
  • 613
  • 6
  • 16
  • 25
2
votes
2 answers

Compared to mod_wsgi, how does mod_python "work"?

It seems most of the blog posts the web relating to mod_python & mod_wsgi concentrate on telling me how mod_wsgi is better and what a WSGI application looks like. This is fine, but what I'd really want to know -- to have complete knowledge of the…
ntl0ve
  • 1,896
  • 3
  • 19
  • 25
2
votes
1 answer

Is there a mod_python for Apache HTTP Server 2.2 and Python 2.6 or 3.0?

I poked around the mod_python website and I only found the files for Python 2.5 and earlier for Apache HTTP Server 2.2. I Googled around a little, without significant luck. Any suggestions?
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
2
votes
3 answers

mod_python with apache2, (Re)importing module error

I'm trying to get mod-python to work with apache2 but not having any success. I've followed a few tutorials for getting mod-python working but I can't see what I'm doing wrong. When I visit http://site.example.com/cgi-bin/test.py I actually get my…
Tom Viner
  • 6,655
  • 7
  • 39
  • 40
2
votes
0 answers

django label tag on apache

I've a problem with form rendering on a form which inherits from my own User model. When the rendering is made in dev, everything is OK. But in prod, with apache and mod_python, the form is not generated! Here is my model and model form: class…
renard
  • 1,368
  • 6
  • 20
  • 40
2
votes
1 answer

Redirecting to the correct localization: Nginx, Apache, memcached and Django

My site is localized using a string in the URL (e.g. /DE/certificate gets the German version, /US/certificate gets en-US, etc.) For some URLs on the site, leaving out the localization part redirects to a best-guess (usually /US/) but for others…
pjmorse
  • 9,204
  • 9
  • 54
  • 124
2
votes
3 answers

XP with C:\python in path won't run files in C:\python

XP Command Line: helloworld.py is located in C:\python C:\python is in the path xxxxxx is the user environment path This works: xxxxx> cd C:\python C:\python>helloworld.py Hello World This doesn't work: xxxxx> helloworld.py .....can't find the…
fred3
  • 29
  • 4
2
votes
1 answer

CherryPy + Apache2 - Response cached

I'm trying to develop a CherryPy based system. I'm actually using Apache2 web server + mod_python. I have the next problem: When I update the code of my cherrypy app, refresh several times the browser, and the result is the same as before…
Martin Zugnoni
  • 1,439
  • 2
  • 14
  • 21