> I'm trying to call up flac's encoder from a Python program. I believe I > should be doing it ok, but I get completely different results when doing > it by hand and from the python script. Here's the command line: > > $/usr/bin/flac --endian=little --channels=2 --sign=signed --bps=16 > --sample-rate=44100 --delete-input-file /var/data/myfile.raw > > This works fine when done by hand, and flac encodes the file. > > Inside the script, I do a fork() and then, on the child, I do:
You should probably try using the popen() family of functions instead, or if on Python 2.4 the new commands(?) module. While your approach can be made to work it needs a fair amount of tweaking of environments and the like. popen otr commands should simplify life significantly. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor