How would I go about expanding my PHP code library with Python code?
<p>I have a rather large API written in PHP that I've worked on for years. Some of the functionality needs to be upgraded to the extent where I should really just rewrite the classes. Since I need to scrap the old code anyway, I was thinking perhaps I could replace the old functionality with Python code.</p>

<p>I came across <a href="http://www.csh.rit.edu/~jon/projects/pip/" rel="nofollow">PiP</a> while searching for answers, and it seems like an <strong>exellent</strong> solution (Since I can actually create Python class instances in PHP and call their methods etc.) but it seems it was abandoned in the Alpha stages for reasons unknown to me.</p>

<p>I suppose the simplest solution would be a CLI one, meaning I could run a python instance from PHP and collect the results. I don't particularly like this solution though, considering the amount of Python code I'd have to write just to handle input from PHP and respond accordingly. Plus it's not very reusable.</p>

<p>I don't know if this is a normal problem, Google certainly don't seem to think so, but what would be the best way of complementing a PHP code library with Python code?</p>
