tee command incompatible with xterm
tee command incompatible with xterm
- Subject: tee command incompatible with xterm
- From: "René J.V. Bertin" <email@hidden>
- Date: Fri, 02 Dec 2011 10:31:40 +0100
- Resent-date: Fri, 02 Dec 2011 10:34:19 +0100
- Resent-from: "René J.V. Bertin" <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
Helo Jean-Baptiste,
I don't see why xterm would be incompatible with a simple utility like tee which probably doesn't do anything fancy with its output at all. If anything, there may be some regression in the way xterm handles the command specification, messing with your redirect/pipe construct.
Some thoughts:
- are you sure that your shell hasn't changed? 2>&1 is sh-style syntax, and there are clones out there which aren't perfect drop-in replacements of sh or bash (I had some disagreements with I think zash lately, on a Debian box).
- why use a tee command from within an xterm given xterm itself can send a copy of all its output to a log file?
- alternatively, do an output redirect inside the python script?
René
On Dec 01, 2011, at 21:06, email@hidden wrote:
> From: Jean-Baptiste Marquette <email@hidden>
> Date: December 01, 2011 11:02:51 CET
> To: email@hidden
> Subject: tee command incompatible with xterm
>
>
> Hi X11 gurus,
>
> In a Python script managing multiple processes running concurrently in xterm's, I use the command:
>
> Command = Xterm + '-geometry ' + '"' + coord[NameProc] + '" -T " Proc' + str(NameProc+1) + ' ' + BaseChamp + Filtre + '" -e " ' + Python + ' ' + DirSrc + 'ScampDistortref.py ' + \
> BaseChamp + ' ' + Filtre + ' 2>&1 | tee ' + DirLog + BaseChamp + Filtre + '.log"'
> Process = sub.Popen([Command], shell=True)
> Process.wait()
>
> with
>
> Python = '/Library/Frameworks/EPD64.framework/Versions/Current/bin/python'
> Xterm = '/usr/X11/bin/xterm '
>
> The called script ScampDistortref.py is supposed to print some information in its associated xterm while running. But all I got are printings from the second level of call, i.e. from routines called by ScampDistortref.py itself.
>
> Everything is fine if I remove the pipe and tee command and keep the 2>&1 redirection only.
>
> I had no such problems with previous versions of Xquartz, I suspect a regression of the 2.7.0 version.
>
> My Mac Pro is under Lion 10.7.2
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden