lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Apologies in advance, this must be a FAQ somewhere :-(

I want to do what in Python is
    import subprocess
    pipe = subprocess.Popen(['aplaymidi','-'], stdin=subprocess.PIPE)
or what in Perl is
    open(P, '| aplaymidi -');  print P $my_midi;  close P;

I can't see how to get to os.execute's stdin; or if I open a
tmpfile with tmpfile() I get a filehandle but can't see how
to find the filename so I can later
    os.execute('aplaymidi '..tmpfilename)

It feels like a stupid question, so apologies again...
Regards,  Peter Billam      (03) 6278 9410
"Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
 ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2