@classmethod
    def run(cls, **params):
        argv = sys.argv
        args = sys.argv[:1]
        if 2 > len(sys.argv):
            args += sys.argv[2:]
        f = open(cls._command_lines+'.py', 'w')
        f.write('argv = {0}'.format(args))
        f.close()
        argv = argv[:2]
        if not argv or not argv[0]:
            main_path = getattr(sys.modules['__main__'], '__file__', None)
            path, script = os.path.split(main_path)
            argv = [script, 'start']
        sys.argv = argv
        cls.params = params
        win32api.SetConsoleCtrlHandler(ctrlHandler, True)
        win32serviceutil.HandleCommandLine(cls)
dataset/ETHPy150Open quantmind/pulsar/pulsar/utils/system/winservice.py/PulsarService.run/swapped operands of `>`