def fix_imports(script):
with open(script, '<STR_LIT:r>') as f_script:<EOL><INDENT>lines = f_script.read().splitlines()<EOL><DEDENT>new_lines = []<EOL>for l in lines:<EOL><INDENT>if l.startswith("<STR_LIT>"):<EOL><INDENT>l = "<STR_LIT>" + l<EOL><DEDENT>if "<STR_LIT>" in l:<EOL><INDENT>l = l.replace("<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>new_lines.append(l)<EOL><DEDENT>with open(script, '<STR_LIT:w>') as f_script:<EOL><INDENT>f_script.write("<STR_LIT:\n>".join(new_lines))<EOL><DEDENT>
Replace "from PyQt5 import" by "from pyqode.qt import".

:param script: script path