This repository has been archived on 2026-04-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
original-mcpe-0.6.1/handheld/project/raspberry/py/apiutil.py
2026-04-01 23:13:15 +02:00

14 lines
343 B
Python

import collections
def flatten(l):
for e in l:
if isinstance(e, collections.Iterable) and not isinstance(e, basestring):
for ee in flatten(e): yield ee
else: yield e
def toParameters(l):
return ",".join(map(str, flatten(l)))
def call(name, *l):
return "%s(%s)\n"%(name, toParameters(l))