parameters: (
          message=None,
          savedFileName=None,
          # From here on the order is not documented
          version=None,
          defaultLocation=None,
          dialogOptionFlags=None,
          location=None,
          clientName=None,
          windowTitle=None,
          actionButtonLabel=None,
          cancelButtonLabel=None,
          preferenceKey=None,
          popupExtension=None,
          eventProc=_dummy_Nav_eventproc,
          fileType=None,
          fileCreator=None,
          wanted=None,
          multiple=None)
docstring: Display a dialog asking the user for a filename to save to.
  
      wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
      the other arguments can be looked up in Apple's Navigation Services documentation
docstring_summary: Display a dialog asking the user for a filename to save to.
docstring_tokens: Display a dialog asking the user for a filename to save to .
function: def AskFileForSave(
          message=None,
          savedFileName=None,
          # From here on the order is not documented
          version=None,
          defaultLocation=None,
          dialogOptionFlags=None,
          location=None,
          clientName=None,
          windowTitle=None,
          actionButtonLabel=None,
          cancelButtonLabel=None,
          preferenceKey=None,
          popupExtension=None,
          eventProc=_dummy_Nav_eventproc,
          fileType=None,
          fileCreator=None,
          wanted=None,
          multiple=None):
      """Display a dialog asking the user for a filename to save to.
  
      wanted is the return type wanted: FSSpec, FSRef, unicode or string (default)
      the other arguments can be looked up in Apple's Navigation Services documentation"""
  
  
      default_flags = 0x07
      args, tpwanted = _process_Nav_args(default_flags, version=version,
          defaultLocation=defaultLocation, dialogOptionFlags=dialogOptionFlags,
          location=location,clientName=clientName,windowTitle=windowTitle,
          actionButtonLabel=actionButtonLabel,cancelButtonLabel=cancelButtonLabel,
          savedFileName=savedFileName,message=message,preferenceKey=preferenceKey,
          popupExtension=popupExtension,eventProc=eventProc,fileType=fileType,
          fileCreator=fileCreator,wanted=wanted,multiple=multiple)
      _interact()
      try:
          rr = Nav.NavPutFile(args)
          good = 1
      except Nav.error, arg:
          if arg[0] != -128: # userCancelledErr
              raise Nav.error, arg
          return None
      if not rr.validRecord or not rr.selection:
          return None
      if issubclass(tpwanted, Carbon.File.FSRef):
          raise TypeError, "Cannot pass wanted=FSRef to AskFileForSave"
      if issubclass(tpwanted, Carbon.File.FSSpec):
          return tpwanted(rr.selection[0])
      if issubclass(tpwanted, (str, unicode)):
          # This is gross, and probably incorrect too
          vrefnum, dirid, name = rr.selection[0].as_tuple()
          pardir_fss = Carbon.File.FSSpec((vrefnum, dirid, ''))
          pardir_fsr = Carbon.File.FSRef(pardir_fss)
          pardir_path = pardir_fsr.FSRefMakePath()  # This is utf-8
          name_utf8 = unicode(name, 'macroman').encode('utf8')
          fullpath = os.path.join(pardir_path, name_utf8)
          if issubclass(tpwanted, unicode):
              return unicode(fullpath, 'utf8')
          return tpwanted(fullpath)
      raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted)
function_tokens: def AskFileForSave ( message = None , savedFileName = None , # From here on the order is not documented version = None , defaultLocation = None , dialogOptionFlags = None , location = None , clientName = None , windowTitle = None , actionButtonLabel = None , cancelButtonLabel = None , preferenceKey = None , popupExtension = None , eventProc = _dummy_Nav_eventproc , fileType = None , fileCreator = None , wanted = None , multiple = None ) : default_flags = 0x07 args , tpwanted = _process_Nav_args ( default_flags , version = version , defaultLocation = defaultLocation , dialogOptionFlags = dialogOptionFlags , location = location , clientName = clientName , windowTitle = windowTitle , actionButtonLabel = actionButtonLabel , cancelButtonLabel = cancelButtonLabel , savedFileName = savedFileName , message = message , preferenceKey = preferenceKey , popupExtension = popupExtension , eventProc = eventProc , fileType = fileType , fileCreator = fileCreator , wanted = wanted , multiple = multiple ) _interact ( ) try : rr = Nav . NavPutFile ( args ) good = 1 except Nav . error , arg : if arg [ 0 ] != - 128 : # userCancelledErr raise Nav . error , arg return None if not rr . validRecord or not rr . selection : return None if issubclass ( tpwanted , Carbon . File . FSRef ) : raise TypeError , "Cannot pass wanted=FSRef to AskFileForSave" if issubclass ( tpwanted , Carbon . File . FSSpec ) : return tpwanted ( rr . selection [ 0 ] ) if issubclass ( tpwanted , ( str , unicode ) ) : # This is gross, and probably incorrect too vrefnum , dirid , name = rr . selection [ 0 ] . as_tuple ( ) pardir_fss = Carbon . File . FSSpec ( ( vrefnum , dirid , '' ) ) pardir_fsr = Carbon . File . FSRef ( pardir_fss ) pardir_path = pardir_fsr . FSRefMakePath ( ) # This is utf-8 name_utf8 = unicode ( name , 'macroman' ) . encode ( 'utf8' ) fullpath = os . path . join ( pardir_path , name_utf8 ) if issubclass ( tpwanted , unicode ) : return unicode ( fullpath , 'utf8' ) return tpwanted ( fullpath ) raise TypeError , "Unknown value for argument 'wanted': %s" % repr ( tpwanted )