def get_save_dir():
 savepaths = []
 if ('APPDATA' in os.environ):
  savepaths += [os.path.join(os.environ['APPDATA'], '.minecraft', 'saves')]
 if ('HOME' in os.environ):
  savepaths += [os.path.join(os.environ['HOME'], 'Library', 'Application Support', 'minecraft', 'saves')]
  savepaths += [os.path.join(os.environ['HOME'], '.minecraft', 'saves')]
 for path in savepaths:
  if os.path.exists(path):
   return path

def get_save_dir ( ) : savepaths = [ ] if ( 'APPDATA' in os . environ ) : savepaths += [ os . path . join ( os . environ [ 'APPDATA' ] , '.minecraft' , 'saves' ) ] if ( 'HOME' in os . environ ) : savepaths += [ os . path . join ( os . environ [ 'HOME' ] , 'Library' , 'Application Support' , 'minecraft' , 'saves' ) ] savepaths += [ os . path . join ( os . environ [ 'HOME' ] , '.minecraft' , 'saves' ) ] for path in savepaths : if os . path . exists ( path ) : return path
returns the path to the local saves directory * on windows .