37 lines
978 B
Plaintext
37 lines
978 B
Plaintext
From: a.eyre at optichrome.com (Adrian Eyre)
|
|
Date: Mon, 19 Apr 1999 08:27:14 GMT
|
|
Subject: #!/usr/bin/env python -u
|
|
In-Reply-To: <37175574.25EBDDBE@stuco.uni-klu.ac.at>
|
|
References: <37175574.25EBDDBE@stuco.uni-klu.ac.at>
|
|
Message-ID: <000501be8a3e$6e7269f0$2bcbd9c2@optichrome.com>
|
|
X-UID: 317
|
|
|
|
> (I need the -u for unbuffered output) but when creating RPM files the
|
|
> final rpms needs /usr/local/bin/python.
|
|
|
|
How about a hack like this:
|
|
|
|
import sys
|
|
|
|
class UnbufferedStdout:
|
|
def __init__(self, stdout):
|
|
self.stdout = stdout
|
|
def write(self, arg):
|
|
self.stdout.write(arg)
|
|
self.stdout.flush()
|
|
|
|
sys.stdout = UnbufferedStdout(sys.stdout)
|
|
|
|
--------------------------------------------
|
|
Adrian Eyre <mailto:a.eyre at optichrome.com>
|
|
Optichrome Computer Solutions Ltd
|
|
Maybury Road, Woking, Surrey, GU21 5HX, UK
|
|
Tel: +44 1483 740 233 Fax: +44 1483 760 644
|
|
http://www.optichrome.com
|
|
--------------------------------------------
|
|
|
|
|
|
|
|
|
|
|