I have a PHP script (news-generator.php) which, when I include it, grabs a bunch of news items and prints them. Right now, I\'m using Python for my website (CGI). When I was usi
import subprocess def php(script_path): p = subprocess.Popen(['php', script_path], stdout=subprocess.PIPE) result = p.communicate()[0] return result # YOUR CODE BELOW: page_html = "News and Updates" news_script_output = php("news-generator.php") print page_html + news_script_output