From 1ca5b6d9500ee081e5797138e6194a06d159a8f0 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 26 Sep 2011 17:06:45 +0200 Subject: ukrepl: fix +space bug the python 'print' is retarded and always adds a space to a given character if newline is suppressed, using sys.stdout.write instead --- crypto/bin/ukrepl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crypto') diff --git a/crypto/bin/ukrepl b/crypto/bin/ukrepl index b3b25db9..2dfaabc4 100755 --- a/crypto/bin/ukrepl +++ b/crypto/bin/ukrepl @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # -*- coding: utf-8 -*- import sys @@ -98,4 +98,7 @@ for line in sys.stdin: else: print "unknown mode %c" % mode helpme() - print char, + try: + sys.stdout.write(char) + except: + sys.stdout.write(char.encode("utf-8")) -- cgit v1.2.3