@staticmethod
    def createPostModuleLoadCode(module):

        full_name = module.getFullName()

        if full_name in ("PyQt4.QtCore", "PyQt5.QtCore"):
            qt_version = int(full_name.split('.')[0][-1])

            code = """\
from PyQt%(qt_version)d.QtCore import QCoreApplication
import os

QCoreApplication.setLibraryPaths(
    [
        os.path.join(
           os.path.dirname(__file__),
           "qt-plugins"
        )
    ]
)
""" % {
                "qt_version" : qt_version
            }

            return code, """\
Setting Qt library path to distribution folder. Need to avoid loading target
system Qt plug-ins, which may be from another Qt version."""

        return None, None
Closes the file.
dataset/ETHPy150Open kayhayen/Nuitka/nuitka/plugins/standard/PySidePyQtPlugin.py/NuitkaPluginPyQtPySidePlugins.createPostModuleLoadCode--crossover with--dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/log_processing.py/FileSystem.close