hs.py = run an exec and pipe back the result as a member of a list

2

'2+

did this for hascillator01 that i ghc-ed from hascillator01.hs into ./

import popen2

wave = []
for frame in range(890, 1010):
wave.append(int(popen2.Popen3('./hascillator01 ' +
str(frame)).fromchild.readline()))
print wave

hascillator01 takes int and returns another int
so yes this became a [ints] and that is what i expected
but also yes it is so slow
any cooler way to do it?
now am reading the suprocess's doc .. but a bit hard to get it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top