def app_restart(cls):
        '''
        Restart a frozen esky app
        Can also restart if the program is being run as a script
        passes restarted as an argument to the restarted app
        '''
        logging.debug('In restarter')
        executable = sys.executable.split(os.sep)[-1]
        if os.name == 'nt':
            logging.info('executable is is %s' % executable)
            # restart works here when testing compiled version only
            if executable != 'python.exe':
                boot_strap_path = cls.esky_bootstrap_path()
                bootstrap_file = os.path.join(boot_strap_path, executable)
                logging.info('Bootstrap file for restart: %s' % bootstrap_file)

                subprocess.Popen(
                    [os.path.join(bootstrap_file, bootstrap_file), 'restarted'])
def app_restart ( cls ) : logging . debug ( 'In restarter' ) executable = sys . executable . split ( os . sep ) [ - 1 ] if os . name == 'nt' : logging . info ( 'executable is is %s' % executable ) if executable != 'python.exe' : boot_strap_path = cls . esky_bootstrap_path ( ) bootstrap_file = os . path . join ( boot_strap_path , executable ) logging . info ( 'Bootstrap file for restart: %s' % bootstrap_file ) subprocess . Popen ( [ os . path . join ( bootstrap_file , bootstrap_file ) , 'restarted' ] )
Restart a frozen esky app
        Can also restart if the program is being run as a script
        passes restarted as an argument to the restarted app