i want to execute a python script on my server which execute and return a list of data. How can i execute python script by php and return back the python list data in php code.
for example. python_file.py
import os
def list_data():
"""
this function will return a content list of path directory
:return:
"""
path = 'C:/'
my_list = os.listdir(path)
return my_list
print list_data()