From a3ec4fd557958f906729ef221cf552b0898cb634 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Mon, 10 Jan 2005 09:31:34 +0000 Subject: changed php swig patch script to use stdin and stdout --- php/patch_swig_output.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'php') diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py index c8d82e2d..2c15c7eb 100755 --- a/php/patch_swig_output.py +++ b/php/patch_swig_output.py @@ -84,9 +84,9 @@ with: } """ -wrapFile = file('lasso_wrap.c') -wrap = wrapFile.read() -wrapFile.close() +import sys + +wrap = sys.stdin.read() i = wrap.find(' {\n swig_type_info *ty = SWIG_TypeDynamicCast(') while i >= 0: @@ -124,6 +124,4 @@ while i >= 0: wrap = '%s%s%s' % (wrap[:i], segment, wrap[j:]) i = wrap.find(' {\n swig_type_info *ty = SWIG_TypeDynamicCast(', i + len(segment)) -wrapFile = file('lasso_wrap_patched.c', 'w') -wrapFile.write(wrap) -wrapFile.close() +print wrap -- cgit