Skip to content

Instantly share code, notes, and snippets.

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