def nice_exit(ret=0):
 if (ret and is_bare_console()):
  print
  print 'Press [Enter] to close this window.'
  raw_input()
 sys.exit(ret)

def nice_exit ( ret = 0 ) : if ( ret and is_bare_console ( ) ) : print print 'Press [Enter] to close this window.' raw_input ( ) sys . exit ( ret )
drop-in replacement for sys .