• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Plesk and python

cipcip

Basic Pleskian
Hello guys,

I am trying to check and see if python is working on my hosting with a simple hello world script.

If I go to Tools & Settings -> Server Components I can see the following:
Code:
mod_python (Deprecated)    3.3.1-11ubuntu2

So I assume it is installed ?! I have read that Plesk Onyx dropped the support for python. Why is that ? :(
How to run, because now all I can see if I navigate to the .py file is the code, not the actual interpretation.

See here: https://tutorialindex.com/php/hello.py

Thank you,
Cristian
 
It is working, stupid mistake, I forgot to enable Python in the webhosting settings for the specific namespace.

Sample script for hello.py:

Code:
#!/usr/bin/env python
print "Content-Type: text/html"
print
print """\
<html>
 <head>
  <title>Python - Hello World</title>
 </head>
 <body>
  Hello World
 </body>
</html>
"""
 
Back
Top