...

View Full Version : python in php



o0O0o.o0O0o
01-31-2008, 04:35 AM
hi friends ,


i want to know is it possible to call python in php

e,g

i have functions made in python


is it possible to call python function in php page to and then diesplay the result through php

kokjj87
05-17-2009, 06:09 AM
what about this?
http://www.csh.rit.edu/~jon/projects/pip/

oesxyl
05-17-2009, 07:30 AM
test.py:


a = ['Mary','had','a','little','lamb'];
for i in range(len(a)):
print i, a[i]



test.php:


<?php
passthru('python ' . $_SERVER['DOCUMENT_ROOT'] . 'test.py');
?>


or:

http://www.python.org/doc/essays/ppt/sd99east/index.htm

best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum