Example #1
0
 def __disable_autologin(cls):
     from koapy.compat.pyside2.QtWidgets import QApplication
     from koapy.backend.kiwoom_open_api_plus.core.KiwoomOpenApiPlusQAxWidget import KiwoomOpenApiPlusQAxWidget
     cls.logger.info('Disabling auto login')
     app = QApplication(sys.argv)  # pylint: disable=unused-variable
     control = KiwoomOpenApiPlusQAxWidget()
     module_path = control.GetAPIModulePath()
     autologin_dat = os.path.join(module_path, 'system', 'Autologin.dat')
     if os.path.exists(autologin_dat):
         cls.logger.info('Removing %s', autologin_dat)
         os.remove(autologin_dat)
         cls.logger.info('Disabled auto login')
         return True
     else:
         cls.logger.info('Autologin is already disabled')
         return False
Example #2
0
    def disable_autologin_impl(cls):
        from koapy.backend.kiwoom_open_api_plus.core.KiwoomOpenApiPlusQAxWidget import (
            KiwoomOpenApiPlusQAxWidget, )
        from koapy.compat.pyside2.QtWidgets import QApplication

        cls.logger.info("Disabling auto login")
        app = QApplication(sys.argv)  # pylint: disable=unused-variable
        control = KiwoomOpenApiPlusQAxWidget()
        module_path = control.GetAPIModulePath()
        autologin_dat = os.path.join(module_path, "system", "Autologin.dat")
        if os.path.exists(autologin_dat):
            cls.logger.info("Removing %s", autologin_dat)
            os.remove(autologin_dat)
            cls.logger.info("Disabled auto login")
            return True
        else:
            cls.logger.info("Autologin is already disabled")
            return False