forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
13
project/raspberry/py/apiutil.py
Executable file
13
project/raspberry/py/apiutil.py
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
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))
|
||||
Loading…
Add table
Add a link
Reference in a new issue