#!/usr/bin/env python -u
Adrian Eyre
a.eyre at optichrome.com
Mon Apr 19 04:27:14 EDT 1999
> (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
--------------------------------------------
More information about the Python-list
mailing list