16 |
# write to the Free Software Foundation, Inc., 59 Temple Place |
# write to the Free Software Foundation, Inc., 59 Temple Place |
17 |
# - Suite 330, Boston, MA 02111-1307, USA. |
# - Suite 330, Boston, MA 02111-1307, USA. |
18 |
# |
# |
19 |
# Copyright 2002 Free Software Foundation |
# Copyright 2002-2003 Free Software Foundation |
20 |
# |
# |
21 |
# FILE: |
# FILE: |
22 |
# transforms/file/stdio.py |
# transforms/file/stdio.py |
29 |
|
|
30 |
import sys |
import sys |
31 |
|
|
32 |
from gnue.reports.GROutputAdapter import DestinationAdapter as Base |
from gnue.reports.base.GROutputAdapter import DestinationAdapter as Base |
33 |
|
|
34 |
class DestinationAdapter(Base): |
class DestinationAdapter(Base): |
35 |
|
|
46 |
|
|
47 |
# Make any output from the program go to stderr instead |
# Make any output from the program go to stderr instead |
48 |
sys.stdout = sys.stderr |
sys.stdout = sys.stderr |
49 |
|
|
50 |
return self.input |
return self.input |
51 |
|
|
52 |
# |
# |
54 |
# transform adapter |
# transform adapter |
55 |
# |
# |
56 |
def getOutputFile(self): |
def getOutputFile(self): |
57 |
self.input, self.tempfile = self.createTempFile() |
input, self.tempfile = self.createTempFile() |
58 |
self.input.close() |
input.close() |
59 |
|
|
60 |
|
# Make any output from the program go to stderr instead |
61 |
|
self.input = sys.stdout |
62 |
|
sys.stdout = sys.stderr |
63 |
|
|
64 |
return self.tempfile |
return self.tempfile |
65 |
|
|
66 |
# |
# |