awais.naseem.1 Posted February 10, 2010 Share Posted February 10, 2010 Hello all, i want a litlle help with my php project, i have to compile a "python" script from a php script and utilize that python's script output. i have to use proc_open() for this purpose but am unable to do it, as far as system() and shell_exec() is concerned, they are fulfilling my requirements.... if proc_open() is able to do this task or it is mend for other purpose, i have to run an external program that has been written in any other language.... please feel free to ask anything waiting for replies Thankyou Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/ Share on other sites More sharing options...
trq Posted February 10, 2010 Share Posted February 10, 2010 please feel free to ask anything You go first. Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010426 Share on other sites More sharing options...
awais.naseem.1 Posted February 10, 2010 Author Share Posted February 10, 2010 What?? i dint get you??? i am sorry Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010435 Share on other sites More sharing options...
trq Posted February 10, 2010 Share Posted February 10, 2010 You don't seem to have any question in your post. Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010446 Share on other sites More sharing options...
awais.naseem.1 Posted February 10, 2010 Author Share Posted February 10, 2010 Actually i want to ask, how can i compile a python script from proc_open()?? is proc_open() mend for this purpose??? Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010456 Share on other sites More sharing options...
trq Posted February 11, 2010 Share Posted February 11, 2010 Python isn't a compiled language. However, system or shell_exec would generally be sufficient to execute a Python script. Do you need to pipe data in and out of the program? Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010476 Share on other sites More sharing options...
awais.naseem.1 Posted February 11, 2010 Author Share Posted February 11, 2010 sorry i mean run not compile* i have to send a string chracters as input to my python code and that code will generate an output, that should be return .... Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010477 Share on other sites More sharing options...
trq Posted February 11, 2010 Share Posted February 11, 2010 i have to send a string chracters as input to my python code and that code will generate an output, that should be return .... Then it sound like proc_open is what your after. Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010478 Share on other sites More sharing options...
awais.naseem.1 Posted February 11, 2010 Author Share Posted February 11, 2010 but am unable to perform it Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010484 Share on other sites More sharing options...
awais.naseem.1 Posted February 11, 2010 Author Share Posted February 11, 2010 Check this out ... i am gonna attach my php file .. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/191631-proc_open-vs-system/#findComment-1010485 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.