Esempio n. 1
0
def fresh_generator(filename):
    return pie.data_mutator(pie.parse(filename))
#!/usr/bin/env python

import pie, sys

for f in sys.argv[1:]:
    gen = pie.data_mutator(pie.parse(f))
    maximum = 0
    for token in gen:
        if token[pie.TOKEN_TYPE] is "polygon":
            sides = token[pie.FIRST + 1]
            if sides > maximum:
                maximum = sides
    if maximum > 4:
        print f, sides, "sided poly"
Esempio n. 3
0
#!/usr/bin/env python

import pie, sys

for f in sys.argv[1:]:
	gen = pie.bsp_mutator(pie.data_mutator(pie.parse(f)))
	for token in gen:
		if token[pie.TOKEN_TYPE] is "error":
			print f, token[pie.LINENO], token[pie.ERROR]
Esempio n. 4
0
def fresh_generator(filename):
	return pie.data_mutator(pie.parse(filename))