0

I have an webapplication that was originall implemented written with mod_python in mind.

I have been able to port it to mod_wsgi, but I worry that there might be some subtle differences in the way that global variables or other features are handled.

Most of the information that I have seen on mod_python and mod_wsgi is a comparison of the memory footprint, such as the comparison here:

https://modwsgi.readthedocs.org/en/latest/frequently-asked-questions/

Are there any implementation issues in the two apache modules that will cause differences in behaviour between mod_python and mod_wsgi.

ChrisGuest
  • 3,398
  • 4
  • 32
  • 53

1 Answers1

1

You will have to enumerate what you mean by 'other features'. As to global variables, it is explained in:

That document was effectively a cut and paste, with some extra details, of what also occurred in mod_python. So how to deal with global and cross process data is more or less the same.

Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134
  • I recall with mod_python that there are certain constructs that do not behave as you would have naively expected. One example has to do with defining functions or methods with parameters that include referenced defaults. So instead of `def fn(a,b,c={}):` it is preferable to do: `def fn(a,b,c=None): if c is None: c = {}` – ChrisGuest Aug 05 '13 at 00:43
  • That was an example of where I have to change python code to accommodate mod_python. Are there likely to be some other code changes that should be considered when migrating from mod_python to mod_wsgi? – ChrisGuest Aug 05 '13 at 00:53
  • That has got nothing to do with mod_python. That is the way Python itself works and is a trap for people doing normal Python scripts as well. – Graham Dumpleton Aug 05 '13 at 12:13