[SciPy-user] optimize.fmin_tnc - how to catch its output?
Jan Groenewald
jan at aims.ac.za
Mon Jul 21 23:10:54 EDT 2008
Hi Stéfan,
On Tue, Jul 22, 2008 at 12:56 AM, Stéfan van der Walt <stefan at sun.ac.za> wrote:
> python optimise_script.py 2>&1 | cat > out.txt
http://en.wikipedia.org/wiki/Cat_(Unix)#cat_and_UUOC ?
You don' t need the "| cat".
Never mind the pipecat, there is a shortcut for "2>&1 >" and it is "&>".
> Otherwise, the C-code will have to be modified. Does anybody know
> what the best way is to write to sys.stdout and sys.stderr (not printf
> that goes to /dev/stdout) via the Python C API?
I don't know but found this interesting so googled it:
http://www.ragestorm.net/tutorial?id=21#9
or
http://docs.python.org/lib/module-subprocess.html
regards,
Jan
More information about the SciPy-User
mailing list