Jump to content

how to execute python files


Darkness Soul

Recommended Posts

Yo,

I need a little help over there.. I wanna to run a python script from a php page.. something like:
[code]/* block code */
switch ( $var )
{
  case 1:
      # run first.py
  case 2:
      # run second.py
}
/* block code */[/code]
This is just an exemple from my idea..

Thanks anyway.

D.Soul
Link to comment
https://forums.phpfreaks.com/topic/14220-how-to-execute-python-files/
Share on other sites

hm, its don't work.. i've tried it this logic:

print '1'
shell_exec
print '3'

the py file is togheter in the same folder, so i use the $result as you said, but, it print '1', and stop printing.. do nothing..

tonight i will try better, now im little busy, but thanks =)

D.Soul

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.