def system_script_extension(system=None):
 exts = {'windows': '.bat', 'darwin': '.command', 'linux': '.sh'}
 system = (system or platform.system())
 return exts.get(system.lower(), '.sh')

def system_script_extension ( system = None ) : exts = { 'windows' : '.bat' , 'darwin' : '.command' , 'linux' : '.sh' } system = ( system or platform . system ( ) ) return exts . get ( system . lower ( ) , '.sh' )
the extension for the one script that could be considered "the os script" for the given system .