import subprocess

def php(script_path):
    p = subprocess.Popen(['php', script_path], stdout=subprocess.PIPE)
result = p.communicate()[0]
return result
page_html = '<h1>News and Updates</h1>'
news_script_output = php('news-generator.php')
print(page_html + news_script_output)
Как включить PHP-скрипт в Python?