Some process in porting to Haiku. Haiku does not have Python 3, only Python 2.6.8, and handles ANSI escapes sequences a bit different despite reporting to be xterm.

Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
Mattias Andrée 2013-01-17 23:53:13 +01:00
parent 8967291e9c
commit 8a6952804f

12
haiku-ise.sh Executable file
View file

@ -0,0 +1,12 @@
#!sh
sed -i 's_#!/usr/bin/env python3_#!python_g' *.py
sed -i 's_print(_printout(_g' *.py
sed -i 's_.buffer._._g' *.py
sed -i 's_\x1b39_\x1b37_g' */*.pony
sed -i 's_\x1b49_\x1b40_g' */*.pony
sed -i 's_;39_;37_g' */*.pony
sed -i 's_;49_;40_g' */*.pony
sed -i 's_sys.std_std_g' *.py
sed -i 's_def printout(_stdout = os.fdopen(1, '\''wb'\'')\x0adef printout(_g' *.py
sed -i 's_def printerr(_stderr = os.fdopen(2, '\''wb'\'')\x0adef printerr(_g' *.py
sed -i 's_stdout = _stdin = os.fdopen(0, '\''rb'\'')\x0astdout = _g' *.py