python:executer_python_chez_ovh

Ceci est une ancienne révision du document !


Exécuter Python sur OVH

Mettre le fichier .cgi dans /cgi-bin/

Passer le fichier en exécutable (705)

Contenu du fichier :

#!/usr/bin/python
# -*- coding: UTF-8 -*-
print("Content-type: text/html\n\n")
print("Hello World!")

Ou

#!/usr/bin/python
# -*- coding: UTF-8 -*-
print("Content-type: text/html\n\n")
from random import *

for i in range (1,10):
    print (random())

Pour afficher :

http://physix.fr/cgi-bin/test.cgi

  • python/executer_python_chez_ovh.1580632023.txt.gz
  • Dernière modification : 2020/07/24 00:23
  • (modification externe)