A simple Python script to generate a web page worked perfectly under the shell account but failed with a 500 server error when I tried to see the web page though a browser (and thus the Apache server). It turned out that on shell.sonic.net, sys.version reports
2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
and on the webserver, sys.version reports
2.3.4 (#1, Nov 5 2004, 11:31:40) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)]
I was trying to use class string.Formatter, a feature that all the cool Python kids have been using since 2.6. When I used the older approach, it worked fine.
Is there a way to specify a newer version of Python in either environment? How do I find out what's installed?
2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
and on the webserver, sys.version reports
2.3.4 (#1, Nov 5 2004, 11:31:40) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)]
I was trying to use class string.Formatter, a feature that all the cool Python kids have been using since 2.6. When I used the older approach, it worked fine.
Is there a way to specify a newer version of Python in either environment? How do I find out what's installed?