18 lines
394 B
Python
18 lines
394 B
Python
#!/usr/bin/python
|
|
|
|
from subprocess import Popen, PIPE
|
|
from grid import simple_rect_grid
|
|
|
|
def get_qdelaunay_dump(g):
|
|
cmd = 'qdelaunay Qt f'
|
|
p = Popen(cmd.split(), bufsize=1, stdin=PIPE, stdout=PIPE)
|
|
so, se = p.communicate(g.for_qhull())
|
|
for i in so.splitlines():
|
|
yield i
|
|
|
|
if __name__ == '__main__':
|
|
g = simple_rect_grid(3,3)
|
|
print g
|
|
for i in get_qdelaunay_dump(g):
|
|
print i
|