Issue 55 in fabricate: How to redirect/capture run output to a file ?

17 views
Skip to first unread message

fabr...@googlecode.com

unread,
Jan 5, 2014, 3:40:31 PM1/5/14
to fabrica...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 55 by satis...@gmail.com: How to redirect/capture run output to a
file ?
http://code.google.com/p/fabricate/issues/detail?id=55

I have a linker command which outputs map data to stdout.
I tried using "> output.map" which failed because it is passed as an
argument to the command itself and not to the shell.

In the original makefile, i have the following to capture the map file:
link options -o output objects > output.map

Is there a way to capture the stdout and let stderr to go to screen ?

Probably tee.exe may help to redirect the output to a file but the issue is
to redirect output of a command to its own output file.

version: 1.26
OS: Windows7 64-bit


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Berwyn Hoyt

unread,
Jan 5, 2014, 7:50:55 PM1/5/14
to fabrica...@googlegroups.com
Does the following do it?
  fabricate.run(parameters, shell=True)


You received this message because you are subscribed to the Google Groups "fabricate users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabricate-users+unsubscribe@googlegroups.com.
To post to this group, send email to fabricate-users@googlegroups.com.
Visit this group at http://groups.google.com/group/fabricate-users.
For more options, visit https://groups.google.com/groups/opt_out.



--
Check out our winning design in this Bronchoscope Simulator for AirwaySkills ( TVNZ coverage or radio ).

Berwyn Hoyt, Electronic Solutions & Business  --  Brush Technology
Ph: +64 3 741 1204     Mobile: +64 21 045 7830
Web: brush.co.nz

fabr...@googlecode.com

unread,
Aug 11, 2014, 10:34:16 AM8/11/14
to fabrica...@googlegroups.com

Comment #1 on issue 55 by wer...@beroux.com: How to redirect/capture run
bump! I tried `shell(..., stderr=subprocess.PIPE)` but it raises

TypeError: type object got multiple values for keyword argument 'stderr'

May be there is a way to allow this simply? Of course it's possible to
directly use subprocess.

fabr...@googlecode.com

unread,
Aug 11, 2014, 10:35:16 AM8/11/14
to fabrica...@googlegroups.com

Comment #2 on issue 55 by wer...@beroux.com: How to redirect/capture run
And of course one could make it OS-specific, and use shell=True and shell
pipe redirection of stderr to null.

fabr...@googlecode.com

unread,
Aug 11, 2014, 9:47:58 PM8/11/14
to fabrica...@googlegroups.com

Comment #3 on issue 55 by ele...@gmail.com: How to redirect/capture run
Yes, the > re-direct notation is a shell thing, you need to run the command
in the shell for it to work.
Reply all
Reply to author
Forward
0 new messages