From: Gilles DAVID Date: Fri, 31 Mar 2017 09:58:13 +0000 (+0200) Subject: [PY3] Remove obsolete imports X-Git-Tag: V9_0_0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5ab273a3f6d8b27c9035c972286b0bf40a3550b2;p=tools%2Fyacsgen.git [PY3] Remove obsolete imports --- diff --git a/module_generator/pycompo.py b/module_generator/pycompo.py index 1879666..74218d2 100644 --- a/module_generator/pycompo.py +++ b/module_generator/pycompo.py @@ -24,15 +24,14 @@ import os from module_generator.gener import Component, Invalid from module_generator.pyth_tmpl import pyinitService, pyService, pyCompoEXE, pyCompo, cmake_src_compo_py import textwrap -from string import split,rstrip,join def indent(text, prefix=' '): """Indent text by prepending a given prefix to each line.""" if not text: return '' - lines = split(text, '\n') + lines = text.split('\n') lines = list(map(lambda line, prefix=prefix: prefix + line, lines)) - if lines: lines[-1] = rstrip(lines[-1]) - return join(lines, '\n') + if lines: lines[-1] = lines[-1].rstrip() + return '\n'.join(lines) class PYComponent(Component): """