Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > Python

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-31-2008, 03:35 AM   PM User | #1
o0O0o.o0O0o
Senior Coder

 
o0O0o.o0O0o's Avatar
 
Join Date: Jan 2008
Location: C:\Windows\System32
Posts: 1,018
Thanks: 19
Thanked 9 Times in 9 Posts
o0O0o.o0O0o is infamous around these parts
python in php

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
o0O0o.o0O0o is offline   Reply With Quote
Old 05-17-2009, 05:09 AM   PM User | #2
kokjj87
Regular Coder

 
kokjj87's Avatar
 
Join Date: Sep 2008
Location: Singapore
Posts: 279
Thanks: 1
Thanked 55 Times in 54 Posts
kokjj87 is on a distinguished road
what about this?
http://www.csh.rit.edu/~jon/projects/pip/
kokjj87 is offline   Reply With Quote
Old 05-17-2009, 06:30 AM   PM User | #3
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
test.py:
Code:
a = ['Mary','had','a','little','lamb'];
for i in range(len(a)):
    print i, a[i]
test.php:
PHP Code:
<?php
passthru
('python ' $_SERVER['DOCUMENT_ROOT'] . 'test.py');
?>
or:

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

best regards
oesxyl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:50 AM.


Advertisement
Log in to turn off these ads.