Skip to content

Instantly share code, notes, and snippets.

@tluyben
tluyben / py2php.py
Last active September 10, 2015 07:16 — forked from reusee/py2php.py
Python to php translator, compile python script to php
import ast
from cStringIO import StringIO
import sys
INFSTR = '1e308'
def interleave(inter, f, seq):
seq = iter(seq)
try:
f(next(seq))