<?php
// Les data à envoyer à Python
if(!empty($_POST['com'])) {
$data = $_POST['com'];
}
$tmp = exec("python test.py $data");
echo $tmp;
?>
<html>
<head><title>test</title></head>
<body>
<h2>Envoi de data vers python :</h2>
<form name="commande" method="post" action="test.php">
Entrez une commande: <input type="text" name="com"/><br/>
<input type="submit" name="valider" value="OK"/>
</form>
</body>
</html>